mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Adding dimenson parameter to the RectilinearMesh class.
This commit is contained in:
parent
60e216a16f
commit
10e34b094c
1 changed files with 8 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue