mmg3d
|
Go to the source code of this file.
Data Structures | |
struct | MMG3D_PROctree_s |
struct | MMG3D_PROctree |
Macros | |
#define | MMG5_RETURN_AND_FREE(mesh, met, ls, disp, val) |
#define | MMG3D_POINT_REALLOC(mesh, sol, ip, wantedGap, law, o, tag, src) |
#define | MMG3D_TETRA_REALLOC(mesh, jel, wantedGap, law) |
#define | MMG3D_ALPHAD 20.7846096908265 /* 12*sqrt(3) */ |
#define | MMG3D_LLONG 2.5 |
#define | MMG3D_LSHRT 0.3 |
#define | MMG3D_LOPTL 1.3 |
#define | MMG3D_LOPTS 0.6 |
#define | MMG3D_SWAP06 0.0288675 /* 0.6/MMG3D_ALPHAD */ |
#define | MMG3D_SSWAPIMPROVE 1.053 |
#define | MMG3D_LSWAPIMPROVE 1.1 |
#define | MMG3D_DET2VOL 0.1666666666666667 /* 1/6 */ |
#define | MMG3D_BADKAL 0.2 |
#define | MMG3D_MAXKAL 1. |
#define | MMG3D_NPMAX 1000000 |
#define | MMG3D_NAMAX 200000 |
#define | MMG3D_NTMAX 2000000 |
#define | MMG3D_NEMAX 6000000 |
#define | MMG3D_SHORTMAX 0x7fff |
#define | MMG3D_VOLFRAC 1.e-5 |
Typedefs | |
typedef struct MMG3D_PROctree_s | MMG3D_PROctree_s |
typedef MMG3D_PROctree * | MMG3D_pPROctree |
Variables | |
static const uint8_t | MMG5_inxt3 [7] = { 1,2,3,0,1,2,3 } |
next vertex of tetra: {1,2,3,0,1,2,3} More... | |
static const uint8_t | MMG5_iprv3 [7] = { 3,0,1,2,3,0,1 } |
previous vertex of tetra: {3,0,1,2,3,0,1} More... | |
static const uint8_t | 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 int8_t | MMG5_idirinv [4][4] = {{-1,0,1,2},{0,-1,2,1},{0,1,-1,2},{0,2,1,-1}} |
static const int8_t | 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 int8_t | 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 uint8_t | 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 uint8_t | 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 uint8_t | 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 uint8_t | 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 uint8_t | 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 uint8_t | 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 uint8_t | 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(* | MMG3D_defsiz )(MMG5_pMesh, MMG5_pSol) |
int(* | MMG3D_gradsiz )(MMG5_pMesh, MMG5_pSol) |
int(* | MMG3D_gradsizreq )(MMG5_pMesh, MMG5_pSol) |
int(* | MMG5_intmet )(MMG5_pMesh, MMG5_pSol, int, int8_t, int, double) |
int(* | MMG5_interp4bar )(MMG5_pMesh, MMG5_pSol, int, int, double *) |
int(* | MMG5_movintpt )(MMG5_pMesh, MMG5_pSol, MMG3D_pPROctree, int *, int, int) |
int(* | MMG5_movbdyregpt )(MMG5_pMesh, MMG5_pSol, MMG3D_pPROctree, int *, int, int *, int, int, int) |
int(* | MMG5_movbdyrefpt )(MMG5_pMesh, MMG5_pSol, MMG3D_pPROctree, int *, int, int *, int, int) |
int(* | MMG5_movbdynompt )(MMG5_pMesh, MMG5_pSol, MMG3D_pPROctree, int *, int, int *, int, int) |
int(* | MMG5_movbdyridpt )(MMG5_pMesh, MMG5_pSol, MMG3D_pPROctree, int *, int, int *, int, int) |
int(* | MMG5_cavity )(MMG5_pMesh, MMG5_pSol, int, int, int *, int, double) |
int(* | MMG3D_PROctreein )(MMG5_pMesh, MMG5_pSol, MMG3D_pPROctree, int, double) |
#define MMG3D_ALPHAD 20.7846096908265 /* 12*sqrt(3) */ |
#define MMG3D_BADKAL 0.2 |
#define MMG3D_DET2VOL 0.1666666666666667 /* 1/6 */ |
#define MMG3D_LLONG 2.5 |
#define MMG3D_LOPTL 1.3 |
#define MMG3D_LOPTS 0.6 |
#define MMG3D_LSHRT 0.3 |
#define MMG3D_LSWAPIMPROVE 1.1 |
#define MMG3D_MAXKAL 1. |
#define MMG3D_NAMAX 200000 |
#define MMG3D_NEMAX 6000000 |
#define MMG3D_NPMAX 1000000 |
#define MMG3D_NTMAX 2000000 |
#define MMG3D_POINT_REALLOC | ( | mesh, | |
sol, | |||
ip, | |||
wantedGap, | |||
law, | |||
o, | |||
tag, | |||
src | |||
) |
Reallocation of point table and sol table and creation of point ip with coordinates o and tag tag
#define MMG3D_SHORTMAX 0x7fff |
#define MMG3D_SSWAPIMPROVE 1.053 |
#define MMG3D_SWAP06 0.0288675 /* 0.6/MMG3D_ALPHAD */ |
#define MMG3D_TETRA_REALLOC | ( | mesh, | |
jel, | |||
wantedGap, | |||
law | |||
) |
Reallocation of tetra table and creation of tetra jel
#define MMG3D_VOLFRAC 1.e-5 |
#define MMG5_RETURN_AND_FREE | ( | mesh, | |
met, | |||
ls, | |||
disp, | |||
val | |||
) |
Free allocated pointers of mesh and sol structure and return value val
typedef MMG3D_PROctree* MMG3D_pPROctree |
typedef struct MMG3D_PROctree_s MMG3D_PROctree_s |
PROctree cell: cellule for point region octree (to speed-up the research of the closest point to another one).
int MMG3D_addPROctree | ( | MMG5_pMesh | mesh, |
MMG3D_PROctree * | q, | ||
const int | no | ||
) |
int MMG3D_addPROctreeRec | ( | MMG5_pMesh | mesh, |
MMG3D_PROctree_s * | q, | ||
double * | ver, | ||
const int | no, | ||
int | nv | ||
) |
mesh | pointer toward the mesh structure. |
q | pointer toward an PROctree 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 PROctree cell. |
Add vertex in the suitable quadrant of the PROctree. 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_chk_shellEdgeTag | ( | MMG5_pMesh | mesh, |
int | start, | ||
int8_t | ia, | ||
int16_t | tag, | ||
int | ref | ||
) |
mesh | pointer toward the mesh |
start | tetra from which we start to travel |
ia | local index of edge that must be updated |
tag | edge tag |
ref | edge ref |
Test consistency of tag and ref of the boundary edge \ia of tetra start by traveling its shell.
void MMG3D_chkmeshedgestags | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh |
Test consistency between the tags in the xtetra of all mesh edges marked as boundaries.
void MMG3D_chkpointtag | ( | MMG5_pMesh | mesh | ) |
mesh | Test consistency between points and edges tags. If an error is detected, hash mesh edges to check the consistency between the tags of tetra edges. |
Check consistency between edge tags and point tags
An error has been detected: check the consistency between the tags of tetra edges
An error has been detected: check the consistency between the tags of tetra edges
An error has been detected: check the consistency between the tags of tetra edges
An error has been detected: check the consistency between the tags of tetra edges
void MMG3D_computeInqua | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int * | ne, | ||
double * | max, | ||
double * | avg, | ||
double * | min, | ||
int * | iel, | ||
int * | good, | ||
int * | med, | ||
int | his[5], | ||
int | imprim | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
ne | pointer toward the number of used tetra (to fill). |
max | pointer toward the maximal quality (normalized) to fill. |
avg | pointer toward the average quality (normalized) to fill. |
min | pointer toward the minimal quality (normalized) to fill. |
iel | pointer toward the index of the worst tetra (to fill). |
good | number of good elements (to fill). |
med | number of elements with a quality greather than 0.5 (to fill). |
his | pointer toward the mesh histogram (to fill). |
imprim | verbosity level |
Compute the needed quality information in order to print the quality histogram (for a classic storage of the metric at ridges).
void MMG3D_computeLESqua | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int * | ne, | ||
double * | max, | ||
double * | avg, | ||
double * | min, | ||
int * | iel, | ||
int * | good, | ||
int * | med, | ||
int | his[5], | ||
int | imprim | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
ne | pointer toward the number of used tetra (to fill). |
max | pointer toward the maximal quality (normalized) to fill. |
avg | pointer toward the average quality (normalized) to fill. |
min | pointer toward the minimal quality (normalized) to fill. |
iel | pointer toward the index of the worst tetra (to fill). |
good | number of good elements (to fill). |
med | number of elements with a quality greather than 0.5 (to fill). |
his | pointer toward the mesh histogram (to fill). |
imprim | verbosity level |
Compute the needed quality information in order to print the quality histogram in optimLES mode.
void MMG3D_computeOutqua | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int * | ne, | ||
double * | max, | ||
double * | avg, | ||
double * | min, | ||
int * | iel, | ||
int * | good, | ||
int * | med, | ||
int | his[5], | ||
int * | nrid, | ||
int | imprim | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
ne | pointer toward the number of used tetra (to fill). |
max | pointer toward the maximal quality (normalized) to fill. |
avg | pointer toward the average quality (normalized) to fill. |
min | pointer toward the minimal quality (normalized) to fill. |
iel | pointer toward the index of the worst tetra (to fill). |
good | number of good elements (to fill). |
med | number of elements with a quality greather than 0.5 (to fill). |
his | pointer toward the mesh histogram (to fill). |
nrid | number of tetra with 4 ridge points if we want to warn the user to fill. |
imprim | verbosity level |
Compute the needed quality information in order to print the quality histogram (for special storage of the metric at ridges).
int MMG3D_computePrilen | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
double * | avlen, | ||
double * | lmin, | ||
double * | lmax, | ||
int * | ned, | ||
int * | amin, | ||
int * | bmin, | ||
int * | amax, | ||
int * | bmax, | ||
int * | nullEdge, | ||
int8_t | metRidTyp, | ||
double ** | bd_in, | ||
int | hl[9] | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
avlen | average length (to fill). |
lmin | minimal length (to fill). |
lmax | max length (to fill). |
ned | number of edges (to fill). |
amin | (to fill). |
bmin | (to fill). |
amax | (to fill). |
bmax | (to fill). |
nullEdge | (to fill). |
metRidTyp | (to fill). |
bd_in | (to fill). |
hl | (to fill). |
Compute the required information to print the length histogram
int MMG3D_coquilFaceFirstLoop | ( | MMG5_pMesh | mesh, |
int | start, | ||
int | na, | ||
int | nb, | ||
int8_t | iface, | ||
int8_t | ia, | ||
int * | list, | ||
int * | ilist, | ||
int * | it1, | ||
int * | it2, | ||
int * | piv, | ||
int * | adj, | ||
int8_t * | 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, 1 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, | ||
int8_t * | iface, | ||
int8_t * | ia, | ||
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.
Step 1: Set metric at points belonging to a required edge: compute the metric as the mean of the length of the required eges passing through the point
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
Step 1: Set metric at points belonging to a required edge: compute the metric as the mean of the length of the required eges passing through the point
Step 2: size at non required 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
Step 3: 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_delPROctree | ( | MMG5_pMesh | mesh, |
MMG3D_pPROctree | q, | ||
const int | no | ||
) |
mesh | pointer toward the mesh structure. |
q | pointer toward the global PROctree. |
no | reference of the vertex to be deleted. |
Delete the vertex no from the PROctree structure.
int MMG3D_delPROctreeRec | ( | MMG5_pMesh | mesh, |
MMG3D_PROctree_s * | q, | ||
double * | ver, | ||
const int | no, | ||
const int | nv | ||
) |
mesh | pointer toward the mesh structure. |
q | pointer toward an PROctree 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 PROctree cell. |
Delete vertex no from the PROctree. This function is recursively called until we reach the terminal PROctree 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_delPROctreeVertex | ( | MMG5_pMesh | mesh, |
MMG3D_PROctree_s * | q, | ||
int | indNo | ||
) |
q | pointer toward a terminal PROctree cell (containing vertex) |
no | index of the point to delete from the PROctree |
Delete the vertex of index no from the terminal PROctree 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_displayQualHisto | ( | int | ne, |
double | max, | ||
double | avg, | ||
double | min, | ||
int | iel, | ||
int | good, | ||
int | med, | ||
int | his[5], | ||
int | nrid, | ||
int | optimLES, | ||
int | imprim | ||
) |
ne | number of used tetra. |
max | maximal quality (normalized). |
avg | average quality (normalized). |
min | minimal quality (normalized). |
iel | index of the worst tetra. |
good | number of good elements. |
med | number of elements with a quality greather than 0.5 |
his | pointer toward the mesh histogram. |
nrid | number of tetra with 4 ridge points if we want to warn the user. |
optimLES | 1 if we work in optimLES mode, 0 otherwise |
imprim | verbosity level |
Print the header of the histogram of mesh qualities then call the function that print the histogram for special metric at ridges.
int MMG3D_displayQualHisto_internal | ( | int | ne, |
double | max, | ||
double | avg, | ||
double | min, | ||
int | iel, | ||
int | good, | ||
int | med, | ||
int | his[5], | ||
int | nrid, | ||
int | optimLES, | ||
int | imprim | ||
) |
ne | number of used tetra. |
max | maximal quality (normalized). |
avg | average quality (normalized). |
min | minimal quality (normalized). |
iel | index of the worst tetra. |
good | number of good elements. |
med | number of elements with a quality greather than 0.5 |
his | pointer toward the mesh histogram. |
nrid | number of tetra with 4 ridge points if we want to warn the user. |
optimLES | 1 if we work in optimLES mode, 0 otherwise |
imprim | verbosity level |
Print histogram of mesh qualities for special storage of metric at ridges.
int MMG3D_findEdge | ( | MMG5_pMesh | mesh, |
MMG5_pTetra | pt, | ||
int | k, | ||
int | na, | ||
int | nb, | ||
int | error, | ||
int8_t * | mmgWarn, | ||
int8_t * | ia | ||
) |
mesh | pointer toward the mesh structure. |
pt | pointer toward the working tetra |
k | index of the tetra pt. |
na | index of the first extermity of the seeking edge. |
nb | index of the second extermity of the seeking edge. |
error | 1 if we want to print an error message, 0 for a warning. |
mmgWarn | static variable to print warning only once (not used if error==1) |
ia | pointer toward the edge index (to fill). |
Find the local index of the edge ia in the tetra pt of index k;
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).
void MMG3D_Free_arrays | ( | MMG5_pMesh * | mesh, |
MMG5_pSol * | sol, | ||
MMG5_pSol * | ls, | ||
MMG5_pSol * | disp, | ||
MMG5_pSol * | field | ||
) |
mesh | pointer toward the mesh structure. |
sol | pointer toward a solution / level-set. |
sol | pointer toward a displacement. |
Free mesh arrays.
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).
void MMG3D_Free_topoTables | ( | MMG5_pMesh | mesh | ) |
Free adja, xtetra and xpoint tables
void MMG3D_freePROctree | ( | MMG5_pMesh | , |
MMG3D_PROctree ** | q | ||
) |
void MMG3D_freePROctree_s | ( | MMG5_pMesh | mesh, |
MMG3D_PROctree_s * | q, | ||
int | nv | ||
) |
mesh | pointer toward the mesh structure. |
q | pointer toward the PROctree cell |
nv | number of vertices in the cell subtree |
Free the PROctree cell.
int MMG3D_getListSquare | ( | MMG5_pMesh | , |
double * | , | ||
MMG3D_PROctree * | , | ||
double * | , | ||
MMG3D_PROctree_s *** | |||
) |
int MMG3D_getListSquareRec | ( | MMG3D_PROctree_s * | q, |
double * | center, | ||
double * | rect, | ||
MMG3D_PROctree_s *** | qlist, | ||
double * | dist, | ||
double * | ani, | ||
double | l0, | ||
int | nc, | ||
int | dim, | ||
int * | index | ||
) |
q | pointer toward the PROctree 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 PROctrees that intersect rect. |
dist | pointer toward the list of distances between center of the PROctree 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 PROctree cells that intersect rect |
List the number of PROctree cells that intersect the rectangle rect. To avoid counting of the cells, a maximum is set.
int64_t MMG3D_getPROctreeCoordinate | ( | MMG3D_pPROctree | q, |
double * | ver, | ||
int | dim | ||
) |
q | pointer toward the global PROctree. |
ver | coordinates of the point. |
dim | space dimension (should be 3). |
Get the integer containing the coordinates
int MMG3D_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.
Mark the edges belonging to a required entity
int MMG3D_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 MMG3D_gradsizreq_ani | ( | 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.
Mark the edges belonging to a required entity (already done if the classic gradation is enabled)
int MMG3D_gradsizreq_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.
Mark the edges belonging to a required entity
Update the sizes and mark the treated points
int MMG3D_hashPrism | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure. |
Create partial table of adjacency for prisms (prism prism).
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_initPROctree | ( | MMG5_pMesh | mesh, |
MMG3D_pPROctree * | q, | ||
int | nv | ||
) |
mesh | pointer toward the mesh structure. |
q | pointer toward the global PROctree |
nv | maximum number of vertices in each cell before subdivision |
Initialisation of the PROctree cell.
void MMG3D_initPROctree_s | ( | MMG3D_PROctree_s * | q | ) |
q | pointer toward the PROctree cell |
Initialisation of the PROctree 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, | ||
int8_t | 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 PROctree cell to test. |
l | size of the cell |
zoneCenter | 3 coordinates of the center of the search zone |
radius | of the search zone |
void MMG3D_keep_only1Subdomain | ( | MMG5_pMesh | mesh, |
int | nsd | ||
) |
mesh | pointer toward the mesh structure. |
nsd | index of subdomain to keep. |
Keep only subdomain of index nsd and remove other subdomains.
int MMG3D_loadMesh_opened | ( | MMG5_pMesh | mesh, |
FILE * | inm, | ||
int | bin | ||
) |
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_mark_packedPoints | ( | MMG5_pMesh | mesh, |
int * | np, | ||
int * | nc | ||
) |
mesh | pointer toward the mesh structure (unused). |
np | pointer toward the number of used points |
nc | pointer toward the number of packed corners |
Pack the mesh points and store the packed point index in tmp. Don't preserve numbering order.
void MMG3D_mark_pointsOnReqEdge_fromTetra | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure. |
Set the s field of the points that belongs to a required edge to 1, set it to 0 otherwise.
int MMG3D_memOption | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure |
memory repartition for the -m option.
int MMG3D_memOption_memRepartition | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure |
memory repartition for the memMax amout of memory available.
int MMG3D_memOption_memSet | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure |
Set the memMax value to its "true" value (50% of the RAM or memory asked by user) and perform memory repartition for the -m option. If -m is not given, memMax is the detected RAM. If -m is provided, check the user option and set memMax to the available RAM if the user ask for too much memory. Last, perform the memory repartition between the mmg arrays with respect to the memMax value.
void MMG3D_mergeBranches | ( | MMG5_pMesh | mesh, |
MMG3D_PROctree_s * | q, | ||
int | dim, | ||
int | nv | ||
) |
mesh | pointer toward the mesh structure. |
q | pointer toward an PROctree cell. |
dim | dimension of the space (=3) |
nv | maximum number of points in an PROctree cell. |
Merge branches that have a parent counting less than nv vertices.
void MMG3D_mergeBranchesRec | ( | MMG3D_PROctree_s * | q0, |
MMG3D_PROctree_s * | q, | ||
int | dim, | ||
int | nv, | ||
int * | index | ||
) |
q0 | pointer toward an PROctree cell. |
q | pointer toward an PROctree cell. |
dim | dimension of the space (=3). |
nv | maximum number of points in an PROctree 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, | ||
MMG5_pSol | met | ||
) |
mesh | pointer toward the mesh structure. |
sol | pointer toward the level-set. |
met | pointer toward a metric (optionnal). |
Create implicit surface in mesh.
int MMG3D_movbdyregpt_geom | ( | MMG5_pMesh | mesh, |
int * | lists, | ||
const int | kel, | ||
const int | ip0, | ||
double | n[3], | ||
double | lambda[3], | ||
double | o[3], | ||
double | no[3] | ||
) |
mesh | pointer toward the mesh |
lists | pointer toward the surface ball of ip0 |
kel | index of the current element in the ball |
ip0 | global index of the point to move |
n | normal at ip0 |
lambda | barycentric coor of the new point in triangle |
o | coordinates of the new point (to compute) |
no | normal at new point (to compute) |
Compute the Bezier patch at element lists[kel], compute the new point coordinates, normal and tangent and check the geometric approximation.
int MMG3D_movePROctree | ( | MMG5_pMesh | mesh, |
MMG3D_pPROctree | q, | ||
int | no, | ||
double * | newVer, | ||
double * | oldVer | ||
) |
mesh | pointer toward the mesh structure. |
q | pointer toward the global PROctree. |
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 PROctree 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 PROctree. (ie: one move at a time in the mesh and the PROctree)
int MMG3D_movetetrapoints | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
MMG3D_pPROctree | PROctree, | ||
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_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 | mesh, |
MMG5_pSol | sol, | ||
int | k, | ||
int | ib | ||
) |
int MMG3D_movv_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
int | k, | ||
int | ib | ||
) |
int MMG3D_newElt | ( | MMG5_pMesh | mesh | ) |
get new elt address
int MMG3D_newPt | ( | MMG5_pMesh | mesh, |
double | c[3], | ||
int16_t | tag, | ||
int | src | ||
) |
get new point address
int MMG3D_nmgeom | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh |
Define continuous geometric support at non manifold vertices, using volume information.
int MMG3D_normalAdjaTri | ( | MMG5_pMesh | mesh, |
int | start, | ||
int8_t | 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_openMesh | ( | int | imprim, |
const char * | filename, | ||
FILE ** | inm, | ||
int * | bin, | ||
char * | modeASCII, | ||
char * | modeBIN | ||
) |
imprim | verbosity level (muted for stdout if -1) |
filename | file to open |
inm | pointer toward the file unit |
bin | 1 if file will be at binary format |
modeASCII | mode in which to open an ascii file ("r","r+","w","w+",...) |
modeASCII | mode in which to open an ascii file ("r","r+","w","w+",...) |
Try to open a Medit file at asked mode (read only, write, etc) and store if file is binary (depending on the extension).
int MMG3D_optbdry | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
MMG3D_pPROctree | PROctree, | ||
int | k | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
PROctree | pointer toward the PROctree structure. |
k | index of a tetra |
Try to optimize the tetra k. This tetra has a face on the boundary.
int MMG3D_optlap | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol | ||
) |
mesh | pointer toward the mesh structure. |
sol | pointer toward the sol structure |
Laplacian/anti-laplacian over the mesh to improve its mean quality
int MMG3D_opttyp | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
MMG3D_pPROctree | PROctree, | ||
int | testmark | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
PROctree | pointer toward the PROctree structure. |
testmark | all the tets with a mark less than testmark will not be treated. |
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_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_pack_pointArray | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure (unused). |
Pack a sparse point array. Don't preserve numbering order.
int MMG3D_pack_points | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure (unused). |
Pack a sparse point array and update the element vertices according to their new indices.
Store in tmp the pack index of each point and count the corner
Update the element vertices indices
Pack the point array
int MMG3D_pack_prismsAndQuads | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure |
Pack prisms and quads. Don't preserve numbering order.
int MMG3D_pack_sol | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol | ||
) |
mesh | pointer toward the mesh structure (unused). |
met | pointer toward the solution (metric or level-set) structure. |
Pack a sparse solution structure. Don't preserve numbering order.
int MMG3D_pack_tetra | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure |
Pack the sparse tetra. Doesn't pack the adjacency array. Don't preserve numbering order.
int MMG3D_pack_tetraAndAdja | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure |
Pack the sparse tetra and the associated adja array. Don't preserve numbering order.
int MMG3D_packMesh | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
MMG5_pSol | met | ||
) |
mesh | pointer toward the mesh structure (unused). |
sol | pointer toward a solution structure. |
met | pointer toward a solution 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_placeInListPROctree | ( | MMG3D_PROctree_s ** | qlist, |
MMG3D_PROctree_s * | q, | ||
int | index, | ||
int | size | ||
) |
qList | list of pointer on PROctree. |
q | pointer on PROctree 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, | ||
int8_t | 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_PROctree * | q | ) |
void MMG3D_printArbreDepth | ( | MMG3D_PROctree_s * | q, |
int | depth, | ||
int | nv, | ||
int | dim | ||
) |
q | pointer toward an PROctree 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_PROctreein_ani | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
MMG3D_pPROctree | PROctree, | ||
int | ip, | ||
double | lmax | ||
) |
mesh | pointer toward the mesh structure. |
sol | pointer toward the solution structure. |
PROctree | pointer toward the PROctree 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_PROctreein_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
MMG3D_pPROctree | PROctree, | ||
int | ip, | ||
double | lmax | ||
) |
mesh | pointer toward the mesh structure. |
sol | pointer toward the solution structure. |
PROctree | pointer toward the PROctree 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_rmc | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol | ||
) |
mesh | pointer toward the mesh |
sol | pointer toward the level-set |
Removal of small parasitic components (bubbles of material, etc) with volume less than mesh->info.rmc (default VOLFRAC) * volume of the mesh.
int MMG3D_rotate_surfacicBall | ( | MMG5_pMesh | mesh, |
int * | lists, | ||
int | ilists, | ||
int | ip0, | ||
double | r[3][3], | ||
double * | lispoi | ||
) |
mesh | pointer toward the mesh structure. |
lists | pointer toward the surfacic ball of the point. |
ilists | size of the surfacic ball. |
ip0 | global index of the point that we move |
r | rotation matrix that sends the normal at ip0 to z-axis |
lispoi | rotated surfacic ball (lispoi[k] is the common edge between faces lists[k-1] and lists[k]) |
Rotation of the oriented surfacic ball of ip0.
At this point, lispoi contains the oriented surface ball of point p0, that has been rotated through r, with the convention that triangle l has edges lispoi[l]; lispoi[l+1]
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_set_metricAtPointsOnReqEdges | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int8_t | ismet | ||
) |
mesh | pointer toward the mesh |
met | pointer toward the metric |
ismet | 1 if user provided metric |
Compute the metric at points on trequired adges as the mean of the lengths of the required eges to which belongs the point. The processeed points are marked with flag 3.
void MMG3D_set_reqBoundaries | ( | MMG5_pMesh | mesh | ) |
mesh | pointer towarad the mesh structure. |
Set all boundary triangles to required and add a tag to detect that they are not realy required.
int MMG3D_setMeshSize_alloc | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure. |
Allocation of the array fields of the mesh.
int MMG3D_setMeshSize_initData | ( | MMG5_pMesh | mesh, |
int | np, | ||
int | ne, | ||
int | nprism, | ||
int | nt, | ||
int | nquad, | ||
int | na | ||
) |
mesh | pointer toward the mesh structure. |
np | number of vertices. |
ne | number of tetrahedra. |
nprism | number of prisms. |
nt | number of triangles. |
nquad | number of quads. |
na | number of edges. |
Check the input mesh size and assign their values to the mesh.
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_PROctree * | q, |
int | dim | ||
) |
void MMG3D_sizeArbreRec | ( | MMG3D_PROctree_s * | q, |
int | nv, | ||
int | dim, | ||
int * | s1, | ||
int * | s2 | ||
) |
q | pointer toward an PROctree cell |
nv | maximum number of vertices in an PROctree leaf |
dim | dimension in which we work |
s | size of the PROctree |
Print the memory size of the PROctree.
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_pPROctree | PROctree, | ||
int | k, | ||
int | iar, | ||
double | OCRIT | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
PROctree | pointer toward the PROctree structure. |
k | elt index. |
iar | index of edge to split. |
OCRIT | quality threshold. |
Try to split edge number iar of tetra k
int MMG3D_splsurfedge | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
MMG5_pTetra | pt, | ||
MMG5_pxTetra | pxt, | ||
int8_t | imax, | ||
int8_t | typchk, | ||
int8_t | chkRidTet, | ||
int * | warn | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
k | index of the tetra to split. |
pt | tetra to split |
pxt | associated xtetra |
imax | index of the edge to split to split |
typchk | type of check |
chkRidTet | check for ridge metric |
*warn | warn is set to 1 if we don't have enough memory to complete mesh. |
Split a surface edge using split1b
int MMG3D_swap23 | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int8_t | metRidTyp, | ||
int | ifac, | ||
int | conf0, | ||
int | adj, | ||
int | conf1 | ||
) |
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) |
ifac | face of the tetra k that give the best results for the swap23 |
conf0 | detected configuration for the swap23 of the tetra k |
adj | neighbour of the tetra k through the face ifac (4*k1+ifac1) |
conf1 | detected configuration for the swap23 of the tetra adj/4 |
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_swpItem | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
MMG3D_pPROctree | PROctree, | ||
int | k, | ||
int | iar | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
PROctree | pointer toward the PROctree 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, | ||
int8_t | 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.
void MMG3D_unset_reqBoundaries | ( | MMG5_pMesh | mesh | ) |
mesh | pointer towarad the mesh structure. |
Set all boundary triangles to required and add a tag to detect that they are not realy required.
int MMG3D_update_eltsVertices | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure (unused). |
Update the element vertices indices with the pack point index stored in the tmp field of the points.
int MMG3D_update_xtetra | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure. |
Update the xtetra array to store the new bdy faces created by the isosurface discretization.
double MMG3D_vfrac | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
int | k, | ||
int | pm | ||
) |
mesh | pointer toward the mesh structure |
sol | pointer toward the ls function |
k | index of the triangle |
Calculate the area of the positive (if pm == 1) or negative (if pm == -1) subdomain inside tetra k defined by the ls function in sol
Checks for debug mode
int MMG3D_zaldy | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh |
allocate main structure
int MMG5_anatet | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int8_t | 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 for external tria and with domain of max ref for interface tria.
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 |
mesh | mesh |
ip0 | first edge extremity |
ip1 | second edge extremity |
s | parameter value |
o | point coordinates |
no | normal at point o (to fill) |
to | tangent at point o along edge ip0 ip1 (to fill) |
Compute point located at parameter value s from point ip0, as well as interpolate of normals, tangent for a NOM edge
|
inline |
mesh | mesh |
ip0 | first edge extremity |
ip1 | second edge extremity |
s | parameter value |
o | point coordinates |
no | normal at point o (to fill) |
to | tangent at point o (to fill) |
Compute point located at parameter value step from point ip0, as well as interpolate of normals, tangent for a REF edge.
|
inline |
mesh | mesh |
ip0 | first edge extremity |
ip1 | second edge extremity |
s | parameter value |
v | reference normal |
o | point coordinates |
no | normal at point o (to fill) |
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 |
mesh | mesh |
ip0 | first edge extremity |
ip1 | second edge extremity |
s | parameter value |
o | point coordinates |
no1 | normal at point o (to fill) |
no2 | normal at point o (to fill) |
to | tangent at point o (to fill) |
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_boulenmInt | ( | MMG5_pMesh | mesh, |
int | start, | ||
int | ip, | ||
double | t[3] | ||
) |
mesh | pointer toward the mesh structure. |
start | tetra index. |
ip | point index. |
t | computed tangent vector. |
Travel the ball of the internal non manifold point ip in tetra start and calculate the tangent vector to the underlying curve.
int MMG5_boulernm | ( | MMG5_pMesh | mesh, |
MMG5_Hash * | hash, | ||
int | start, | ||
int | ip, | ||
int * | ng, | ||
int * | nr | ||
) |
mesh | pointer toward the mesh structure. |
hash | pointer toward an allocated hash table. |
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_boulesurfvolpNom | ( | MMG5_pMesh | mesh, |
int | start, | ||
int | ip, | ||
int | iface, | ||
int * | listv, | ||
int * | ilistv, | ||
int * | lists, | ||
int * | ilists, | ||
int * | refmin, | ||
int * | refplus, | ||
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. |
refmin | return the reference of one of the two subdomains in presence |
refplus | return the reference of the other subdomain in presence |
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. |
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, | ||
int8_t | iface, | ||
int8_t | iedg, | ||
int * | listv, | ||
int | ilistv, | ||
int * | lists, | ||
int | ilists, | ||
int | refmin, | ||
int | refplus, | ||
int8_t | typchk, | ||
int | isnm, | ||
int8_t | isnmint | ||
) |
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. |
refmin | reference of one of the two subdomains in presence |
refplus | reference of the other subdomain in presence |
typchk | typchk type of checking permformed for edge length (hmax or MMG3D_LLONG criterion). |
isnm | 1 if edge is non-manifold |
isnmint | 1 if ip is an internal non manifold point; |
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). If isnm is 1, the collapse occurs along an external MG_NOM edge. If isnmint is 1, ip is an internal non manifold point and dont have normals. In this last case, lists, ilists refmin, refplus and isnm variables aren't used (we neither have a surfacic ball nor "positive" and "negative" volumes)
int MMG5_chkcol_int | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int8_t | iface, | ||
int8_t | iedg, | ||
int * | list, | ||
int | ilist, | ||
int8_t | typchk | ||
) |
Check whether collapse ip -> iq could be performed, ip internal ; 'mechanical' tests (positive jacobian) are not performed here
int8_t MMG5_chkedg | ( | MMG5_pMesh | mesh, |
MMG5_Tria * | pt, | ||
int8_t | 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 | ) |
mesh | pointer toward the mesh structure. |
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, | ||
int | refmin, | ||
int | refplus, | ||
int8_t | isminp, | ||
int8_t | 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 refmin and outside the shell of edge. |
ndepplus | ndex of an elt with ref refplus and outside the shell of edge. |
refmin | reference of one of the two subdomains in presence |
refplus | reference of the other subdomain in presence |
isminp | 1 if we have found a tetra with ref refmin |
isplp | 1 if we have found a tetra with ref refplus |
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, | ||
int8_t | 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, | ||
int8_t | 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_chkVertexConnectedDomains | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure. |
check subdomains connected by a vertex and mark these vertex as CRN and REQ.
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, | ||
int8_t | indq, | ||
int8_t | 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).
Merge tags and references of edges that will merge due to the collapse (the shell of each edge is travelled so each xtetra of the shell is updated). Note that it can't be done in the previous loop because the mesh would be corrupted if we stop the collapse. It can't neither be done in the next loop because we start to delete the elements of the shell.
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, | ||
int8_t | 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, | ||
int8_t * | iface, | ||
int8_t * | 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 | ||
) |
mesh | pointer toward the mesh. |
sol,pointer | toward the sol structure. |
weightelt | put weight on elts. |
npcible | estimation of the final number of nodes/ |
Approximation of the final number of vertex.
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.
int MMG5_deltag | ( | MMG5_pMesh | mesh, |
int | start, | ||
int | ia, | ||
int16_t | tag | ||
) |
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 | mesh | ) |
Calculate an estimate of the average (isotropic) length of edges in the mesh
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_hashFace | ( | MMG5_pMesh | mesh, |
MMG5_Hash * | hash, | ||
int | ia, | ||
int | ib, | ||
int | ic, | ||
int | k | ||
) |
mesh | pointer toward the mesh. |
hash | pointer toward the hash table to fill. |
ia | first vertex of face to hash. |
ib | second vertex of face to hash. |
ic | third vertex of face to hash. |
k | index of face to hash. |
int MMG5_hashGetFace | ( | MMG5_Hash * | hash, |
int | ia, | ||
int | ib, | ||
int | ic | ||
) |
return index of triangle ia ib ic
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 | ||
) |
hash | pointer toward the hash table in which edges are stored |
a | first edge extremity |
b | second edge extremity |
ref | reference to assign to the edge |
tag | tag to assign |
set tag to edge on geometry
void MMG5_Init_parameters | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure. |
Initialization of the input parameters.
MMG3D_IPARAM_lag is 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, | ||
int8_t | 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, | ||
int8_t | 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 | , | ||
int8_t | , | ||
double | , | ||
double * | |||
) |
int MMG5_intridmet | ( | MMG5_pMesh | , |
MMG5_pSol | , | ||
int | , | ||
int | , | ||
double | , | ||
double * | , | ||
double * | |||
) |
int MMG5_intvolmet | ( | MMG5_pMesh | , |
MMG5_pSol | , | ||
int | , | ||
int8_t | , | ||
double | , | ||
double * | |||
) |
int MMG5_isbr | ( | MMG5_pMesh | mesh, |
int | ref | ||
) |
Return 1 if reference ref is in the br table, 0 otherwise
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.
size_t MMG5_memSize | ( | void | ) |
Compute the available memory size of the computer.
int MMG5_mmg3d1_delone | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int * | permNodGlob | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
permNodGlob | if provided, strore the global permutation of nodes |
Main adaptation routine.
— stage 1: geometric mesh
— stage 2: computational mesh
int MMG5_mmg3d1_pattern | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int * | permNodGlob | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
permNodGlob | if provided, strore the global permutation of nodes. |
Main adaptation routine.
— stage 1: geometric mesh
— Stage 2: computational mesh
int MMG5_mmg3d3 | ( | MMG5_pMesh | mesh, |
MMG5_pSol | disp, | ||
MMG5_pSol | met, | ||
int ** | invalidTets | ||
) |
mesh | mesh structure |
disp | displacement structure |
met | metric structure |
invalidTets | array to store the list of invalid tetra if we are unable to move. |
Lagrangian node displacement and meshing. Code for options: info.lag >= 0 -> displacement, info.lag > 0 -> displacement+remeshing with swap and moves info.lag > 1 -> displacement+remeshing with split+collapse+swap+move
int MMG5_mmg3dBezierCP | ( | MMG5_pMesh | mesh, |
MMG5_Tria * | pt, | ||
MMG5_pBezier | pb, | ||
int8_t | 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)
Orientation of the normals at non-manifold points
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_movbdynomintpt_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
MMG3D_pPROctree | PROctree, | ||
int * | listv, | ||
int | ilistv, | ||
int | improve | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
PROctree | pointer toward the PROctree structure. |
listv | pointer toward the volumic ball of the point. |
ilistv | 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 non manifold point, whose volumic ball is passed
int MMG5_movbdynompt_ani | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
MMG3D_pPROctree | PROctree, | ||
int * | listv, | ||
int | ilistv, | ||
int * | lists, | ||
int | ilists, | ||
int | improve | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
PROctree | pointer toward the PROctree 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_pPROctree | PROctree, | ||
int * | listv, | ||
int | ilistv, | ||
int * | lists, | ||
int | ilists, | ||
int | improve | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
PROctree | pointer toward the PROctree 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 surfacic balls are passed.
int MMG5_movbdyrefpt_ani | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
MMG3D_pPROctree | PROctree, | ||
int * | listv, | ||
int | ilistv, | ||
int * | lists, | ||
int | ilists, | ||
int | improve | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
PROctree | pointer toward the PROctree 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_pPROctree | PROctree, | ||
int * | listv, | ||
int | ilistv, | ||
int * | lists, | ||
int | ilists, | ||
int | improve | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
PROctree | pointer toward the PROctree 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_pPROctree | PROctree, | ||
int * | listv, | ||
int | ilistv, | ||
int * | lists, | ||
int | ilists, | ||
int | improveSurf, | ||
int | improveVol | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
PROctree | pointer toward the PROctree 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, compute patch in triangle iel and check that geometric approx has not been degraded too much
int MMG5_movbdyregpt_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
MMG3D_pPROctree | PROctree, | ||
int * | listv, | ||
int | ilistv, | ||
int * | lists, | ||
int | ilists, | ||
int | improveSurf, | ||
int | improveVol | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
PROctree | pointer toward the PROctree 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_pPROctree | PROctree, | ||
int * | listv, | ||
int | ilistv, | ||
int * | lists, | ||
int | ilists, | ||
int | improve | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
PROctree | pointer toward the PROctree 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_pPROctree | PROctree, | ||
int * | listv, | ||
int | ilistv, | ||
int * | lists, | ||
int | ilists, | ||
int | improve | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
PROctree | pointer toward the PROctree 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_pPROctree | PROctree, | ||
int * | list, | ||
int | ilist, | ||
int | improve | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
PROctree | pointer toward the PROctree 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_pPROctree | PROctree, | ||
int * | list, | ||
int | ilist, | ||
int | improve | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
PROctree | pointer toward the PROctree 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_pPROctree | PROctree, | ||
int * | list, | ||
int | ilist, | ||
int | improve | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
PROctree | pointer toward the PROctree 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_pPROctree | PROctree, | ||
double | clickSurf, | ||
double | clickVol, | ||
int | moveVol, | ||
int | improveSurf, | ||
int | improveVolSurf, | ||
int | improveVol, | ||
int | maxit, | ||
int | testmark | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
PROctree | pointer toward the PROctree 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 |
testmark | all the tets with a mark less than testmark will not be treated. |
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).
int MMG5_norface | ( | MMG5_pMesh | mesh, |
int | k, | ||
int | iface, | ||
double | n[3] | ||
) |
Compute normal to face iface of tetra k, exterior to tetra k
int MMG5_norver | ( | MMG5_pMesh | mesh | ) |
compute normals at C1 vertices, for C0: tangents
|
inline |
naive (increasing) sorting algorithm, for very small tabs ; permutation is stored in perm
int16_t MMG5_openCoquilTravel | ( | MMG5_pMesh | mesh, |
int | na, | ||
int | nb, | ||
int * | adj, | ||
int * | piv, | ||
int8_t * | iface, | ||
int8_t * | 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_paktet | ( | MMG5_pMesh | mesh | ) |
mesh | pointer toward the mesh structure. |
tetra packing.
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 | mesh, |
MMG5_pSol | disp | ||
) |
For debugging purposes: save disp
int MMG5_setadj | ( | MMG5_pMesh | mesh | ) |
mesh | pointer towarad the mesh structure. |
topology: set tria adjacency, detect Moebius, flip faces, count connected comp.
int MMG5_setdhd | ( | MMG5_pMesh | mesh | ) |
check for ridges: dihedral angle
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.
int MMG5_settag | ( | MMG5_pMesh | mesh, |
int | start, | ||
int | ia, | ||
int16_t | tag, | ||
int | edg | ||
) |
mesh | pointer toward the mesh structure |
start | tetra from which we start |
ia | local index of the edge in start |
tag | tag to set |
edg | edge reference to set |
Set tag tag and ref edg of edge ia (if need be) in tetra start by travelling its shell.
int MMG5_singul | ( | MMG5_pMesh | mesh | ) |
check for singularities
int MMG5_split1 | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
int | vx[6], | ||
int8_t | 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, | ||
int8_t | metRidTyp, | ||
int8_t | 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], | ||
int8_t | 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], | ||
int8_t | 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], | ||
int8_t | 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], | ||
int8_t | 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], | ||
int8_t | 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, | ||
int8_t | 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], | ||
int8_t | 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], | ||
int8_t | 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], | ||
int8_t | 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], | ||
int8_t | 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 | ||
) |
mesh | pointer toward the mesh structure. |
start | starting tetra. |
ia | local edge index in tetra start. |
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_pPROctree | PROctree, | ||
int8_t | 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 |
PROctree | pointer toward the PROctree 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_pPROctree | PROctree, | ||
int8_t | 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. |
PROctree | pointer toward the PROctree 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_pPROctree | PROctree, | ||
int | typchk | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
PROctree | pointer toward the PROctree 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_pPROctree | PROctree, | ||
int | typchk, | ||
int | testmark | ||
) |
mesh | pointer toward the mesh structure. |
met | pointer toward the metric structure. |
crit | coefficient of quality improvment. |
PROctree | pointer toward the PROctree structure in delaunay mode and toward the NULL pointer otherwise |
typchk | type of checking permformed for edge length (hmin or LSHORT criterion) |
testmark | all the tets with a mark less than testmark will not be treated. |
Internal edge flipping.
void MMG5_tet2tri | ( | MMG5_pMesh | mesh, |
int | k, | ||
int8_t | 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.
|
extern |
|
extern |
|
extern |
|
extern |
|
static |
arpt[i]: edges passing through vertex i
|
extern |
|
extern |
|
extern |
|
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
|
extern |
|
extern |
|
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
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
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 ...