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

Perform surface mesh adaptation. More...

#include "libmmgs_private.h"
#include "mmgsexterns_private.h"
#include "mmgexterns_private.h"
#include "inlined_functions_private.h"
Include dependency graph for mmgs1.c:

Go to the source code of this file.

Functions

int MMGS_dichoto (MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int *vx)
 
int MMGS_dichoto1b (MMG5_pMesh mesh, MMG5_pSol met, MMG5_int iel, int ia, MMG5_int ip)
 
int chkedg (MMG5_pMesh mesh, MMG5_int iel)
 
static void MMGS_set_localFunc (MMG5_pSol met, int8_t typchk, double(**MMGS_lenEdg)(MMG5_pMesh, MMG5_pSol, MMG5_int, MMG5_int, int8_t), double(**MMGS_caltri)(MMG5_pMesh, MMG5_pSol, MMG5_pTria))
 
static int swpmsh (MMG5_pMesh mesh, MMG5_pSol met, int8_t typchk)
 
static int movtri (MMG5_pMesh mesh, MMG5_pSol met, int maxit)
 
static int MMGS_delPatternPts (MMG5_pMesh mesh, MMG5_Hash hash)
 
static int anaelt (MMG5_pMesh mesh, MMG5_pSol met, int8_t typchk)
 
MMG5_int chkspl (MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int i)
 
static MMG5_int colelt (MMG5_pMesh mesh, MMG5_pSol met, int8_t typchk)
 
static MMG5_int adpspl (MMG5_pMesh mesh, MMG5_pSol met)
 
static MMG5_int adpcol (MMG5_pMesh mesh, MMG5_pSol met)
 
static int adptri (MMG5_pMesh mesh, MMG5_pSol met, MMG5_int *permNodGlob)
 
static int anatri (MMG5_pMesh mesh, MMG5_pSol met, int8_t typchk)
 
int MMG5_mmgs1 (MMG5_pMesh mesh, MMG5_pSol met, MMG5_int *permNodGlob)
 

Variables

int8_t ddb
 

Detailed Description

Perform surface mesh adaptation.

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

Definition in file mmgs1.c.

Function Documentation

◆ adpcol()

static MMG5_int adpcol ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
static
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
Returns
-1 if failed.
number of deleted points.

Collapse edges of length smaller than MMGS_LOPTS.

Definition at line 1208 of file mmgs1.c.

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

◆ adpspl()

static MMG5_int adpspl ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
static
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
Returns
-1 if failed or number of new points.

Split edges of length bigger than MMGS_LOPTL.

Definition at line 1132 of file mmgs1.c.

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

◆ adptri()

static int adptri ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_int *  permNodGlob 
)
static

Definition at line 1272 of file mmgs1.c.

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

◆ anaelt()

static int anaelt ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int8_t  typchk 
)
static
Parameters
meshpointer toward the mesh
metpointer toward the metric
typchktype of check performed depending on the remeshing step
Returns
-1 if fail, the number of split otherwise

Analyze triangles and split if needed

  1. Simulate splitting and delete points leading to invalid configurations

Definition at line 579 of file mmgs1.c.

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

◆ anatri()

static int anatri ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int8_t  typchk 
)
static

Definition at line 1389 of file mmgs1.c.

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

◆ chkedg()

int chkedg ( MMG5_pMesh  mesh,
MMG5_int  iel 
)

Definition at line 214 of file mmgs1.c.

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

◆ chkspl()

MMG5_int chkspl ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_int  k,
int  i 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kindex of element to split.
iindex of edge to split.
Returns
-1 if lack of memory, 0 if the edge should not be split and 1 if success.

Check if splitting edge i of element k is ok.

Definition at line 954 of file mmgs1.c.

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

◆ colelt()

static MMG5_int colelt ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int8_t  typchk 
)
static
Parameters
meshpointer toward mesh structure
metpointer toward met structure
typchktype of check to perform: 1 for first stage (adaptation to capture roughly the surface mesh), 2 for second stage of adaptation (rough capture of input metric).

Attempt to collapse small edges

Definition at line 1025 of file mmgs1.c.

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

◆ MMG5_mmgs1()

int MMG5_mmgs1 ( 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.

Definition at line 1462 of file mmgs1.c.

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

◆ MMGS_delPatternPts()

static int MMGS_delPatternPts ( MMG5_pMesh  mesh,
MMG5_Hash  hash 
)
inlinestatic
Parameters
meshpointer toward the mesh structure.
hashpointer toward the hash table of edges.
Returns
0 if failed, 1 if success

Delete the points inserted by pattern if the pattern step fail.

Definition at line 537 of file mmgs1.c.

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

◆ MMGS_dichoto()

int MMGS_dichoto ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_int  k,
MMG5_int *  vx 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
kelement index.
vxpointer toward table of edges to split.
Returns
1.

Find acceptable position for splitting.

Definition at line 52 of file mmgs1.c.

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

◆ MMGS_dichoto1b()

int MMGS_dichoto1b ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_int  iel,
int  ia,
MMG5_int  ip 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
ielindex of the starting triangle.
ialocal index of the edge to split in k.
ipindex of the point that we try to create.
Returns
1 if success, 0 otherwise.

Find acceptable position for MMG5_split1b, starting from point ip.

Definition at line 156 of file mmgs1.c.

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

◆ MMGS_set_localFunc()

static void MMGS_set_localFunc ( MMG5_pSol  met,
int8_t  typchk,
double(**)(MMG5_pMesh, MMG5_pSol, MMG5_int, MMG5_int, int8_t)  MMGS_lenEdg,
double(**)(MMG5_pMesh, MMG5_pSol, MMG5_pTria MMGS_caltri 
)
inlinestatic
Parameters
metpointer toward met structure
typchktype of check to perform: 1 for first stage (adaptation to capture roughly the surface mesh), 2 for second stage of adaptation (rough capture of input metric).

Assign functions for computation of edge lengths and tria qualities: they are now used in first stage of adaptation to ensure that, if we enter with a mesh+metric already adapted, we don't delete entierly the work done (massive collapses on planar surfaces for example).

Definition at line 406 of file mmgs1.c.

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

◆ movtri()

static int movtri ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  maxit 
)
static

Definition at line 469 of file mmgs1.c.

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

◆ swpmsh()

static int swpmsh ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int8_t  typchk 
)
static

Definition at line 428 of file mmgs1.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.