About references


In Mmg, the references (“ref” keyword in the API prototypes and/or Medit documentation) is an integer value attached to each mesh entities (points, triangles, tetrahedra…).
This value is seen by Mmg as the domain (or material) identification. It allows for exemple to identify:

  • boundary areas on which different boundary conditions will be applied;
  • domains with different physical properties.

The references are important values because Mmg will try to preserve the interfaces between different references (this interfaces will be remeshed but with normal / tangent preservation).

Example: mesh of an ellipsoid embedded inside a cube
  • The tetrahedra inside the ellipsoid have the ref (=reference) 3. This reference is associated to the yellow color;
  • Tetra outside the ellipsoid have the ref 2, associated to the green color;
  • The triangles at cube boundaries have the ref 1 (red).

References restrictions

  • User must use positive or null references (negative references are used for debugging purposes by developpers and may lead to unespected behaviours);
  • Interfaces between volume (tetra in 3D or triangles en 2D) of same references are deleted (seen as a lost surface inside one unique domain). To preserve such interfaces (3D only), you can use the –opnbdy option. Note that it may slow down the software;
  • Input point references are preserved (thus, collapse between points with different refs may be refused). Moreover, new points are created with the ref 0, so if you don’t use point references, it is better to set it to 0.

Mmg references within Gmsh I/O

The Mmg references matches with the physical tag of Gmsh.


Comments are closed.