diff --git a/ntrfc/utils/filehandling/mesh.py b/ntrfc/utils/filehandling/mesh.py index 276300c82f788ee9581257b62ce881a7af076968..dff72c61dbdb5c41c011157c126cf7f2be1ca326 100644 --- a/ntrfc/utils/filehandling/mesh.py +++ b/ntrfc/utils/filehandling/mesh.py @@ -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: