removed check volume for structured meshes

This commit is contained in:
RemDelaporteMathurin 2022-06-29 14:18:31 +02:00
parent 5603e328b8
commit c77eb6097d

View file

@ -633,21 +633,12 @@ class RegularMesh(StructuredMesh):
normalize the data by the volume of the mesh elements.
Defaults to True.
Raises:
RuntimeError: when no volume data is found and volume_normalisation
is required
Returns:
vtk.vtkStructuredGrid: the VTK object
"""
import vtk
from vtk.util import numpy_support as nps
if self.volumes is None and volume_normalization:
raise RuntimeError("No volume data is present on this "
"unstructured mesh. Please load the "
" mesh information from a statepoint file.")
# check that the data sets are appropriately sized
for label, dataset in datasets.items():
if isinstance(dataset, np.ndarray):
@ -914,21 +905,12 @@ class RectilinearMesh(StructuredMesh):
normalize the data by the volume of the mesh elements.
Defaults to True.
Raises:
RuntimeError: when no volume data is found and volume_normalisation
is required
Returns:
vtk.vtkStructuredGrid: the VTK object
"""
import vtk
from vtk.util import numpy_support as nps
if self.volumes is None and volume_normalization:
raise RuntimeError("No volume data is present on this "
"unstructured mesh. Please load the "
" mesh information from a statepoint file.")
# check that the data sets are appropriately sized
for label, dataset in datasets.items():
if isinstance(dataset, np.ndarray):
@ -1176,21 +1158,12 @@ class CylindricalMesh(StructuredMesh):
normalize the data by the volume of the mesh elements.
Defaults to True.
Raises:
RuntimeError: when no volume data is found and volume_normalisation
is required
Returns:
vtk.vtkStructuredGrid: the VTK object
"""
import vtk
from vtk.util import numpy_support as nps
if self.volumes is None and volume_normalization:
raise RuntimeError("No volume data is present on this "
"unstructured mesh. Please load the "
" mesh information from a statepoint file.")
# check that the data sets are appropriately sized
for label, dataset in datasets.items():
if isinstance(dataset, np.ndarray):
@ -1440,21 +1413,12 @@ class SphericalMesh(StructuredMesh):
normalize the data by the volume of the mesh elements.
Defaults to True.
Raises:
RuntimeError: when no volume data is found and volume_normalisation
is required
Returns:
vtk.vtkStructuredGrid: the VTK object
"""
import vtk
from vtk.util import numpy_support as nps
if self.volumes is None and volume_normalization:
raise RuntimeError("No volume data is present on this "
"unstructured mesh. Please load the "
" mesh information from a statepoint file.")
# check that the data sets are appropriately sized
for label, dataset in datasets.items():
if isinstance(dataset, np.ndarray):