1. Description
The MESH extension is a mesh format associated with FreeFemm++ software, a multiphysics non linear solver. You can find the description of this format and a lot of information about this software in the FreeFemm++ manual.
2. Features supported by FEconv
FEconv supports the reading and writing of 2D and 3D FreeFem++ MESH files. The type of elements allowed in this kind of files are edges, triangles and tetrahedrons.
3. Data structure
The header of the MESH file starts with the version file (MeshVersionFormatted
) and the dimension of the mesh (Dimension
).
The FreeFem++ MESH file is a simple format that contains several elements like vertices, edges, triangles and tetrahedrons. Each type of element uses a data structure that starts with keyword, then the number of elements and the data for each element.
The data for defining each vertex contains the coordinates (Cn
, 2 or 3 coordinates depending on the dimension)and a vertex label (VL
):
C1 C2 C3 VL
The data for each element contains the node labels (Nn
, depending on the element type) and a region label (RL
):
N1 N2 N3 N4 RL
Here you can see a complete example:
MeshVersionFormatted 1 Vertices 69 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0 0.000000000000000E+000 1.00000000000000 0.000000000000000E+000 0 1.00000000000000 1.00000000000000 0.000000000000000E+000 1 1.00000000000000 0.000000000000000E+000 0.000000000000000E+000 1 ... Tetrahedra 224 11 9 10 1 1 1 12 10 11 1 12 13 10 11 2 13 16 14 10 2 ... Triangles 35 65 66 67 3 65 66 69 3 66 64 62 0 67 69 68 0 ...