regular_cube_mesh
regular_cube_mesh(nx, ny=None, nz=None, type='rotationally-symmetric')
Tetrahedral volume mesh of a cube
Generates a regular tetrahedral mesh of a one by one by one cube by dividing each grid cube into 6 or 5 tetrahedra.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
nx |
int
|
number of vertices on the x-axis |
required |
ny |
int, optional (default None)
|
number of vertices on the y-axis, default nx |
None
|
nz |
int, optional (default None)
|
number of vertices on the y-axis, default ny |
None
|
type |
str, optional (default 'rotationally-symmetric')
|
the specific cube division scheme: 'five' for a division of each cube into 5 tets 'rotationally-symmetric' (default), 'reflectionally-symmetric' or 'hex' |
'rotationally-symmetric'
|
Returns:
Name | Type | Description |
---|---|---|
V |
(n,d) numpy array
|
vertex list of a tet mesh |
T |
(m,T) numpy int array
|
tet index list of a tet mesh |
See Also
regular_square_mesh.
Examples:
# Generate a 10x10x10 tetrahedral mesh
gs = 10
V, T = gpytoolbox.regular_cube_mesh(gs)
Source code in src/gpytoolbox/regular_cube_mesh.py
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|