mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-21 14:35:27 -04:00
Read IFP settings only in source/eigenvalue run mode (#3673)
This commit is contained in:
parent
f70febb05f
commit
9b40ea008e
1 changed files with 14 additions and 14 deletions
|
|
@ -545,6 +545,20 @@ void read_settings_xml(pugi::xml_node root)
|
|||
} else if (rel_max_lost_particles <= 0.0 || rel_max_lost_particles >= 1.0) {
|
||||
fatal_error("Relative max lost particles must be between zero and one.");
|
||||
}
|
||||
|
||||
// Check for user value for the number of generation of the Iterated Fission
|
||||
// Probability (IFP) method
|
||||
if (check_for_node(root, "ifp_n_generation")) {
|
||||
ifp_n_generation = std::stoi(get_node_value(root, "ifp_n_generation"));
|
||||
if (ifp_n_generation <= 0) {
|
||||
fatal_error("'ifp_n_generation' must be greater than 0.");
|
||||
}
|
||||
// Avoid tallying 0 if IFP logs are not complete when active cycles start
|
||||
if (ifp_n_generation > n_inactive) {
|
||||
fatal_error("'ifp_n_generation' must be lower than or equal to the "
|
||||
"number of inactive cycles.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Copy plotting random number seed if specified
|
||||
|
|
@ -1130,20 +1144,6 @@ void read_settings_xml(pugi::xml_node root)
|
|||
temperature_range[1] = range.at(1);
|
||||
}
|
||||
|
||||
// Check for user value for the number of generation of the Iterated Fission
|
||||
// Probability (IFP) method
|
||||
if (check_for_node(root, "ifp_n_generation")) {
|
||||
ifp_n_generation = std::stoi(get_node_value(root, "ifp_n_generation"));
|
||||
if (ifp_n_generation <= 0) {
|
||||
fatal_error("'ifp_n_generation' must be greater than 0.");
|
||||
}
|
||||
// Avoid tallying 0 if IFP logs are not complete when active cycles start
|
||||
if (ifp_n_generation > n_inactive) {
|
||||
fatal_error("'ifp_n_generation' must be lower than or equal to the "
|
||||
"number of inactive cycles.");
|
||||
}
|
||||
}
|
||||
|
||||
// Check for tabular_legendre options
|
||||
if (check_for_node(root, "tabular_legendre")) {
|
||||
// Get pointer to tabular_legendre node
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue