Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
Functions
hash.c File Reference

Functions for hash tables management and tetrahedra packing. More...

#include "mmgcommon_private.h"
Include dependency graph for hash.c:

Go to the source code of this file.

Functions

int MMG5_mmgHashTria (MMG5_pMesh mesh, MMG5_int *adjt, MMG5_Hash *hash, int chkISO)
 
MMG5_int MMG5_hashFace (MMG5_pMesh mesh, MMG5_Hash *hash, MMG5_int ia, MMG5_int ib, MMG5_int ic, MMG5_int k)
 
int MMG5_hashEdge (MMG5_pMesh mesh, MMG5_Hash *hash, MMG5_int a, MMG5_int b, MMG5_int k)
 
int MMG5_hashUpdate (MMG5_Hash *hash, MMG5_int a, MMG5_int b, MMG5_int k)
 
int MMG5_hashEdgeTag (MMG5_pMesh mesh, MMG5_Hash *hash, MMG5_int a, MMG5_int b, int16_t tag)
 
MMG5_int MMG5_hashGet (MMG5_Hash *hash, MMG5_int a, MMG5_int b)
 
int MMG5_hashNew (MMG5_pMesh mesh, MMG5_Hash *hash, MMG5_int hsiz, MMG5_int hmax)
 

Detailed Description

Functions for hash tables management and tetrahedra packing.

Author
Charles Dapogny (UPMC)
Cécile Dobrzynski (Bx INP/Inria/UBordeaux)
Pascal Frey (UPMC)
Algiane Froehly (Inria/UBordeaux)
Version
5

Definition in file hash.c.

Function Documentation

◆ MMG5_hashEdge()

int MMG5_hashEdge ( MMG5_pMesh  mesh,
MMG5_Hash hash,
MMG5_int  a,
MMG5_int  b,
MMG5_int  k 
)
Parameters
meshpointer toward the mesh structure.
hashpointer toward the hash table of edges.
aindex of the first extremity of the edge.
bindex of the second extremity of the edge.
kindex of point along the edge.
Returns
1 if success, 0 if fail.

Add edge $[a;b]$ to the hash table.

Definition at line 345 of file hash.c.

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

◆ MMG5_hashEdgeTag()

int MMG5_hashEdgeTag ( MMG5_pMesh  mesh,
MMG5_Hash hash,
MMG5_int  a,
MMG5_int  b,
int16_t  tag 
)
Parameters
meshpointer toward the mesh structure.
hashpointer toward the hash table of edges.
aindex of the first extremity of the edge.
bindex of the second extremity of the edge.
tagedge tag
Returns
the edge tag if success, 0 if fail.

Add edge $[a;b]$ to the hash table if it doesn't exist and store the edge tag. If the edge exist, add the new tag to the already stored tags.

Definition at line 437 of file hash.c.

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

◆ MMG5_hashFace()

MMG5_int MMG5_hashFace ( MMG5_pMesh  mesh,
MMG5_Hash hash,
MMG5_int  ia,
MMG5_int  ib,
MMG5_int  ic,
MMG5_int  k 
)
Parameters
meshpointer toward the mesh.
hashpointer toward the hash table to fill.
iafirst vertex of face to hash.
ibsecond vertex of face to hash.
icthird vertex of face to hash.
kindex of face to hash.
Returns
0 if fail, -1 if the face is newly hashed, index of the first face hashed if another face with same vertices exist.

Definition at line 286 of file hash.c.

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

◆ MMG5_hashGet()

MMG5_int MMG5_hashGet ( MMG5_Hash hash,
MMG5_int  a,
MMG5_int  b 
)
Parameters
hashpointer toward the hash table of edges.
aindex of the first extremity of the edge.
bindex of the second extremity of the edge.
Returns
the index of point stored along $[a;b]$.

Find the index of point stored along $[a;b]$.

Definition at line 495 of file hash.c.

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

◆ MMG5_hashNew()

int MMG5_hashNew ( MMG5_pMesh  mesh,
MMG5_Hash hash,
MMG5_int  hsiz,
MMG5_int  hmax 
)
Parameters
meshpointer toward the mesh structure.
hashpointer toward the hash table of edges.
hsizinitial size of hash table.
hmaxmaximal size of hash table.
Returns
1 if success, 0 if fail.

Hash edges or faces.

Definition at line 526 of file hash.c.

Here is the caller graph for this function:

◆ MMG5_hashUpdate()

int MMG5_hashUpdate ( MMG5_Hash hash,
MMG5_int  a,
MMG5_int  b,
MMG5_int  k 
)
Parameters
meshpointer toward the mesh structure.
hashpointer toward the hash table of edges.
aindex of the first extremity of the edge.
bindex of the second extremity of the edge.
knew index of point along the edge.
Returns
1 if success, 0 if fail (edge is not found).

Update the index of the point stored along the edge $[a;b]$

Definition at line 400 of file hash.c.

Here is the caller graph for this function:

◆ MMG5_mmgHashTria()

int MMG5_mmgHashTria ( MMG5_pMesh  mesh,
MMG5_int *  adjt,
MMG5_Hash hash,
int  chkISO 
)
Parameters
meshpointer toward the mesh structure.
adjtpointer toward the adjacency table of the surfacic mesh.
hashpointer toward the edge hash table.
chkISOflag to say if we check ISO references (so if we come from mmg3d).
Returns
1 if success, 0 otherwise.

Create surface adjacency

Remarks
the ph->s field computation is useless in mmgs.
: as all triangles are mesh boundaries, we do not need to mark their adges as MG_BDY so the MG_BDY tag may be used inside geometrical triangles (external non-parallel, or internal parallel) to tag edges on the intersection with purely parallel (non-geometrical) triangles. The MG_PARBDYBDY tag is also added, as it does not have a supporting triangle to inherit this tag from.

Definition at line 58 of file hash.c.

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