You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
We are using meshio inside SALOME and I want to convert a mesh in MED format to MSH format.
When trying to write to gmsh v4.1, it fails with the following error:
bernhard@debian11:/hdd2/S2/SALOME-MBS-DB11$ meshio convert -o gmsh ~/Shared/med/Cube.med ~/Shared/med/Cube.msh
Traceback (most recent call last):
File "/hdd2/S2/SALOME-MBS-DB11/INSTALL/meshio/lib/python3.9/site-packages/bin/meshio", line 8, in <module>
sys.exit(main())
File "/hdd2/S2/SALOME-MBS-DB11/INSTALL/meshio/lib/python3.9/site-packages/meshio/_cli/_main.py", line 52, in main
return args.func(args)
File "/hdd2/S2/SALOME-MBS-DB11/INSTALL/meshio/lib/python3.9/site-packages/meshio/_cli/_convert.py", line 75, in convert
write(args.outfile, mesh, **kwargs)
File "/hdd2/S2/SALOME-MBS-DB11/INSTALL/meshio/lib/python3.9/site-packages/meshio/_helpers.py", line 188, in write
return writer(filename, mesh, **kwargs)
File "/hdd2/S2/SALOME-MBS-DB11/INSTALL/meshio/lib/python3.9/site-packages/meshio/gmsh/main.py", line 111, in <lambda>
"gmsh": lambda f, m, **kwargs: write(f, m, "4.1", **kwargs),
File "/hdd2/S2/SALOME-MBS-DB11/INSTALL/meshio/lib/python3.9/site-packages/meshio/gmsh/main.py", line 102, in write
writer.write(filename, mesh, binary=binary, float_fmt=float_fmt)
File "/hdd2/S2/SALOME-MBS-DB11/INSTALL/meshio/lib/python3.9/site-packages/meshio/gmsh/_gmsh41.py", line 332, in write
_write_nodes(fh, mesh.points, mesh.cells, mesh.point_data, float_fmt, binary)
File "/hdd2/S2/SALOME-MBS-DB11/INSTALL/meshio/lib/python3.9/site-packages/meshio/gmsh/_gmsh41.py", line 584, in _write_nodes
raise WriteError(
meshio._exceptions.WriteError: Specify entity information (gmsh:dim_tags in point_data) to deal with more than one cell type.
But there is no problem to write the same MED file to gmsh v2.2 or gmsh v4.0!
Is it possible to register explicitly the output format v4.0 in the .../meshio/gmsh/main.py file like shown below?
This would overcome the problem with the v4.1 format!
register_format(
"gmsh",
[".msh"],
read,
{
"gmsh22": lambdaf, m, **kwargs: write(f, m, "2.2", **kwargs),
"gmsh40": lambdaf, m, **kwargs: write(f, m, "4.0", **kwargs),
"gmsh": lambdaf, m, **kwargs: write(f, m, "4.1", **kwargs),
},
)
The text was updated successfully, but these errors were encountered:
Description
We are using meshio inside SALOME and I want to convert a mesh in MED format to MSH format.
When trying to write to gmsh v4.1, it fails with the following error:
But there is no problem to write the same MED file to gmsh v2.2 or gmsh v4.0!
Is it possible to register explicitly the output format v4.0 in the
.../meshio/gmsh/main.py
file like shown below?This would overcome the problem with the v4.1 format!
The text was updated successfully, but these errors were encountered: