Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added flags to SIIntegrator, convereted np.equal to np.array_equal, u…
…pdated doc strings
  • Loading branch information
lewisgross1296 committed Mar 4, 2025
commit 5ed5a59107349fefa2038ac555ceb2502a43e369
28 changes: 26 additions & 2 deletions openmc/deplete/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,18 @@ class Integrator(ABC):
:attr:`solver`.

.. versionadded:: 0.12
continue_timesteps : bool, optional
Whether or not to treat the current solve as a continuation of a
previous simulation. Defaults to `False`. If `True`, the timesteps

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's explain the intended behavior for a False value as well here.

provided to the `Integrator` must match exactly those that exist
in the `prev_results` passed to the `Opereator`. The `power`,
Comment thread
lewisgross1296 marked this conversation as resolved.
Resolved
`power_density`, or `source_rates` must match as well. It
is the user's responsibility to make sure that the continue
solve uses the same method of specifying `power`, `power_density`,
or `source_rates`.
Comment thread
lewisgross1296 marked this conversation as resolved.
Resolved

.. versionadded:: 0.15.1

Attributes
----------
operator : openmc.deplete.abc.TransportOperator
Expand Down Expand Up @@ -933,6 +945,17 @@ class SIIntegrator(Integrator):
:attr:`solver`.

.. versionadded:: 0.12
continue_timesteps : bool, optional
Whether or not to treat the current solve as a continuation of a
previous simulation. Defaults to `False`. If `True`, the timesteps
provided to the `Integrator` must match exactly those that exist
in the `prev_results` passed to the `Opereator`. The `power`,
`power_density`, or `source_rates` must match as well. It
is the user's responsibility to make sure that the continue
solve uses the same method of specifying `power`, `power_density`,
or `source_rates`.

.. versionadded:: 0.15.1

Attributes
----------
Expand Down Expand Up @@ -974,13 +997,14 @@ def __init__(
source_rates: Optional[Sequence[float]] = None,
timestep_units: str = 's',
n_steps: int = 10,
solver: str = "cram48"
solver: str = "cram48",
continue_timesteps: bool = False,
):
check_type("n_steps", n_steps, Integral)
check_greater_than("n_steps", n_steps, 0)
super().__init__(
operator, timesteps, power, power_density, source_rates,
timestep_units=timestep_units, solver=solver)
timestep_units=timestep_units, solver=solver, continue_timesteps=continue_timesteps)
self.n_steps = n_steps

def _get_bos_data_from_operator(self, step_index, step_power, n_bos):
Expand Down