discretize.tests.setup_mesh#
- discretize.tests.setup_mesh(mesh_type, nC, nDim)[source]#
Generate arbitrary mesh for testing.
For the mesh type, number of cells along each axis and dimension specified, setup_mesh will construct a random mesh that can be used for testing. By design, the domain width is 1 along each axis direction.
- Parameters:
- mesh_type
str
Defines the mesh type. Must be one of {‘uniformTensorMesh’, ‘randomTensorMesh’, ‘uniformCylindricalMesh’, ‘randomCylindricalMesh’, ‘uniformTree’, ‘randomTree’, ‘uniformCurv’, ‘rotateCurv’, ‘sphereCurv’}
- nC
int
Number of cells along each axis. If mesh_type is ‘Tree’, then nC defines the number of base mesh cells and must be a power of 2.
- nDim
int
The dimension of the mesh. Must be 1, 2 or 3.
- mesh_type
- Returns:
discretize.base.BaseMesh
A discretize mesh of class specified by the input argument mesh_type