Add user setting for source rejection fraction (#3433)

This commit is contained in:
Paul Romano 2025-06-10 22:51:51 -05:00 committed by GitHub
parent f796fa04e0
commit f571be87c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 118 additions and 50 deletions

View file

@ -124,6 +124,7 @@ RunMode run_mode {RunMode::UNSET};
SolverType solver_type {SolverType::MONTE_CARLO};
std::unordered_set<int> sourcepoint_batch;
std::unordered_set<int> statepoint_batch;
double source_rejection_fraction {0.05};
std::unordered_set<int> source_write_surf_id;
int64_t ssw_max_particles;
int64_t ssw_max_files;
@ -644,6 +645,12 @@ void read_settings_xml(pugi::xml_node root)
write_initial_source = get_node_value_bool(root, "write_initial_source");
}
// Get relative number of lost particles
if (check_for_node(root, "source_rejection_fraction")) {
source_rejection_fraction =
std::stod(get_node_value(root, "source_rejection_fraction"));
}
// Survival biasing
if (check_for_node(root, "survival_biasing")) {
survival_biasing = get_node_value_bool(root, "survival_biasing");