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
I am using meshio to read my vtk file, my vtk file contains 966 2D triangles 1544 3D tetrahedra, when I convert the vtk to gmesh's .msh file an error occurs, he lost the boundary labels that I defined in cell_data. When I try to assign the data from cell_data to gmsh:physical it reports an error that my array is inhomogeneous.
I used the code as follows
mesh = meshio.read('1.vtk')
mesh.cell_data['gmsh:physical'] =mesh.cell_data.pop('CellEntityIds')
meshio.write('test_mesh.msh', mesh, file_format='gmsh22')
The text was updated successfully, but these errors were encountered:
mesh = meshio.Mesh(
points,
cells,
# Optionally provide extra data on points, cells, etc.
point_data={"T": [0.3, -1.2, 0.5, 0.7, 0.0, -3.0]},
# Each item in cell data must match the cells array
cell_data={"a": [[0.1, 0.2], [0.4]]},
)
mesh.write(
"foo.vtk", # str, os.PathLike, or buffer/open file
# file_format="vtk", # optional if first argument is a path; inferred from extension
)
I am using meshio to read my vtk file, my vtk file contains 966 2D triangles 1544 3D tetrahedra, when I convert the vtk to gmesh's .msh file an error occurs, he lost the boundary labels that I defined in cell_data. When I try to assign the data from cell_data to gmsh:physical it reports an error that my array is inhomogeneous.
I used the code as follows
mesh = meshio.read('1.vtk')
mesh.cell_data['gmsh:physical'] =mesh.cell_data.pop('CellEntityIds')
meshio.write('test_mesh.msh', mesh, file_format='gmsh22')
The text was updated successfully, but these errors were encountered: