Skip to content
Snippets Groups Projects
Commit 4741594e authored by MaNyh's avatar MaNyh
Browse files

revive old code for load_mesh as multiBlockMesh combine does not return the right format

parent 4db0250f
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,12 @@ def load_mesh(path_to_mesh): ...@@ -16,7 +16,12 @@ def load_mesh(path_to_mesh):
mesh = pv.UnstructuredGrid(cgns) mesh = pv.UnstructuredGrid(cgns)
elif str(type(cgns)).find('vtkMultiBlockDataSet') != -1: elif str(type(cgns)).find('vtkMultiBlockDataSet') != -1:
multiBlockMesh = pv.MultiBlock(cgns) multiBlockMesh = pv.MultiBlock(cgns)
mesh = multiBlockMesh.combine() mesh = pv.UnstructuredGrid()
for domainId in range(multiBlockMesh.GetNumberOfBlocks()):
domain = multiBlockMesh.GetBlock(domainId)
for blockId in range(domain.GetNumberOfBlocks()):
block = domain.GetBlock(blockId)
mesh = mesh.merge(block)
return mesh return mesh
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment