mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Initializing internal volume parameter and using len() to size bins (so we aren't assuming use of a numpy array)
This commit is contained in:
parent
b1023a2afa
commit
43a4bd4ac7
2 changed files with 2 additions and 1 deletions
|
|
@ -750,7 +750,7 @@ class MeshFilter(Filter):
|
|||
cv.check_type('filter mesh', mesh, openmc.MeshBase)
|
||||
self._mesh = mesh
|
||||
if isinstance(mesh, openmc.UnstructuredMesh):
|
||||
self.bins = [ (n, 1, 1) for n in range(1, mesh.volumes.size + 1) ]
|
||||
self.bins = [(n, 1, 1) for n in range(1, len(mesh.volumes) + 1)]
|
||||
else:
|
||||
self.bins = list(mesh.indices)
|
||||
|
||||
|
|
|
|||
|
|
@ -616,6 +616,7 @@ class UnstructuredMesh(MeshBase):
|
|||
def __init__(self, mesh_id=None, name='', filename=''):
|
||||
super().__init__(mesh_id, name)
|
||||
self._filename = filename
|
||||
self._volumes = []
|
||||
|
||||
@property
|
||||
def filename(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue