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

Fonctions for isotropic size map computation. More...

#include "libmmg3d.h"
#include "libmmg3d_private.h"
#include "inlined_functions_private.h"
#include "mmgexterns_private.h"
Include dependency graph for isosiz_3d.c:

Go to the source code of this file.

Macros

#define MAXLEN   1.0e9
 
#define A64TH   0.015625
 
#define A16TH   0.0625
 
#define A32TH   0.03125
 

Functions

double MMG5_lenedgCoor_iso (double *ca, double *cb, double *ma, double *mb)
 Compute edge length from edge's coordinates. More...
 
static double MMG5_defsizreg (MMG5_pMesh mesh, MMG5_pSol met, MMG5_int nump, MMG5_int *lists, int ilists, double hmin, double hmax, double hausd)
 
double MMG5_meansizreg_iso (MMG5_pMesh mesh, MMG5_pSol met, MMG5_int nump, MMG5_int *lists, int ilists, double hmin, double hmax)
 
static int MMG3D_sum_reqEdgeLengthsAtPoint (MMG5_pMesh mesh, MMG5_pSol met, MMG5_Hash *hash, MMG5_pTetra pt, int8_t i)
 
int MMG3D_set_metricAtPointsOnReqEdges (MMG5_pMesh mesh, MMG5_pSol met, int8_t ismet)
 
int MMG3D_defsiz_iso (MMG5_pMesh mesh, MMG5_pSol met)
 
void MMG3D_mark_pointsOnReqEdge_fromTetra (MMG5_pMesh mesh)
 
int MMG3D_gradsiz_iso (MMG5_pMesh mesh, MMG5_pSol met)
 
int MMG3D_gradsizreq_iso (MMG5_pMesh mesh, MMG5_pSol met)
 

Variables

int8_t ddb
 

Detailed Description

Fonctions for isotropic size map computation.

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

Definition in file isosiz_3d.c.

Macro Definition Documentation

◆ A16TH

#define A16TH   0.0625

Definition at line 44 of file isosiz_3d.c.

◆ A32TH

#define A32TH   0.03125

Definition at line 45 of file isosiz_3d.c.

◆ A64TH

#define A64TH   0.015625

Definition at line 43 of file isosiz_3d.c.

◆ MAXLEN

#define MAXLEN   1.0e9

Definition at line 42 of file isosiz_3d.c.

Function Documentation

◆ MMG3D_defsiz_iso()

int MMG3D_defsiz_iso ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
Returns
0 if fail, 1 otherwise.

Define isotropic size map at all boundary vertices of the mesh, associated with geometric approx, and prescribe hmax at the internal vertices Field h of Point is used, to store the prescribed size (not inverse, squared,...)

1) Size at internal points

Step 1: Set metric at points belonging to a required edge: compute the metric as the mean of the length of the required eges passing through the point

Step 2: size at non required internal points

First step: search for local parameters

Second step: set the metric

Set size at points that cannot be reached from the tetra

First step: search for local parameters

Second step: set the metric

Set size at points that cannot be reached from the tetra

Step 3: size at regular surface points

First step: search for local parameters

Second step: set the metric

3) Travel all boundary faces to update size prescription for points on ridges/edges

First step: search for local parameters

Second step: set metric

Definition at line 662 of file isosiz_3d.c.

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

◆ MMG3D_gradsiz_iso()

int MMG3D_gradsiz_iso ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
Returns
0 if fail, 1 otherwise.

Enforce mesh gradation by truncating size map.

Definition at line 1083 of file isosiz_3d.c.

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

◆ MMG3D_gradsizreq_iso()

int MMG3D_gradsizreq_iso ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
Returns
0 if fail, 1 otherwise.

Enforce mesh gradation by truncating size map.

Mark the edges belonging to a required entity

Update the sizes and mark the treated points

Definition at line 1168 of file isosiz_3d.c.

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

◆ MMG3D_mark_pointsOnReqEdge_fromTetra()

void MMG3D_mark_pointsOnReqEdge_fromTetra ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh structure.

Set the s field of the points that belongs to a required edge to 4*ne+3, set it to 0 otherwise.

Definition at line 1048 of file isosiz_3d.c.

Here is the caller graph for this function:

◆ MMG3D_set_metricAtPointsOnReqEdges()

int MMG3D_set_metricAtPointsOnReqEdges ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int8_t  ismet 
)
Parameters
meshpointer toward the mesh
metpointer toward the metric
ismet1 if user provided metric
Returns
0 if fail, 1 otherwise

Compute the metric at points on trequired adges as the mean of the lengths of the required eges to which belongs the point. The processeed points are marked with flag 3.

Definition at line 564 of file isosiz_3d.c.

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

◆ MMG3D_sum_reqEdgeLengthsAtPoint()

static int MMG3D_sum_reqEdgeLengthsAtPoint ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_Hash hash,
MMG5_pTetra  pt,
int8_t  i 
)
inlinestatic
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
hashedge hashtable.
pttetra to process.
iindex of the edge of the tetra pt that we process.
Returns
1 if success, 0 if fail.

If the edge i of the tetra pt is seen for the first time, compute its euclidean length, add this length to the metric of the edge extremities and increment the count of times we have processed this extremities.

Definition at line 533 of file isosiz_3d.c.

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

◆ MMG5_defsizreg()

static double MMG5_defsizreg ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_int  nump,
MMG5_int *  lists,
int  ilists,
double  hmin,
double  hmax,
double  hausd 
)
static
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
numpindex of point in which the size must be computed.
listspointer toward the surfacic ball of nump.
ilistssize of surfacic ball of nump.
hminminimal edge size.
hmaxmaximal edge size.
hausdhausdorff value.
Returns
the isotropic size at the point if success, FLT_MAX if fail.

Define isotropic size at regular point nump, whose surfacic ball is provided and update metric at 'regular' non-manifold points of the surfacic ball of point.

Definition at line 92 of file isosiz_3d.c.

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

◆ MMG5_lenedgCoor_iso()

double MMG5_lenedgCoor_iso ( double *  ca,
double *  cb,
double *  ma,
double *  mb 
)
inline

Compute edge length from edge's coordinates.

Parameters
*capointer toward the coordinates of the first edge's extremity.
*cbpointer toward the coordinates of the second edge's extremity.
*mapointer toward the metric associated to the first edge's extremity.
*mbpointer toward the metric associated to the second edge's extremity.
Returns
edge length.

Compute length of edge $[ca,cb]$ (with ca and cb coordinates of edge extremities) according to the isotropic size prescription.

Definition at line 61 of file isosiz_3d.c.

Here is the caller graph for this function:

◆ MMG5_meansizreg_iso()

double MMG5_meansizreg_iso ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_int  nump,
MMG5_int *  lists,
int  ilists,
double  hmin,
double  hmax 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
numpindex of point in which the size must be computed.
listspointer toward the surfacic ball of nump.
ilistssize of surfacic ball of nump.
hminminimal edge size.
hmaxmaximal edge size.
Returns
the isotropic size at the point.

For -nosurf option : define isotropic size at regular point nump, whose surfacic ball is provided. The size is computed as the mean of the length of the surface edges passing through nump.

Definition at line 482 of file isosiz_3d.c.

Variable Documentation

◆ ddb

int8_t ddb
extern

Definition at line 42 of file mmg3d1_delone.c.