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

Perform volume and surface mesh adaptation in delaunay mode. More...

#include "libmmg3d.h"
#include "libmmg3d_private.h"
#include "mmg3dexterns_private.h"
Include dependency graph for mmg3d1_delone.c:

Go to the source code of this file.

Macros

#define MMG3D_THRES_DEL   1.6
 
#define MMG3D_LOPTL_DEL   1.41
 
#define MMG3D_LFILTS_DEL   0.7
 
#define MMG3D_LFILTL_DEL   0.2
 

Functions

static int MMG3D_mmg3d1_delone_split (MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree *PROctree, MMG5_int k, int8_t imax, double lmax, double lmaxtet, int8_t chkRidTet, MMG5_int *ifilt, MMG5_int *ns, int *warn, int8_t *countMemFailure)
 
static int MMG3D_mmg3d1_delone_splcol (MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree *PROctree, MMG5_int k, int8_t imin, double lmin, int8_t imax, double lmax, double lmaxtet, int8_t chkRidTet, MMG5_int *ifilt, MMG5_int *ns, MMG5_int *nc, int *warn)
 
static int MMG5_adpsplcol (MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree *PROctree, MMG5_int ne, MMG5_int *ifilt, MMG5_int *ns, MMG5_int *nc, int *warn)
 
static int MMG5_optbad (MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree)
 
static int MMG5_adpdel (MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree *PROctree, int *warn)
 
static int MMG5_optetLES (MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree)
 
static int MMG5_optet (MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree)
 
static int MMG5_adptet_delone (MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree *PROctree, MMG5_int *permNodGlob)
 
int MMG5_mmg3d1_delone (MMG5_pMesh mesh, MMG5_pSol met, MMG5_int *permNodGlob)
 

Variables

int8_t ddb
 

Detailed Description

Perform volume and surface mesh adaptation in delaunay mode.

Author
Cécile Dobrzynski (Bx INP/Inria/UBordeaux)
Version
5

Perform volume and surface mesh adaptation in delaunay mode (MMG_PATTERN preprocessor flag set to OFF).

Definition in file mmg3d1_delone.c.

Macro Definition Documentation

◆ MMG3D_LFILTL_DEL

#define MMG3D_LFILTL_DEL   0.2

Definition at line 47 of file mmg3d1_delone.c.

◆ MMG3D_LFILTS_DEL

#define MMG3D_LFILTS_DEL   0.7

Definition at line 46 of file mmg3d1_delone.c.

◆ MMG3D_LOPTL_DEL

#define MMG3D_LOPTL_DEL   1.41

Definition at line 45 of file mmg3d1_delone.c.

◆ MMG3D_THRES_DEL

#define MMG3D_THRES_DEL   1.6

Definition at line 44 of file mmg3d1_delone.c.

Function Documentation

◆ MMG3D_mmg3d1_delone_splcol()

static int MMG3D_mmg3d1_delone_splcol ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG3D_pPROctree PROctree,
MMG5_int  k,
int8_t  imin,
double  lmin,
int8_t  imax,
double  lmax,
double  lmaxtet,
int8_t  chkRidTet,
MMG5_int *  ifilt,
MMG5_int *  ns,
MMG5_int *  nc,
int *  warn 
)
inlinestatic
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
PROctreepointer toward the PROctree structure.
kindex of tetra in which we work.
iminindex in k of edge that we consider for split.
lminlength of edge imax.
imaxindex in k of edge that we consider for split.
lmaxlength of edge imax.
lmaxtetlength of largest edge of tetra k.
1if we want to check tetra with 4 ridge metrics.
ifiltpointer to store the number of vertices filtered by the PROctree.
nspointer toward count of splits (has to be updated)
ncpointer toward count of collapses (has to be updated)
warnpointer to store a flag that warn the user in case of reallocation error.
Returns
-2 for low failure (mesh has to be saved).
-1 for strong failure.
0 if edge cannot be modified and if we want to pass to next loop step (next element or next tetra edge)
1 if edge cannot be modified and we want to treat next elt
2 if edge has been modified and we want to treat next element.
3 if nothing has been done (no error but no edge modification either).

Try to split imax edge if too large and to collapse imin edge if too small.

If unable to treat edge with ier==1 return value or if edge has not been splitted but slpit_delone has not raised any error: try to collapse short edge.

  1. Try to merge small edge: if collapse is not possible, pass to next element

Definition at line 355 of file mmg3d1_delone.c.

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

◆ MMG3D_mmg3d1_delone_split()

static int MMG3D_mmg3d1_delone_split ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG3D_pPROctree PROctree,
MMG5_int  k,
int8_t  imax,
double  lmax,
double  lmaxtet,
int8_t  chkRidTet,
MMG5_int *  ifilt,
MMG5_int *  ns,
int *  warn,
int8_t *  countMemFailure 
)
inlinestatic
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
PROctreepointer toward the PROctree structure.
kindex of tetra in which we work.
imaxindex in k of edge that we consider for split.
lmaxlength of edge imax.
lmaxtetlength of largest edge of tetra k.
1if we want to check tetra with 4 ridge metrics.
ifiltpointer to store the number of vertices filtered by the PROctree.
nspointer toward count of splits (has to be updated)
warnpointer to store a flag that warn the user in case of reallocation error.
countMemFailurenumber of memory errors (to update)
Returns
-2 for low failure (mesh has to be saved).
-1 for strong failure.
0 if edge cannot be splitted and if we want to pass to next loop step (next element or next tetra edge)
1 if edge cannot be splitted and we want to try to collapse too long edge.
2 if edge has been splitted and we want to treat next element.
3 if nothing has been done (no error but no split either).

Try to split imax if too large.

Get edge infos

Check edge length

Edge belongs to a boundary face: try to split using patterns

b/ Edge splitting

Case of a tetra without xtetra (no boundary faces): split non-bdy edges with Delauney kernel.

Definition at line 82 of file mmg3d1_delone.c.

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

◆ MMG5_adpdel()

static int MMG5_adpdel ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG3D_pPROctree PROctree,
int *  warn 
)
static
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
PROctreepointer toward the PROctree structure.
warnset to 1 if we can't insert point due to lack of memory.
Returns
-1 if fail and we dont try to end the remesh process, 0 if fail but we try to end the remesh process and 1 if success.

Split edges longer than MMG3D_LOPTL_DEL and collapse edges shorter than MMG3D_LOPTS.

Definition at line 638 of file mmg3d1_delone.c.

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

◆ MMG5_adpsplcol()

static int MMG5_adpsplcol ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG3D_pPROctree PROctree,
MMG5_int  ne,
MMG5_int *  ifilt,
MMG5_int *  ns,
MMG5_int *  nc,
int *  warn 
)
inlinestatic
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
PROctreepointer toward the PROctree structure.
nenumber of elements.
ifiltpointer to store the number of vertices filtered by the PROctree.
nspointer to store the number of vertices insertions.
ncpointer to store the number of collapse.
warnpointer to store a flag that warn the user in case of reallocation difficulty.
Returns
-1 if fail and we don't save the mesh, 0 if fail but we try to save the mesh, 1 otherwise.

adpsplcol loop: split edges longer than MMG3D_LOPTL_DEL and collapse edges shorter than MMG3D_LOPTS.

Step 1: find longest and shortest edge (and try to manage them)

Step 2: longest and shortest edges are stucked => try the other edges

  1. Try to split too long edge

Definition at line 423 of file mmg3d1_delone.c.

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

◆ MMG5_adptet_delone()

static int MMG5_adptet_delone ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG3D_pPROctree PROctree,
MMG5_int *  permNodGlob 
)
static
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
PROctreepointer toward the PROctree structure.
permNodGlobif provided, strore the global permutation of nodes
Returns
0 if failed, 1 otherwise.

Analyze tetrahedra and split long / collapse short, according to prescribed metric.

Step 1: few iters of swaps

Step 2: few iters of splits, collapses, swaps and moves

Step 3: Last wave of improvements: few iters of bad elts treatment, swaps and moves

Definition at line 955 of file mmg3d1_delone.c.

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

◆ MMG5_mmg3d1_delone()

int MMG5_mmg3d1_delone ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_int *  permNodGlob 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
permNodGlobif provided, strore the global permutation of nodes
Returns
0 if failed, 1 if success.

Main adaptation routine.

— stage 1: geometric mesh

— stage 2: computational mesh

Definition at line 1028 of file mmg3d1_delone.c.

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

◆ MMG5_optbad()

static int MMG5_optbad ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG3D_pPROctree  PROctree 
)
static
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
PROctreepointer toward the PROctree structure.
Returns
0 if failed, 1 otherwise.

Mesh optimization during insertion phase.

Definition at line 562 of file mmg3d1_delone.c.

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

◆ MMG5_optet()

static int MMG5_optet ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG3D_pPROctree  PROctree 
)
static
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
PROctreepointer toward the PROctree structure.
Returns
0 if failed, 1 otherwise.

Mesh optimization using egde swapping and point relocation.

Definition at line 846 of file mmg3d1_delone.c.

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

◆ MMG5_optetLES()

static int MMG5_optetLES ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG3D_pPROctree  PROctree 
)
static
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
PROctreepointer toward the PROctree structure.
Returns
0 if failed, 1 otherwise.

Mesh optimization for LES computation (improve the element skewness).

Definition at line 752 of file mmg3d1_delone.c.

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

Variable Documentation

◆ ddb

int8_t ddb

Definition at line 42 of file mmg3d1_delone.c.