mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Modification to load_state_point() so source bank existence in statepoint files is only checked for EIGENVALUE restart cases as the new fixed source bank model will never write source particles to file
This commit is contained in:
parent
41580b02ed
commit
50a9a0ac3b
1 changed files with 10 additions and 10 deletions
|
|
@ -380,15 +380,14 @@ void load_state_point()
|
|||
// Read batch number to restart at
|
||||
read_dataset(file_id, "current_batch", simulation::restart_batch);
|
||||
|
||||
// Check for source in statepoint if needed
|
||||
bool source_present;
|
||||
read_attribute(file_id, "source_present", source_present);
|
||||
|
||||
if (simulation::restart_batch > settings::n_batches) {
|
||||
fatal_error("The number batches specified in settings.xml is fewer "
|
||||
" than the number of batches in the given statepoint file.");
|
||||
}
|
||||
|
||||
// Logical flag for source present in statepoint file
|
||||
bool source_present;
|
||||
|
||||
// Read information specific to eigenvalue run
|
||||
if (settings::run_mode == RunMode::EIGENVALUE) {
|
||||
read_dataset(file_id, "n_inactive", temp);
|
||||
|
|
@ -396,6 +395,13 @@ void load_state_point()
|
|||
|
||||
// Take maximum of statepoint n_inactive and input n_inactive
|
||||
settings::n_inactive = std::max(settings::n_inactive, temp);
|
||||
|
||||
// Check to make sure source bank is present
|
||||
read_attribute(file_id, "source_present", source_present);
|
||||
if (settings::path_sourcepoint == settings::path_statepoint &&
|
||||
!source_present) {
|
||||
fatal_error("Source bank must be contained in statepoint restart file");
|
||||
}
|
||||
}
|
||||
|
||||
// Read number of realizations for global tallies
|
||||
|
|
@ -406,12 +412,6 @@ void load_state_point()
|
|||
restart_set_keff();
|
||||
simulation::current_batch = simulation::restart_batch;
|
||||
|
||||
// Check to make sure source bank is present
|
||||
if (settings::path_sourcepoint == settings::path_statepoint &&
|
||||
!source_present) {
|
||||
fatal_error("Source bank must be contained in statepoint restart file");
|
||||
}
|
||||
|
||||
// Read tallies to master. If we are using Parallel HDF5, all processes
|
||||
// need to be included in the HDF5 calls.
|
||||
#ifdef PHDF5
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue