nschloe / meshio

:spider_web: input/output for many mesh formats
MIT License
1.94k stars 400 forks source link

Write physical groups when converting gmsh to exodus #1353

Open NjJu1 opened 2 years ago

NjJu1 commented 2 years ago

Hi, I am new to meshio package. This is a great package, but I meet with difficulties when converting gmsh (version 2 or 4) into exodus format. I use the following commands for reading and writting meshes:

import meshio

mesh = meshio.read('test.msh', file_format="gmsh") mesh.write("test.exo", file_format = 'exodus')

By looking at the result of mesh, I find that physical groups are correctly identified by mesh. However, by using ParaView to see the output test.exo, I find that the physical groups information are totally lost, with Unnamed block ID: 0 and Unnamed block ID: 1 in Element blocks.

Does it mean meshio could not preserve physical group information? Or does it mean there is something missing on my codes?

Many thanks!

airwarriorg91 commented 4 months ago

Hey ! Did you find a solution to this problem ? Also, by any chance you are doing this conversion for nek5000 ?