mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 13:15:39 -04:00
Shared Secondary Particle Bank (#3863)
Co-authored-by: John Tramm <jtramm@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Paul Romano <paul.k.romano@gmail.com> Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
parent
beed56e6ee
commit
0169fd9226
63 changed files with 2409 additions and 299 deletions
|
|
@ -83,6 +83,7 @@ bool uniform_source_sampling {false};
|
|||
bool ufs_on {false};
|
||||
bool urr_ptables_on {true};
|
||||
bool use_decay_photons {false};
|
||||
bool use_shared_secondary_bank {false};
|
||||
bool weight_windows_on {false};
|
||||
bool weight_window_checkpoint_surface {false};
|
||||
bool weight_window_checkpoint_collision {true};
|
||||
|
|
@ -1320,6 +1321,27 @@ void read_settings_xml(pugi::xml_node root)
|
|||
settings::use_decay_photons =
|
||||
get_node_value_bool(root, "use_decay_photons");
|
||||
}
|
||||
|
||||
// If weight windows are on, also enable shared secondary bank (unless
|
||||
// explicitly disabled by user).
|
||||
if (check_for_node(root, "shared_secondary_bank")) {
|
||||
bool val = get_node_value_bool(root, "shared_secondary_bank");
|
||||
if (val && run_mode == RunMode::EIGENVALUE) {
|
||||
warning(
|
||||
"Shared secondary bank is not supported in eigenvalue calculations. "
|
||||
"Setting will be ignored.");
|
||||
} else {
|
||||
settings::use_shared_secondary_bank = val;
|
||||
}
|
||||
} else if (settings::weight_windows_on) {
|
||||
if (run_mode == RunMode::EIGENVALUE) {
|
||||
warning(
|
||||
"Shared secondary bank is not supported in eigenvalue calculations. "
|
||||
"Particle local secondary banks will be used instead.");
|
||||
} else if (run_mode == RunMode::FIXED_SOURCE) {
|
||||
settings::use_shared_secondary_bank = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void free_memory_settings()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue