mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Statepoint file loading refactor and CAPI function (#2886)
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
3370ce1978
commit
f543c007a3
7 changed files with 104 additions and 24 deletions
|
|
@ -54,8 +54,14 @@ int openmc_run()
|
|||
openmc::simulation::time_total.start();
|
||||
openmc_simulation_init();
|
||||
|
||||
int err = 0;
|
||||
// Ensure that a batch isn't executed in the case that the maximum number of
|
||||
// batches has already been run in a restart statepoint file
|
||||
int status = 0;
|
||||
if (openmc::simulation::current_batch >= openmc::settings::n_max_batches) {
|
||||
status = openmc::STATUS_EXIT_MAX_BATCH;
|
||||
}
|
||||
|
||||
int err = 0;
|
||||
while (status == 0 && err == 0) {
|
||||
err = openmc_next_batch(&status);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue