Prerequisite

Note that the gmsh software handles a lot of mesh file formats, thus, you can use it to convert your mesh at the medit format :

Save As -> Mesh - INRIA Medit (*.mesh)

If you use the medit file format, you can provide:

  • a size map at medit solution file format (.sol extension) if you want to adapt your mesh to a size map.
  • a level-set map at medit solution file format (.sol extension) if you want to discretize an isovalue of a function.

If you use the gmsh file format:

  • the size map or level-set map must be provided in the .msh(b) file as $NodeData and flagged using a string tag with the :metric suffix.
  • there is a non-compatibility between the .mesh format used by mmg2d (coordinates in 2D) and the gmsh output (coordinates in 3D):
    • To force mmg2d to produce a .mesh file readable by Gmsh (not anymore compatible with Medit) you can run mmg2d with the -msh 1 command line argument.
    • To load a 2D .mesh file created with Gmsh, you will need to run mmg2d with the -msh 2 command line argument. In this case, the .mesh file produced by mmg2d is a Gmsh .mesh.

Remark: you must provide positive or null integers for the entities references.

Comments are closed.