transition compatibility

This commit is contained in:
Martin Diehl 2021-06-16 14:35:54 +02:00
parent f080136751
commit f19dc27246
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ class Grid:
Grid-based geometry from file.
"""
v = VTK.load(fname if str(fname).endswith('.vti') else str(fname)+'.vti')
v = VTK.load(fname if str(fname).endswith(('.vti','.vtr')) else str(fname)+'.vti') # compatibility hack
comments = v.get_comments()
cells = np.array(v.vtk_data.GetDimensions())-1
bbox = np.array(v.vtk_data.GetBounds()).reshape(3,2).T