mmg3d
swapgen_3d.c File Reference

Functions for swapping process inside the mesh. More...

Include dependency graph for swapgen_3d.c:

Functions

int _MMG5_chkswpgen (MMG5_pMesh mesh, MMG5_pSol met, int start, int ia, int *ilist, int *list, double crit, char typchk)
 
int _MMG5_swpgen (MMG5_pMesh mesh, MMG5_pSol met, int nconf, int ilist, int *list, _MMG3D_pOctree octree, char typchk)
 
int MMG3D_swap23 (MMG5_pMesh mesh, MMG5_pSol met, int k, char metRidTyp)
 

Detailed Description

Functions for swapping process inside the mesh.

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

Function Documentation

◆ _MMG5_chkswpgen()

int _MMG5_chkswpgen ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  start,
int  ia,
int *  ilist,
int *  list,
double  crit,
char  typchk 
)
Parameters
meshpointer toward the mesh structure
metpointer toward the metric structure.
starttetrahedra in which the swap should be performed
iaedge that we want to swap
ilistpointer to store the size of the shell of the edge
listpointer to store the shell of the edge
critimprovment coefficient
Returns
0 if fail, the index of point corresponding to the swapped configuration otherwise ( $4*k+i$).
Parameters
typchktype of checking permformed for edge length (hmin or LSHORT criterion).

Check whether swap of edge ia in start should be performed, and return $4*k+i$ the index of point corresponding to the swapped configuration. The shell of edge is built during the process.

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

◆ _MMG5_swpgen()

int _MMG5_swpgen ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  nconf,
int  ilist,
int *  list,
_MMG3D_pOctree  octree,
char  typchk 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the sol structure.
nconfconfiguration.
ilistnumber of tetrahedra in the shell of the edge that we want to swap.
listpointer toward the shell of the edge that we want to swap.
octreepointer toward the octree structure in Delaunay mode, NULL pointer in pattern mode.
typchktype of checking permformed for edge length (hmin or LSHORT criterion).
Returns
-1 if lack of memory, 0 if fail to swap, 1 otherwise.

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

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

◆ MMG3D_swap23()

int MMG3D_swap23 ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
char  metRidTyp 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the sol structure.
kindex of the tetrahedron with multiple boundary faces (to be swapped).
metRidTypmetric storage (classic or special)
Returns
-1 if lack of memory, 0 if fail to swap, 1 otherwise.

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).

Remarks
used in anatet4 to remove the tetra with multiple boundary faces.

Neighbouring element with which we will try to swap

Swap
Quality Update

Here is the call graph for this function: