The grids are cartesian grids, all cells have the same size in all directions. The required parameters are the number of points per side for the grid paralellepiped.
square from a
rectangle from a,b
Grid generation functions are:
square(i)
rectangle(i, j)
cube(i)
parallelepiped(i, j, k)
Each function returns a numpy [1] array with point coordinates, the whole is a cartesian grid (or mesh). Mesh dimensions are (3,i,j,k), the first dim is x,y,z, then each side of the paralellepiped is i,j and k. Any returned mesh has such a shape
The table hereafter summerize the function results w.r.t. parameters: les dimensions obtenues:
mesh | params | i | j | k |
---|---|---|---|---|
square | a | a | a | 1 |
rectangle | a,b | a | b | 1 |
cube | a | a | a | a |
parallelepiped | a,b,c | a | b | c |
[1] | see http://www.numpy.org |
Cython interface to fortran `gen3d`
If one dim is 0 or 1 it fails, ZERO_DIM is returned.
Creates `(3,i,i,i)` mesh
see parallelepiped()
Main function for mesh generation.
Functions square(), rectangle(), cube() use this function with specific `(i,j,k)`.
Creates `(3,i,j,1)` mesh
see parallelepiped()
Creates `(3,i,i,1)` mesh
see parallelepiped()