From 7662978d5ef625c63eac658792e81fccafee4577 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Thu, 30 Apr 2015 07:36:45 +0700 Subject: [PATCH] Use property decorator to set Filter.mesh. Add a few more property decorators for StatePoint class. --- src/utils/openmc/statepoint.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/utils/openmc/statepoint.py b/src/utils/openmc/statepoint.py index ad74ca1fd..006b654fd 100644 --- a/src/utils/openmc/statepoint.py +++ b/src/utils/openmc/statepoint.py @@ -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)