Skip to content

Add a reader for Gmsh files in MSH 4.1 format

Marcus Mohr requested to merge mohr/mohr/reader-for-msh4.1-mc into master

As explained in #271 (closed) the MSH2.2 format is quite out-dated. However, it is currently the only mesh format we can import with HyTeG. This MR changes this by implementing a reader for the current MSH4.1 format. Doing so it fixes #271 (closed).

Additionally the MR also addresses #275 (closed) by allowing to consistently using the physical tags in the mesh-file to set the primitives boundary flags. An example is given below which was generated with ParaView from the output of the show_mesh app for the two-blocks.msh file. In the file the two rectangular blocks have different physical tags, as have the vertices and edges for the left part, those in the right part and the two vertices and edge forming the interface between the two blocks. The images demonstrate that the reader correctly sets these values for all primitives present in the Nodes and Elements section of the file and also correctly deduces the flags for the derived primitives. In our case here these are the edges inside the two blocks.

EdgesEdges+VerticesEdges+Vertices+Faces

I have not added a specific test for the new reader. Instead the MR replaces several 2D and 3D meshes used in the testsuite by versions in MSH4.1 format.

Merge request reports