mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
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:
parent
da23e4646d
commit
3a963b4183
1 changed files with 2 additions and 4 deletions
|
|
@ -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)
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue