From 348f6d63a722f7e961b09263dd373bb703f483b3 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Sat, 19 Aug 2017 16:59:42 -0500 Subject: [PATCH] Use _update_filter_strides when reading statepoints --- openmc/statepoint.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/openmc/statepoint.py b/openmc/statepoint.py index 474b03033a..16d5b5d848 100644 --- a/openmc/statepoint.py +++ b/openmc/statepoint.py @@ -402,14 +402,6 @@ class StatePoint(object): scores = group['score_bins'].value n_score_bins = group['n_score_bins'].value - # Compute and set the filter strides - for i in range(n_filters): - tally_filter = tally.filters[i] - tally_filter.stride = n_score_bins * len(nuclide_names) - - for j in range(i+1, n_filters): - tally_filter.stride *= tally.filters[j].num_bins - # Read scattering moment order strings (e.g., P3, Y1,2, etc.) moments = group['moment_orders'].value @@ -423,6 +415,9 @@ class StatePoint(object): tally.scores.append(score) + # Compute and set the filter strides + tally._update_filter_strides() + # Add Tally to the global dictionary of all Tallies tally.sparse = self.sparse self._tallies[tally_id] = tally