mmg2d
quality.c File Reference

Functions to compute elements quality and edge lengths. More...

#include "mmgcommon.h"
Include dependency graph for quality.c:

Functions

double MMG5_caltri33_ani (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria pt)
 
double MMG5_caltri_ani (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria ptt)
 
double MMG5_caltri_iso (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria ptt)
 
void MMG5_displayLengthHisto (MMG5_pMesh mesh, int ned, double *avlen, int amin, int bmin, double lmin, int amax, int bmax, double lmax, int nullEdge, double *bd, int *hl, char shift)
 
void MMG5_displayLengthHisto_internal (int ned, int amin, int bmin, double lmin, int amax, int bmax, double lmax, int nullEdge, double *bd, int *hl, char shift, int imprim)
 
int MMG5_minQualCheck (int iel, double minqual, double alpha)
 

Detailed Description

Functions to compute elements quality and edge lengths.

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

Function Documentation

◆ MMG5_caltri33_ani()

double MMG5_caltri33_ani ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_pTria  pt 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the meric structure.
ptpointer toward the triangle structure.
Returns
The computed quality.

Compute the quality of the surface triangle ptt with respect to an anisotropic metric and a classic storage of the ridges metrics.

Here is the call graph for this function:

◆ MMG5_caltri_ani()

double MMG5_caltri_ani ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_pTria  ptt 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the meric structure.
pttpointer toward the triangle structure.
Returns
The computed quality.

Compute the quality of the surface triangle ptt with respect to an anisotropic metric.

Warning
The quality is computed as if the triangle is a "straight" triangle.
Here is the call graph for this function:

◆ MMG5_caltri_iso()

double MMG5_caltri_iso ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_pTria  ptt 
)
inline
Parameters
meshpointer toward the mesh structure.
metpointer toward the meric structure.
pttpointer toward the triangle structure.
Returns
The computed quality.

Compute the quality of the surface triangle ptt with respect to an isotropic metric.

◆ MMG5_displayLengthHisto()

void MMG5_displayLengthHisto ( MMG5_pMesh  mesh,
int  ned,
double *  avlen,
int  amin,
int  bmin,
double  lmin,
int  amax,
int  bmax,
double  lmax,
int  nullEdge,
double *  bd,
int *  hl,
char  shift 
)
Parameters
meshpointer toward the mesh structure.
nededges number.
avlenpointer toward the average edges lengths.
aminindex of first extremity of the smallest edge.
bminindex of second extremity of the smallest edge.
lminsmallest edge length.
amaxindex of first extremity of the largest edge.
bmaxindex of second extremity of the largest edge.
lmaxlargest edge length.
nullEdgenumber of edges for which we are unable to compute the length
bdpointer toward the table of the quality span.
hlpointer toward the table that store the number of edges for eac
shiftvalue to shift the target lenght interval span of quality

Display histogram of edge length.

Here is the call graph for this function:

◆ MMG5_displayLengthHisto_internal()

void MMG5_displayLengthHisto_internal ( int  ned,
int  amin,
int  bmin,
double  lmin,
int  amax,
int  bmax,
double  lmax,
int  nullEdge,
double *  bd,
int *  hl,
char  shift,
int  imprim 
)
Parameters
meshpointer toward the mesh structure.
nededges number.
aminindex of first extremity of the smallest edge.
bminindex of second extremity of the smallest edge.
lminsmallest edge length.
amaxindex of first extremity of the largest edge.
bmaxindex of second extremity of the largest edge.
lmaxlargest edge length.
nullEdgenumber of edges for which we are unable to compute the length
bdpointer toward the table of the quality span.
hlpointer toward the table that store the number of edges for eac
shiftvalue to shift the target lenght interval span of quality
imprimverbosity level

Display histogram of edge length without the histo header

◆ MMG5_minQualCheck()

int MMG5_minQualCheck ( int  iel,
double  minqual,
double  alpha 
)
Parameters
ielindex of the worst tetra of the mesh
minqualquality of the worst tetra of the mesh (will be normalized by alpha)
alphanormalisation parameter for the quality
Returns
1 if success, 0 if fail (the quality is lower than MMG5_NULKAL).

Print warning or error messages depending on the quality of the worst tetra of the mesh.