mmg2d
hash_2d.c File Reference
#include "mmg2d.h"
Include dependency graph for hash_2d.c:

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)
 

Macro Definition Documentation

◆ KTA

#define KTA   7

◆ KTB

#define KTB   11

Function Documentation

◆ MMG2D_assignEdge()

int MMG2D_assignEdge ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh
Returns
0 if fail, 1 otherwise

Transfer some input edge data to the corresponding triangles fields

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_bdryEdge()

int MMG2D_bdryEdge ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh
Returns
1 if success, 0 if fail

Create the edges in the mesh from the information stored in the triangles, or by identifying the different components of the mesh.

Remarks
Possible extension needed to take into account constrained edges
Call in debug mode only
Here is the caller graph for this function:

◆ MMG2D_hashQuad()

int MMG2D_hashQuad ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh structure.
Returns
0 if failed, 1 otherwise.

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG2D_hashTria()

int MMG2D_hashTria ( MMG5_pMesh  mesh)
Parameters
meshpointer toward the mesh
Returns
1 if success, 0 if fail

Create adjacency relations between the triangles dein the mesh

Here is the caller graph for this function:

◆ MMG2D_pack()

int MMG2D_pack ( MMG5_pMesh  mesh,
MMG5_pSol  sol,
MMG5_pSol  met 
)
Parameters
meshpointer toward the mesh structure.
solpointer toward a solution structure.
metpointer toward a solution structure.
Returns
0 if memory problem (uncomplete mesh), 1 otherwise.

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

Here is the call graph for this function:
Here is the caller graph for this function: