meshio
meshio copied to clipboard
[BUG] Unable to convert medit mesh to SU2
Describe the bug When I try to convert any medit mesh to SU2 I receive the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/meshio/_helpers.py", line 188, in write
return writer(filename, mesh, **kwargs)
File "/meshio/su2/_su2.py", line 340, in write
for index, (cell_type, data) in enumerate(mesh.cells):
TypeError: cannot unpack non-iterable CellBlock object
The error occurs when writing the SU2 mesh. In particular, after having written all the elements of the internal volume, when it has to start writing the surface elements for each tag, the execution stops and gives the error.
I believe the error is not with converting the medit format to SU2 format, just with writing a SU2 mesh.
To Reproduce
Just write a SU2 mesh with any tags.
mesh = meshio.read("input.mesh")
meshio.write("output.su2", mesh)