From 1fd1ad7cdabfb5083b2ea5b708e52cdc82860b6e Mon Sep 17 00:00:00 2001 From: church89 Date: Thu, 26 Feb 2026 10:47:57 +0100 Subject: [PATCH] make keff_search control class private --- openmc/deplete/__init__.py | 1 - openmc/deplete/abc.py | 6 +++--- openmc/deplete/keff_search_control.py | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/openmc/deplete/__init__.py b/openmc/deplete/__init__.py index 68f83bce0..052e22459 100644 --- a/openmc/deplete/__init__.py +++ b/openmc/deplete/__init__.py @@ -17,7 +17,6 @@ from .stepresult import * from .results import * from .integrators import * from .transfer_rates import * -from .keff_search_control import * from .r2s import * from . import abc from . import cram diff --git a/openmc/deplete/abc.py b/openmc/deplete/abc.py index 5ca4d70e4..2c6d177c4 100644 --- a/openmc/deplete/abc.py +++ b/openmc/deplete/abc.py @@ -31,7 +31,7 @@ from .results import Results, _SECONDS_PER_MINUTE, _SECONDS_PER_HOUR, \ from .pool import deplete from .reaction_rates import ReactionRates from .transfer_rates import TransferRates, ExternalSourceRates -from .keff_search_control import KeffSearchControl +from .keff_search_control import _KeffSearchControl __all__ = [ @@ -742,7 +742,7 @@ class Integrator(ABC): @keff_search_control.setter def keff_search_control(self, keff_search_control): - check_type('keff search control', keff_search_control, KeffSearchControl) + check_type('keff search control', keff_search_control, _KeffSearchControl) self._keff_search_control = keff_search_control def _timed_deplete(self, n, rates, dt, i=None, matrix_func=None): @@ -1185,7 +1185,7 @@ class Integrator(ABC): .. versionadded:: 0.15.4 """ - self._keff_search_control = KeffSearchControl( + self._keff_search_control = _KeffSearchControl( self.operator, function, x0, diff --git a/openmc/deplete/keff_search_control.py b/openmc/deplete/keff_search_control.py index 678c1c060..731fd1214 100644 --- a/openmc/deplete/keff_search_control.py +++ b/openmc/deplete/keff_search_control.py @@ -3,7 +3,7 @@ from openmc.mpi import comm from typing import Callable from warnings import warn -class KeffSearchControl: +class _KeffSearchControl: """Controller for keff search during depletion calculations. This class performs keff searches to maintain a target keff by adjusting