Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
Functions | Variables
colver_3d.c File Reference

Functions for vertices collapsing. More...

#include "inlined_functions_3d_private.h"
#include "mmg3dexterns_private.h"
Include dependency graph for colver_3d.c:

Go to the source code of this file.

Functions

int MMG5_chkcol_int (MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int8_t iface, int8_t iedg, int64_t *list, int ilist, int8_t typchk)
 
static MMG5_int MMG3D_unfold_shell (MMG5_pMesh mesh, MMG5_int start, MMG5_int end, MMG5_int na, MMG5_int nb, MMG5_int piv, MMG5_int *iel, int8_t *iopp)
 
static int MMG5_topchkcol_bdy (MMG5_pMesh mesh, MMG5_int k, int iface, int8_t iedg, MMG5_int *lists, int ilists)
 
static int MMG3D_get_shellEdgeTag_oneDir (MMG5_pMesh mesh, MMG5_int start, MMG5_int na, MMG5_int nb, int16_t *tag, MMG5_int *ref, MMG5_int piv, MMG5_int adj, int8_t *filled)
 
static int MMG3D_get_shellEdgeTag (MMG5_pMesh mesh, MMG5_int start, int8_t ia, int16_t *tag, MMG5_int *ref)
 
int MMG5_chkcol_bdy (MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int8_t iface, int8_t iedg, int64_t *listv, int ilistv, MMG5_int *lists, int ilists, MMG5_int refmin, MMG5_int refplus, int8_t typchk, int isnm, int8_t isnmint)
 
static void MMG3D_update_edgeTag (MMG5_pTetra pt, MMG5_pxTetra pxt, MMG5_int np, MMG5_int nq, uint8_t ip, MMG5_pTetra pt1, MMG5_pxTetra pxt1, uint8_t voyp)
 
static MMG5_int MMG3D_update_shellEdgeTag_oneDir (MMG5_pMesh mesh, MMG5_int start, MMG5_int na, MMG5_int nb, int16_t tag, MMG5_int ref, MMG5_int piv, MMG5_int adj)
 
static int MMG3D_update_shellEdgeTag (MMG5_pMesh mesh, MMG5_int start, int8_t ia, int16_t tag, MMG5_int ref)
 
MMG5_int MMG5_colver (MMG5_pMesh mesh, MMG5_pSol met, int64_t *list, int ilist, int8_t indq, int8_t typchk)
 

Variables

int8_t ddb
 

Detailed Description

Functions for vertices collapsing.

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

Definition in file colver_3d.c.

Function Documentation

◆ MMG3D_get_shellEdgeTag()

static int MMG3D_get_shellEdgeTag ( MMG5_pMesh  mesh,
MMG5_int  start,
int8_t  ia,
int16_t *  tag,
MMG5_int *  ref 
)
inlinestatic
Parameters
meshpointer toward the mesh
starttetra from which we start to travel
ialocal index of edge that must be updated
tagnew edge tag
refnew edge ref
Returns
1 if success, 0 if fail.

Get tag and ref of the edge \ia of tetra start by traveling its shell. Stop when meeting the first xtetra (it is sufficient if tags and refs are consistent through the edge shell);

Definition at line 432 of file colver_3d.c.

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

◆ MMG3D_get_shellEdgeTag_oneDir()

static int MMG3D_get_shellEdgeTag_oneDir ( MMG5_pMesh  mesh,
MMG5_int  start,
MMG5_int  na,
MMG5_int  nb,
int16_t *  tag,
MMG5_int *  ref,
MMG5_int  piv,
MMG5_int  adj,
int8_t *  filled 
)
inlinestatic
Parameters
meshpointer toward the mesh
starttetra from which we start to travel
naedge vertex
nbedge vertex
tagnew edge tag
refnew edge ref
pivglobal index of the pivot to set the sense of travel
adjindex of adjacent tetra for the travel
filled1 if an xtetra has been found (so tag and ref are filled)
Returns
-1 if fail, start if shell has been completely travelled without founding an xtetra, adj if an xtetra has been found, 0 otherwise

Get tag and ref of the edge na nb from tetra start by traveling its shell in one direction (given by the pivot piv). Stop when meeting the first xtetra with a non 0 tag (it is sufficient if tags and refs are consistent through the edge shell except for edges with null tags);

Definition at line 377 of file colver_3d.c.

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

◆ MMG3D_unfold_shell()

static MMG5_int MMG3D_unfold_shell ( MMG5_pMesh  mesh,
MMG5_int  start,
MMG5_int  end,
MMG5_int  na,
MMG5_int  nb,
MMG5_int  piv,
MMG5_int *  iel,
int8_t *  iopp 
)
inlinestatic
Parameters
meshpointer toward the mesh
starttetra from which we start to travel
endtetra at which we stop the travel
naedge vertex
nbedge vertex
pivglobal index of the pivot to set the sense of travel
ielpointer toward the last element of the shell
iopppointer toward the ending boundary face of the shell
Returns
-1 if fail, piv otherwise.

Unfold the shell of the edge na nb from tetra start in the direction given by the pivot piv).

Definition at line 193 of file colver_3d.c.

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

◆ MMG3D_update_edgeTag()

static void MMG3D_update_edgeTag ( MMG5_pTetra  pt,
MMG5_pxTetra  pxt,
MMG5_int  np,
MMG5_int  nq,
uint8_t  ip,
MMG5_pTetra  pt1,
MMG5_pxTetra  pxt1,
uint8_t  voyp 
)
inlinestatic
Parameters
pttetra of the shell of the edge to collapse
pxtxtetra associated to pt
npglobal index of point to collapse
nqglobal index of point on which we collapse
iplocal index of np in pt
pt1tetra neighbour to pt through nq
pxt1xtetra associated to pt1
voyppoint facing tetra pt in pt1

Update tag and ref of the edges of pxt1 that belongs to the face sharing pt1 and pt (face ip in pt).

Definition at line 940 of file colver_3d.c.

Here is the caller graph for this function:

◆ MMG3D_update_shellEdgeTag()

static int MMG3D_update_shellEdgeTag ( MMG5_pMesh  mesh,
MMG5_int  start,
int8_t  ia,
int16_t  tag,
MMG5_int  ref 
)
inlinestatic
Parameters
meshpointer toward the mesh
starttetra from which we start to travel
ialocal index of edge that must be updated
tagnew edge tag
refnew edge ref
Returns
1 if success, 0 if fail.

Update tag and ref of the edge \ia of tetra start by traveling its shell.

Definition at line 1067 of file colver_3d.c.

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

◆ MMG3D_update_shellEdgeTag_oneDir()

static MMG5_int MMG3D_update_shellEdgeTag_oneDir ( MMG5_pMesh  mesh,
MMG5_int  start,
MMG5_int  na,
MMG5_int  nb,
int16_t  tag,
MMG5_int  ref,
MMG5_int  piv,
MMG5_int  adj 
)
inlinestatic
Parameters
meshpointer toward the mesh
starttetra from which we start to travel
naedge vertex
nbedge vertex
tagnew edge tag
refnew edge ref
pivglobal index of the pivot to set the sense of travel
adjindex of adjacent tetra for the travel
Returns
-1 if fail, start if shell has been completely travelled, 0 otherwise

Update tag and ref of the edge na nb from tetra start by traveling its shell in one direction (given by the pivot piv).

Definition at line 1002 of file colver_3d.c.

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

◆ MMG5_chkcol_bdy()

int MMG5_chkcol_bdy ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_int  k,
int8_t  iface,
int8_t  iedg,
int64_t *  listv,
int  ilistv,
MMG5_int *  lists,
int  ilists,
MMG5_int  refmin,
MMG5_int  refplus,
int8_t  typchk,
int  isnm,
int8_t  isnmint 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kindex of element in which we collapse.
ifaceface through wich we perform the collapse
iedgedge to collapse (in local face num)
listvpointer toward the list of the tetra in the ball of p0.
ilistvnumber of tetra in the ball of p0.
listspointer toward the surfacic ball of p0.
ilistsnumber of tetra in the surfacic ball of p0.
refminreference of one of the two subdomains in presence
refplusreference of the other subdomain in presence
typchktypchk type of checking permformed for edge length (hmax or MMG3D_LLONG criterion).
isnm1 if edge is non-manifold
isnmint1 if ip is an internal non manifold point;
Returns
ilistv if success, 0 if the point cannot be collapsed, -1 if fail.

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)

Remarks
we don't check edge lengths.

Definition at line 515 of file colver_3d.c.

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

◆ MMG5_chkcol_int()

int MMG5_chkcol_int ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_int  k,
int8_t  iface,
int8_t  iedg,
int64_t *  list,
int  ilist,
int8_t  typchk 
)

Check whether collapse ip -> iq could be performed, ip internal ; 'mechanical' tests (positive jacobian) are not performed here

Definition at line 43 of file colver_3d.c.

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

◆ MMG5_colver()

MMG5_int MMG5_colver ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int64_t *  list,
int  ilist,
int8_t  indq,
int8_t  typchk 
)
Parameters
meshpointer toward the mesh
metpointer toward the metric
listpointer toward the ball of the point
ilistnumber of elements in the ball of the point
indqlocal index of the point on which we collapse
typchktype of check performed depending on the remeshing step
Returns
np the index of the collpased point if success, 0 if we cannot collapse, -1 if we fail.

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.

Definition at line 1144 of file colver_3d.c.

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

◆ MMG5_topchkcol_bdy()

static int MMG5_topchkcol_bdy ( MMG5_pMesh  mesh,
MMG5_int  k,
int  iface,
int8_t  iedg,
MMG5_int *  lists,
int  ilists 
)
static
Parameters
meshpointer toward the mesh structure.
kindex of the starting tetra.
ifacelocal index of the starting face in the tetra k.
ideglocal index of the starting edge in the face iface.
listssurfacic ball of p.
ilistsnumber of elements in the surfacic ball of p.
Returns
0 if the check of the topology fails, 1 if success, -1 if the function fails.

Topological check on the surface ball of np and nq in collapsing np->nq ; iface = boundary face on which lie edge iedg - in local face num. (pq, or ia in local tet notation). See the Mmg Google Drive/Documentation/mmg3d/topchkcol_bdy3D.pdf for a picture of the configuration.

Definition at line 251 of file colver_3d.c.

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

Variable Documentation

◆ ddb

int8_t ddb
extern

Definition at line 42 of file mmg3d1_delone.c.