- a conformal mesh at the medit file format (.mesh(b) extension) or at the gmsh file format (.msh(b) extension)
- if you have access to the VTK library built with MPI support (VTK_USE_MPI CMake’s flag setted to ON): .vtk, .vtp and .vtu paraview files are accepted too.
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 at medit solution file format (.sol extension) if you want to discretize an isovalue of a function.
- a displacement at medit solution file format (.sol extension) if you want to perform the lagrangian motion of an object.
If you use the gmsh file format:
- the size map must be provided in the .msh(b) file as $NodeData and flagged using a string tag with the :metric suffix.
- the level-set or displacement must be provided in the .msh(b) file as $NodeData
- 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 -3dMedit 1 command line argument.
- To load a 2D .mesh file created with Gmsh, you will need to run mmg2d with the -3dMedit 2 command line argument. In this case, the .mesh file produced by mmg2d is a Gmsh .mesh.
- To load a 2D .mesh file created with Gmsh and to save it as a Medit 2D .mesh file, you can run mmg2d with the –3dMedit 3 command line argument.
If you use one of the VTK file format:
- the size map must be provided in the mesh file as point data and named with the :metric suffix.
- the level-set or displacement must be provided in the mesh file as point data.
- domain references (resp. node references) can be provided using cell data (resp. point data) with the medit:ref array name.
Remark: you must provide positive or null integers for the entities references.
Learn to use the Mmg tools
To learn how to use the Mmg tools:
- Mmg applications and libraries:
- ParMmg application to remesh tetrahedral volume meshes in parallel
Lot of options are commons between the four codes, thus, do not hesitate to look at the tutorials of the four software to understand how to use it.
To learn how to use the Mmg libraries: go here
Practical work to learn how to use Mmg (applications and libraries):
- gmsh: allows to visualize your mesh at the medit format (but not the associated solution) and, of course, your mesh at the gmsh format and its embedded solution.
- medit: allows to visualize your mesh and solution at the medit format.
- paraview: allows to visualize your mesh and solution at the VTK file formats.
Of course the meshes generated by Mmg can be used in any solver. If you don’t have a favorite solver yet, you can use one of those that interfaces Mmg:
- AVBP: a solver for numerical simulation of unsteady turbulence for reacting flows.
- Elmer/Ice: a finite element software for ice sheet, glaciers and ice flow modelling (open source).
- Freefem++:a partial differential equation solver for non-linear multi-physics systems in 2D and 3D (open source).
- Gypsilab: a MATLAB toolbox for fast numerical computation with finite element and boundary element methods (open source).
- Kratos: a framework for building parallel, multi-disciplinary simulation software (open source).
- MUSIC: a multimodal platform for cardiac imagery.
- YALES2: a solver for two-phase combustion, from primary atomization to pollutant prediction, on massive complex meshes.
Library for scientific computation
If you use PETSc, ParMmg is now available in the DMPlex layer.