Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
|
#include "libmmg2d_private.h"
Go to the source code of this file.
Macros | |
#define | KTA 7 |
#define | KTB 11 |
Functions | |
int | MMG2D_hashTria (MMG5_pMesh mesh) |
int | MMG2D_hashQuad (MMG5_pMesh mesh) |
int | MMG2D_assignEdge (MMG5_pMesh mesh) |
int | MMG2D_bdryEdge (MMG5_pMesh mesh) |
int | MMG2D_pack (MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pSol met) |
int MMG2D_assignEdge | ( | MMG5_pMesh | mesh | ) |
mesh | pointer to the mesh |
Transfer some input edge data to the corresponding triangles fields
The cleaning of required tags inside triangles has been initially added by commit da4b099c. It probably followed the report of a bug arising when several library functions are successively called without cleaning the mesh structure but on december 2022 I am not able to reproduce this bug. Due to tags cleaning, input required edges are lost in ls discretization mode (see issue #171). The metRidtyp field (previsouly not used in 2D) is now used to mark if MMG2D_assignEdge function is called for the first time inside the library and if we have to clean triangle tags (in order to fix issue #171 without breaking again the initial fix).
Definition at line 334 of file hash_2d.c.
int MMG2D_bdryEdge | ( | MMG5_pMesh | mesh | ) |
mesh | pointer to the mesh |
Create the edges in the mesh from the information stored in the triangles, or by identifying the different components of the mesh.
int MMG2D_hashQuad | ( | MMG5_pMesh | mesh | ) |
mesh | pointer to the mesh structure. |
Create full table of adjacency for quadrangles (quad \( <-> \) quad adjacencies and quad \( -> \) tri adjacencies): 1) if the edge \( i1 \) of quad \( k1 \) is adja to quad \( k2 \) through edge \( i2 \), \( adja[4*(k1-1)+1+i1] = 4*k2+i2 \). 2) if the edge \( i1 \) of quad \( k1 \) is adja to tria \( k2 \) through edge \( i2 \), \( adja[4*(k1-1)+1+i1] = -(3*k2+i2) \).
Step 1: Fill adjacendies between quadrangles
Step 2: Fill adjacencies between quadrangles and triangles
Definition at line 151 of file hash_2d.c.
int MMG2D_hashTria | ( | MMG5_pMesh | mesh | ) |
int MMG2D_pack | ( | MMG5_pMesh | mesh, |
MMG5_pSol | sol, | ||
MMG5_pSol | met | ||
) |
mesh | pointer to the mesh structure. |
sol | pointer to a solution structure. |
met | pointer to a solution structure. |
Pack the mesh and metric and create explicitly all the mesh structures (edges).
Recreate adjacencies if need be
Pack vertex indices
Count the number of edges in the mesh
Count edges stored in triangles
Count edges stored in quadrangles
Pack edges
Pack triangles
Pack quadrangles
Pack solutions (metric map, displacement, ...)
Pack vertices
Reset ppt->tmp field
Reset garbage collector
Definition at line 530 of file hash_2d.c.