mmg2d
|
Interpolation of metrics. More...
#include "mmg2d.h"
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) |
Interpolation of metrics.
int MMG2D_defaultmet_2d | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
char | i | ||
) |
mesh | pointer toward the mesh |
met | pointer toward the metric |
k | elt index |
i | vertex index in triangle k |
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.
int MMG2D_defmetbdy_2d | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
int | k, | ||
char | i | ||
) |
mesh | pointer toward the mesh |
met | pointer toward the metric |
k | index of the tria in which we work |
i | index of the point on which we want to compute the metric |
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.
int MMG2D_defsiz_ani | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met | ||
) |
mesh | pointer toward the mesh |
met | pointer toward the metric |
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
int MMG2D_grad2met_ani | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
MMG5_pTria | pt, | ||
int | np1, | ||
int | np2 | ||
) |
mesh | pointer toward the mesh |
met | pointer toward the metric |
pt | pointer toward the processed triangle. |
np1 | first edge extremity (global index) |
np2 | second edge extremity (global index) |
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
int MMG2D_grad2metreq_ani | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
MMG5_pTria | pt, | ||
int | npmaster, | ||
int | npslave | ||
) |
mesh | pointer toward the mesh |
met | pointer toward the metric |
pt | pointer toward the processed tria. |
npmaster | edge extremity that cannot be modified |
npslave | edge extremity to modify to respect the gradation. |
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
|
inlinestatic |
dm | eigenvalues of the first matrix |
dn | eigenvalues of the second matrix |
difsiz | maximal size gap authorized by the gradation. |
dir | direction in which the sizes are graded. |
ier | flag 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.
|
inlinestatic |
m | first matrix |
n | second matrix |
dm | eigenvalues of m in the coreduction basis |
dn | eigenvalues of n in the coreduction basis |
vp | coreduction basis |
ier | flag of the updated sizes: (ier & 1) if we dm has been modified, (ier & 2) if dn has been modified. |
Update of the metrics = tP^-1 diag(d0,d1)P^-1, P = (vp[0], vp[1]) stored in columns