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

Scale and unscale mesh and solution. More...

#include "mmgcommon_private.h"
#include "mmgexterns_private.h"
Include dependency graph for scalem.c:

Go to the source code of this file.

Functions

int MMG5_boundingBox (MMG5_pMesh mesh)
 
void MMG5_check_hminhmax (MMG5_pMesh mesh, int8_t sethmin, int8_t sethmax)
 
int MMG5_check_setted_hminhmax (MMG5_pMesh mesh)
 
int MMG5_truncate_met3d (MMG5_pSol met, MMG5_int ip, double isqhmin, double isqhmax)
 
int MMG5_scale_scalarMetric (MMG5_pMesh mesh, MMG5_pSol met, double dd)
 
int MMG5_scale_tensorMetric (MMG5_pMesh mesh, MMG5_pSol met, double dd)
 
int MMG5_solTruncature_iso (MMG5_pMesh mesh, MMG5_pSol met)
 
int MMG5_2dSolTruncature_ani (MMG5_pMesh mesh, MMG5_pSol met)
 
int MMG5_3dSolTruncature_ani (MMG5_pMesh mesh, MMG5_pSol met)
 
int MMG5_scale_meshAndSol (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol, double *dd)
 
int MMG5_scaleMesh (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol)
 
int MMG5_unscaleMesh (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol)
 

Detailed Description

Scale and unscale mesh and solution.

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

Definition in file scalem.c.

Function Documentation

◆ MMG5_2dSolTruncature_ani()

int MMG5_2dSolTruncature_ani ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the solution structure.
Returns
0 if fail, 1 if succeed.

Compute hmin and hmax values from unflagged points (if not setted by the user), check the values and truncate the 2D metric.

Definition at line 365 of file scalem.c.

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

◆ MMG5_3dSolTruncature_ani()

int MMG5_3dSolTruncature_ani ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the solution structure.
Returns
0 if fail, 1 if succeed.

Compute hmin and hmax values from unflagged points (if not setted by the user), check the values and truncate the 3D metric.

Definition at line 453 of file scalem.c.

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

◆ MMG5_boundingBox()

int MMG5_boundingBox ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh structure.
Returns
1 if success, 0 if fail (computed bounding box too small).

Compute the mesh bounding box and fill the min, max and delta fields of the MMG5_info structure.

Definition at line 46 of file scalem.c.

Here is the caller graph for this function:

◆ MMG5_check_hminhmax()

void MMG5_check_hminhmax ( MMG5_pMesh  mesh,
int8_t  sethmin,
int8_t  sethmax 
)
Parameters
meshpointer toward the mesh structure.
sethmin1 if hmin is setted by the user.
sethmax1 if hmax is setted by the user.

Check the compatibility between the automatically computed hmin/hmax values and the user settings.

Definition at line 89 of file scalem.c.

Here is the caller graph for this function:

◆ MMG5_check_setted_hminhmax()

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

Check that hmin (resp. hmax) is not user setted if it is negative.

Definition at line 116 of file scalem.c.

Here is the caller graph for this function:

◆ MMG5_scale_meshAndSol()

int MMG5_scale_meshAndSol ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_pSol  sol,
double *  dd 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward a metric
solpointer toward a solution structure (level-set or displacement).
ddpointer toward the scaling value (to fill)
Returns
1 if success, 0 if fail.

Scale the mesh and the size informations between 0 and 1. Compute a default value for the hmin/hmax parameters if needed.

Definition at line 561 of file scalem.c.

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

◆ MMG5_scale_scalarMetric()

int MMG5_scale_scalarMetric ( MMG5_pMesh  mesh,
MMG5_pSol  met,
double  dd 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
ddscaling value.
Returns
1 if success, 0 if fail.

Scale and truncate by hmin/hmax the scalar metric stored in met. If hmin/hmax are not provided by the user, it is automatically computed from the metric.

Definition at line 206 of file scalem.c.

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

◆ MMG5_scale_tensorMetric()

int MMG5_scale_tensorMetric ( MMG5_pMesh  mesh,
MMG5_pSol  met,
double  dd 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
ddscaling value.
Returns
1 if success, 0 if fail.

Scale and truncate by hmin/hmax the scalar metric stored in met. If hmin/hmax are not provided by the user, it is automatically computed from the metric.

Definition at line 260 of file scalem.c.

Here is the caller graph for this function:

◆ MMG5_scaleMesh()

int MMG5_scaleMesh ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_pSol  sol 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
solpointer toward a solution structure (level-set or displacement).
Returns
1 if success, 0 if fail (computed bounding box too small or one af the anisotropic input metric is not valid).

Scale the mesh and the size informations between 0 and 1. Compute a default value for the hmin/hmax parameters if needed.

Definition at line 649 of file scalem.c.

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

◆ MMG5_solTruncature_iso()

int MMG5_solTruncature_iso ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the solution structure.
Returns
0 if fail, 1 if succeed.

Compute hmin and hmax values from unflagged points (if not setted by the user), check the values and truncate the metric.

Definition at line 299 of file scalem.c.

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

◆ MMG5_truncate_met3d()

int MMG5_truncate_met3d ( MMG5_pSol  met,
MMG5_int  ip,
double  isqhmin,
double  isqhmax 
)
Parameters
metpointer toward metric.
ippointer toward global index of point on which metric has to be truncated
isqhmininverse square of hmin (min edge size)
isqhmaxinverse square of hmax (max edge size)
Returns
0 if fail, 1 if succeed

Truncation of anisotropic metric at point ip by hmin and hmax.

Definition at line 148 of file scalem.c.

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

◆ MMG5_unscaleMesh()

int MMG5_unscaleMesh ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_pSol  sol 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward a metric.
solpointer toward a solution structure (level-set or displacement).
Returns
1.

Unscale the mesh and the size informations to their initial sizes.

Definition at line 689 of file scalem.c.

Here is the caller graph for this function: