Skip to content
Snippets Groups Projects
Commit 4d37dc95 authored by MaNyh's avatar MaNyh
Browse files

allowing newer vtk-mesh-formats fix

parent a64d193f
No related branches found
No related tags found
No related merge requests found
......@@ -6,8 +6,11 @@ import pyvista as pv
def load_mesh(path_to_mesh):
assert os.path.isfile(path_to_mesh), path_to_mesh + " is not a valid file"
extension = os.path.splitext(path_to_mesh)[1]
if extension == ".vtk" or extension == ".vtp" or extension == ".vtu" or extension == ".vtm":
if extension == ".vtk" or extension == ".vtp" or extension == ".vtu" :
mesh = pv.read(path_to_mesh)
elif extension == ".vtm":
multiBlockMesh = pv.read(cgns)
mesh = multiBlockMesh.combine()
elif extension == ".cgns":
cgns = cgnsReader(path_to_mesh)
if str(type(cgns)).find('vtkStructuredGrid') != -1:
......
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