openmc-dev / openmc

OpenMC Monte Carlo Code
https://docs.openmc.org
Other
699 stars 444 forks source link

Transport solve is run at end of single-step depletion simulation when `final_step=False` #2927

Open yardasol opened 1 month ago

yardasol commented 1 month ago

Bug Description

The docstring for Integrator.integrate() methods specifies that when final_step is False, a transport solve should not be run at the end of the final timestep. In the corner case where len(timesteps) == 1, it seems that the code runs a transport solve after this timestep regardless of the value of final_step.

Steps to Reproduce

  1. Generate a dummy model using this script.
  2. Run a depletion simulation using this script.
  3. Observe the terminal output and notice also that two statepoint files are created.

Environment

OpenMC 0.14.1 installed from source.