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

Check the input mesh validity. More...

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

Go to the source code of this file.

Macros

#define MMG5_EPSLOC   1.00005
 
#define IEDG(a, b)   (((a) > 0) && ((b) > 0)) ? ((a)+(b)) : (((a)+(b))-(1))
 

Functions

void MMG5_chkvol (MMG5_pMesh mesh)
 
static int MMG3D_chk_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)
 
int MMG3D_chk_shellEdgeTag (MMG5_pMesh mesh, MMG5_int start, int8_t ia, int16_t tag, MMG5_int ref)
 
void MMG3D_chkmeshedgestags (MMG5_pMesh mesh)
 
void MMG3D_chkedgetag (MMG5_pMesh mesh, MMG5_int ip1, MMG5_int ip2, int tag)
 
static void MMG3D_consistency_error_message (MMG5_pMesh mesh, MMG5_pPoint ppt, MMG5_int k, int i, MMG5_int ip1, MMG5_int ip2)
 
void MMG3D_chkpointtag (MMG5_pMesh mesh)
 
int MMG5_chkmshsurf (MMG5_pMesh mesh)
 
static int MMG3D_chkcoquilface (MMG5_pMesh mesh)
 
int MMG5_mmg3dChkmsh (MMG5_pMesh mesh, int severe, MMG5_int base)
 
int MMG5_chkptonbdy (MMG5_pMesh mesh, MMG5_int np)
 
int MMG5_cntbdypt (MMG5_pMesh mesh, MMG5_int nump)
 
int MMG5_chkfemtopo (MMG5_pMesh mesh)
 
int srcface (MMG5_pMesh mesh, MMG5_int n0, MMG5_int n1, MMG5_int n2)
 

Variables

int8_t ddb
 

Detailed Description

Check the input mesh validity.

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 chkmsh_3d.c.

Macro Definition Documentation

◆ IEDG

#define IEDG (   a,
 
)    (((a) > 0) && ((b) > 0)) ? ((a)+(b)) : (((a)+(b))-(1))

Definition at line 40 of file chkmsh_3d.c.

◆ MMG5_EPSLOC

#define MMG5_EPSLOC   1.00005

Definition at line 39 of file chkmsh_3d.c.

Function Documentation

◆ MMG3D_chk_shellEdgeTag()

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

Test consistency of tag and ref of the boundary edge \ia of tetra start by traveling its shell.

Definition at line 142 of file chkmsh_3d.c.

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

◆ MMG3D_chk_shellEdgeTag_oneDir()

static int MMG3D_chk_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
tagedge tag
refedge 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 (open shell).

Test consistency of 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 92 of file chkmsh_3d.c.

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

◆ MMG3D_chkcoquilface()

static int MMG3D_chkcoquilface ( MMG5_pMesh  mesh)
inlinestatic
Parameters
meshpointer toward the mesh structure.
Returns
0 if fail, 1 otherwise

Check the number of boundary faces in each edge shell and the consistency of the edge tag.

Definition at line 412 of file chkmsh_3d.c.

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

◆ MMG3D_chkedgetag()

void MMG3D_chkedgetag ( MMG5_pMesh  mesh,
MMG5_int  ip1,
MMG5_int  ip2,
int  tag 
)
Parameters
meshpointer toward the mesh
ip1first vertex of edge to test
ip2second vertex of edge to test
tagedge tag

Test consistency between the tags of the edge ip1 - ip2 from all the tetra of the edge shell.

Warning
Not used.

Definition at line 261 of file chkmsh_3d.c.

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

◆ MMG3D_chkmeshedgestags()

void MMG3D_chkmeshedgestags ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh

Test consistency between the tags in the xtetra of all mesh edges marked as boundaries.

Warning
Not used.

Definition at line 201 of file chkmsh_3d.c.

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

◆ MMG3D_chkpointtag()

void MMG3D_chkpointtag ( MMG5_pMesh  mesh)
Parameters
mesh

Test consistency between points and edges tags. If an error is detected, hash mesh edges to check the consistency between the tags of tetra edges.

Warning
Not used.

Check consistency between edge tags and point tags

Definition at line 329 of file chkmsh_3d.c.

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

◆ MMG3D_consistency_error_message()

static void MMG3D_consistency_error_message ( MMG5_pMesh  mesh,
MMG5_pPoint  ppt,
MMG5_int  k,
int  i,
MMG5_int  ip1,
MMG5_int  ip2 
)
inlinestatic
Parameters
meshpointer toward the mesh
pptpointer toward unconsistent point
ktetra index
ilocal index of edge in tetra k
ip1first vertex of edge to test
ip2second vertex of edge to test

Print error message when an edge vertex has a non-consistent tag.

An error has been detected: check the consistency between the tags of tetra edges

Definition at line 300 of file chkmsh_3d.c.

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

◆ MMG5_chkfemtopo()

int MMG5_chkfemtopo ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh structure.
Returns
0 if fail, 1 otherwise.

Count the number of tetras that have several boundary faces, as well as the number of internal edges connecting points of the boundary.

Definition at line 767 of file chkmsh_3d.c.

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

◆ MMG5_chkmshsurf()

int MMG5_chkmshsurf ( MMG5_pMesh  mesh)
Returns
0 if fail, 1 otherwise
Warning
Not used.

Definition at line 378 of file chkmsh_3d.c.

◆ MMG5_chkptonbdy()

int MMG5_chkptonbdy ( MMG5_pMesh  mesh,
MMG5_int  np 
)

Search boundary faces containing point np.

Returns
0 if fail, 1 otherwise
Warning
Not used.

Definition at line 656 of file chkmsh_3d.c.

Here is the call graph for this function:

◆ MMG5_chkvol()

void MMG5_chkvol ( MMG5_pMesh  mesh)
Parameters
meshpointer toward mesh

Test that tetra have positive volumes.

Warning
Not used.

Definition at line 51 of file chkmsh_3d.c.

Here is the call graph for this function:

◆ MMG5_cntbdypt()

int MMG5_cntbdypt ( MMG5_pMesh  mesh,
MMG5_int  nump 
)

Count how many boundary faces share point nump.

Warning
Not used.

Definition at line 718 of file chkmsh_3d.c.

Here is the call graph for this function:

◆ MMG5_mmg3dChkmsh()

int MMG5_mmg3dChkmsh ( MMG5_pMesh  mesh,
int  severe,
MMG5_int  base 
)
Parameters
meshpointer toward the mesh structure.
severelevel of performed check (unused)
baseunused argument.
Returns
0 if fail, 1 if success.

Check the mesh validity

Definition at line 454 of file chkmsh_3d.c.

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

◆ srcface()

int srcface ( MMG5_pMesh  mesh,
MMG5_int  n0,
MMG5_int  n1,
MMG5_int  n2 
)

Search face n0,n1,n2 in mesh, and get the support tetras, with the corresponding refs.

Warning
Not used.

Definition at line 850 of file chkmsh_3d.c.

Here is the call graph for this function:

Variable Documentation

◆ ddb

int8_t ddb
extern

Definition at line 42 of file mmg3d1_delone.c.