Peridynamics.jl

Documentation for Peridynamics.jl

Functions

Peridynamics.Discretization.create_gridFunction
create_grid(bounds[, steps])

Create a Cartesian grid by discretizing the line segment, rectangle, or box defined by bounds in increments of steps. If steps is not defined, a default step size of 1.0 will be used in all directions.

Arguments

  • bounds::Array{<:Number}: Array that defines the min/max values of a line segment (1D), rectangle (2D), or box (3D) that the grid will be placed in. The first row of the array defines the minimum values, the second row defines the maximum values.
  • steps::Array{Union{AbstractFloat, Integer}}: Array that defines how many steps in each direction. If the array values in steps are of type <:Integer integers then those values define how many points are used in each direction. If the array values in steps are of type <:AbstractFloat numbers then those values define the step size in each direction.

Examples

julia> create_grid([0; 2], [2])
2-element Array{Float64,1}:
 0.0
 2.0
julia> create_grid([0 0; 2 2], [2.0 1.0])
6×2 Array{Float64,2}:
 0.0  0.0
 0.0  1.0
 0.0  2.0
 2.0  0.0
 2.0  1.0
 2.0  2.0
julia> create_grid([0 0 0; 2 2 2], [2 2 2])
8×3 Array{Float64,2}:
 0.0  0.0  0.0
 0.0  0.0  2.0
 0.0  2.0  0.0
 0.0  2.0  2.0
 2.0  0.0  0.0
 2.0  0.0  2.0
 2.0  2.0  0.0
 2.0  2.0  2.0
source

Index