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.
This commit is contained in:
Andrew Johnson 2019-06-21 11:49:17 -05:00
parent da23e4646d
commit 3a963b4183
No known key found for this signature in database
GPG key ID: 253418E91B7F6FEB

View file

@ -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)
)