Data structures¶
In mmg, several data structures are defined in order to represent and manipulate different entities such as tetrahedra, triangles, or meshes.
Mesh¶
The main data structure that is used throughout mmg is the mesh structure MMG5_Mesh
.
This structure contains the following fields:
-
struct MMG5_Mesh¶
-
size_t memMax¶
Maximum memory available
-
size_t memCur¶
Current memory used
-
double gap¶
Gap for table reallocation
-
int ver¶
Version of the mesh file
-
int dim¶
Dimension of the mesh
-
int type¶
Type of the mesh
-
MMG5_int npi¶
Number of ??
-
MMG5_int nti¶
Number of ??
-
MMG5_int nai¶
Number of ??
-
MMG5_int nei¶
Number of ??
-
MMG5_int np¶
Number of ??
-
MMG5_int na¶
Number of ??
-
MMG5_int nt¶
Number of ??
-
MMG5_int ne¶
Number of ??
-
MMG5_int npmax¶
Number of ??
-
MMG5_int namax¶
Number of ??
-
MMG5_int ntmax¶
Number of ??
-
MMG5_int nemax¶
Number of ??
-
MMG5_int xpmax¶
Number of ??
-
MMG5_int xtmax¶
Number of ??
-
MMG5_int nquad¶
number of quadrangles
-
MMG5_int nprism¶
number of prisms
-
int nsols¶
number of solutions (metric excluded) in the solution file (lower than a NSOLS_MAX)
-
MMG5_int nc1¶
number of ??
-
MMG5_int base¶
Used with a flag to know if an entity has been treated
-
MMG5_int mark¶
Flag for delaunay (to know if an entity has been treated)
-
MMG5_int xp¶
Number of surface points
-
MMG5_int xt¶
Number of triangles/tetrahedra
-
MMG5_int xpr¶
Number of prisms
-
MMG5_int npnil¶
Index of first unused point
-
MMG5_int nenil¶
Index of first unused element
-
MMG5_int nanil¶
Index of first unused edge (2D only)
-
MMG5_int *adja¶
- !< Table of tetrahedron adjacency: if
\f\(adja[4*(i-1)+1+j]=4*k+l\f\) then the \f\(i^{th}\f\) and \f\(k^th\f\) tetrahedra are adjacent and share their faces \a j and \a l (resp.)
-
MMG5_int *adjt¶
- Table of triangles adjacency: if
\f\(adjt[3*(i-1)+1+j]=3*k+l\f\) then the \f\(i^{th}\f\) and \f\(k^th\f\) triangles are adjacent and share their edges \a j and \a l (resp.)
-
MMG5_int *adjapr¶
- Table of prisms adjacency: if
\f\(adjapr[5*(i-1)+1+j]=5*k+l\f\) then the \f\(i^{th}\f\) and \f\(k^th\f\) prism are adjacent and share their faces \a j and \a l (resp.)
-
MMG5_int *adjq¶
- Table of quadrangles adjacency: if
\f\(adjq[4*(i-1)+1+j]=4*k+l\f\) then the \f\(i^{th}\f\) and \f\(k^th\f\) quadrilaterals are adjacent and share their edges \a j and \a l (resp.)
-
int *ipar¶
Store indices of the local parameters
-
MMG5_pPoint Point¶
Pointer toward the
MMG5_Point
structure
-
MMG5_pxPoint xPoint¶
Pointer toward the
MMG5_Point
structure
-
MMG5_pTetra tetra¶
Pointer toward the
MMG5_Point
structure
-
MMG5_pxTetra xtetra¶
Pointer toward the
MMG5_Point
structure
-
MMG5_pPrism prism¶
Pointer toward the
MMG5_Point
structure
-
MMG5_pxPrism xprism¶
Pointer toward the
MMG5_Point
structure
-
MMG5_pTria tria¶
Pointer toward the
MMG5_Point
structure
-
MMG5_pQuad quadra¶
Pointer toward the
MMG5_Point
structure
-
MMG5_pEdge edge¶
Pointer toward the
MMG5_Point
structure
-
MMG5_HGeom htab¶
MMG5_Point
structure
-
MMG5_Info info¶
MMG5_Point
structure
-
char *namein¶
Input mesh name
-
char *nameout¶
Output mesh name
-
size_t memMax¶
The MMG5_Mesh
structure contains arrays to all geometric entities used to represent the mesh.
Each geometric entity has its own structure.
Tetrahedra are represented using the MMG5_Tetra structure:
-
struct MMG5_Tetra¶
-
double qual¶
Quality of the element
-
MMG5_int v[4]¶
Vertices of the tetrahedron
-
MMG5_int ref¶
Reference of the tetrahedron
-
MMG5_int base¶
Description
-
MMG5_int mark¶
Used for delaunay
-
MMG5_int xt¶
- Index of the surface ref MMG5_xTetra associated to the
tetrahedron (only for tetrahedra that are adjacent to surfaces)
-
MMG5_int flag¶
flag
-
uint16 tag¶
tag
-
double qual¶
The structure xtetra
¶
The mesh contains certain tetrahedra that bear particular information, notably because one or several of their faces pertain to the surface part of the mesh.
If pxt
is of type pxtetra
For \(i=0,\ldots,3\),
pxt->ftag[i]
is the tag of the \(i^{\text{th}}\) face of the tetrahedron.For \(i=0,\ldots,3\),
pxt->ref[i]
is the reference of the \(i^{\text{th}}\) face of the tetrahedron.