From f91b1edf0e5ccd679eb2dbd0a09038282bfaf4bf Mon Sep 17 00:00:00 2001 From: church89 Date: Thu, 2 Nov 2023 14:05:28 +0100 Subject: [PATCH] return right lenght of prev_res --- openmc/deplete/abc.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/openmc/deplete/abc.py b/openmc/deplete/abc.py index dac4ccd991f..a0984ed52a5 100644 --- a/openmc/deplete/abc.py +++ b/openmc/deplete/abc.py @@ -766,8 +766,13 @@ def _get_bos_data_from_restart(self, step_index, source_rate, bos_conc): def _get_start_data(self): if self.operator.prev_res is None: return 0.0, 0 - return (self.operator.prev_res[-1].time[-1], - len(self.operator.prev_res) - 1) + else: + if comm.size != 1: + return (self.operator.prev_res[-1].time[-1], + int(len(self.operator.prev_res)/2) - 1) + else: + return (self.operator.prev_res[-1].time[-1], + len(self.operator.prev_res) - 1) def _get_bos_from_batchwise(self, step_index, bos_conc): """Get BOS from criticality batch-wise control