From c77eb6097d6584820256ad497520273669299f9a Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Wed, 29 Jun 2022 14:18:31 +0200 Subject: [PATCH] removed check volume for structured meshes --- openmc/mesh.py | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/openmc/mesh.py b/openmc/mesh.py index 1372c5196e..a63834941f 100644 --- a/openmc/mesh.py +++ b/openmc/mesh.py @@ -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):