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

Functions for the optimization of very bad elements. More...

#include "libmmg3d.h"
#include "inlined_functions_3d_private.h"
Include dependency graph for opttyp_3d.c:

Go to the source code of this file.

Functions

static int MMG3D_typelt (MMG5_pMesh mesh, MMG5_int iel, int *item)
 
int MMG3D_swpItem (MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, MMG5_int k, int iar)
 
static int MMG3D_swpalmostall (MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, MMG5_int k, int iar)
 
int MMG3D_splitItem (MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, MMG5_int k, int iar, double OCRIT)
 
static int MMG3D_splitalmostall (MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, MMG5_int k, int iar)
 
MMG5_int MMG3D_opttyp (MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, MMG5_int testmark)
 

Detailed Description

Functions for the optimization of very bad elements.

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

Definition in file opttyp_3d.c.

Function Documentation

◆ MMG3D_opttyp()

MMG5_int MMG3D_opttyp ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG3D_pPROctree  PROctree,
MMG5_int  testmark 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
PROctreepointer toward the PROctree structure.
testmarkall the tets with a mark less than testmark will not be treated.
Returns
0 if fail, number of improved elts otherwise.

Travel across the mesh to detect element with very bad quality (less than 0.2) and try to improve them by every means.

Definition at line 472 of file opttyp_3d.c.

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

◆ MMG3D_splitalmostall()

static int MMG3D_splitalmostall ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG3D_pPROctree  PROctree,
MMG5_int  k,
int  iar 
)
inlinestatic
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
PROctreepointer toward the PROctree structure.
kelt index.
iarindex of edge to not split.
Returns
1 if success, 0 otherwise

Try to split evry edge of tetra k except of edge number iar.

Definition at line 440 of file opttyp_3d.c.

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

◆ MMG3D_splitItem()

int MMG3D_splitItem ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG3D_pPROctree  PROctree,
MMG5_int  k,
int  iar,
double  OCRIT 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
PROctreepointer toward the PROctree structure.
kelt index.
iarindex of edge to split.
OCRITquality threshold.
Returns
1 if success, 0 otherwise

Try to split edge number iar of tetra k

Definition at line 394 of file opttyp_3d.c.

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

◆ MMG3D_swpalmostall()

static int MMG3D_swpalmostall ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG3D_pPROctree  PROctree,
MMG5_int  k,
int  iar 
)
inlinestatic
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
PROctreepointer toward the PROctree structure.
kelt index.
iarindex of edge to not try to swap.
Returns
-1 if fail, 0 if we don't swap anything, 1 otherwise.

Try to swap all edges of tetra k except of the edge number iar.

Definition at line 367 of file opttyp_3d.c.

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

◆ MMG3D_swpItem()

int MMG3D_swpItem ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG3D_pPROctree  PROctree,
MMG5_int  k,
int  iar 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
PROctreepointer toward the PROctree structure.
kelt index.
iarindex of edge to not try to swap.
Returns
-1 if fail, 0 if we don't swap anything, 1 otherwise.

Try to swap edge iar of tetra k.

Definition at line 328 of file opttyp_3d.c.

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

◆ MMG3D_typelt()

static int MMG3D_typelt ( MMG5_pMesh  mesh,
MMG5_int  iel,
int *  item 
)
static
Parameters
meshpointer toward the mesh structure.
ielelement index.
itembad entity.
Returns
-1 if fail, element type otherwise.

Identify the type of element.
Type:

  • 0: element is ok.
  • 1: empty volume but 4 valid faces (sliver)
  • 2: empty volume and a vertex close to the opposite face. 4 valid faces (chinese hat).
  • 3: 3 valid faces, 1 obtuse face (aileron)
  • 4: 2 valid faces, 2 acute faces (=> 1 small edge)
  • 5: 1 valid face, 3 small edges
  • 6: 2 faces with big edges, 2 faces with small edges
  • 7: 4 faces with big edges

Element caracteristics by type:

  • 0: 0 obtuse face, 0 acute face, 0 big edge, 0 small edge.
  • 1: 0 obtuse face, 0 acute face, 0 big edge, 0 small edge.
  • 2: 0 obtuse face, 0 acute face, 0 big edge, 0 small edge.
  • 3: 1 obtuse face, 0 acute face, 1 big edge, 0 small edge.
  • 4: 0 obtuse face, 2 acute face, 0 big edge, 1 small edge.
  • 5: 0 obtuse face, 3 acute face, 0 big edge, 3 small edge.
  • 6: 2 obtuse face, 2 acute face, 1 big edge, 1 small edge.
  • 7: 0 obtuse face, 4 acute face, 0 big edge, 2 small edge.

Definition at line 65 of file opttyp_3d.c.

Here is the caller graph for this function: