issue with reading neper generated .msh4 file
I generated a tessellation using the software Neper
, and meshed it to .msh4
format. However, I am having problems loading it in gmsh, where it shows a lot of warnings/errors and I lose information like $PhysicalNames. I believe it is due to the non-standard .msh
file generated from neper.
The msh file istest.msh4 Commands I ran:
import gmsh
gmsh.initialize()
gmsh.open('test.msh4')
gmsh.open('test.msh4')
Info : Reading 'test.msh4'...
Info : Storing section $MeshVersion as model attribute
Info : Storing section $Domain as model attribute
Info : 27 entities
Warning : Entity 6 not found in the Brep of entity 2
Warning : Entity 5 not found in the Brep of entity 2
Warning : Entity 5 not found in the Brep of entity 3
Warning : Entity 4 not found in the Brep of entity 4
Warning : Entity 2 not found in the Brep of entity 5
Warning : Entity 8 not found in the Brep of entity 5
Warning : Entity 8 not found in the Brep of entity 6
Warning : Entity 7 not found in the Brep of entity 6
Warning : Entity 7 not found in the Brep of entity 7
Warning : Entity 3 not found in the Brep of entity 7
Warning : Entity 3 not found in the Brep of entity 8
Warning : Entity 2 not found in the Brep of entity 8
Warning : Entity 5 not found in the Brep of entity 9
Warning : Entity 8 not found in the Brep of entity 9
Warning : Entity 2 not found in the Brep of entity 10
Warning : Entity 4 not found in the Brep of entity 11
Warning : Entity 3 not found in the Brep of entity 11
Warning : Entity 7 not found in the Brep of entity 12
Warning : Entity 6 not found in the Brep of entity 12
Warning : Entity -1 not found in the Brep of entity 1
Warning : Entity 1 not found in the Brep of entity 4
Info : 14 nodes
Info : [ 0%] Creating discrete point 2
Info : [ 0%] Creating discrete point 3
Info : [ 0%] Creating discrete point 4
Info : [ 0%] Creating discrete point 5
Info : [ 0%] Creating discrete point 6
Info : [ 0%] Creating discrete point 7
Info : [ 0%] Creating discrete point 8
Info : [ 0%] Creating discrete curve 1
Info : 68 elements
Info : Storing section $NSets as model attribute
Info : Storing section $Fasets as model attribute
Info : Storing section $ElsetCrySym as model attribute
Info : Storing section $ElsetOrientations as model attribute
Info : Done reading 'test.msh4'
In another test case generated from neper:test2.msh4
import gmsh
gmsh.initialize()
gmsh.open('test2.msh4')
gmsh.open('test2.msh4')
Info : Reading 'test2.msh4'...
Info : Storing section $MeshVersion as model attribute
Info : Storing section $Domain as model attribute
Info : 27 entities
Error : Could not read entities
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
Input In [3], in <cell line: 1>()
----> 1 gmsh.open('test2.msh4')
File /usr/local/lib/python3.10/dist-packages/gmsh.py:336, in open(fileName)
332 lib.gmshOpen(
333 c_char_p(fileName.encode()),
334 byref(ierr))
335 if ierr.value != 0:
--> 336 raise Exception(logger.getLastError())
Exception: Could not read entities
Any help here would be great! Many thanks, Sharan