mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
Use property decorator to set Filter.mesh. Add a few more property decorators
for StatePoint class.
This commit is contained in:
parent
3fe577c934
commit
7662978d5e
1 changed files with 12 additions and 1 deletions
|
|
@ -115,6 +115,17 @@ class StatePoint(object):
|
|||
def tallies(self):
|
||||
return self._tallies
|
||||
|
||||
@property
|
||||
def tallies_present(self):
|
||||
return self._tallies_present
|
||||
|
||||
@property
|
||||
def global_tallies(self):
|
||||
return self._global_tallies
|
||||
|
||||
@property
|
||||
def n_realizations(self):
|
||||
return self._n_realizations
|
||||
|
||||
def _read_metadata(self):
|
||||
|
||||
|
|
@ -372,7 +383,7 @@ class StatePoint(object):
|
|||
|
||||
if FILTER_TYPES[filter_type] == 'mesh':
|
||||
key = self._mesh_keys[self._mesh_ids.index(bins)]
|
||||
filter._mesh = self._meshes[key]
|
||||
filter.mesh = self._meshes[key]
|
||||
|
||||
# Add Filter to the Tally
|
||||
tally.add_filter(filter)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue