mmgs
hash.c File Reference

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

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

Functions

int MMG5_mmgHashTria (MMG5_pMesh mesh, int *adjt, MMG5_Hash *hash, int chkISO)
 
int MMG5_hashEdge (MMG5_pMesh mesh, MMG5_Hash *hash, int a, int b, int k)
 
int MMG5_hashUpdate (MMG5_Hash *hash, int a, int b, int k)
 
int MMG5_hashEdgeTag (MMG5_pMesh mesh, MMG5_Hash *hash, int a, int b, int16_t tag)
 
int MMG5_hashGet (MMG5_Hash *hash, int a, int b)
 
int MMG5_hashNew (MMG5_pMesh mesh, MMG5_Hash *hash, int hsiz, 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

Function Documentation

◆ MMG5_hashEdge()

int MMG5_hashEdge ( MMG5_pMesh  mesh,
MMG5_Hash hash,
int  a,
int  b,
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.

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,
int  a,
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.

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

◆ MMG5_hashGet()

int MMG5_hashGet ( MMG5_Hash hash,
int  a,
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]$.

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,
int  hsiz,
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.

Here is the caller graph for this function:

◆ MMG5_hashUpdate()

int MMG5_hashUpdate ( MMG5_Hash hash,
int  a,
int  b,
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]$

Here is the caller graph for this function:

◆ MMG5_mmgHashTria()

int MMG5_mmgHashTria ( MMG5_pMesh  mesh,
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.
Here is the call graph for this function:
Here is the caller graph for this function: