Hash functions

Hash functions are ubiquitous in \(\texttt{mmg}\), as they serve to create adjacencies, to detect singular edges, etc.

\(\texttt{MMG5_mmgHashTria}\)

This function is used in all three \(\texttt{mmg}\) instances. It creates the hash table for all the edges of a triangle mesh – be it a 2d triangle mesh, a surface or boundary mesh.

In this function,

  • The table adjt for the adjacencies of the surface mesh (passed in argument) is filled.

  • The number ph->s indicates the number of triangles shared by a hashed edge.

  • Non manifold edges, shared by at least three surface triangles, are detected and tagged.