mmg3d
|
Go to the source code of this file.
Data Structures | |
struct | _MMG3D_octree_s |
struct | _MMG3D_octree |
Macros | |
#define | _MMG5_RETURN_AND_FREE(mesh, met, disp, val) |
#define | _MMG5_POINT_REALLOC(mesh, sol, ip, wantedGap, law, o, tag, retval) |
#define | _MMG5_TETRA_REALLOC(mesh, jel, wantedGap, law, retval) |
#define | _MMG3D_ALPHAD 20.7846096908265 |
#define | _MMG3D_LLONG 2.5 |
#define | _MMG3D_LSHRT 0.3 |
#define | _MMG3D_LOPTL 1.3 |
#define | _MMG3D_LOPTS 0.6 |
#define | _MMG3D_BADKAL 0.2 |
#define | _MMG3D_NPMAX 1000000 |
#define | _MMG3D_NAMAX 200000 |
#define | _MMG3D_NTMAX 2000000 |
#define | _MMG3D_NEMAX 6000000 |
#define | _MMG3D_SHORTMAX 0x7fff |
Typedefs | |
typedef struct _MMG3D_octree_s | _MMG3D_octree_s |
typedef _MMG3D_octree * | _MMG3D_pOctree |
Variables | |
static const unsigned char | _MMG5_inxt3 [7] = { 1,2,3,0,1,2,3 } |
next vertex of tetra: {1,2,3,0,1,2,3} More... | |
static const unsigned char | _MMG5_iprv3 [7] = { 3,0,1,2,3,0,1 } |
previous vertex of tetra: {3,0,1,2,3,0,1} More... | |
static const unsigned char | _MMG5_idir [4][3] = { {1,2,3}, {0,3,2}, {0,1,3}, {0,2,1} } |
idir[i]: vertices of face opposite to vertex i More... | |
static const char | _MMG5_idirinv [4][4] = {{-1,0,1,2},{0,-1,2,1},{0,1,-1,2},{0,2,1,-1}} |
static const unsigned char | _MMG5_iarf [4][3] = { {5,4,3}, {5,1,2}, {4,2,0}, {3,0,1} } |
iarf[i]: edges of face opposite to vertex i More... | |
static const unsigned char | _MMG5_iarfinv [4][6] = { {-1,-1,-1,2,1,0}, {-1,1,2,-1,-1,0},{2,-1,1,-1,0,-1},{1,2,-1,0,-1,-1}} |
num of the j^th edge in the i^th face More... | |
static const unsigned char | _MMG5_iare [6][2] = { {0,1}, {0,2}, {0,3}, {1,2}, {1,3}, {2,3} } |
vertices of extremities of the edges of the tetra More... | |
static const unsigned char | _MMG5_ifar [6][2] = { {2,3}, {1,3}, {1,2}, {0,3}, {0,2}, {0,1} } |
ifar[i][]: faces sharing the ith edge of the tetra More... | |
static const unsigned char | _MMG5_isar [6][2] = { {2,3}, {3,1}, {1,2}, {0,3}, {2,0}, {0,1} } |
isar[i][]: vertices of extremities of the edge opposite to the ith edge More... | |
static const unsigned char | _MMG5_arpt [4][3] = { {0,1,2}, {0,4,3}, {1,3,5}, {2,5,4} } |
arpt[i]: edges passing through vertex i More... | |
static const unsigned char | _MMG5_idir_pr [5][4] = { {0,1,2,0},{3,5,4,3},{1,4,5,2},{0,2,5,3},{0,3,4,1} } |
idir[i]: vertices of face i for a prism More... | |
static const unsigned char | _MMG5_iarf_pr [5][5] = { {0,1,3,0}, {6,8,7,6}, {3,5,8,4}, {5,1,2,7},{0,4,6,2} } |
iarf[i]: edges of face i for a prism More... | |
static const unsigned char | MMG5_permedge [12][6] |
double(* | _MMG5_lenedg )(MMG5_pMesh, MMG5_pSol, int, MMG5_pTetra) |
double(* | _MMG5_lenedgspl )(MMG5_pMesh, MMG5_pSol, int, MMG5_pTetra) |
double(* | _MMG5_caltet )(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTetra pt) |
double(* | _MMG5_caltri )(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria ptt) |
int(* | _MMG5_defsiz )(MMG5_pMesh, MMG5_pSol) |
int(* | _MMG5_gradsiz )(MMG5_pMesh, MMG5_pSol) |
int(* | _MMG5_intmet )(MMG5_pMesh, MMG5_pSol, int, char, int, double) |
int(* | _MMG5_interp4bar )(MMG5_pMesh, MMG5_pSol, int, int, double *) |
int(* | _MMG5_movintpt )(MMG5_pMesh, MMG5_pSol, _MMG3D_pOctree, int *, int, int) |
int(* | _MMG5_movbdyregpt )(MMG5_pMesh, MMG5_pSol, _MMG3D_pOctree, int *, int, int *, int, int, int) |
int(* | _MMG5_movbdyrefpt )(MMG5_pMesh, MMG5_pSol, _MMG3D_pOctree, int *, int, int *, int, int) |
int(* | _MMG5_movbdynompt )(MMG5_pMesh, MMG5_pSol, _MMG3D_pOctree, int *, int, int *, int, int) |
int(* | _MMG5_movbdyridpt )(MMG5_pMesh, MMG5_pSol, _MMG3D_pOctree, int *, int, int *, int, int) |
int(* | _MMG5_cavity )(MMG5_pMesh, MMG5_pSol, int, int, int *, int, double) |
int(* | _MMG3D_octreein )(MMG5_pMesh, MMG5_pSol, _MMG3D_pOctree, int, double) |
#define _MMG3D_ALPHAD 20.7846096908265 |
#define _MMG3D_BADKAL 0.2 |
#define _MMG3D_LLONG 2.5 |
#define _MMG3D_LOPTL 1.3 |
#define _MMG3D_LOPTS 0.6 |
#define _MMG3D_LSHRT 0.3 |
#define _MMG3D_NAMAX 200000 |
#define _MMG3D_NEMAX 6000000 |
#define _MMG3D_NPMAX 1000000 |
#define _MMG3D_NTMAX 2000000 |
#define _MMG3D_SHORTMAX 0x7fff |
Reallocation of point table and sol table and creation of point ip with coordinates o and tag tag
#define _MMG5_RETURN_AND_FREE | ( | mesh, | |
met, | |||
disp, | |||
val | |||
) |
Free allocated pointers of mesh and sol structure and return value val
Reallocation of tetra table and creation of tetra jel
typedef struct _MMG3D_octree_s _MMG3D_octree_s |
Octree cell.
typedef _MMG3D_octree* _MMG3D_pOctree |
int _MMG3D_addOctree | ( | MMG5_pMesh | mesh, |
_MMG3D_octree * | q, | ||
const int | no | ||
) |
int _MMG3D_addOctreeRec | ( | MMG5_pMesh | mesh, |
_MMG3D_octree_s * | q, | ||
double * | ver, | ||
const int | no, | ||
int | nv | ||
) |
mesh | pointer toward the mesh structure. |
q | pointer toward an octree cell. |
ver | vertex coordinates scaled such that the quadrant is [0;1]x[0;1]x[0;1] |
no | vertex index in the mesh. |
nv | maximum number of points in an octree cell. |
Add vertex in the suitable quadrant of the octree. This function is recursively called until we reach the last one. At each step, the vertex coordinates are scaled such as the quadrant is the [0;1]x[0;1]x[0;1] box.
int _MMG3D_analys | ( | MMG5_pMesh | mesh | ) |
preprocessing stage: mesh analysis
— stage 1: data structures for surface
— stage 2: surface analysis
int _MMG3D_bdryBuild | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure (unused). |
Create the boundary entities of the mesh (triangles and edges).
int _MMG3D_bezierInt | ( | _MMG5_pBezier | pb, |
double | uv[2], | ||
double | o[3], | ||
double | no[3], | ||
double | to[3] | ||
) |
pb | pointer toward the Bezier structure. |
uv | coordinates of the point in the parametric space. |
o | computed coordinates of the point in the real space. |
no | computed normal. |
to | computed tangent. |
Compute o, no and to at in Bezier patch.
int _MMG3D_chk4ridVertices | ( | MMG5_pMesh | mesh, |
MMG5_pTetra | pt | ||
) |
int _MMG3D_coquilFaceFirstLoop | ( | MMG5_pMesh | mesh, |
int | start, | ||
int | na, | ||
int | nb, | ||
char | iface, | ||
char | ia, | ||
int * | list, | ||
int * | ilist, | ||
int * | it1, | ||
int * | it2, | ||
int * | piv, | ||
int * | adj, | ||
char * | hasadja, | ||
int * | nbdy, | ||
int | silent | ||
) |
mesh | pointer toward the mesh structure. |
start | index of the starting tetrahedron. |
na | global index of the 1st extremity of the edge whose shell is computed |
nb | global index of the 2d extremity of the edge whose shell is computed |
iface | index of the face from which we come. |
ia | index of edge whose shell is computed (in tetra). |
list | pointer toward the list of tetra in the shell (to fill). |
ilist | pointer toward the number of tetra in the shell (to fill). |
it1 | pointer toward the index of the 1st boundary face sharing ia |
it2 | pointer toward the index of the 2d boundary face sharing ia (to fill). |
adj | pointer toward the adjacent to treat in the shell (to update) |
hasadja | pointer toward 0 if we don't have adja through iface, 0 otherwise (to fill) |
nbdy | pointer toward the number of boundaries found minus 1 (to update) |
silent | if 1, print error message for more than 2 boundary triangles in the shell |
Travel in the shell of the edge until meeting the first tetra or reaching a tetra without adjacent. Fill it2 and list.
void _MMG3D_coquilFaceSecondLoopInit | ( | MMG5_pMesh | mesh, |
int | piv, | ||
char * | iface, | ||
int * | i, | ||
int * | list, | ||
int * | ilist, | ||
int * | it1, | ||
int * | pradj, | ||
int * | adj | ||
) |
mesh | pointer toward the mesh structure. |
piv | global index of the pivot. |
iface | index of the face from which we come. |
i | index of edge whose shell is computed (in tetra). |
list | pointer toward the list of tetra in the shell (to fill). |
ilist | pointer toward the number of tetra in the shell (to fill). |
it1 | pointer toward the index of the 1st boundary face sharing ia |
pradj | pointer toward the first tetra of the shell (to fill). |
adj | pointer toward the adjacent to treat in the shell (to update) |
Initialize the travel in the shell of the edge in reverse direction than in the coquilFaceFirstLoop function.
int _MMG3D_defsiz_ani | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric stucture. |
Define size at points by intersecting the surfacic metric and the physical metric.
int _MMG3D_defsiz_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
Define isotropic size map at all boundary vertices of the mesh, associated with geometric approx, and prescribe hmax at the internal vertices Field h of Point is used, to store the prescribed size (not inverse, squared,...)
1) Size at internal points
First step: search for local parameters
Second step: set the metric
Set size at points that cannot be reached from the tetra
First step: search for local parameters
Second step: set the metric
Set size at points that cannot be reached from the tetra
2) size at regular surface points
First step: search for local parameters
Second step: set the metric
3) Travel all boundary faces to update size prescription for points on ridges/edges
First step: search for local parameters
Second step: set metric
int _MMG3D_delElt | ( | MMG5_pMesh | mesh, |
int | iel | ||
) |
mesh | pointer toward the mesh |
iel | index of the element to delete |
Delete the element iel
int _MMG3D_delOctree | ( | MMG5_pMesh | mesh, |
_MMG3D_pOctree | q, | ||
const int | no | ||
) |
mesh | pointer toward the mesh structure. |
q | pointer toward the global octree. |
no | reference of the vertex to be deleted. |
Delete the vertex no from the octree structure.
int _MMG3D_delOctreeRec | ( | MMG5_pMesh | mesh, |
_MMG3D_octree_s * | q, | ||
double * | ver, | ||
const int | no, | ||
const int | nv | ||
) |
mesh | pointer toward the mesh structure. |
q | pointer toward an octree cell. |
ver | vertex coordinates scaled such that the quadrant is [0;1]x[0;1]x[0;1] |
no | vertex index in the mesh. |
nv | maximum number of points in an octree cell. |
Delete vertex no from the octree. This function is recursively called until we reach the terminal octree cell containing the vertex no. At each step, the vertex coordinates are scaled such as the quadrant is the [0;1]x[0;1]x[0;1] box.
int _MMG3D_delOctreeVertex | ( | MMG5_pMesh | mesh, |
_MMG3D_octree_s * | q, | ||
int | indNo | ||
) |
q | pointer toward a terminal octree cell (containing vertex) |
no | index of the point to delete from the octree |
Delete the vertex of index no from the terminal octree cell, merge the cells if necessary.
void _MMG3D_delPt | ( | MMG5_pMesh | mesh, |
int | ip | ||
) |
int _MMG3D_dichoto | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int * | vx | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | tetrahedron index. |
vx | pointer toward table of edges to split. |
Find acceptable position for splitting.
int _MMG3D_dichoto1b | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int * | list, | ||
int | ret, | ||
int | ip | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
list | pointer toward the shell of edge. |
ret | double of the number of tetrahedra in the shell. |
ip | new point index. |
Find acceptable position for _MMG5_split1b, passing the shell of considered edge, starting from o point.
int _MMG3D_Free_all_var | ( | va_list | argptr | ) |
argptr | list of the mmg structures that must be deallocated. Each structure must follow one of the MMG5_ARG* preprocessor variable that allow to identify it. |
argptr contains at least a pointer toward a MMG5_pMesh structure (that will contain the mesh and identified by the MMG5_ARG_ppMesh keyword)
To call the MMG3D_mmg3dlib function, you must also provide a pointer toward a MMG5_pSol structure (that will contain the ouput metric (and the input one, if provided) and identified by the MMG5_ARG_ppMet keyword).
To call the MMG3D_mmg3dls function, you must also provide a pointer toward a MMG5_pSol structure (that will contain the level-set function and identified by the MMG5_ARG_ppLs keyword).
To call the MMG3D_mmg3dmov library, you must also provide a pointer toward a MMG5_pSol structure storing the displacement (and identified by the MMG5_ARG_ppDisp keyword).
Internal function for deallocations before return (taking a va_list as argument).
int _MMG3D_Free_names_var | ( | va_list | argptr | ) |
argptr | list of the mmg structures for whose we want to deallocate the name. Each structure must follow one of the MMG5_ARG* preprocessor variable that allow to identify it. |
argptr contains at least a pointer toward a MMG5_pMesh structure (that will contain the mesh and identified by the MMG5_ARG_ppMesh keyword)
To call the MMG3D_mmg3dlib function, you must also provide a pointer toward a MMG5_pSol structure (that will contain the ouput metric (and the input one, if provided) and identified by the MMG5_ARG_ppMet keyword).
To call the MMG3D_mmg3dls function, you must also provide a pointer toward a MMG5_pSol structure (that will contain the level-set function and identified by the MMG5_ARG_ppLs keyword).
To call the MMG3D_mmg3dmov library, you must also provide a pointer toward a MMG5_pSol structure storing the displacement (and identified by the MMG5_ARG_ppDisp keyword).
Internal function for name deallocations before return (taking a va_list as argument).
int _MMG3D_Free_structures_var | ( | va_list | argptr | ) |
argptr | list of the mmg structures that must be deallocated. Each structure must follow one of the MMG5_ARG* preprocessor variable that allow to identify it. |
argptr contains at least a pointer toward a MMG5_pMesh structure (that will contain the mesh and identified by the MMG5_ARG_ppMesh keyword)
To call the MMG3D_mmg3dlib function, you must also provide a pointer toward a MMG5_pSol structure (that will contain the ouput metric (and the input one, if provided) and identified by the MMG5_ARG_ppMet keyword).
To call the MMG3D_mmg3dls function, you must also provide a pointer toward a MMG5_pSol structure (that will contain the level-set function and identified by the MMG5_ARG_ppLs keyword).
To call the MMG3D_mmg3dmov library, you must also provide a pointer toward a MMG5_pSol structure storing the displacement (and identified by the MMG5_ARG_ppDisp keyword).
Internal function for structures deallocations before return (taking a va_list as argument).
|
inline |
Free adja, xtetra and xpoint tables
void _MMG3D_freeOctree | ( | MMG5_pMesh | , |
_MMG3D_octree ** | q | ||
) |
void _MMG3D_freeOctree_s | ( | MMG5_pMesh | mesh, |
_MMG3D_octree_s * | q, | ||
int | nv | ||
) |
mesh | pointer toward the mesh structure. |
q | pointer toward the octree cell |
nv | number of vertices in the cell subtree |
Free the octree cell.
int _MMG3D_getListSquare | ( | MMG5_pMesh | , |
double * | , | ||
_MMG3D_octree * | , | ||
double * | , | ||
_MMG3D_octree_s *** | |||
) |
int _MMG3D_getListSquareRec | ( | _MMG3D_octree_s * | q, |
double * | center, | ||
double * | rect, | ||
_MMG3D_octree_s *** | qlist, | ||
double * | dist, | ||
double * | ani, | ||
double | l0, | ||
int | nc, | ||
int | dim, | ||
int * | index | ||
) |
q | pointer toward the octree cell. |
center | coordinates of the centre of the current subtree. |
rect | rectangle that we want to intersect with the subtree. We define it given: the coordinates of one corner of the rectange and the length of the rectangle in each dimension. |
qlist | pointer toward the list of pointer over the sub octrees that intersect rect. |
dist | pointer toward the list of distances between center of the octree cells in qlist and the last 3 elements are the coordinates of the center of the whole recangle. |
ani | metric of the point. |
l0 | radius of the search zone. |
nc | number max of cell in the list +3 (the three last. |
dim | dimension =3. |
index | number of octree cells that intersect rect |
List the number of octree cells that intersect the rectangle rect. To avoid counting of the cells, a maximum is set.
int _MMG3D_hashTria | ( | MMG5_pMesh | mesh, |
_MMG5_Hash * | hash | ||
) |
mesh | pointer toward the mesh structure. |
hash | Edges hash table. |
Create surface adjacency table. Allocate the edge hash table hash but don't free it.
int _MMG3D_indElt | ( | MMG5_pMesh | mesh, |
int | kel | ||
) |
find the element number in packed numerotation
int _MMG3D_indPt | ( | MMG5_pMesh | mesh, |
int | kp | ||
) |
find the point number in packed numerotation
int _MMG3D_Init_mesh_var | ( | va_list | argptr | ) |
argptr | list of the mmg structures that must be initialized. Each structure must follow one of the MMG5_ARG* preprocessor variable that allow to identify it. |
argptr contains at least a pointer toward a MMG5_pMesh structure (that will contain the mesh and identified by the MMG5_ARG_ppMesh keyword)
To call the MMG3D_mmg3dlib function, you must also provide a pointer toward a MMG5_pSol structure (that will contain the ouput metric (and the input one, if provided) and identified by the MMG5_ARG_ppMet keyword).
To call the MMG3D_mmg3dls function, you must also provide a pointer toward a MMG5_pSol structure (that will contain the level-set function and identified by the MMG5_ARG_ppLs keyword).
To call the MMG3D_mmg3dmov library, you must also provide a pointer toward a MMG5_pSol structure storing the displacement (and identified by the MMG5_ARG_ppDisp keyword).
Internal function for structure allocations (taking a va_list argument).
int _MMG3D_initOctree | ( | MMG5_pMesh | mesh, |
_MMG3D_pOctree * | q, | ||
int | nv | ||
) |
mesh | pointer toward the mesh structure. |
q | pointer toward the global octree |
nv | maximum number of vertices in each cell before subdivision |
Initialisation of the octree cell.
void _MMG3D_initOctree_s | ( | _MMG3D_octree_s * | q | ) |
q | pointer toward the octree cell |
Initialisation of the octree cell.
int _MMG3D_inqua | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
Print histogram of mesh qualities for classic storage of metric at ridges.
int _MMG3D_intersectRect | ( | double * | rectin, |
double * | rectinout | ||
) |
rectin | rectangle to intersect, is not modified. |
rectinout | rectangle to intersect, is set to the intersection. |
Set rectinout to the intersection of the two rectangles. Rectangles are defined by: the coordinates of the lower left corner of the rectange and the length of the rectangle in each dimension.
int _MMG3D_intmet33_ani | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
char | i, | ||
int | ip, | ||
double | s | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | element index. |
i | local index of edge in k. |
ip | global index of the new point in which we want to compute the metric. |
s | interpolation parameter (between 0 and 1). |
Interpolation of anisotropic sizemap at parameter s along edge i of elt k for a classic storage of ridges metrics (before defsiz call).
int _MMG3D_isCellIncluded | ( | double * | cellCenter, |
double | l, | ||
double * | zoneCenter, | ||
double | l0 | ||
) |
cellCenter | 3 coordinates of the center of the octree cell to test. |
l | size of the cell |
zoneCenter | 3 coordinates of the center of the search zone |
radius | of the search zone |
int _MMG3D_localParamNm | ( | MMG5_pMesh | mesh, |
int | iel, | ||
int | iface, | ||
int | ia, | ||
double * | hausd_ip, | ||
double * | hmin_ip, | ||
double * | hmax_ip | ||
) |
mesh | pointer toward the mesh structure. |
iel | index of tetra in which we work |
iface | index of face in iel |
ia | index of edge in iel along which we want to compute the local parameters |
hausd_ip | pointer toward the local hausdorff parameter to compute |
hmin_ip | pointer toward the local minimal edge size to compute |
hmax_ip | pointer toward the local maximal edge size to compute |
Compute the local parameters at non manifold point ip.
int _MMG3D_localParamReg | ( | MMG5_pMesh | mesh, |
int | ip, | ||
int * | listv, | ||
int | ilistv, | ||
int * | lists, | ||
int | ilists, | ||
double * | hausd_ip, | ||
double * | hmin_ip, | ||
double * | hmax_ip | ||
) |
mesh | pointer toward the mesh structure. |
ip | global index of point in which we want to compute the local parameters |
listv | pointer toward the ball of ip |
ilistv | number of tetra in the ball of ip |
lists | pointer toward the surface ball of ip |
ilists | number of tetra in the surface ball of ip |
hausd_ip | pointer toward the local hausdorff parameter to compute |
hmin_ip | pointer toward the local minimal edge size to compute |
hmax_ip | pointer toward the local maximal edge size to compute |
Compute the local parameters at point ip (the volume and surface ball of point must be provided).
int _MMG3D_memOption | ( | MMG5_pMesh | mesh | ) |
memory repartition for the -m option
void _MMG3D_mergeBranches | ( | MMG5_pMesh | mesh, |
_MMG3D_octree_s * | q, | ||
int | dim, | ||
int | nv | ||
) |
mesh | pointer toward the mesh structure. |
q | pointer toward an octree cell. |
dim | dimension of the space (=3) |
nv | maximum number of points in an octree cell. |
Merge branches that have a parent counting less than nv vertices.
void _MMG3D_mergeBranchesRec | ( | _MMG3D_octree_s * | q0, |
_MMG3D_octree_s * | q, | ||
int | dim, | ||
int | nv, | ||
int * | index | ||
) |
q0 | pointer toward an octree cell. |
q | pointer toward an octree cell. |
dim | dimension of the space (=3). |
nv | maximum number of points in an octree cell. |
index | next index in the array to be filled. |
Merge sub-branches q of q0, in their parent q0. q0 should contain no more than nv vertices.
int _MMG3D_mmg3d2 | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol | ||
) |
mesh | pointer toward the mesh structure. |
sol | pointer toward the solution structure |
Create implicit surface in mesh.
int _MMG3D_moveOctree | ( | MMG5_pMesh | mesh, |
_MMG3D_pOctree | q, | ||
int | no, | ||
double * | newVer, | ||
double * | oldVer | ||
) |
mesh | pointer toward the mesh structure. |
q | pointer toward the global octree. |
no | index of the moved point. |
newVer | new coordinates for the moved point. |
oldVer | old coordinates for the moved point. |
Move one point in the octree structure. /!\ the vertex of index no can have either the new or the old coordinates in the mesh but all other vertice should have the same coordinates as when they were inserted into the octree. (ie: one move at a time in the mesh and the octree)
int _MMG3D_movnormal_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
int | k, | ||
int | ib | ||
) |
mesh | pointer toward the mesh structure. |
sol | pointer toward the metric structure. |
k | tetra index. |
ib | local index of the point inside the tetra k. |
Move internal point according to the normal at the opposite face Try to increase the volume of the tetra.
int _MMG3D_movv_ani | ( | MMG5_pMesh | , |
MMG5_pSol | , | ||
int | , | ||
int | |||
) |
int _MMG3D_movv_iso | ( | MMG5_pMesh | , |
MMG5_pSol | , | ||
int | , | ||
int | |||
) |
int _MMG3D_newElt | ( | MMG5_pMesh | mesh | ) |
get new elt address
int _MMG3D_newPt | ( | MMG5_pMesh | mesh, |
double | c[3], | ||
int16_t | tag | ||
) |
get new point address
int _MMG3D_normalAdjaTri | ( | MMG5_pMesh | mesh, |
int | start, | ||
char | iface, | ||
int | ia, | ||
double | n[3] | ||
) |
mesh | pointer toward the mesh structure |
start | index of the working tetra |
iface | local index of the boundary face of the tetra start |
ia | local index on face iface of the edge through which we seek the adjacent triangle of the triangle iface of start. |
n | normal of the new boundary face in the tetra idx. |
Compute the normal of the adjacent triangle of the triangle iface of the tetra start through the edge ia (in local numbering of the face).
Store the adjacent boundary triangle (triangle adjacent to iface through the edge ia
Compute the normal of the second triangle
int _MMG3D_octreein_ani | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
_MMG3D_pOctree | octree, | ||
int | ip, | ||
double | lmax | ||
) |
mesh | pointer toward the mesh structure. |
sol | pointer toward the solution structure. |
octree | pointer toward the octree structure. |
ip | index of point to check. |
Check if the vertex ip is not too close from another one (for an anisotropic metric).
int _MMG3D_octreein_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
_MMG3D_pOctree | octree, | ||
int | ip, | ||
double | lmax | ||
) |
mesh | pointer toward the mesh structure. |
sol | pointer toward the solution structure. |
octree | pointer toward the octree structure. |
ip | index of point to check. |
Check if the vertex ip is not too close from another one (for an isotropic metric).
int _MMG3D_optlap | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol | ||
) |
mesh | pointer toward the mesh structure. |
sol | pointer toward the sol structure |
int _MMG3D_outqua | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
Print histogram of mesh qualities for special storage of metric at ridges.
int _MMG3D_packMesh | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
MMG5_pSol | disp | ||
) |
mesh | pointer toward the mesh structure (unused). |
met | pointer toward the solution (metric or level-set) structure. |
disp | pointer toward the solution (displacement) structure. |
Pack the sparse mesh and create triangles and edges before getting out of library
void _MMG3D_placeInListDouble | ( | double * | distList, |
double | dist, | ||
int | index, | ||
int | size | ||
) |
distList | list of values. |
dist | value to insert in the list. |
index | position of the element before the place where dist should be inserted. |
size | size of the list before insertion. |
Insert the value dist in the list distList at position index+1. Moves other data so nothing is lost. No memory check performed, this function should be called with coherent parameters.
void _MMG3D_placeInListOctree | ( | _MMG3D_octree_s ** | qlist, |
_MMG3D_octree_s * | q, | ||
int | index, | ||
int | size | ||
) |
qList | list of pointer on octree. |
q | pointer on octree to be inserted in the list. |
index | position of the element before the place where q should be inserted. |
size | size of the list before insertion. |
Insert the pointer q in the list qList at position index+1. Moves other data so nothing is lost. No memory check performed, this function should be called with coherent parameters.
int _MMG3D_prilen | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
char | metRidTyp | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
metRidTyp | Type of storage of ridges metrics: 0 for classic storage, 1 for special storage. |
Compute sizes of edges of the mesh, and displays histo.
void _MMG3D_printArbre | ( | _MMG3D_octree * | q | ) |
void _MMG3D_printArbreDepth | ( | _MMG3D_octree_s * | q, |
int | depth, | ||
int | nv, | ||
int | dim | ||
) |
q | pointer toward an octree cell |
depth | depth of the subtree |
nv | number of vertices in the subtree |
dim | dimension in which we work |
Print the depth depth of the subtree of q.
int _MMG3D_seekIndex | ( | double * | distList, |
double | dist, | ||
int | indexMin, | ||
int | indexMax | ||
) |
distList | ordered list of value from smallest to largest. |
dist | value to be compared to elements in the list. |
indexMin | minimum index of the list. |
indexMax | maximum index of the list. |
|
inlinestatic |
Set common pointer functions between mmgs and mmg3d to the matching mmg3d functions.
int _MMG3D_simbulgept | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int * | list, | ||
int | ret, | ||
int | ip | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric. |
list | pointer toward the edge shell. |
ret | size of the edge shell. |
ip | new point index. |
Simulate at the same time creation and bulging of one point, with new position o and tag tag, to be inserted at an edge, whose shell is passed.
Check the deviation for new triangles
int* _MMG3D_sizeArbre | ( | _MMG3D_octree * | q, |
int | dim | ||
) |
void _MMG3D_sizeArbreRec | ( | _MMG3D_octree_s * | q, |
int | nv, | ||
int | dim, | ||
int * | s1, | ||
int * | s2 | ||
) |
q | pointer toward an octree cell |
nv | maximum number of vertices in an octree leaf |
dim | dimension in which we work |
s | size of the octree |
Print the memory size of the octree.
void _MMG3D_solTruncature | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met | ||
) |
void _MMG3D_solTruncatureForOptim | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the solution structure. |
Truncate the metric computed by the DoSol function by hmax and hmin values (if setted by the user). Set hmin and hmax if they are not setted.
int _MMG3D_split1_sim | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int | vx[6] | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | index of element to split. |
vx | ![]() |
Simulate the splitting of 1 edge of element
int _MMG3D_split2_sim | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int | vx[6] | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | index of element to split. |
vx | ![]() |
Simulate split of two opposite edges.
int _MMG3D_split2sf_sim | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int | vx[6] | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | index of element to split. |
vx | ![]() |
Simulate split of two edges that belong to a common face
int _MMG3D_split3_sim | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int | vx[6] | ||
) |
Simulate split of 1 face (3 edges)
int _MMG3D_split3cone_sim | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int | vx[6] | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | index of element to split. |
vx | ![]() |
Simulate split of 3 edges in cone configuration.
int _MMG3D_split3op_sim | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int | vx[6] | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | index of element to split. |
vx | ![]() |
Simulate split of 3 edges in opposite configuration.
int _MMG3D_split4op_sim | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int | vx[6] | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | index of element to split. |
vx | ![]() |
Simulate split of 4 edges in opposite configuration.
int _MMG3D_split4sf_sim | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int | vx[6] | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | index of element to split. |
vx | ![]() |
Simulate split of 4 edges in a configuration when 3 lie on the same face.
int _MMG3D_split5_sim | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int | vx[6] | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | index of element to split. |
vx | ![]() |
Simulate split of 5 edges.
int _MMG3D_split6_sim | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int | vx[6] | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | index of element to split. |
vx | ![]() |
Simulate split of 6 edges.
int _MMG3D_splitItem | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
_MMG3D_pOctree | octree, | ||
int | k, | ||
int | iar, | ||
double | OCRIT | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
octree | pointer toward the octree structure. |
k | elt index. |
iar | index of edge to split. |
OCRIT | quality threshold. |
Try to split edge number iar of tetra k
int _MMG3D_swpItem | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
_MMG3D_pOctree | octree, | ||
int | k, | ||
int | iar | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
octree | pointer toward the octree structure. |
k | elt index. |
iar | index of edge to not try to swap. |
Try to swap edge iar of tetra k.
int _MMG3D_tetraQual | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
char | metRidTyp | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the meric structure. |
metRidTyp | metric storage (classic or special) |
Compute the quality of the tetras over the mesh.
int _MMG3D_zaldy | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh |
allocate main structure
int _MMG5_anatet | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
char | typchk, | ||
int | patternMode | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
typchk | type of checking for edges length. |
patternMode | flag to say if we perform vertex insertion by patterns or by delaunay kernel. |
Analyze tetrahedra and split if needed.
int _MMG5_bdryIso | ( | MMG5_pMesh | ) |
int _MMG5_bdryPerm | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure. |
Make orientation of triangles compatible with tetra faces.
int _MMG5_bdrySet | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure. |
Set the triangles references to the tetrahedra faces and edges.
int _MMG5_bdryUpdate | ( | MMG5_pMesh | mesh | ) |
Update tag and refs of tetra edges. If tetra is required, set the faces/edges to required
int _MMG5_bdyMCF | ( | MMG5_pMesh | ) |
|
inline |
mesh | pointer toward the mesh structure. |
ip0 | index of the first point of the curve. |
ip1 | index of the second point of the curve. |
b0 | the first computed extrapolated control point. |
b1 | the second computed extrapolated control point. |
ised | flag for special edge. |
v | direction for normal vectors. |
Compute control points associated to the underlying curve to . ised = 1 if
must be considered as a special edge. Provide a direction v which will be considered as reference when dealing with choice of normal vectors.
|
inline |
c1 | coordinates of the first point of the curve. |
c2 | coordinates of the second point of the curve. |
t1 | normal at the first point of the curve. |
t2 | normal at the second point of the curve. |
Compute value of the parameter that makes the underlying Bezier curve with 'constant speed'
|
inline |
Compute point located at parameter value step from point ip0, as well as interpolate of normals, tangent for a NOM edge
|
inline |
Compute point located at parameter value step from point ip0, as well as interpolate of normals, tangent for a REF edge
|
inline |
Compute point located at parameter value step from point ip0, as well as interpolate of normals, tangent for a regular edge ; v = ref vector (normal) for choice of normals if need be
|
inline |
Compute point located at parameter value step from point ip0, as well as interpolate of normals, tangent for a RIDGE edge
|
inline |
c1 | coordinates of the first point of the curve. |
c2 | coordinates of the second point of the curve. |
n1 | normal at the first point of the curve. |
n2 | normal at the second point of the curve. |
t1 | computed normal at the first point of the curve. |
t2 | computed normal at the second point of the curve. |
Compute tangent to geometric support curve passing through c1,c2, with normals n1,n2
int _MMG5_boulenm | ( | MMG5_pMesh | mesh, |
int | start, | ||
int | ip, | ||
int | iface, | ||
double | n[3], | ||
double | t[3] | ||
) |
mesh | pointer toward the mesh structure. |
start | tetra index. |
ip | point index. |
iface | face index. |
n | computed normal vector. |
t | computed tangent vector. |
Define normal and tangent vectors at a non manifold point (ip in start, supported by face iface), enumerating its (outer)surfacic ball.
int _MMG5_boulernm | ( | MMG5_pMesh | mesh, |
int | start, | ||
int | ip, | ||
int * | ng, | ||
int * | nr | ||
) |
mesh | pointer toward the mesh structure. |
start | index of the starting tetrahedra. |
ip | local index of the point in the tetrahedra start. |
ng | pointer toward the number of ridges. |
nr | pointer toward the number of reference edges. |
Count the numer of ridges and reference edges incident to the vertex ip when ip is non-manifold.
int _MMG5_boulesurfvolp | ( | MMG5_pMesh | mesh, |
int | start, | ||
int | ip, | ||
int | iface, | ||
int * | listv, | ||
int * | ilistv, | ||
int * | lists, | ||
int * | ilists, | ||
int | isnm | ||
) |
mesh | pointer toward the mesh structure. |
start | index of the starting tetra. |
ip | index in start of the looked point. |
iface | index in start of the starting face. |
listv | pointer toward the computed volumic ball. |
ilistv | pointer toward the computed volumic ball size. |
lists | pointer toward the computed surfacic ball. |
ilists | pointer toward the computed surfacic ball size. |
isnm | is the looked point ip non-manifold? |
Compute the volumic ball of a SURFACE point p, as well as its surfacic ball, starting from tetra start, with point ip, and face if in tetra volumic ball. listv[k] = 4*number of tet + index of point surfacic ball. lists[k] = 4*number of tet + index of face.
int _MMG5_bouletrid | ( | MMG5_pMesh | mesh, |
int | start, | ||
int | iface, | ||
int | ip, | ||
int * | il1, | ||
int * | l1, | ||
int * | il2, | ||
int * | l2, | ||
int * | ip0, | ||
int * | ip1 | ||
) |
mesh | pointer toward the mesh structure. |
start | index of the starting tetrahedron. |
ip | index of the looked ridge point. |
iface | index in start of the starting face. |
il1 | pointer toward the first ball size. |
l1 | pointer toward the first computed ball (associated to n_1's side). |
il2 | pointer toward the second ball size. |
l2 | pointer toward the second computed ball (associated to n_2's side). |
ip0 | index of the first extremity of the ridge. |
ip1 | index of the second extremity of the ridge. |
Computation of the two surface balls of a ridge point: the list l1 is associated to the normal of face iface. ip0 and ip1 are the indices of the 2 ending point of the ridge. Both lists are returned enumerated in direct order.
int _MMG5_boulevolp | ( | MMG5_pMesh | mesh, |
int | start, | ||
int | ip, | ||
int * | list | ||
) |
mesh | pointer toward the mesh structure. |
start | index of the starting tetrahedra. |
ip | local index of the point in the tetrahedra start. |
list | pointer toward the list of the tetra in the volumic ball of ip. |
Fill the volumic ball (i.e. filled with tetrahedra) of point ip in tetra start. Results are stored under the form , kel = number of the tetra, jel = local index of p within kel.
|
inline |
mesh | pointer toward the mesh structure. |
met | pointer toward the meric structure. |
pt | pointer toward a tetrahedra. |
Compute the quality of the tet pt with respect to the anisotropic metric met. and for a calssic storage of metrics at ridges.
int _MMG5_cavity_ani | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | iel, | ||
int | ip, | ||
int * | list, | ||
int | lon, | ||
double | volmin | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the sol structure. |
iel | tetra index. |
ip | point local index in iel. |
list | pointer toward the list of tetra in the shell of edge where ip will be inserted. |
lon | number of tetra in the list. |
Mark elements in cavity and update the list of tetra in the cavity.
int _MMG5_cavity_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
int | iel, | ||
int | ip, | ||
int * | list, | ||
int | lon, | ||
double | volmin | ||
) |
mesh | pointer toward the mesh structure. |
sol | pointer toward the sol structure. |
iel | tetra index. |
ip | point local index in iel. |
list | pointer toward the list of tetra in the shell of edge where ip will be inserted. |
lon | number of tetra in the list. |
Mark elements in cavity and update the list of tetra in the cavity.
int _MMG5_cenrad_ani | ( | MMG5_pMesh | mesh, |
double * | ct, | ||
double * | m, | ||
double * | c, | ||
double * | rad | ||
) |
mesh | pointer toward the mesh structure. |
ct | coordinates of vertices of the element. |
m | metric at the point for which we compute the cavity. |
c | center of circumscribing circle to the element. |
rad | squared radius of circumscribing circle to the element. |
Compute radius (squared) and center of circumscribing circle to the element for an anisotropic metric m.
int _MMG5_cenrad_iso | ( | MMG5_pMesh | mesh, |
double * | ct, | ||
double * | c, | ||
double * | rad | ||
) |
mesh | pointer toward the mesh structure. |
ct | coordinates of vertices of the element. |
c | center of circumscribing circle to the element. |
rad | squared radius of circumscribing circle to the element. |
Compute radius (squared) and center of circumscribing circle to the element.
int _MMG5_chkBdryTria | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure. |
Check the matching between actual and given number of faces in the mesh: Count the number of faces in mesh and compare this number to the number of given triangles. If the founded number exceed the given one, add the missing boundary triangles. Do nothing otherwise.
Step 1: scan the mesh and count the boundaries
Step 2: detect the extra boundaries (that will be ignored) provided by the user
Step 3: add the missing boundary triangles or, if the mesh contains prisms, set to required the triangles at interface betwen prisms and tet
int _MMG5_chkcol_bdy | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
char | iface, | ||
char | iedg, | ||
int * | listv, | ||
int | ilistv, | ||
int * | lists, | ||
int | ilists, | ||
char | typchk | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | index of element in which we collapse. |
iface | face through wich we perform the collapse |
iedg | edge to collapse (in local face num) |
listv | pointer toward the list of the tetra in the ball of p0. |
ilistv | number of tetra in the ball of p0. |
lists | pointer toward the surfacic ball of p0. |
ilists | number of tetra in the surfacic ball of p0. |
typchk | typchk type of checking permformed for edge length (hmax or _MMG3D_LLONG criterion). |
Check whether collapse ip -> iq could be performed, ip boundary point ; 'mechanical' tests (positive jacobian) are not performed here ; iface = boundary face on which lie edge iedg - in local face num. (pq, or ia in local tet notation).
int _MMG5_chkcol_int | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
char | iface, | ||
char | iedg, | ||
int * | list, | ||
int | ilist, | ||
char | typchk | ||
) |
Check whether collapse ip -> iq could be performed, ip internal ; 'mechanical' tests (positive jacobian) are not performed here
char _MMG5_chkedg | ( | MMG5_pMesh | mesh, |
MMG5_pTria | pt, | ||
char | ori, | ||
double | , | ||
double | , | ||
int | |||
) |
char _MMG5_chkedg | ( | MMG5_pMesh | mesh, |
MMG5_Tria * | pt, | ||
char | ori, | ||
double | hmax, | ||
double | hausd, | ||
int | locPar | ||
) |
mesh | pointer toward the mesh structure. |
pt | pointer toward the triangle. |
ori | orientation of the triangle (1 for direct orientation, 0 otherwise). |
hmax | maximal edge length. |
hausd | maximal hausdorff distance. |
locPar | 1 if hmax and hausd are locals parameters. |
Find edges of (virtual) triangle pt that need to be split with respect to the Hausdorff criterion.
int _MMG5_chkfemtopo | ( | MMG5_pMesh | mesh | ) |
Count the number of tetras that have several boundary faces, as well as the number of internal edges connecting points of the boundary
int _MMG5_chkmani | ( | MMG5_pMesh | mesh | ) |
Check whether implicit surface enclosed in volume is orientable
First test : check whether a tetra has 4 boundary faces
Second test : Check whether configuration is manifold in each ball
int _MMG5_chkmanicoll | ( | MMG5_pMesh | mesh, |
int | k, | ||
int | iface, | ||
int | iedg, | ||
int | ndepmin, | ||
int | ndepplus, | ||
char | isminp, | ||
char | isplp | ||
) |
mesh | pointer toward the mesh structure. |
k | index of element in which we collapse. |
iface | face through wich we perform the collapse |
iedg | edge to collapse |
ndepmin | index of an elt with ref MG_MINUS and outside the shell of edge. |
ndepplus | ndex of an elt with ref MG_PLUS and outside the shell of edge. |
isminp | 1 if we have found a tetra with ref MG_MINUS |
isplp | 1 if we have found a tetra with ref MG_PLUS |
Check whether collapse of point np to nq does not create a non manifold situation at nq ndepmin, ndepplus = tetra of ref minus, plus in ball of np, not in shell of (np,nq).
First step : pile up tetras of future ball of nq, crossing through the shell of (np,nq), as long as they have same ref as ndepmin list[l] <= 0 if element of ball of np, >= 0, if element of ball of nq
Second step : same process, starting with a tetra of different reference, in the ball of np
int _MMG5_chkptonbdy | ( | MMG5_pMesh | mesh, |
int | np | ||
) |
Search boundary faces containing point np.
int _MMG5_chkswpbdy | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int * | list, | ||
int | ilist, | ||
int | it1, | ||
int | it2, | ||
char | typchk | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
list | pointer toward the shell of the edge. |
ilist | pointer toward the size of the shell of the edge. |
it1 | first element of the open shell. |
it2 | last element of the open shell. |
typchk | type of checking permformed for edge length (hmin or LSHORT criterion). |
Check whether edge whose shell is provided should be swapped for geometric approximation purposes (the 2 surface triangles are also provided).
int _MMG5_chkswpgen | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | start, | ||
int | ia, | ||
int * | ilist, | ||
int * | list, | ||
double | crit, | ||
char | typchk | ||
) |
mesh | pointer toward the mesh structure |
met | pointer toward the metric structure. |
start | tetrahedra in which the swap should be performed |
ia | edge that we want to swap |
ilist | pointer to store the size of the shell of the edge |
list | pointer to store the shell of the edge |
crit | improvment coefficient |
typchk | type of checking permformed for edge length (hmin or LSHORT criterion). |
Check whether swap of edge ia in start should be performed, and return the index of point corresponding to the swapped configuration. The shell of edge is built during the process.
int _MMG5_cntbdypt | ( | MMG5_pMesh | mesh, |
int | nump | ||
) |
Count how many boundary faces share point nump.
int _MMG5_colver | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int * | list, | ||
int | ilist, | ||
char | indq, | ||
char | typchk | ||
) |
mesh | pointer toward the mesh |
met | pointer toward the metric |
list | pointer toward the ball of the point |
ilist | number of elements in the ball of the point |
indq | local index of the point on which we collapse |
typchk | type of check performed depending on the remeshing step |
Collapse vertex p = list[0]%4 of tetra list[0]/4 over vertex indq of tetra list[0]/4. Only physical tests (positive jacobian) are done (i.e. approximation of the surface, etc... must be performed outside).
int _MMG5_coquil | ( | MMG5_pMesh | mesh, |
int | start, | ||
int | ia, | ||
int * | list | ||
) |
mesh | pointer toward the mesh structure |
start | index of the starting tetra |
ia | index of the edge |
list | list of tetra sharing the edge ia |
Find all tets sharing edge ia of tetra start.
int _MMG5_coquilface | ( | MMG5_pMesh | mesh, |
int | start, | ||
char | iface, | ||
int | ia, | ||
int * | list, | ||
int * | it1, | ||
int * | it2, | ||
int | silent | ||
) |
mesh | pointer toward the mesh structure. |
start | index of the starting tetrahedron. |
iface | index of the boundary face from which we come. |
ia | index of edge whose shell is computed (in tetra). |
list | pointer toward the list of tetra in the shell (to fill). |
it1 | pointer toward the index of the first boundary face sharing ia (to fill). |
it2 | pointer toward the index of the second boundary face sharing ia (to fill). |
silent | if 1, print error message for more than 2 boundary triangles in the shell |
Find all tets sharing edge ia of tetra start, and stores boundary faces when met. and
, iel = index of tetra, iface = index of face in tetra.
void _MMG5_coquilFaceErrorMessage | ( | MMG5_pMesh | mesh, |
int | k1, | ||
int | k2 | ||
) |
mesh | pointer toward the mesh structure. |
k1 | should contain a tetra index. |
k2 | should contain a tetra index different from k2. |
Print an error message if _MMG5_coquilFace detect a boundary topology problem.
int16_t _MMG5_coquilTravel | ( | MMG5_pMesh | mesh, |
int | na, | ||
int | nb, | ||
int * | adj, | ||
int * | piv, | ||
char * | iface, | ||
int * | i | ||
) |
mesh | pointer toward the mesh structure. |
na | global index of edge extremity. |
nb | global index of edge extremity. |
adj | starting tetrahedron at the begining and finish tet at the end. |
piv | global index of the vertex opposite to the travelling face (updated for the finish tet at the end). |
iface | previous traveling face of the tet (suspected to be boundary), updated. |
i | local index of the edge ![]() |
Travel around the edge from tetra adj and through the face piv.
int _MMG5_countelt | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
double * | weightelt, | ||
long * | npcible | ||
) |
Approximation of the final number of vertex.
void _MMG5_defaultValues | ( | MMG5_pMesh | ) |
int _MMG5_delone | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
int | ip, | ||
int * | list, | ||
int | ilist | ||
) |
mesh | pointer toward the mesh structure. |
sol | pointer toward the solution structure. |
ip | index of the point to insert. |
list | pointer toward the list of the tetra in the cavity (computed by _MMG5_cavity). |
ilist | number of tetra inside the cavity. |
Insertion of the vertex ip. The cavity of ip become its ball.
|
inline |
mesh | pointer toward the mesh structure |
start | index of the starting tetra |
ia | index of the edge in tetra start that we want to modify |
tag | tag to remove |
Remove the tag tag of edge ia in tetra start by travelling its shell.
int _MMG5_denoisbdy | ( | MMG5_pMesh | ) |
int _MMG5_dichodisp | ( | MMG5_pMesh | , |
double * | |||
) |
|
inline |
If need be, invert the travelling sense of surfacic ball so that it is travelled in the direct sense with respect to direction n anchored at point ip (ip = global num.): return 2 = orientation reversed, 1 otherwise
double _MMG5_estavglen | ( | MMG5_pMesh | ) |
void _MMG5_freeXPrisms | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure. |
Free xprism structure.
void _MMG5_freeXTets | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure. |
Free xtetra structure.
int _MMG5_gradsiz_ani | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
Enforces mesh gradation by truncating metric field.
int _MMG5_gradsiz_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
Enforce mesh gradation by truncating size map.
int _MMG5_hashPop | ( | _MMG5_Hash * | hash, |
int | a, | ||
int | b | ||
) |
remove edge from hash table
int _MMG5_hEdge | ( | MMG5_pMesh | mesh, |
MMG5_HGeom * | hash, | ||
int | a, | ||
int | b, | ||
int | ref, | ||
int16_t | tag | ||
) |
store edge on geometry
int _MMG5_hGeom | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward he mesh structure. |
Build hashtable for initial mesh edges.
int _MMG5_hGet | ( | MMG5_HGeom * | hash, |
int | a, | ||
int | b, | ||
int * | ref, | ||
int16_t * | tag | ||
) |
get ref and tag to edge on geometry
int _MMG5_hNew | ( | MMG5_pMesh | mesh, |
MMG5_HGeom * | hash, | ||
int | hsiz, | ||
int | hmax | ||
) |
to store edge on geometry
int _MMG5_hPop | ( | MMG5_HGeom * | hash, |
int | a, | ||
int | b, | ||
int * | ref, | ||
int16_t * | tag | ||
) |
remove edge from hash table
int _MMG5_hTag | ( | MMG5_HGeom * | hash, |
int | a, | ||
int | b, | ||
int | ref, | ||
int16_t | tag | ||
) |
set tag to edge on geometry
void _MMG5_Init_parameters | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure. |
Initialization of the input parameters (stored in the Info structure).
MMG5_IPARAM_verbose = 1
MMG*_IPARAM_iso = 0
MMG5_IPARAM_mem = -1
MMG5_IPARAM_debug = 0
MMG5_IPARAM_npar = 0
MMG5_IPARAM_noinsert = 0
MMG5_IPARAM_noswap = 0
MMG5_IPARAM_nomove = 0
MMG5_IPARAM nmat = 0
MMG5_DPARAM_angleDetection = _MMG5_ANGEDG
MMG5_DPARAM_hmin = 0.001 bounding box size;
MMG5_DPARAM_hmax = double of the bounding box size
MMG5_DPARAM_hsiz= -1.
MMG5_DPARAM_hausd = 0.01
MMG5_DPARAM_hgrad = 1.3
MMG5_PPARAM = NULL
MMG3D_IPARAM_lag = -1 used by mmg3d only but need to be negative in the scaleMesh function
int _MMG5_interp4bar33_ani | ( | MMG5_pMesh | , |
MMG5_pSol | , | ||
int | , | ||
int | , | ||
double * | |||
) |
int _MMG5_interp4bar_ani | ( | MMG5_pMesh | , |
MMG5_pSol | , | ||
int | , | ||
int | , | ||
double * | |||
) |
int _MMG5_interp4bar_iso | ( | MMG5_pMesh | , |
MMG5_pSol | , | ||
int | , | ||
int | , | ||
double * | |||
) |
int _MMG5_intmet_ani | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
char | i, | ||
int | ip, | ||
double | s | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | element index. |
i | local index of edge in k. |
ip | global index of the new point in which we want to compute the metric. |
s | interpolation parameter (between 0 and 1). |
Interpolation of anisotropic sizemap at parameter s along edge i of elt k for a special storage of ridges metric (after defsiz call).
int _MMG5_intmet_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
char | i, | ||
int | ip, | ||
double | s | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | element index. |
i | local index of edge in k. |
ip | global index of the new point in which we want to compute the metric. |
s | interpolation parameter (between 0 and 1). |
Interpolation of anisotropic sizemap at parameter s along edge i of elt k.
int _MMG5_intregmet | ( | MMG5_pMesh | , |
MMG5_pSol | , | ||
int | , | ||
char | , | ||
double | , | ||
double * | |||
) |
int _MMG5_intridmet | ( | MMG5_pMesh | , |
MMG5_pSol | , | ||
int | , | ||
int | , | ||
double | , | ||
double * | , | ||
double * | |||
) |
int _MMG5_intvolmet | ( | MMG5_pMesh | , |
MMG5_pSol | , | ||
int | , | ||
char | , | ||
double | , | ||
double * | |||
) |
int _MMG5_lapantilap | ( | MMG5_pMesh | , |
double * | |||
) |
|
inline |
Compute edge length from edge's coordinates.
*ca | pointer toward the coordinates of the first edge's extremity. |
*cb | pointer toward the coordinates of the second edge's extremity. |
*ma | pointer toward the metric associated to the first edge's extremity. |
*mb | pointer toward the metric associated to the second edge's extremity. |
Compute length of edge (with ca and cb coordinates of edge extremities) according to the isotropic size prescription.
int _MMG5_meancur | ( | MMG5_pMesh | mesh, |
int | np, | ||
double | c[3], | ||
int | ilist, | ||
int * | list, | ||
double | h[3] | ||
) |
double _MMG5_meansizreg_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | nump, | ||
int * | lists, | ||
int | ilists, | ||
double | hmin, | ||
double | hmax | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
nump | index of point in which the size must be computed. |
lists | pointer toward the surfacic ball of nump. |
ilists | size of surfacic ball of nump. |
hmin | minimal edge size. |
hmax | maximal edge size. |
For -nosurf option : define isotropic size at regular point nump, whose surfacic ball is provided. The size is computed as the mean of the length of the surface edges passing through nump.
long long _MMG5_memSize | ( | void | ) |
Compute the available memory size of the computer.
int _MMG5_mmg3d1_delone | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
Main adaptation routine.
— stage 1: geometric mesh
— stage 2: computational mesh
int _MMG5_mmg3d1_pattern | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
Main adaptation routine.
— stage 1: geometric mesh
— Stage 2: computational mesh
int _MMG5_mmg3d3 | ( | MMG5_pMesh | , |
MMG5_pSol | , | ||
MMG5_pSol | |||
) |
int _MMG5_mmg3dBezierCP | ( | MMG5_pMesh | mesh, |
MMG5_Tria * | pt, | ||
_MMG5_pBezier | pb, | ||
char | ori | ||
) |
mesh | pointer toward the mesh structure. |
pt | pointer toward the triangle structure. |
pb | pointer toward the computed Bezier structure. |
ori | triangle orientation. |
Compute Bezier control points on triangle pt (cf. Vlachos)
int _MMG5_mmg3dChkmsh | ( | MMG5_pMesh | mesh, |
int | severe, | ||
int | base | ||
) |
mesh | pointer toward the mesh structure. |
severe | level of performed check |
base | unused argument. |
Check the mesh validity
int _MMG5_movbdynompt_ani | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
_MMG3D_pOctree | octree, | ||
int * | listv, | ||
int | ilistv, | ||
int * | lists, | ||
int | ilists, | ||
int | improve | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
octree | pointer toward the octree structure. |
listv | pointer toward the volumic ball of the point. |
ilistv | size of the volumic ball. |
lists | pointer toward the surfacic ball of the point. |
ilists | size of the surfacic ball. |
improve | force the new minimum element quality to be greater or equal than 1.02 of the old minimum element quality. |
Move boundary non manifold point, whose volumic and (exterior) surfacic balls are passed
int _MMG5_movbdynompt_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
_MMG3D_pOctree | octree, | ||
int * | listv, | ||
int | ilistv, | ||
int * | lists, | ||
int | ilists, | ||
int | improve | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
octree | pointer toward the octree structure. |
listv | pointer toward the volumic ball of the point. |
ilistv | size of the volumic ball. |
lists | pointer toward the surfacic ball of the point. |
ilists | size of the surfacic ball. |
improve | force the new minimum element quality to be greater or equal than 1.02 of the old minimum element quality. |
Move boundary non manifold point, whose volumic and (exterior) surfacic balls are passed
int _MMG5_movbdyrefpt_ani | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
_MMG3D_pOctree | octree, | ||
int * | listv, | ||
int | ilistv, | ||
int * | lists, | ||
int | ilists, | ||
int | improve | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
octree | pointer toward the octree structure. |
listv | pointer toward the volumic ball of the point. |
ilistv | size of the volumic ball. |
lists | pointer toward the surfacic ball of the point. |
ilists | size of the surfacic ball. |
improve | force the new minimum element quality to be greater or equal than 1.02 of the old minimum element quality. |
Move boundary reference point, whose volumic and surfacic balls are passed.
int _MMG5_movbdyrefpt_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
_MMG3D_pOctree | octree, | ||
int * | listv, | ||
int | ilistv, | ||
int * | lists, | ||
int | ilists, | ||
int | improve | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
octree | pointer toward the octree structure. |
listv | pointer toward the volumic ball of the point. |
ilistv | size of the volumic ball. |
lists | pointer toward the surfacic ball of the point. |
ilists | size of the surfacic ball. |
improve | force the new minimum element quality to be greater or equal than 1.02 of the old minimum element quality. |
Move boundary reference point, whose volumic and surfacic balls are passed.
int _MMG5_movbdyregpt_ani | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
_MMG3D_pOctree | octree, | ||
int * | listv, | ||
int | ilistv, | ||
int * | lists, | ||
int | ilists, | ||
int | improveSurf, | ||
int | improveVol | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
octree | pointer toward the octree structure. |
listv | pointer toward the volumic ball of the point. |
ilistv | size of the volumic ball. |
lists | pointer toward the surfacic ball of the point. |
ilists | size of the surfacic ball. |
improve | force the new minimum element quality to be greater or equal than 1.02 of the old minimum element quality. |
Move boundary regular point, whose volumic and surfacic balls are passed.
Step 1 : rotation matrix that sends normal n to the third coordinate vector of R^3
Step 2 : rotation of the oriented surfacic ball with r : lispoi[k] is the common edge between faces lists[k-1] and lists[k]
Step 3 : Compute gradient towards optimal position = centre of mass of the ball, projected to tangent plane
Step 4 : locate new point in the ball, and compute its barycentric coordinates
Step 5 : come back to original problem, and compute patch in triangle iel
int _MMG5_movbdyregpt_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
_MMG3D_pOctree | octree, | ||
int * | listv, | ||
int | ilistv, | ||
int * | lists, | ||
int | ilists, | ||
int | improveSurf, | ||
int | improveVol | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
octree | pointer toward the octree structure. |
listv | pointer toward the volumic ball of the point. |
ilistv | size of the volumic ball. |
lists | pointer toward the surfacic ball of the point. |
ilists | size of the surfacic ball. |
improve | force the new minimum element quality to be greater or equal than 1.02 of the old minimum element quality. |
Move boundary regular point, whose volumic and surfacic balls are passed.
Step 1 : rotation matrix that sends normal n to the third coordinate vector of R^3
Step 2 : rotation of the oriented surfacic ball with r : lispoi[k] is the common edge between faces lists[k-1] and lists[k]
Step 3 : Compute optimal position to make current triangle equilateral, and average of these positions
Step 4 : locate new point in the ball, and compute its barycentric coordinates
Step 5 : come back to original problem, and compute patch in triangle iel
int _MMG5_movbdyridpt_ani | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
_MMG3D_pOctree | octree, | ||
int * | listv, | ||
int | ilistv, | ||
int * | lists, | ||
int | ilists, | ||
int | improve | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
octree | pointer toward the octree structure. |
listv | pointer toward the volumic ball of the point. |
ilistv | size of the volumic ball. |
lists | pointer toward the surfacic ball of the point. |
ilists | size of the surfacic ball. |
improve | force the new minimum element quality to be greater or equal |
Move boundary ridge point, whose volumic and surfacic balls are passed.
int _MMG5_movbdyridpt_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
_MMG3D_pOctree | octree, | ||
int * | listv, | ||
int | ilistv, | ||
int * | lists, | ||
int | ilists, | ||
int | improve | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
octree | pointer toward the octree structure. |
listv | pointer toward the volumic ball of the point. |
ilistv | size of the volumic ball. |
lists | pointer toward the surfacic ball of the point. |
ilists | size of the surfacic ball. |
improve | force the new minimum element quality to be greater or equal than 1.02 of the old minimum element quality. |
Move boundary ridge point, whose volumic and surfacic balls are passed.
int _MMG5_movintpt_ani | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
_MMG3D_pOctree | octree, | ||
int * | list, | ||
int | ilist, | ||
int | improve | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
octree | pointer toward the octree structure. |
list | pointer toward the volumic ball of the point. |
ilist | size of the volumic ball. |
improve | force the new minimum element quality to be greater or equal than 1.02 of the old minimum element quality. |
Move internal point whose volumic is passed.
int _MMG5_movintpt_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
_MMG3D_pOctree | octree, | ||
int * | list, | ||
int | ilist, | ||
int | improve | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
octree | pointer toward the octree structure. |
list | pointer toward the volumic ball of the point. |
ilist | size of the volumic ball. |
improve | force the new minimum element quality to be greater or equal than 0.9 of the old minimum element quality. |
Move internal point whose volumic is passed.
int _MMG5_movintptLES_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
_MMG3D_pOctree | octree, | ||
int * | list, | ||
int | ilist, | ||
int | improve | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
octree | pointer toward the octree structure. |
list | pointer toward the volumic ball of the point. |
ilist | size of the volumic ball. |
improve | force the new minimum element quality to be greater or equal than 0.9 of the old minimum element quality. |
Move internal point whose volumic ball is passed (for LES optimization). The optimal point position is computed as the barycenter of the optimal point position for each tetra. The optimal point position for a tetra is the point located over the normal of the face at the face barycenter and at the distance 1 of the face.
int _MMG5_movtet | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
_MMG3D_pOctree | octree, | ||
double | clickSurf, | ||
double | clickVol, | ||
int | moveVol, | ||
int | improveSurf, | ||
int | improveVolSurf, | ||
int | improveVol, | ||
int | maxit | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
octree | pointer toward the octree structure. |
clickSurf | triangle quality threshold under which we want to move |
clickVol | tetra quality threshold under which we want to move |
moveVol | internal move |
improveSurf | forbid surface degradation during the move |
improveVolSurf | forbid volume degradation during the surfacic move |
improveVol | forbid volume degradation during the move |
maxit | maximum number of iteration. |
Analyze tetrahedra and move points so as to make mesh more uniform.
|
inline |
mesh | pointer toward the mesh structure. |
met | pointer toward the sol structure. |
pt | pointer toward a tetra. |
m1 | computed metric. |
Compute mean metric over the internal tetra pt. Do not take into account the metric values at ridges points (because we don't know how to build it).
|
inline |
Compute normal to face iface of tetra k, exterior to tetra k
|
inline |
naive (increasing) sorting algorithm, for very small tabs ; permutation is stored in perm
void _MMG5_openCoquilTravel | ( | MMG5_pMesh | mesh, |
int | na, | ||
int | nb, | ||
int * | adj, | ||
int * | piv, | ||
char * | iface, | ||
int * | i | ||
) |
mesh | pointer toward the mesh structure. |
na | global index of edge extremity. |
nb | global index of edge extremity. |
adj | starting tetrahedron at the begining and finish tet at the end. |
piv | global index of the vertex opposite to the travelling face (updated for the finish tet at the end). |
iface | traveling face of the tet (suspected to be boundary), updated. |
i | local index of the edge ![]() |
Travel around the edge from tetra adj and through the face piv. The shell of the edge is open and the tetra adj has no neighbour through the face iface.
double _MMG5_orcal_poi | ( | double | a[3], |
double | b[3], | ||
double | c[3], | ||
double | d[3] | ||
) |
int _MMG5_ppgdisp | ( | MMG5_pMesh | , |
double * | |||
) |
void _MMG5_printTetra | ( | MMG5_pMesh | mesh, |
char * | fileName | ||
) |
Debug function (not use in clean code): print mesh->tetra structure
int _MMG5_saveDisp | ( | MMG5_pMesh | , |
MMG5_pSol | |||
) |
int _MMG5_setNmTag | ( | MMG5_pMesh | mesh, |
_MMG5_Hash * | hash | ||
) |
mesh | pointer towar the mesh structure. |
hash | edges hash table. |
Set tags to non-manifold edges and vertices. Not done before because we need the MMG5_xTetra table.
|
inline |
Set tag and edg of edge ia (if need be) in tetra start by travelling its shell
int _MMG5_split1 | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int | vx[6], | ||
char | metRidTyp | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | index of element to split. |
vx | ![]() |
metRidTyp | metric storage (classic or special) |
Split 1 edge of tetra k.
int _MMG5_split1b | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int * | list, | ||
int | ret, | ||
int | ip, | ||
int | cas, | ||
char | metRidTyp, | ||
char | chkRidTet | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
list | pointer toward the shell of edge. |
ret | size of the shell of edge. |
ip | idex of new point. |
cas | flag to watch the length of the new edges. |
metRidTyp | Type of storage of ridges metrics: 0 for classic storage, 1 for special storage. |
chkRidTet | if 1, avoid the creation of a tet with 4 ridge vertices |
Split edge , whose shell list is passed, introducing point ip Beware : shell has to be enumerated in ONLY ONE TRAVEL (always same sense).
2 different checks : 1) are we creating a too small edge (BUG_Split1b_SpereIso_0.125h_met) 2) in aniso and from the last wave of anatet(typchk=1): avoid the creation of a tetra with 4 ridge vertices.
int _MMG5_split2 | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int | vx[6], | ||
char | metRidTyp | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | index of element to split. |
vx | ![]() |
metRidTyp | metric storage (classic or special) |
Split of two OPPOSITE edges
int _MMG5_split2sf | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int | vx[6], | ||
char | metRidTyp | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | index of element to split. |
vx | ![]() |
metRidTyp | metric storage (classic or special) |
Split of two edges that belong to a common face : 1 tetra becomes 3
int _MMG5_split3 | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int | vx[6], | ||
char | metRidTyp | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | index of element to split. |
vx | ![]() |
metRidTyp | metric storage (classic or special) |
1 face (3 edges) subdivided
int _MMG5_split3cone | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int | vx[6], | ||
char | metRidTyp | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | index of element to split. |
vx | ![]() |
metRidTyp | metric storage (classic or special) |
Split 3 edge in cone configuration
int _MMG5_split3op | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int | vx[6], | ||
char | metRidTyp | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | index of element to split. |
vx | ![]() |
metRidTyp | metric storage (classic or special) |
Split 3 opposite edges in a tetra
int _MMG5_split4bar | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
char | metRidTyp | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | tetra index. |
metRidTyp | metric storage (classic or special) |
Split a tetra in 4 tetras by introducing its barycenter. FOR NOW : flags, that tell which edge should be split, are not updated (erased) : UPDATE NEEDED ?
int _MMG5_split4op | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int | vx[6], | ||
char | metRidTyp | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | index of element to split. |
vx | ![]() |
metRidTyp | metric storage (classic or special) |
Split 4 edges in a configuration when no 3 edges lie on the same face
int _MMG5_split4sf | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int | vx[6], | ||
char | metRidTyp | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | index of element to split. |
vx | ![]() |
metRidTyp | metric storage (classic or special) |
Split 4 edges in a configuration when 3 lie on the same face
int _MMG5_split5 | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int | vx[6], | ||
char | metRidTyp | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | index of element to split. |
vx | ![]() |
metRidTyp | metric storage (classic or special) |
Split 5 edges
int _MMG5_split6 | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int | vx[6], | ||
char | metRidTyp | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | index of element to split. |
vx | ![]() |
metRidTyp | metric storage (classic or special) |
split all faces (6 edges)
int _MMG5_splitedg | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | iel, | ||
int | iar, | ||
double | crit | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
iel | tetra index |
iar | edge index of iel |
crit | quality threshold. |
Split edge iar of iel and verify that every new tet have a better quality than crit
int _MMG5_srcbdy | ( | MMG5_pMesh | mesh, |
int | start, | ||
int | ia | ||
) |
Identify whether edge ia in start is a boundary edge by unfolding its shell
int _MMG5_srcface | ( | MMG5_pMesh | mesh, |
int | n0, | ||
int | n1, | ||
int | n2 | ||
) |
int _MMG5_startedgsurfball | ( | MMG5_pMesh | mesh, |
int | nump, | ||
int | numq, | ||
int * | list, | ||
int | ilist | ||
) |
If need be, reorder the surfacic ball of point ip, so that its first element has edge (p,q) (nump,q = global num) as edge _MMG5_iprv2[ip] of face iface. return 2 = orientation reversed, 1 otherwise
int _MMG5_stiffelt | ( | MMG5_pMesh | , |
int | , | ||
double * | , | ||
double * | |||
) |
double _MMG5_surftri | ( | MMG5_pMesh | , |
int | , | ||
int | |||
) |
int _MMG5_swpbdy | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int * | list, | ||
int | ret, | ||
int | it1, | ||
_MMG3D_pOctree | octree, | ||
char | typchk | ||
) |
mesh | pointer toward the mesh structure |
met | pointer toward the solution structure |
list | pointer toward the shell of the edge |
ret | dobble of the number of tetrahedra in the shell |
it1 | boundary face carrying the beforehand tested terminal point for collapse |
octree | pointer toward the octree structure in Delaunay mode, NULL pointer in pattern mode. |
typchk | type of checking permformed for edge length (hmin or LSHORT criterion). |
Swap boundary edge whose shell is provided.
int _MMG5_swpgen | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | nconf, | ||
int | ilist, | ||
int * | list, | ||
_MMG3D_pOctree | octree, | ||
char | typchk | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the sol structure. |
nconf | configuration. |
ilist | number of tetrahedra in the shell of the edge that we want to swap. |
list | pointer toward the shell of the edge that we want to swap. |
octree | pointer toward the octree structure in Delaunay mode, NULL pointer in pattern mode. |
typchk | type of checking permformed for edge length (hmin or LSHORT criterion). |
Perform swap of edge whose shell is passed according to configuration nconf.
First step : split of edge (na,nb)
Second step : collapse of np towards enhancing configuration
int _MMG5_swpmsh | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
_MMG3D_pOctree | octree, | ||
int | typchk | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
octree | pointer toward the octree structure (only for delaunay). |
typchk | type of checking permformed for edge length (hmin or LSHORT criterion). |
Search for boundary edges that could be swapped for geometric approximation.
int _MMG5_swptet | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
double | crit, | ||
double | declic, | ||
_MMG3D_pOctree | octree, | ||
int | typchk | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
crit | coefficient of quality improvment. |
octree | pointer toward the octree structure in delaunay mode and toward the NULL pointer otherwise |
typchk | type of checking permformed for edge length (hmin or LSHORT criterion). |
Internal edge flipping.
void _MMG5_tet2tri | ( | MMG5_pMesh | mesh, |
int | k, | ||
char | ie, | ||
MMG5_Tria * | ptt | ||
) |
mesh | pointer toward the mesh structure. |
k | tetrahedron index. |
ie | face index of tetrahedron. |
ptt | pointer toward the output triangle. |
Set triangle corresponding to face ie of tetra k.
double _MMG5_timestepMCF | ( | MMG5_pMesh | , |
double | |||
) |
int _MMG5_trydisp | ( | MMG5_pMesh | , |
double * | , | ||
short | |||
) |
int _MMG5_velextLS | ( | MMG5_pMesh | , |
MMG5_pSol | |||
) |
double _MMG5_volint | ( | MMG5_pMesh | ) |
|
inlinestatic |
mesh | pointer toward the mesh structure. |
Warn user that some tetrahedra of the mesh have been reoriented.
int MMG3D_hashPrism | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure. |
Create table of adjacency for prisms.
int MMG3D_movetetrapoints | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
_MMG3D_pOctree | octree, | ||
int | k | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | index of a tetra |
Try to move the vertices of the tetra k to improve its quality.
int MMG3D_optbdry | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
_MMG3D_pOctree | octree, | ||
int | k | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
octree | pointer toward the octree structure. |
k | index of a tetra |
Try to optimize the tetra k. This tetra has a face on the boundary.
int MMG3D_opttyp | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
_MMG3D_pOctree | octree | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
octree | pointer toward the octree structure. |
Travel across the mesh to detect element with very bad quality (less than 0.2) and try to improve them by every means.
int MMG3D_swap23 | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
char | metRidTyp | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the sol structure. |
k | index of the tetrahedron with multiple boundary faces (to be swapped). |
metRidTyp | metric storage (classic or special) |
Search an adjacent to the tetra k and perform swap 2->3 (the common face of the 2 tetra is destroyed and replaced by a common edge used by the three new elts).
Neighbouring element with which we will try to swap
Swap
Quality Update
int(* _MMG3D_octreein) (MMG5_pMesh,MMG5_pSol,_MMG3D_pOctree,int, double) |
|
static |
arpt[i]: edges passing through vertex i
double(* _MMG5_caltet) (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTetra pt) |
double(* _MMG5_caltri) (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria ptt) |
int(* _MMG5_cavity) (MMG5_pMesh,MMG5_pSol,int,int,int *, int,double) |
int(* _MMG5_defsiz) (MMG5_pMesh,MMG5_pSol) |
int(* _MMG5_gradsiz) (MMG5_pMesh,MMG5_pSol) |
|
static |
vertices of extremities of the edges of the tetra
|
static |
iarf[i]: edges of face opposite to vertex i
|
static |
iarf[i]: edges of face i for a prism
|
static |
num of the j^th edge in the i^th face
|
static |
idir[i]: vertices of face opposite to vertex i
|
static |
idir[i]: vertices of face i for a prism
|
static |
|
static |
ifar[i][]: faces sharing the ith edge of the tetra
int(* _MMG5_interp4bar) (MMG5_pMesh, MMG5_pSol, int, int, double *) |
int(* _MMG5_intmet) (MMG5_pMesh, MMG5_pSol, int, char, int, double) |
|
static |
next vertex of tetra: {1,2,3,0,1,2,3}
|
static |
previous vertex of tetra: {3,0,1,2,3,0,1}
|
static |
isar[i][]: vertices of extremities of the edge opposite to the ith edge
double(* _MMG5_lenedg) (MMG5_pMesh,MMG5_pSol,int, MMG5_pTetra) |
double(* _MMG5_lenedgspl) (MMG5_pMesh,MMG5_pSol,int, MMG5_pTetra) |
int(* _MMG5_movbdynompt) (MMG5_pMesh, MMG5_pSol, _MMG3D_pOctree,int *, int, int *, int,int) |
int(* _MMG5_movbdyrefpt) (MMG5_pMesh, MMG5_pSol, _MMG3D_pOctree,int *, int, int *, int,int) |
int(* _MMG5_movbdyregpt) (MMG5_pMesh, MMG5_pSol, _MMG3D_pOctree,int *, int, int *, int, int,int) |
int(* _MMG5_movbdyridpt) (MMG5_pMesh, MMG5_pSol, _MMG3D_pOctree,int *, int, int *, int,int) |
int(* _MMG5_movintpt) (MMG5_pMesh,MMG5_pSol, _MMG3D_pOctree,int *, int, int) |
|
static |
Table that associates to each (even) permutation of the 4 vertices of a tetrahedron the corresponding permutation of its edges.
Labels : 0 : [0,1,2,3] 1 : [0,2,3,1] 2 : [0,3,1,2] 3 : [1,0,3,2] 4 : [1,2,0,3] 5 : [1,3,2,0] 6 : [2,0,1,3] 7 : [2,1,3,0] 8 : [2,3,0,1] 9 : [3,0,2,1] 10 : [3,1,0,2] 11 : [3,2,1,0] The edge 0 of the config 1 become the edge 1 of the reference config so permedge[1][0]=1 ...