# README
Gosl. gm/msh. Mesh generation and Delaunay triangulation
Definitions
Quadrilaterals and Hexahedra
2D:
Vertices Edges
y
| 3 6 2 2
+--x @-----@-----@ +-----------+
| | | |
| | | |
7 @ @ 5 3| |1
| | | |
| | | |
@-----@-----@ +-----------+
0 4 1 0
3D:
Vertices Faces
z
| 4 15 7
,+--y @-------@--------@ +----------------+
x' ,'| ,'| ,'| ,'|
12 @' | 14 ,' | ,' | ___ ,' |
,' |16 ,@ |19 ,' |,'5,' [0],' |
5 ,' @ 6 ,' @ ,' |~~~ ,' |
@'=======@=======@' | +'===============+' ,'| |
| 13 | | | | ,'| | | |3| |
| | | 11 | | |2| | | |,' |
17 | 0 @- - - | @- - - -@ | |,' +- - - | +- - - -+
@ ,' @ ,' 3 | ,' | ,'
| 8 @' 18 | ,' | ,' [1] ___| ,'
| ,' | ,@ 10 | ,' ,'4,'| ,'
| ,' | ,' | ,' ~~~ | ,'
@-------@--------@' +----------------+'
1 9 2
3D:
Seams (aka Edges)
z
| 7
,+--y +----------------+
x' ,'| ,'|
4 ,' |8 6,' |
,' | ,' |
,' | 5 ,' |11
+'===============+' |
| | | |
| | | 3 |
| .- - - | - - - -+
9| ,' | ,'
| 0,' |10 ,'
| ,' | ,' 2
| ,' | ,'
+----------------+'
1
Triangles and Tetrahedra
2D:
Nodes Edges
y 2
| @ @
+--x / \ / \
5 / \ 4 / \
@ @ 2 / \ 1
/ \ / \
/ \ / \
@-----@-----@ @-----------@
0 3 1 0
3D: Nodes Faces
z
| | |
,+--y 3 +
x' /|`. /|`.
|| `, || `,
/ | ', / | ',
| | \ | | \
/ | `. / | `.
| | `, | | `,
/ 7 9 / | ',
| | \ | | \
/ | `. / | 0 `.
| | ', | | ',
8 | \ / 1 | \
| 0 ,,_ `. | + ,,_ `.
| / ``'-., 6 `. | / ``'-.,,. `.
| / `''-.,,_ ', | / ``''-.,,_ ',
| / ``'2 ,, | / \3\ ``'+ ,,
| ' ,.-`` | ,' ,.-``
| 4 _,-'` | / _,-'`
' / ,.'` ' / 2 ,.'`
| / _ 5 ` | / _.''`
'/ ,-'` '/ ,-'`
|/ ,.-`` |/ ,.-``
/ _,-`` / _,-``
1 '` +.'`
3D:
Seams (aka edges)
|
+
/|`.
|| `,
/ | ',
| | \
/ | `.
| | `,5
/ |3 ',
| | \
/ | `.
4 | | ',
/ | \
| +.,,_ `.
| / ``'-.,,. `.
| / 2 ``''-.,,_ ',
| / ``'+ ,,
| ,' ,.-``
| / 0 _,-'`
' / ,.'`
| / _.''`
'/ ,-'` 1
|/ ,.-``
/ _,-``
+.'`
API
# Functions
FuncHex20 calculates the shape functions (S) and derivatives of shape functions (dSdR) of hex20 elements at {r,s,t} natural coordinates.
FuncHex8 calculates the shape functions (S) and derivatives of shape functions (dSdR) of hex8 elements at {r,s,t} natural coordinates.
FuncLin2 calculates the shape functions (S) and derivatives of shape functions (dSdR) of lin2 elements at {r,s,t} natural coordinates.
FuncLin3 calculates the shape functions (S) and derivatives of shape functions (dSdR) of lin3 elements at {r,s,t} natural coordinates.
FuncLin4 calculates the shape functions (S) and derivatives of shape functions (dSdR) of lin4 elements at {r,s,t} natural coordinates.
FuncLin5 calculates the shape functions (S) and derivatives of shape functions (dSdR) of lin5 elements at {r,s,t} natural coordinates.
FuncQua12 calculates the shape functions (S) and derivatives of shape functions (dSdR) of qua12 (serendipity) elements at {r,s,t} natural coordinates.
FuncQua16 calculates the shape functions (S) and derivatives of shape functions (dSdR) of qua16 elements at {r,s,t} natural coordinates.
FuncQua17 calculates the shape functions (S) and derivatives of shape functions (dSdR) of qua17 (serendipity) elements at {r,s,t} natural coordinates.
FuncQua4 calculates the shape functions (S) and derivatives of shape functions (dSdR) of qua4 elements at {r,s,t} natural coordinates.
FuncQua8 calculates the shape functions (S) and derivatives of shape functions (dSdR) of qua8 (serendipity) elements at {r,s,t} natural coordinates.
FuncQua9 calculates the shape functions (S) and derivatives of shape functions (dSdR) of qua9 elements at {r,s,t} natural coordinates.
FuncTet10 calculates the shape functions (S) and derivatives of shape functions (dSdR) of tet10 elements at {r,s,t} natural coordinates.
FuncTet4 calculates the shape functions (S) and derivatives of shape functions (dSdR) of tet4 elements at {r,s,t} natural coordinates.
FuncTri10 calculates the shape functions (S) and derivatives of shape functions (dSdR) of tri10 elements at {r,s,t} natural coordinates.
FuncTri15 calculates the shape functions (S) and derivatives of shape functions (dSdR) of tri15 elements at {r,s,t} natural coordinates.
FuncTri3 calculates the shape functions (S) and derivatives of shape functions (dSdR) of tri3 elements at {r,s,t} natural coordinates.
FuncTri6 calculates the shape functions (S) and derivatives of shape functions (dSdR) of tri6 elements at {r,s,t} natural coordinates.
GenQuadRegion generates 2D region made of quads
ctype -- one of Type{Qua4,Qua8,Qua9,Qua12,Qua16,Qua17} ndivR -- number of divisions (cells) along r (e.g.
GenQuadRegionHL generates 2D region made of quads (high-level version of GenQuadRegion) NOTE: see GenQuadRegion for more details.
GenRing2d generates mesh of quads representing a 2D ring ctype -- one of Type{Qua4,Qua8,Qua9,Qua12,Qua16,Qua17} ndivR -- number of divisions along radius ndivA -- number of divisions along alpha r -- minimum radius R -- maximum radius alpha -- maximum alpha NOTE: a circular region is created if maxA=2⋅π.
IntPointsFindSet finds set of integration points by cell kind and set name.
NewIntegrator returns a new object to integrate over polyhedra/polygons (cells) ctype -- index of cell type; e.g.
NewMesh creates mesh from json string.
NewMeshIntegrator returns a new MeshIntegrator.
QuadPointsGaussLegendre generate quadrature points for Gauss-Legendre integration npts -- is the total number of points; e.g.
QuadPointsWilson5 generates 5 integration points according to Wilson's Appendix G-7 formulae w0input -- if w0input > 0, use this value instead of default w0=8/3 (corner) p4stable -- if true, use w0=0.004 and wa=0.999 to mimic 4-point rule.
QuadPointsWilson8 generates 8 integration points according to Wilson's Appendix G-7 formulae wbinput -- if wbinput > 0, use this value instead of default wb=40/49.
QuadPointsWilson9 computes the 9-points for hexahedra according to Wilson's Appendix G-7 formulae w0input -- if w0input > 0, use this value instead of default w0=16/3 (corner) p8stable -- if true, use w0=0.008 and wa=0.999 to mimic 8-point rule.
Read reads mesh and call CheckAndCalcDerivedVars.
# Constants
"hex" cell kind.
"lin" cell kind.
max number of kinds.
"qua" cell kind.
"tet" cell kind.
"tri" cell kind.
Hex20 cell type index.
Hex8 cell type index.
Lin2 cell type index.
Lin3 cell type index.
Lin4 cell type index.
Lin5 cell type index.
max number of types.
Qua12 cell type index.
Qua16 cell type index.
Qua17 cell type index.
Qua4 cell type index.
Qua8 cell type index.
Qua9 cell type index.
Tet10 cell type index.
Tet4 cell type index.
Tri10 cell type index.
Tri15 cell type index.
Tri3 cell type index.
Tri6 cell type index.
# Variables
DefaultIntPoints holds the default integration points for all cell types It maps [cellTypeIndex] => [npts][4] where 4 means r,s,t,w NOTE: the highest number of integration points is selected, thus the default number may not be optimal.
EdgeLocalVerts holds the local indices of vertices on edges of shape [TypeNumMax][nedges][nverts].
EdgeLocalVertsD holds the local indices (for drawing) of vertices on edges of shape [TypeNumMax][nedges][nverts].
FaceLocalVerts holds the local indices of vertices on faces of shape [TypeNumMax][nfaces][nverts].
FaceLocalVertsD holds the local indices (for drawing) of vertices on faces of shape [TypeNumMax][nfaces][nverts].
Functions holds functions to compute shape functions and derivatives [TypeNumMax].
GeomNdim holds the geometry number of space dimensions [TypeNumMax].
IntPoints holds integration points for all kinds of cells: lin,qua,hex,tri,tet It maps [cellKind] => [options][npts][4] where 4 means r,s,t,w.
NatCoords holds the natural coordinates of vertices on shape [TypeNumMax][nverts][gndim].
NumVerts holds the number of vertices on shape [TypeNumMax].
TypeIndexToKey converts type index (e.g.
TypeIndexToKind converts type index (e.g.
TypeKeyToIndex converts type key (e.g.
# Structs
BoundaryData holds ID of edge or face and pointer to Cell at boundary (edge or face).
Cell holds cell data (in e.g.
Edge holds the vertices and cells attached to an edge.
EdgeKey holds 3 sorted numbers to identify an edge.
Integrator implements methods to perform numerical integration over a polyhedron/polygon.
Mesh defines mesh data.
MeshIntegrator implements methods to perform numerical integration over a mesh.
TagMaps holds data for finding information using on tags.
Vertex holds vertex data (e.g.
# Type aliases
BoundaryDataSet defines a set of BoundaryData.
CellSet defines a set of cells.
EdgesMap is a map of edges.
ShapeFunction computes the shape function and derivatives.
VertexSet defines a set of vertices.