Read msh file

I’m looking for reading a msh file (version 2.2), ReadGmsh (from netgen.read_gmsh) can do that. I read the documention and i didn’t find any relevant about it. It sounds not so clear about information needed :

  • does ReadGmsh take into account physical (first) or elementary (second) tags.
  • does ReadGmsh need PhysicalNames ? If yes, are they related to elementary or physical tag ?

Best regards.

PS : I’d be great to offer import msh file in netgen :wink:


from a quick look at the code I would recommend to use both physical tags and physical names.
If the import does not work it should be possible to quickly fix that. Just let me know and provide a simple example that fails.

In addition, you may have a look into meshio (GitHub - nschloe/meshio: input/output for many mesh formats) which supports conversion
between a lot of different formats, including gmsh and netgen.

Matthias R.