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

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

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

Go to the source code of this file.

Functions

int MMG3D_tetraQual (MMG5_pMesh mesh, MMG5_pSol met, int8_t metRidTyp)
 
double MMG5_caltet33_ani (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTetra pt)
 
int MMG3D_computePrilen (MMG5_pMesh mesh, MMG5_pSol met, double *avlen, double *lmin, double *lmax, MMG5_int *ned, MMG5_int *amin, MMG5_int *bmin, MMG5_int *amax, MMG5_int *bmax, MMG5_int *nullEdge, int8_t metRidTyp, double **bd_in, MMG5_int hl[9])
 
int MMG3D_prilen (MMG5_pMesh mesh, MMG5_pSol met, int8_t metRidTyp)
 
void MMG3D_computeLESqua (MMG5_pMesh mesh, MMG5_pSol met, MMG5_int *ne, double *max, double *avg, double *min, MMG5_int *iel, MMG5_int *good, MMG5_int *med, MMG5_int his[5], int imprim)
 
int MMG3D_displayQualHisto (MMG5_int ne, double max, double avg, double min, MMG5_int iel, MMG5_int good, MMG5_int med, MMG5_int his[5], MMG5_int nrid, int optimLES, int imprim)
 
int MMG3D_displayQualHisto_internal (MMG5_int ne, double max, double avg, double min, MMG5_int iel, MMG5_int good, MMG5_int med, MMG5_int his[5], MMG5_int nrid, int optimLES, int imprim)
 
void MMG3D_computeInqua (MMG5_pMesh mesh, MMG5_pSol met, MMG5_int *ne, double *max, double *avg, double *min, MMG5_int *iel, MMG5_int *good, MMG5_int *med, MMG5_int his[5], int imprim)
 
int MMG3D_inqua (MMG5_pMesh mesh, MMG5_pSol met)
 
void MMG3D_computeOutqua (MMG5_pMesh mesh, MMG5_pSol met, MMG5_int *ne, double *max, double *avg, double *min, MMG5_int *iel, MMG5_int *good, MMG5_int *med, MMG5_int his[5], MMG5_int *nrid, int imprim)
 
int MMG3D_outqua (MMG5_pMesh mesh, MMG5_pSol met)
 
int MMG5_countelt (MMG5_pMesh mesh, MMG5_pSol sol, double *weightelt, long *npcible)
 

Variables

int8_t ddb
 

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

Definition in file quality_3d.c.

Function Documentation

◆ MMG3D_computeInqua()

void MMG3D_computeInqua ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_int *  ne,
double *  max,
double *  avg,
double *  min,
MMG5_int *  iel,
MMG5_int *  good,
MMG5_int *  med,
MMG5_int  his[5],
int  imprim 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
nepointer toward the number of used tetra (to fill).
maxpointer toward the maximal quality (normalized) to fill.
avgpointer toward the average quality (normalized) to fill.
minpointer toward the minimal quality (normalized) to fill.
ielpointer toward the index of the worst tetra (to fill).
goodnumber of good elements (to fill).
mednumber of elements with a quality greather than 0.5 (to fill).
hispointer toward the mesh histogram (to fill).
imprimverbosity level

Compute the needed quality information in order to print the quality histogram (for a classic storage of the metric at ridges).

Definition at line 559 of file quality_3d.c.

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

◆ MMG3D_computeLESqua()

void MMG3D_computeLESqua ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_int *  ne,
double *  max,
double *  avg,
double *  min,
MMG5_int *  iel,
MMG5_int *  good,
MMG5_int *  med,
MMG5_int  his[5],
int  imprim 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
nepointer toward the number of used tetra (to fill).
maxpointer toward the maximal quality (normalized) to fill.
avgpointer toward the average quality (normalized) to fill.
minpointer toward the minimal quality (normalized) to fill.
ielpointer toward the index of the worst tetra (to fill).
goodnumber of good elements (to fill).
mednumber of elements with a quality greather than 0.5 (to fill).
hispointer toward the mesh histogram (to fill).
imprimverbosity level

Compute the needed quality information in order to print the quality histogram in optimLES mode.

Definition at line 376 of file quality_3d.c.

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

◆ MMG3D_computeOutqua()

void MMG3D_computeOutqua ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_int *  ne,
double *  max,
double *  avg,
double *  min,
MMG5_int *  iel,
MMG5_int *  good,
MMG5_int *  med,
MMG5_int  his[5],
MMG5_int *  nrid,
int  imprim 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
nepointer toward the number of used tetra (to fill).
maxpointer toward the maximal quality (normalized) to fill.
avgpointer toward the average quality (normalized) to fill.
minpointer toward the minimal quality (normalized) to fill.
ielpointer toward the index of the worst tetra (to fill).
goodnumber of good elements (to fill).
mednumber of elements with a quality greather than 0.5 (to fill).
hispointer toward the mesh histogram (to fill).
nridnumber of tetra with 4 ridge points if we want to warn the user to fill.
imprimverbosity level

Compute the needed quality information in order to print the quality histogram (for special storage of the metric at ridges).

Definition at line 680 of file quality_3d.c.

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

◆ MMG3D_computePrilen()

int MMG3D_computePrilen ( MMG5_pMesh  mesh,
MMG5_pSol  met,
double *  avlen,
double *  lmin,
double *  lmax,
MMG5_int *  ned,
MMG5_int *  amin,
MMG5_int *  bmin,
MMG5_int *  amax,
MMG5_int *  bmax,
MMG5_int *  nullEdge,
int8_t  metRidTyp,
double **  bd_in,
MMG5_int  hl[9] 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
avlenaverage length (to fill).
lminminimal length (to fill).
lmaxmax length (to fill).
nednumber of edges (to fill).
amin(to fill).
bmin(to fill).
amax(to fill).
bmax(to fill).
nullEdge(to fill).
metRidTyp(to fill).
bd_in(to fill).
hl(to fill).
Returns
0 if fail, 1 otherwise.

Compute the required information to print the length histogram

Definition at line 221 of file quality_3d.c.

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

◆ MMG3D_displayQualHisto()

int MMG3D_displayQualHisto ( MMG5_int  ne,
double  max,
double  avg,
double  min,
MMG5_int  iel,
MMG5_int  good,
MMG5_int  med,
MMG5_int  his[5],
MMG5_int  nrid,
int  optimLES,
int  imprim 
)
Parameters
nenumber of used tetra.
maxmaximal quality (normalized).
avgaverage quality (normalized).
minminimal quality (normalized).
ielindex of the worst tetra.
goodnumber of good elements.
mednumber of elements with a quality greather than 0.5
hispointer toward the mesh histogram.
nridnumber of tetra with 4 ridge points if we want to warn the user.
optimLES1 if we work in optimLES mode, 0 otherwise
imprimverbosity level
Returns
0 if the worst element has a nul quality, 1 otherwise.

Print the header of the histogram of mesh qualities then call the function that print the histogram for special metric at ridges.

Definition at line 460 of file quality_3d.c.

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

◆ MMG3D_displayQualHisto_internal()

int MMG3D_displayQualHisto_internal ( MMG5_int  ne,
double  max,
double  avg,
double  min,
MMG5_int  iel,
MMG5_int  good,
MMG5_int  med,
MMG5_int  his[5],
MMG5_int  nrid,
int  optimLES,
int  imprim 
)
Parameters
nenumber of used tetra.
maxmaximal quality (normalized).
avgaverage quality (normalized).
minminimal quality (normalized).
ielindex of the worst tetra.
goodnumber of good elements.
mednumber of elements with a quality greather than 0.5
hispointer toward the mesh histogram.
nridnumber of tetra with 4 ridge points if we want to warn the user.
optimLES1 if we work in optimLES mode, 0 otherwise
imprimverbosity level
Returns
0 if the worst element has a nul quality, 1 otherwise.

Print histogram of mesh qualities for special storage of metric at ridges.

Definition at line 494 of file quality_3d.c.

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

◆ MMG3D_inqua()

int MMG3D_inqua ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
Returns
0 if the worst element has a nul quality, 1 otherwise.

Print histogram of mesh qualities for classic storage of metric at ridges.

Definition at line 631 of file quality_3d.c.

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

◆ MMG3D_outqua()

int MMG3D_outqua ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
Returns
0 if the worst element has a nul quality, 1 otherwise.

Print histogram of mesh qualities for special storage of metric at ridges.

Definition at line 764 of file quality_3d.c.

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

◆ MMG3D_prilen()

int MMG3D_prilen ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int8_t  metRidTyp 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
metRidTypType of storage of ridges metrics: 0 for classic storage, 1 for special storage.
Returns
0 if fail, 1 otherwise.

Compute sizes of edges of the mesh, and displays histo.

Definition at line 341 of file quality_3d.c.

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

◆ MMG3D_tetraQual()

int MMG3D_tetraQual ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int8_t  metRidTyp 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the meric structure.
metRidTypmetric storage (classic or special)
Returns
1 if success, 0 if fail.

Compute the quality of the tetras over the mesh.

Definition at line 50 of file quality_3d.c.

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

◆ MMG5_caltet33_ani()

double MMG5_caltet33_ani ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_pTetra  pt 
)
inline
Parameters
meshpointer toward the mesh structure.
metpointer toward the meric structure.
ptpointer toward a tetrahedra.
Returns
The anisotropic quality of the tet or 0.0 if fail.

Compute the quality of the tet pt with respect to the anisotropic metric met. $ Q = V_met(K) / (sum(len(edge_K)^2)^(3/2) $ and for a calssic storage of metrics at ridges.

Todo:
test with the square of this measure

Definition at line 109 of file quality_3d.c.

Here is the caller graph for this function:

◆ MMG5_countelt()

int MMG5_countelt ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
double *  weightelt,
long *  npcible 
)
Parameters
meshpointer toward the mesh.
sol,pointertoward the sol structure.
weighteltput weight on elts.
npcibleestimation of the final number of nodes/
Returns
0 if fail, 1 if success

Approximation of the final number of vertex.

Warning
call MMG3D_hashTetra(mesh,1) or analysis before using

Definition at line 808 of file quality_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.