Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
|
Functions to move a point in the mesh. 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 | MMG5_movintpt_iso (MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, int64_t *list, int ilist, int improve) |
int | MMG5_movintptLES_iso (MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, MMG5_int *list, int ilist, int improve) |
int | MMG3D_rotate_surfacicBall (MMG5_pMesh mesh, MMG5_int *lists, int ilists, MMG5_int ip0, double r[3][3], double *lispoi) |
int | MMG3D_movbdyregpt_geom (MMG5_pMesh mesh, MMG5_int *lists, const MMG5_int kel, const MMG5_int ip0, double n[3], double lambda[3], double o[3], double no[3]) |
int | MMG5_movbdyregpt_iso (MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, int64_t *listv, int ilistv, MMG5_int *lists, int ilists, int improveSurf, int improveVol) |
static int | MMG3D_curveEndingPts_chkEdg (MMG5_pMesh mesh, MMG5_int *lists, int l, MMG5_int ip0, MMG5_int *ipa, MMG5_int *ipb, const uint16_t edgTag, MMG5_int *ip) |
int | MMG3D_curveEndingPts (MMG5_pMesh mesh, MMG5_int *lists, int ilists, const uint16_t edgTag, MMG5_int ip0, MMG5_int *ip1, MMG5_int *ip2) |
int | MMG3D_movbdycurvept_chckAndUpdate (MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, int64_t *listv, int ilistv, int improve, MMG5_pPoint p0, MMG5_int ip0, uint8_t isrid, double o[3], double no[3], double no2[3], double to[3]) |
int | MMG3D_movbdycurvept_newPosForSimu (MMG5_pMesh mesh, MMG5_pPoint p0, MMG5_int ip0, MMG5_int ip1, MMG5_int ip2, double ll1old, double ll2old, uint8_t isrid, const double step, double o[3], double no[3], double no2[3], double to[3], const uint16_t edgTag) |
static int | MMG3D_movbdycurvept_iso (MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, int64_t *listv, int ilistv, MMG5_int *lists, int ilists, int improve, const int16_t edgTag) |
int | MMG5_movbdyrefpt_iso (MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, int64_t *listv, int ilistv, MMG5_int *lists, int ilists, int improve) |
int | MMG5_movbdynompt_iso (MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, int64_t *listv, int ilistv, MMG5_int *lists, int ilists, int improve) |
int | MMG5_movbdynomintpt_iso (MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, int64_t *listv, int ilistv, int improve) |
int | MMG5_movbdyridpt_iso (MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, int64_t *listv, int ilistv, MMG5_int *lists, int ilists, int improve) |
int | MMG3D_movv_ani (MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int k, int ib) |
int | MMG3D_movnormal_iso (MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int k, int ib) |
int | MMG3D_movv_iso (MMG5_pMesh mesh, MMG5_pSol sol, MMG5_int k, int ib) |
Functions to move a point in the mesh.
Definition in file movpt_3d.c.
int MMG3D_curveEndingPts | ( | MMG5_pMesh | mesh, |
MMG5_int * | lists, | ||
int | ilists, | ||
const uint16_t | edgTag, | ||
MMG5_int | ip0, | ||
MMG5_int * | ip1, | ||
MMG5_int * | ip2 | ||
) |
mesh | pointer to the mesh structure. |
lists | pointer to the surfacic ball of the point. |
ilists | size of the surfacic ball. |
edgTag | Type of edge on which we move (MG_REF, MG_NOM or MG_GEO). |
ip0 | point that we want to move along curve. |
ip1 | first ending point of curve (in current surfacic ball). |
ip2 | second ending point of curve (in current surfacic ball). |
Search the two ending points of curve passing through ip0 in the surfacic ball of ip0.
Travel surfacic ball and recover the two ending points of curve (that will be stored in ip1 and ip2): ball is travelled from beginning in one direction until meeting the curve edge, then, starting from the end, in the other direction until meeting the second curve edge.
a. Travel surface edges in one sense to get the first featured edge. Triangles of the surface are successively processed and the tag of the edge between current tria and previous one is tested (so each edge is checked only once). Ball processing stops at first featured edge crossed.
b. Now travel surface edges in the reverse sense so as to get the second curve. Again, we test the tag of the edge at interface of current triangle and previous one and we stop ball pocessing when the second featured edge has been found. This edge is necessarly different from the one previously found.
Definition at line 944 of file movpt_3d.c.
|
inlinestatic |
mesh | pointer to the mesh structure. |
lists | pointer to the surfacic ball of the point we want to move (ip0). |
l | item of lists to process. |
ip0 | global index of point whose ball is passed. |
ipa | global idx of second vertex of previous bdy tria of the list (updated at end of tria processing). |
ipb | global idx of third vertex of previous bdy tria of the list (updated at end of tria processing). |
edgTag | searched tag (MG_NOM, MG_GEO, MG_REF). |
ip | variable to store the global index of ending point (if found). |
Process boundary triangle stored in the item l of the surfacic list lists of point ip0. Check if the edge at interface of this tria and the tria ipa - ipb - ip0 (previous tria of the list) has tag edgTag:
Definition at line 853 of file movpt_3d.c.
int MMG3D_movbdycurvept_chckAndUpdate | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
MMG3D_pPROctree | PROctree, | ||
int64_t * | listv, | ||
int | ilistv, | ||
int | improve, | ||
MMG5_pPoint | p0, | ||
MMG5_int | ip0, | ||
uint8_t | isrid, | ||
double | o[3], | ||
double | no[3], | ||
double | no2[3], | ||
double | to[3] | ||
) |
mesh | pointer to the mesh structure. |
met | pointer to the metric structure. |
PROctree | pointer to the PROctree structure. |
listv | pointer to the volumic ball of the point. |
ilistv | size of the volumic ball. |
improve | force the new minimum element quality to be greater or equal than 1.02 of the old minimum element quality. |
p0 | point that we want to move. |
ip0 | global index of point p0. |
isrid | 1 if point is a ridge manifold point |
o | point coordinates at new position |
no | normal at point at new position |
no2 | second normal at point at new pos (for ridge manifold point) |
to | tangent at point at new pos. |
Check volumes of the tetra in the ball of point with new position of point. Update coordinates, normals, tangents and qualities if point displacement is accepted.
Check wether all volumes remain positive with new position of the point
Update coordinates, normals, for new point
Definition at line 1056 of file movpt_3d.c.
|
inlinestatic |
mesh | pointer to the mesh structure. |
met | pointer to the metric structure. |
PROctree | pointer to the PROctree structure. |
listv | pointer to the volumic ball of the point. |
ilistv | size of the volumic ball. |
lists | pointer to the surfacic ball of the point. |
ilists | size of the surfacic ball. |
improve | force the new minimum element quality to be greater or equal than 1.02 of the old minimum element quality. |
edgTag | Type of edge on which we move (MG_REF,MG_NOM or MG_GEO). |
Move boundary reference, ridge or non-manifold point, whose volumic and surfacic balls are passed.
Step 0: Compute if the edge is a simple ridge to know if we have to compute a second normal at point
Step 1: Travel surfacic ball and recover the two ending points of curve (that will be stored in ip1 and ip2)
Step 2: At this point, we get the point extremities of the curve passing through ip0 : ip1, ip2, along with support tets it1,it2, the surface faces iface1,iface2, and the associated edges ie1,ie2. Computation of displacement along curve and checks
a. Changes needed for choice of time step : see manuscript notes
b. Check sense of displacement, compute support of the associated edge and features of the new position
For each surfacic triangle build a virtual displaced triangle for check purposes :
Remark: normal deviation is checked only with aniso metric because displacment in inso mode remais sufficiently small to not create spurious ridges while this issue was encountered on some aniso test cases.
d. Check whether all volumes remain positive with new position of the point and update coor, normals, tangents and qualities if move is accepted.
Definition at line 1263 of file movpt_3d.c.
int MMG3D_movbdycurvept_newPosForSimu | ( | MMG5_pMesh | mesh, |
MMG5_pPoint | p0, | ||
MMG5_int | ip0, | ||
MMG5_int | ip1, | ||
MMG5_int | ip2, | ||
double | ll1old, | ||
double | ll2old, | ||
uint8_t | isrid, | ||
const double | step, | ||
double | o[3], | ||
double | no[3], | ||
double | no2[3], | ||
double | to[3], | ||
const uint16_t | edgTag | ||
) |
mesh | pointer to the mesh structure. |
p0 | point that we want to move. |
ip0 | global index of point p0. |
ip1 | First ending point of curve. |
ip2 | Second ending point of curve. |
ll1old | length of edge ip0-ip1. |
ll2old | length of edge ip0-ip2. |
isrid | 1 if point is a ridge manifold point. |
step | step of displacement. |
o | point coordinates at new position |
no | normal at point at new position |
no2 | second normal at point at new pos (for ridge manifold point) |
to | tangent at point at new pos. |
edgTag | MG_NOM, MG_REF or MG_GEO depending on type of curve along which we move. |
Check volumes of the tetra in the ball of point with new position of point. Update coordinates, normals, tangents and qualities if point displacement is accepted.
Choose direction of displacement depending on edge lengths
Build support of the edge ip-ip0 and features of new position
Store computed values for simulations purposes
Definition at line 1150 of file movpt_3d.c.
int MMG3D_movbdyregpt_geom | ( | MMG5_pMesh | mesh, |
MMG5_int * | lists, | ||
const MMG5_int | kel, | ||
const MMG5_int | ip0, | ||
double | n[3], | ||
double | lambda[3], | ||
double | o[3], | ||
double | no[3] | ||
) |
mesh | pointer to the mesh |
lists | pointer to the surface ball of ip0 |
kel | index of the current element in the ball |
ip0 | global index of the point to move |
n | normal at ip0 |
lambda | barycentric coor of the new point in triangle |
o | coordinates of the new point (to compute) |
no | normal at new point (to compute) |
Compute the Bezier patch at element lists[kel], compute the new point coordinates, normal and tangent and check the geometric approximation.
Definition at line 483 of file movpt_3d.c.
int MMG3D_movnormal_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
MMG5_int | k, | ||
int | ib | ||
) |
mesh | pointer to the mesh structure. |
sol | pointer to the metric structure. |
k | tetra index. |
ib | local index of the point inside the tetra k. |
Move internal point according to the normal at the opposite face Try to increase the volume of the tetra. Called when processing very bad elts in opttyp.
Definition at line 1754 of file movpt_3d.c.
int MMG3D_movv_ani | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
MMG5_int | k, | ||
int | ib | ||
) |
mesh | pointer to the mesh structure. |
sol | pointer to the metric structure. |
k | element index |
ip | local index of point |
Move internal point according to the normal at the opposite face Try to increase the volume of the tetra. Called when processing very bad elts in opttyp.
Definition at line 1634 of file movpt_3d.c.
int MMG3D_movv_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
MMG5_int | k, | ||
int | ib | ||
) |
mesh | pointer to the mesh structure. |
sol | pointer to the metric structure. |
k | element index |
ip | local index of point |
Move internal point according to the normal at the opposite face Try to increase the volume of the tetra. Called when processing very bad elts in opttyp.
Definition at line 1883 of file movpt_3d.c.
int MMG3D_rotate_surfacicBall | ( | MMG5_pMesh | mesh, |
MMG5_int * | lists, | ||
int | ilists, | ||
MMG5_int | ip0, | ||
double | r[3][3], | ||
double * | lispoi | ||
) |
mesh | pointer to the mesh structure. |
lists | pointer to the surfacic ball of the point. |
ilists | size of the surfacic ball. |
ip0 | global index of the point that we move |
r | rotation matrix that sends the normal at ip0 to z-axis |
lispoi | rotated surfacic ball (lispoi[k] is the common edge between faces lists[k-1] and lists[k]) |
Rotation of the oriented surfacic ball of ip0.
At this point, lispoi contains the oriented surface ball of point p0, that has been rotated through r, with the convention that triangle l has edges lispoi[l]; lispoi[l+1]
Definition at line 350 of file movpt_3d.c.
int MMG5_movbdynomintpt_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
MMG3D_pPROctree | PROctree, | ||
int64_t * | listv, | ||
int | ilistv, | ||
int | improve | ||
) |
mesh | pointer to the mesh structure. |
met | pointer to the metric structure. |
PROctree | pointer to the PROctree structure. |
listv | pointer to the volumic ball of the point. |
ilistv | size of the volumic ball. |
improve | force the new minimum element quality to be greater or equal than 1.02 of the old minimum element quality. |
Move internal non manifold point, whose volumic ball is passed
Definition at line 1490 of file movpt_3d.c.
int MMG5_movbdynompt_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
MMG3D_pPROctree | PROctree, | ||
int64_t * | listv, | ||
int | ilistv, | ||
MMG5_int * | lists, | ||
int | ilists, | ||
int | improve | ||
) |
mesh | pointer to the mesh structure. |
met | pointer to the metric structure. |
PROctree | pointer to the PROctree structure. |
listv | pointer to the volumic ball of the point. |
ilistv | size of the volumic ball. |
lists | pointer to the surfacic ball of the point. |
ilists | size of the surfacic ball. |
improve | force the new minimum element quality to be greater or equal than 1.02 of the old minimum element quality. |
Move boundary non-manifold point, whose volumic and surfacic balls are passed.
Definition at line 1470 of file movpt_3d.c.
int MMG5_movbdyrefpt_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
MMG3D_pPROctree | PROctree, | ||
int64_t * | listv, | ||
int | ilistv, | ||
MMG5_int * | lists, | ||
int | ilists, | ||
int | improve | ||
) |
mesh | pointer to the mesh structure. |
met | pointer to the metric structure. |
PROctree | pointer to the PROctree structure. |
listv | pointer to the volumic ball of the point. |
ilistv | size of the volumic ball. |
lists | pointer to the surfacic ball of the point. |
ilists | size of the surfacic ball. |
improve | force the new minimum element quality to be greater or equal than 1.02 of the old minimum element quality. |
Move boundary reference point, whose volumic and surfacic balls are passed.
Definition at line 1446 of file movpt_3d.c.
int MMG5_movbdyregpt_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
MMG3D_pPROctree | PROctree, | ||
int64_t * | listv, | ||
int | ilistv, | ||
MMG5_int * | lists, | ||
int | ilists, | ||
int | improveSurf, | ||
int | improveVol | ||
) |
mesh | pointer to the mesh structure. |
met | pointer to the metric structure. |
PROctree | pointer to the PROctree structure. |
listv | pointer to the volumic ball of the point. |
ilistv | size of the volumic ball. |
lists | pointer to the surfacic ball of the point. |
ilists | size of the surfacic ball. |
improve | force the new minimum element quality to be greater or equal than 1.02 of the old minimum element quality. |
Move boundary regular point, whose volumic and surfacic balls are passed.
Step 1 : rotation matrix that sends normal n to the third coordinate vector of R^3
Step 2 : rotation of the oriented surfacic ball with r : lispoi[k] is the common edge between faces lists[k-1] and lists[k]
Step 3 : Compute optimal position to make current triangle equilateral, and average of these positions
Step 4 : locate new point in the ball, and compute its barycentric coordinates
Step 5 : come back to original problem, and compute patch in triangle iel
Definition at line 626 of file movpt_3d.c.
int MMG5_movbdyridpt_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
MMG3D_pPROctree | PROctree, | ||
int64_t * | listv, | ||
int | ilistv, | ||
MMG5_int * | lists, | ||
int | ilists, | ||
int | improve | ||
) |
mesh | pointer to the mesh structure. |
met | pointer to the metric structure. |
PROctree | pointer to the PROctree structure. |
listv | pointer to the volumic ball of the point. |
ilistv | size of the volumic ball. |
lists | pointer to the surfacic ball of the point. |
ilists | size of the surfacic ball. |
improve | force the new minimum element quality to be greater or equal than 1.02 of the old minimum element quality. |
Move boundary ridge point, whose volumic and surfacic balls are passed.
Definition at line 1614 of file movpt_3d.c.
int MMG5_movintpt_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
MMG3D_pPROctree | PROctree, | ||
int64_t * | list, | ||
int | ilist, | ||
int | improve | ||
) |
mesh | pointer to the mesh structure. |
met | pointer to the metric structure. |
PROctree | pointer to the PROctree structure. |
list | pointer to the volumic ball of the point. |
ilist | size of the volumic ball. |
improve | force the new minimum element quality to be greater or equal than 0.9 of the old minimum element quality. |
Move internal point whose volumic is passed.
Definition at line 58 of file movpt_3d.c.
int MMG5_movintptLES_iso | ( | MMG5_pMesh | mesh, |
MMG5_pSol | met, | ||
MMG3D_pPROctree | PROctree, | ||
MMG5_int * | list, | ||
int | ilist, | ||
int | improve | ||
) |
mesh | pointer to the mesh structure. |
met | pointer to the metric structure. |
PROctree | pointer to the PROctree structure. |
list | pointer to the volumic ball of the point. |
ilist | size of the volumic ball. |
improve | force the new minimum element quality to be greater or equal than 0.9 of the old minimum element quality. |
Move internal point whose volumic ball is passed (for LES optimization). The optimal point position is computed as the barycenter of the optimal point position for each tetra. The optimal point position for a tetra is the point located over the normal of the face at the face barycenter and at the distance 1 of the face.
Definition at line 185 of file movpt_3d.c.