mmg2d
scalem.c File Reference

Scale and unscale mesh and solution. More...

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

Functions

int MMG5_boundingBox (MMG5_pMesh mesh)
 
void MMG5_check_hminhmax (MMG5_pMesh mesh, int8_t sethmin, int8_t sethmax)
 
int MMG5_scale_scalarMetric (MMG5_pMesh mesh, MMG5_pSol met, double dd, int8_t sethmin, int8_t sethmax)
 
int MMG5_scale_meshAndSol (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol, double *dd, int8_t *sethmin, int8_t *sethmax)
 
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

Function Documentation

◆ 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.

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.

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,
int8_t *  sethmin,
int8_t *  sethmax 
)
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)
sethminsetted to 1 if hmin must not be computed from the metric.
sethmaxsetted to 1 if hmax must not be computed from the metric.
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.

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,
int8_t  sethmin,
int8_t  sethmax 
)
Parameters
meshpointer toward the mesh structure.
metpointer toward the metric structure.
ddscaling value.
sethmin1 if hmin must not be automatically computed
sethmax1 if hmin must not be automatically computed
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.

Here is the call graph for this function:
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.

Here is the call 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.

Here is the caller graph for this function: