diff --git a/openmc/mesh.py b/openmc/mesh.py index 459b48a694..16e25cddc4 100644 --- a/openmc/mesh.py +++ b/openmc/mesh.py @@ -471,6 +471,8 @@ class RectilinearMesh(MeshBase): Unique identifier for the mesh name : str Name of the mesh + dimension : Iterable of int + The number of mesh cells in each direction. n_dimension : int Number of mesh dimensions (always 3 for a RectilinearMesh). x_grid : Iterable of float @@ -492,6 +494,12 @@ class RectilinearMesh(MeshBase): self._y_grid = None self._z_grid = None + @property + def dimension(self): + return (len(self.x_grid) - 1, + len(self.y_grid) - 1, + len(self.z_grid) - 1) + @property def n_dimension(self): return 3