mmg3d
split_3d.c File Reference

Functions to create new points. More...

Include dependency graph for split_3d.c:

Functions

int MMG3D_split1_sim (MMG5_pMesh mesh, MMG5_pSol met, int k, int vx[6])
 
int MMG5_split1 (MMG5_pMesh mesh, MMG5_pSol met, int k, int vx[6], int8_t metRidTyp)
 
static int MMG3D_normalDeviation (MMG5_pMesh mesh, int start, int8_t iface, int8_t ia, int idx, int ip, double n0[3])
 
int MMG3D_simbulgept (MMG5_pMesh mesh, MMG5_pSol met, int *list, int ret, int ip)
 
int MMG3D_normalAdjaTri (MMG5_pMesh mesh, int start, int8_t iface, int ia, double n[3])
 
int MMG5_split1b (MMG5_pMesh mesh, MMG5_pSol met, int *list, int ret, int ip, int cas, int8_t metRidTyp, int8_t chkRidTet)
 
int MMG3D_split2sf_sim (MMG5_pMesh mesh, MMG5_pSol met, int k, int vx[6])
 
int MMG5_split2sf (MMG5_pMesh mesh, MMG5_pSol met, int k, int vx[6], int8_t metRidTyp)
 
int MMG3D_split2_sim (MMG5_pMesh mesh, MMG5_pSol met, int k, int vx[6])
 
int MMG5_split2 (MMG5_pMesh mesh, MMG5_pSol met, int k, int vx[6], int8_t metRidTyp)
 
int MMG3D_split3_sim (MMG5_pMesh mesh, MMG5_pSol met, int k, int vx[6])
 
int MMG5_split3 (MMG5_pMesh mesh, MMG5_pSol met, int k, int vx[6], int8_t metRidTyp)
 
int MMG3D_split3cone_sim (MMG5_pMesh mesh, MMG5_pSol met, int k, int vx[6])
 
int MMG5_split3cone (MMG5_pMesh mesh, MMG5_pSol met, int k, int vx[6], int8_t metRidTyp)
 
static void MMG3D_configSplit3op (MMG5_pTetra pt, int vx[6], uint8_t tau[4], const uint8_t **taued, uint8_t sym[4], uint8_t symed[6], uint8_t *ip0, uint8_t *ip1, uint8_t *ip2, uint8_t *ip3, uint8_t *ie0, uint8_t *ie1, uint8_t *ie2, uint8_t *ie3, uint8_t *ie4, uint8_t *ie5, uint8_t *imin03, uint8_t *imin12)
 
int MMG3D_split3op_sim (MMG5_pMesh mesh, MMG5_pSol met, int k, int vx[6])
 
int MMG5_split3op (MMG5_pMesh mesh, MMG5_pSol met, int k, int vx[6], int8_t metRidTyp)
 
int MMG5_split4bar (MMG5_pMesh mesh, MMG5_pSol met, int k, int8_t metRidTyp)
 
static void MMG3D_configSplit4sf (MMG5_pTetra pt, int vx[6], uint8_t tau[4], const uint8_t **taued, uint8_t *imin23, uint8_t *imin12)
 
int MMG3D_split4sf_sim (MMG5_pMesh mesh, MMG5_pSol met, int k, int vx[6])
 
int MMG5_split4sf (MMG5_pMesh mesh, MMG5_pSol met, int k, int vx[6], int8_t metRidTyp)
 
int MMG3D_split4op_sim (MMG5_pMesh mesh, MMG5_pSol met, int k, int vx[6])
 
int MMG5_split4op (MMG5_pMesh mesh, MMG5_pSol met, int k, int vx[6], int8_t metRidTyp)
 
static void MMG3D_configSplit5 (MMG5_pTetra pt, int vx[6], uint8_t tau[4], const uint8_t **taued, uint8_t *imin)
 
int MMG3D_split5_sim (MMG5_pMesh mesh, MMG5_pSol met, int k, int vx[6])
 
int MMG5_split5 (MMG5_pMesh mesh, MMG5_pSol met, int k, int vx[6], int8_t metRidTyp)
 
int MMG3D_split6_sim (MMG5_pMesh mesh, MMG5_pSol met, int k, int vx[6])
 
int MMG5_split6 (MMG5_pMesh mesh, MMG5_pSol met, int k, int vx[6], int8_t metRidTyp)
 
static int MMG3D_chksplit (MMG5_pMesh mesh, MMG5_pSol met, int ip, int *list, int ret, double crit)
 
int MMG5_splitedg (MMG5_pMesh mesh, MMG5_pSol met, int iel, int iar, double crit)
 

Variables

int8_t ddb
 

Detailed Description

Functions to create new points.

Author
Charles Dapogny (UPMC)
Cécile Dobrzynski (Bx INP/Inria/UBordeaux)
Pascal Frey (UPMC)
Algiane Froehly (Inria/UBordeaux)
Version
5
Todo:
Doxygen documentation

Function Documentation

◆ MMG3D_chksplit()

static int MMG3D_chksplit ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  ip,
int *  list,
int  ret,
double  crit 
)
inlinestatic
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
ipindex of new point.
listpointer toward the shell of edge.
retsize of the shell of edge.
critquality threshold.
Returns
0 if fail, 1 otherwise.

Check quality before split.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_configSplit3op()

static void MMG3D_configSplit3op ( MMG5_pTetra  pt,
int  vx[6],
uint8_t  tau[4],
const uint8_t **  taued,
uint8_t  sym[4],
uint8_t  symed[6],
uint8_t *  ip0,
uint8_t *  ip1,
uint8_t *  ip2,
uint8_t *  ip3,
uint8_t *  ie0,
uint8_t *  ie1,
uint8_t *  ie2,
uint8_t *  ie3,
uint8_t *  ie4,
uint8_t *  ie5,
uint8_t *  imin03,
uint8_t *  imin12 
)
inlinestatic
Parameters
ptinitial tetra
vxindex of points to insert along edges
tauvertices permutation
tauededges permutation
symvertices symmetry
symededges symmetry
ip0vertex 0 for reference config
ip1vertex 1 for reference config
ip2vertex 2 for reference config
ip3vertex 3 for reference config
ie0edge 0 for reference config
ie1edge 1 for reference config
ie2edge 2 for reference config
ie3edge 3 for reference config
ie4edge 4 for reference config
ie5edge 5 for reference config
imin03minimal index of vertices ip0 and ip3
imin12minimal index of vertices ip1 and ip2

Set permutation /symmetry of vertices for 3 opposite edges config: generic case : 35

Here is the caller graph for this function:

◆ MMG3D_configSplit4sf()

static void MMG3D_configSplit4sf ( MMG5_pTetra  pt,
int  vx[6],
uint8_t  tau[4],
const uint8_t **  taued,
uint8_t *  imin23,
uint8_t *  imin12 
)
inlinestatic
Parameters
ptinitial tetra
vxindex of points to insert along edges
tauvertices permutation
tauededges permutation
imin23minimal index of vertices ip0 and ip3
imin12minimal index of vertices ip1 and ip2

Set permutation of vertices for the split of 4 edges when 3 lie on the same face. Reference configuration 23

Here is the caller graph for this function:

◆ MMG3D_configSplit5()

static void MMG3D_configSplit5 ( MMG5_pTetra  pt,
int  vx[6],
uint8_t  tau[4],
const uint8_t **  taued,
uint8_t *  imin 
)
inlinestatic
Parameters
ptinitial tetra
vxindex of points to insert along edges
tauvertices permutation
tauededges permutation
iminminimal index of vertices tau[0] and tau[1]

Set permutation of vertices for the split of 5 edges. Reference configuration is 62.

Here is the caller graph for this function:

◆ MMG3D_normalAdjaTri()

int MMG3D_normalAdjaTri ( MMG5_pMesh  mesh,
int  start,
int8_t  iface,
int  ia,
double  n[3] 
)
Parameters
meshpointer toward the mesh structure
startindex of the working tetra
ifacelocal index of the boundary face of the tetra start
ialocal index on face iface of the edge through which we seek the adjacent triangle of the triangle iface of start.
nnormal of the new boundary face in the tetra idx.
Returns
1 if success, 0 if we want to refuse the collapse, -1 if fail.

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_normalDeviation()

static int MMG3D_normalDeviation ( MMG5_pMesh  mesh,
int  start,
int8_t  iface,
int8_t  ia,
int  idx,
int  ip,
double  n0[3] 
)
inlinestatic
Parameters
meshpointer toward the mesh structure
startindex of the tetra that we want to split
ifacelocal index of the boundary face that we want to split
ialocal index of the boundary edge that we want to split
idxlocal index of the new tetra that we want to study after the splitting of the tetra start (idx=0 or 1)
ipnew point index
n0normal of the new boundary face in the tetra idx.
Returns
1 if success (no new sharp angle), 0 if we create a sharp angle, -1 if fail.

Check that the split of the edge ia of the tetra start does not create a ridge along the $ idx^{th} $ edge opposite to ip in the boundary triangle iface. Store the normal of the $ idx^{th} $ boundary triangle in n0.

Store the first boundary triangle (the one that is created in the boundary face that we split)

Compute the normal of the first triangle

Compute the normal of the second triangle (triangle adjacent to the first through the edge iploc)

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_simbulgept()

int MMG3D_simbulgept ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int *  list,
int  ret,
int  ip 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric.
listpointer toward the edge shell.
retsize of the edge shell.
ipnew point index.
Returns
1 if all checks are ok
0 if fail due to a very bad quality elt
2 if fail due to a ridge angle creation

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_split1_sim()

int MMG3D_split1_sim ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
int  vx[6] 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kindex of element to split.
vx$vx[i]$ is the index of the point to add on the edge i.
Returns
0 if split leads to invalid situation, else 1.

Simulate the splitting of 1 edge of element

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_split2_sim()

int MMG3D_split2_sim ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
int  vx[6] 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kindex of element to split.
vx$vx[i]$ is the index of the point to add on the edge i.
Returns
0 if the split fail, 1 otherwise

Simulate split of two opposite edges.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_split2sf_sim()

int MMG3D_split2sf_sim ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
int  vx[6] 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kindex of element to split.
vx$vx[i]$ is the index of the point to add on the edge i.
Returns
0 if the split fail, 1 otherwise

Simulate split of two edges that belong to a common face

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_split3_sim()

int MMG3D_split3_sim ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
int  vx[6] 
)

Simulate split of 1 face (3 edges)

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_split3cone_sim()

int MMG3D_split3cone_sim ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
int  vx[6] 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kindex of element to split.
vx$vx[i]$ is the index of the point to add on the edge i.
Returns
0 if the split fail, 1 otherwise

Simulate split of 3 edges in cone configuration.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_split3op_sim()

int MMG3D_split3op_sim ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
int  vx[6] 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kindex of element to split.
vx$vx[i]$ is the index of the point to add on the edge i.
Returns
0 if the split fail, 1 otherwise

Simulate split of 3 edges in opposite configuration.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_split4op_sim()

int MMG3D_split4op_sim ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
int  vx[6] 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kindex of element to split.
vx$vx[i]$ is the index of the point to add on the edge i.
Returns
0 if the split fail, 1 otherwise

Simulate split of 4 edges in opposite configuration.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_split4sf_sim()

int MMG3D_split4sf_sim ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
int  vx[6] 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kindex of element to split.
vx$vx[i]$ is the index of the point to add on the edge i.
Returns
0 if the split fail, 1 otherwise

Simulate split of 4 edges in a configuration when 3 lie on the same face.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_split5_sim()

int MMG3D_split5_sim ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
int  vx[6] 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kindex of element to split.
vx$vx[i]$ is the index of the point to add on the edge i.
Returns
0 if the split fail, 1 otherwise

Simulate split of 5 edges.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG3D_split6_sim()

int MMG3D_split6_sim ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
int  vx[6] 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kindex of element to split.
vx$vx[i]$ is the index of the point to add on the edge i.
Returns
0 if the split fail, 1 otherwise

Simulate split of 6 edges.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG5_split1()

int MMG5_split1 ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
int  vx[6],
int8_t  metRidTyp 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kindex of element to split.
vx$vx[i]$ is the index of the point to add on the edge i.
metRidTypmetric storage (classic or special)
Returns
0 if fail, 1 otherwise

Split 1 edge of tetra k.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG5_split1b()

int MMG5_split1b ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int *  list,
int  ret,
int  ip,
int  cas,
int8_t  metRidTyp,
int8_t  chkRidTet 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
listpointer toward the shell of edge.
retsize of the shell of edge.
ipidex of new point.
casflag to watch the length of the new edges.
metRidTypType of storage of ridges metrics: 0 for classic storage, 1 for special storage.
chkRidTetif 1, avoid the creation of a tet with 4 ridge vertices
Returns
-1 if we fail, 0 if we don't split the edge, 1 if success.

Split edge $list[0]\%6$, 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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG5_split2()

int MMG5_split2 ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
int  vx[6],
int8_t  metRidTyp 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kindex of element to split.
vx$vx[i]$ is the index of the point to add on the edge i.
metRidTypmetric storage (classic or special)
Returns
0 if fail, 1 otherwise

Split of two OPPOSITE edges

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG5_split2sf()

int MMG5_split2sf ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
int  vx[6],
int8_t  metRidTyp 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kindex of element to split.
vx$vx[i]$ is the index of the point to add on the edge i.
metRidTypmetric storage (classic or special)
Returns
0 if fail, 1 otherwise

Split of two edges that belong to a common face : 1 tetra becomes 3

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG5_split3()

int MMG5_split3 ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
int  vx[6],
int8_t  metRidTyp 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kindex of element to split.
vx$vx[i]$ is the index of the point to add on the edge i.
metRidTypmetric storage (classic or special)
Returns
0 if fail, 1 otherwise

1 face (3 edges) subdivided

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG5_split3cone()

int MMG5_split3cone ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
int  vx[6],
int8_t  metRidTyp 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kindex of element to split.
vx$vx[i]$ is the index of the point to add on the edge i.
metRidTypmetric storage (classic or special)
Returns
0 if fail, 1 otherwise

Split 3 edge in cone configuration

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG5_split3op()

int MMG5_split3op ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
int  vx[6],
int8_t  metRidTyp 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kindex of element to split.
vx$vx[i]$ is the index of the point to add on the edge i.
metRidTypmetric storage (classic or special)
Returns
0 if fail, 1 otherwise

Split 3 opposite edges in a tetra

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG5_split4bar()

int MMG5_split4bar ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
int8_t  metRidTyp 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
ktetra index.
metRidTypmetric storage (classic or special)
Returns
0 if fail, index of created point otherwise (ib)

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 ?

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG5_split4op()

int MMG5_split4op ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
int  vx[6],
int8_t  metRidTyp 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kindex of element to split.
vx$vx[i]$ is the index of the point to add on the edge i.
metRidTypmetric storage (classic or special)
Returns
0 if fail, 1 otherwise

Split 4 edges in a configuration when no 3 edges lie on the same face

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG5_split4sf()

int MMG5_split4sf ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
int  vx[6],
int8_t  metRidTyp 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kindex of element to split.
vx$vx[i]$ is the index of the point to add on the edge i.
metRidTypmetric storage (classic or special)
Returns
0 if fail, 1 otherwise

Split 4 edges in a configuration when 3 lie on the same face

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG5_split5()

int MMG5_split5 ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
int  vx[6],
int8_t  metRidTyp 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kindex of element to split.
vx$vx[i]$ is the index of the point to add on the edge i.
metRidTypmetric storage (classic or special)
Returns
0 if fail, 1 otherwise

Split 5 edges

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG5_split6()

int MMG5_split6 ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
int  vx[6],
int8_t  metRidTyp 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kindex of element to split.
vx$vx[i]$ is the index of the point to add on the edge i.
metRidTypmetric storage (classic or special)
Returns
0 if fail, 1 otherwise

split all faces (6 edges)

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG5_splitedg()

int MMG5_splitedg ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  iel,
int  iar,
double  crit 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
ieltetra index
iaredge index of iel
critquality threshold.
Returns
-1 if lack of memory, 0 if we don't split the edge, ip if success.

Split edge iar of iel and verify that every new tet have a better quality than crit

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ ddb

int8_t ddb