Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
|
Fonctions for anisotropic size map computation. More...
#include "libmmg3d.h"
#include "inlined_functions_3d_private.h"
#include "mmg3dexterns_private.h"
#include "mmgexterns_private.h"
Go to the source code of this file.
Functions | |
int | MMG3D_printEigenv (double dm[3], double vp[3][3]) |
int | MMG3D_printMat (int8_t symmat, double *m) |
int | MMG3D_printErrorMat (int8_t symmat, double *m, double *mr) |
int | MMG3D_chk4ridVertices (MMG5_pMesh mesh, MMG5_pTetra pt) |
int | MMG5_moymet (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTetra pt, double *m1) |
static int | MMG5_defmetsin (MMG5_pMesh mesh, MMG5_pSol met, MMG5_int kel, int iface, int ip) |
static int | MMG5_defmetrid (MMG5_pMesh mesh, MMG5_pSol met, MMG5_int kel, int iface, MMG5_int ip) |
static int | MMG5_defmetref (MMG5_pMesh mesh, MMG5_pSol met, MMG5_int kel, int iface, int ip) |
static int | MMG5_defmetreg (MMG5_pMesh mesh, MMG5_pSol met, MMG5_int kel, int iface, int ip) |
static int | MMG5_defmetvol (MMG5_pMesh mesh, MMG5_pSol met, int8_t ismet) |
static int | MMG3D_intextmet (MMG5_pMesh mesh, MMG5_pSol met, int np, double me[6]) |
int | MMG3D_defsiz_ani (MMG5_pMesh mesh, MMG5_pSol met) |
static int | MMG5_grad2metVol_getmet (MMG5_pMesh mesh, MMG5_pSol met, MMG5_int ip, double ux, double uy, double uz, double *m, int8_t *ridgedir) |
static void | MMG5_grad2metVol_extmet (MMG5_pMesh mesh, MMG5_pPoint ppt, double l, double *m, double *mext) |
static void | MMG3D_gradSimred (MMG5_pMesh mesh, MMG5_pPoint ppt, double m[6], double mext[6], int8_t ridgedir, int8_t iloc, int *ier) |
static void | MMG5_grad2metVol_setmet (MMG5_pMesh mesh, MMG5_pSol met, int ip, double *m, int8_t ridgedir) |
static int | MMG5_grad2metVol (MMG5_pMesh mesh, MMG5_pSol met, int np1, int np2) |
int | MMG3D_updatemetreq_ani (double *n, double dn[3], double vp[3][3]) |
static int | MMG5_grad2metVolreq (MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTetra pt, MMG5_int npmaster, MMG5_int npslave) |
int | MMG3D_gradsiz_ani (MMG5_pMesh mesh, MMG5_pSol met) |
int | MMG3D_gradsizreq_ani (MMG5_pMesh mesh, MMG5_pSol met) |
Fonctions for anisotropic size map computation.
Definition in file anisosiz_3d.c.
int MMG3D_chk4ridVertices | ( | MMG5_pMesh | mesh, |
MMG5_pTetra | pt | ||
) |
int MMG3D_defsiz_ani | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met | ||
) |
mesh | pointer to the mesh structure. |
met | pointer to the metric stucture. |
Define size at points by intersecting the surfacic metric and the physical metric.
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
Definition at line 1310 of file anisosiz_3d.c.
|
inlinestatic |
mesh | pointer to the mesh. |
ppt | pointer to the P point structure. |
m | metric tensor on point P. |
mext | extended metric tensor from Q to P. |
ridgedir | normal direction for metric reconstruction on P (on ridge only). |
iloc | local index of point P on the edge. |
ier | pointer to the local indices (on the edge) of updated points, with bitwise encoding. |
Use metric intersection to gradate the anisotropic metric on point P, given the metric extended from point Q on the edge PQ.
Definition at line 1534 of file anisosiz_3d.c.
int MMG3D_gradsiz_ani | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met | ||
) |
mesh | pointer to the mesh structure. |
met | pointer to the metric structure. |
Enforces mesh gradation by truncating metric field.
Mark the edges belonging to a required entity
Definition at line 2073 of file anisosiz_3d.c.
int MMG3D_gradsizreq_ani | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met | ||
) |
mesh | pointer to the mesh structure. |
met | pointer to the metric structure. |
Enforce mesh gradation by truncating size map.
Mark the edges belonging to a required entity (already done if the classic gradation is enabled)
Definition at line 2210 of file anisosiz_3d.c.
|
inlinestatic |
mesh | pointer to the mesh structure. |
met | pointer to the metric structure. |
np | global index of vertex in which we intersect the metrics. |
me | physical metric at point np. |
Intersect the surface metric held in np (supported in tangent plane of np) with 3*3 physical metric in me. For ridge points, this function fill the \( p_0->m[3]\) and \( p_0->m[4]\) fields that contains respectively the specific sizes in the \(n_1\) and \(n_2\) directions.
Definition at line 1267 of file anisosiz_3d.c.
int MMG3D_printEigenv | ( | double | dm[3], |
double | vp[3][3] | ||
) |
dm | matrix eigenvalues (1x3 array). |
vp | eigenvectors matrix (3x3 array, eigenvectors stored by lines). |
Print eigendecomposition.
Definition at line 48 of file anisosiz_3d.c.
int MMG3D_printErrorMat | ( | int8_t | symmat, |
double * | m, | ||
double * | mr | ||
) |
symmat | flag for symmetric(1) or non-symmetric(0) matrix.. |
m | first matrix (1x6 or 1x9 array). |
mr | second matrix (1x6 or 1x9 array). |
Print relative error between two matrices, for each matrix entry.
Definition at line 90 of file anisosiz_3d.c.
int MMG3D_printMat | ( | int8_t | symmat, |
double * | m | ||
) |
symmat | flag for symmetric(1) or non-symmetric(0) matrix.. |
m | matrix (1x6 or 1x9 array). |
Print matrix entries.
Definition at line 67 of file anisosiz_3d.c.
int MMG3D_updatemetreq_ani | ( | double * | n, |
double | dn[3], | ||
double | vp[3][3] | ||
) |
n | matrix to update |
dn | eigenvalues of n in the coreduction basis |
vp | coreduction basis |
Update of the metric n = tP^-1 diag(dn0,dn1,dn2)P^-1, P = (vp[0],vp[1],vp[2]) stored in columns
Definition at line 1867 of file anisosiz_3d.c.
|
static |
mesh | pointer to the mesh structure. |
met | pointer to the metric structure. |
kel | index of the triangle in which we work. |
iface | face of the tetra on which we work. |
ip | index of the point on which we want to compute the metric (in tetra kel). |
Define metric map at a REF vertex of the mesh, associated to the geometric approx of the surface.
Definition at line 606 of file anisosiz_3d.c.
|
static |
mesh | pointer to the mesh structure. |
met | pointer to the metric structure. |
kel | index of the triangle in which we work. |
iface | working face. |
ip | index of the point on which we want to compute the metric in (tetra kel). |
Define metric map at a REGULAR vertex of the mesh, associated to the geometric approx of the surface.
Definition at line 875 of file anisosiz_3d.c.
|
static |
mesh | pointer to the mesh structure. |
met | pointer to the metric structure. |
kel | index of the tetra in which we work. |
iface | face of the tetra on which we work. |
ip | index of the point on which we want to compute the metric (in tetra kel). |
Compute metric tensor associated to a ridge point : convention is a bit weird here : p->m[0] is the specific size in direction t, p->m[1] is the specific size in direction \( u_1 = n_1^t\) p->m[2] is the specific size in direction \( u_2 = n_2^t\), and at each time, metric tensor has to be recomputed, depending on the side.
Definition at line 390 of file anisosiz_3d.c.
|
static |
mesh | pointer to the mesh structure. |
met | pointer to the metric structure. |
kel | index of the tetra in which we work. |
iface | face of the tetra on which we work. |
ip | index of the point on which we want to compute the metric (in tetra kel). |
Define metric map at a SINGULARITY (corner, required or non-manifold points) of the geometry, associated to the geometric approx of the surface. metric \(=\alpha*Id\), \(\alpha =\) size.
Definition at line 191 of file anisosiz_3d.c.
|
inlinestatic |
mesh | pointer to the mesh structure. |
met | pointer to the metric structure. |
ismet | 1 if user provided metric |
Define metric map at a non-boundary vertex of the mesh. Allocate the metric if needed. Truncate the metric at the hmin/hmax values.
First step: search for local parameters
Second step: set metric
First step: search for local parameters
Second step: set metric
Definition at line 1101 of file anisosiz_3d.c.
|
inlinestatic |
mesh | pointer to the mesh. |
met | pointer to the metric structure. |
np1 | global index of the first edge extremity. |
np2 | global index of the second edge extremity. |
Enforces gradation of metric in both extremities of an edge with respect to one other.
Recover normal and metric associated to p1 and p2 (metric can be in ridge storage)
Extend p2 metric and gradate p1
Extend p1 metric and gradate p2 (p1 has already been updated)
Definition at line 1779 of file anisosiz_3d.c.
|
inlinestatic |
mesh | pointer to the mesh. |
ppt | pointer to the P point structure. |
l | Euclidean length of the edge PQ. |
m | metric tensor on point P. |
mext | metric tensor extended on Q. |
Extend metric tensor from point P to point Q according to an h-variation law applied on each eigenvalue.
Definition at line 1498 of file anisosiz_3d.c.
|
inlinestatic |
mesh | pointer to the mesh. |
met | pointer to the metric structure. |
ip | global point index. |
ux | edge vector x-component. |
uy | edge vector y-component. |
uz | edge vector z-component. |
m | point metric (copy, to be filled). |
ridgedir | pointer to the index of the normal direction used for ridge metric (on ridge points only). |
Get metric tensor from metric structure (pass from ridge storage to classical storage on non-singular ridge points, copy metric on all other points). See: [1]. The Hv-correction is used (gradation with respect to H-variation measure).
Definition at line 1439 of file anisosiz_3d.c.
|
inlinestatic |
mesh | pointer to the mesh. |
met | pointer to the metric structure. |
ip | global index of the point. |
m | metric tensor on the point (copy). |
ridgedir | normal direction for metric reconstruction (on ridge only). |
Set new metric tensor to the metric structure (pass from classical storage to ridge storage on non-singular ridge points, copy metric on all other points).
Definition at line 1722 of file anisosiz_3d.c.
|
inlinestatic |
mesh | pointer to the mesh. |
met | pointer to the metric structure. |
pt | pointer to a tetra. |
npmaster | edge extremity that cannot be modified |
npslave | edge extremity to modify to respect the gradation. |
Enforces gradation of metric from required entity toward other using the simultaneous reduction technique (note that as the gradation is propagated, we can be on an edge without a required extremity).
Definition at line 1903 of file anisosiz_3d.c.
|
inline |
mesh | pointer to the mesh structure. |
met | pointer to the sol structure. |
pt | pointer to a tetra. |
m1 | computed metric. |
Compute mean metric over the internal tetra pt. Do not take into account the metric values at ridges points (because we don't know how to build it).
Definition at line 144 of file anisosiz_3d.c.