Skip to content

Commit

Permalink
return right lenght of prev_res
Browse files Browse the repository at this point in the history
  • Loading branch information
church89 committed Nov 2, 2023
1 parent 0267c0f commit f91b1ed
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions openmc/deplete/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f91b1ed

Please sign in to comment.