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
The function mesh = pygmsh.helpers.extract_to_meshio() seems appropriate, but fails on mesh.write('output.vtu') with
Info: VTU format cannot write cell_sets. Converting them to cell_data...
Traceback (most recent call last):
File "/tmp/ipykernel_22333/1224015998.py", line 1, in <module>
MIOmesh.write('test.vtu')
File "/home/dominik/.local/lib/python3.10/site-packages/meshio/_mesh.py", line 241, in write
write(path_or_buf, self, file_format, **kwargs)
File "/home/dominik/.local/lib/python3.10/site-packages/meshio/_helpers.py", line 188, in write
return writer(filename, mesh, **kwargs)
File "/home/dominik/.local/lib/python3.10/site-packages/meshio/vtu/_vtu.py", line 644, in write
mesh.cell_sets_to_data(key)
File "/home/dominik/.local/lib/python3.10/site-packages/meshio/_mesh.py", line 328, in cell_sets_to_data
arr[cc] = i
IndexError: index 14 is out of bounds for axis 0 with size 14
Maybe the mesh representation differs between these two tools (meshio, pygmsh) or their versions.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
How to generate (gmsh) and convert (meshio) a mesh directly in one python-script, without intermediate file
The function
mesh = pygmsh.helpers.extract_to_meshio()
seems appropriate, but fails onmesh.write('output.vtu')
withMaybe the mesh representation differs between these two tools (meshio, pygmsh) or their versions.
Beta Was this translation helpful? Give feedback.
All reactions