mmg2d
anisosiz_2d.c File Reference

Interpolation of metrics. More...

#include "mmg2d.h"
Include dependency graph for anisosiz_2d.c:

Functions

int MMG2D_defaultmet_2d (MMG5_pMesh mesh, MMG5_pSol met, int k, char i)
 
int MMG2D_defmetbdy_2d (MMG5_pMesh mesh, MMG5_pSol met, int k, char i)
 
int MMG2D_defsiz_ani (MMG5_pMesh mesh, MMG5_pSol met)
 
static void MMG2D_gradEigenv (double dm[2], double dn[2], double difsiz, int8_t dir, int8_t *ier)
 
static int MMG2D_updatemet_ani (double *m, double *n, double dm[2], double dn[2], double vp[2][2], int8_t ier)
 
int MMG2D_grad2met_ani (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria pt, int np1, int np2)
 
int MMG2D_grad2metreq_ani (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria pt, int npmaster, int npslave)
 

Detailed Description

Interpolation of metrics.

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

Function Documentation

◆ MMG2D_defaultmet_2d()

int MMG2D_defaultmet_2d ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
char  i 
)
Parameters
meshpointer toward the mesh
metpointer toward the metric
kelt index
ivertex index in triangle k
Returns
0 if fail, 1 if success

Impose default metric (isotropic, with size hmax) at vertex i in triangle k (don't take into account the local parameters). Set the point flag to 1 to be able to truncate it with the local params later.

◆ MMG2D_defmetbdy_2d()

int MMG2D_defmetbdy_2d ( MMG5_pMesh  mesh,
MMG5_pSol  met,
int  k,
char  i 
)
Parameters
meshpointer toward the mesh
metpointer toward the metric
kindex of the tria in which we work
iindex of the point on which we want to compute the metric
Returns
1 if success, 0 if fail

Calculate anisotropic metric tensor at (boundary) vertex i in triangle k on account of geometric approximation of the corresponding curve (taking into account the local parameters). Set the point flag to 2 to ignore it whem imposing the local parameters later.

Here is the call graph for this function:

◆ MMG2D_defsiz_ani()

int MMG2D_defsiz_ani ( MMG5_pMesh  mesh,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh
metpointer toward the metric
Returns
0 if fail, 1 if success

Definition of an anisotropic metric tensor field based on the geometry of the domain; this tensor field is intersected by a user-defined tensor field

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

For points with flag 1 (metrec computed by defaultmet_2d), truncation by the local parameters

Here is the call graph for this function:

◆ MMG2D_grad2met_ani()

int MMG2D_grad2met_ani ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_pTria  pt,
int  np1,
int  np2 
)
Parameters
meshpointer toward the mesh
metpointer toward the metric
ptpointer toward the processed triangle.
np1first edge extremity (global index)
np2second edge extremity (global index)
Returns
0 if fail or we don't need to modify the sizes. ier, where (ier & 1) if metric of ip1 is altered, and (ier & 2) if metric of ip2 is altered.

Perform simultaneous reduction of metrics at ip1 points and ip2, and truncate characteristic sizes so that the difference between two corresponding sizes respect the maximal gradation.

Ref : https://www.rocq.inria.fr/gamma/Frederic.Alauzet/cours/cea2010_V2.pdf

Here is the call graph for this function:

◆ MMG2D_grad2metreq_ani()

int MMG2D_grad2metreq_ani ( MMG5_pMesh  mesh,
MMG5_pSol  met,
MMG5_pTria  pt,
int  npmaster,
int  npslave 
)
Parameters
meshpointer toward the mesh
metpointer toward the metric
ptpointer toward the processed tria.
npmasteredge extremity that cannot be modified
npslaveedge extremity to modify to respect the gradation.
Returns
0 if fail or we don't need to update the size of ipslave, 1 if its size has been updated.

Perform simultaneous reduction of metrics at npmaster points and npslave, and modify the characteristic size of npslave so that the difference between the two sizes respect the maximal gradation

Ref : https://www.rocq.inria.fr/gamma/Frederic.Alauzet/cours/cea2010_V2.pdf

Here is the call graph for this function:

◆ MMG2D_gradEigenv()

static void MMG2D_gradEigenv ( double  dm[2],
double  dn[2],
double  difsiz,
int8_t  dir,
int8_t *  ier 
)
inlinestatic
Parameters
dmeigenvalues of the first matrix
dneigenvalues of the second matrix
difsizmaximal size gap authorized by the gradation.
dirdirection in which the sizes are graded.
ierflag of the modified eigenvalue: (ier & 1) if dm is altered, and (ier & 2) if dn is altered.

Gradation of sizes = 1/sqrt(eigenv of the tensors) in the idir direction.

Here is the caller graph for this function:

◆ MMG2D_updatemet_ani()

static int MMG2D_updatemet_ani ( double *  m,
double *  n,
double  dm[2],
double  dn[2],
double  vp[2][2],
int8_t  ier 
)
inlinestatic
Parameters
mfirst matrix
nsecond matrix
dmeigenvalues of m in the coreduction basis
dneigenvalues of n in the coreduction basis
vpcoreduction basis
ierflag of the updated sizes: (ier & 1) if we dm has been modified, (ier & 2) if dn has been modified.
Returns
0 if fail, 1 otherwise

Update of the metrics = tP^-1 diag(d0,d1)P^-1, P = (vp[0], vp[1]) stored in columns

Here is the caller graph for this function: