mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
added num_mesh_cells property to StructuredMesh
This commit is contained in:
parent
0b0265cb59
commit
9c892f04db
1 changed files with 5 additions and 0 deletions
|
|
@ -193,6 +193,10 @@ class StructuredMesh(MeshBase):
|
|||
s1 = (slice(1, None),)*ndim + (slice(None),)
|
||||
return (vertices[s0] + vertices[s1]) / 2
|
||||
|
||||
@property
|
||||
def num_mesh_cells(self):
|
||||
return np.prod(self.dimension)
|
||||
|
||||
def write_data_to_vtk(self, points, filename, datasets, volume_normalization=True):
|
||||
"""Creates a VTK object of the mesh
|
||||
|
||||
|
|
@ -1547,6 +1551,7 @@ class UnstructuredMesh(MeshBase):
|
|||
"been loaded from a statepoint file.")
|
||||
return len(self._centroids)
|
||||
|
||||
|
||||
@centroids.setter
|
||||
def centroids(self, centroids):
|
||||
cv.check_type("Unstructured mesh centroids", centroids,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue