From 3a963b4183efbf52193c02393ea9ddd6585cafc2 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 21 Jun 2019 11:49:17 -0500 Subject: [PATCH] Modify depletion time matrix size; Remove index - 1 in Results.save The index - 1 was causing values to be written in a correctly sized matrix, but in an offset pattern, e.g. first value written to last position, second value to first position, etc. The ResultsList.get_depletion_time method will already trim this array in the retrieval process. --- openmc/deplete/results.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openmc/deplete/results.py b/openmc/deplete/results.py index 0d6e839154..f7d7550c35 100644 --- a/openmc/deplete/results.py +++ b/openmc/deplete/results.py @@ -302,10 +302,8 @@ class Results(object): power_shape[0] = new_shape power_dset.resize(power_shape) - # keep depletion time matrix with one less index - # corresponding to one fewer calculation proc_shape = list(proc_time_dset.shape) - proc_shape[0] = new_shape - 1 + proc_shape[0] = new_shape proc_time_dset.resize(proc_shape) # If nothing to write, just return @@ -327,7 +325,7 @@ class Results(object): time_dset[index, :] = self.time power_dset[index, :] = self.power if self.proc_time is not None: - proc_time_dset[index - 1] = ( + proc_time_dset[index] = ( self.proc_time / (comm.size * self.n_hdf5_mats) )