diff --git a/openmc/deplete/abc.py b/openmc/deplete/abc.py index 8ba083b58..2b31bd3a3 100644 --- a/openmc/deplete/abc.py +++ b/openmc/deplete/abc.py @@ -848,10 +848,10 @@ class Integrator(ABC): return (self.operator.prev_res[-1].time[0], len(self.operator.prev_res) - 1) - def _apply_keff_search_control(self, step_index, bos_conc): + def _apply_keff_search_control(self, bos_conc): """Apply keff search control to beginning-of-step concentrations.""" x = deepcopy(bos_conc) - return self._keff_search_control.search_for_keff(x, step_index) + return self._keff_search_control.search_for_keff(x) def _restore_keff_search_control(self, res): """Restore keff search control from restart results.""" @@ -870,7 +870,7 @@ class Integrator(ABC): if step_index > 0 or self.operator.prev_res is None: if self._keff_search_control is not None and source_rate != 0.0: bos_conc, keff_search_root = self._apply_keff_search_control( - step_index, bos_conc) + bos_conc) else: keff_search_root = None bos_conc, res = self._get_bos_data_from_operator( @@ -953,7 +953,7 @@ class Integrator(ABC): if output and final_step and comm.rank == 0: print(f"[openmc.deplete] t={t} (final operator evaluation)") if self._keff_search_control is not None and source_rate != 0.0: - n, keff_search_root = self._apply_keff_search_control(i + 1, n) + n, keff_search_root = self._apply_keff_search_control(n) else: keff_search_root = None res_final = self.operator(n, source_rate if final_step else 0.0) diff --git a/openmc/deplete/keff_search_control.py b/openmc/deplete/keff_search_control.py index ab656a4f1..8837dda3a 100644 --- a/openmc/deplete/keff_search_control.py +++ b/openmc/deplete/keff_search_control.py @@ -41,15 +41,13 @@ class _KeffSearchControl: self.search_kwargs['x_min'] = bracket[0] self.search_kwargs['x_max'] = bracket[1] - def search_for_keff(self, x, step_index): + def search_for_keff(self, x): """Perform keff search and update the atom density vector. Parameters ---------- x : list of numpy.ndarray Current atom density vector (atoms per material) - step_index : int - Current depletion step index Returns -------