Write surface source files per batch (#3124)

Co-authored-by: Patrick Shriwise <pshriwise@gmail.com>
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
Zoe Prieto 2024-10-03 19:32:03 -03:00 committed by GitHub
parent b54de4d761
commit 9686851e7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 167 additions and 48 deletions

View file

@ -118,7 +118,8 @@ SolverType solver_type {SolverType::MONTE_CARLO};
std::unordered_set<int> sourcepoint_batch;
std::unordered_set<int> statepoint_batch;
std::unordered_set<int> source_write_surf_id;
int64_t max_surface_particles;
int64_t ssw_max_particles;
int64_t ssw_max_files;
int64_t ssw_cell_id {C_NONE};
SSWCellType ssw_cell_type {SSWCellType::None};
TemperatureMethod temperature_method {TemperatureMethod::NEAREST};
@ -799,14 +800,20 @@ void read_settings_xml(pugi::xml_node root)
// Get maximum number of particles to be banked per surface
if (check_for_node(node_ssw, "max_particles")) {
max_surface_particles =
std::stoll(get_node_value(node_ssw, "max_particles"));
ssw_max_particles = std::stoll(get_node_value(node_ssw, "max_particles"));
} else {
fatal_error("A maximum number of particles needs to be specified "
"using the 'max_particles' parameter to store surface "
"source points.");
}
// Get maximum number of surface source files to be created
if (check_for_node(node_ssw, "max_source_files")) {
ssw_max_files = std::stoll(get_node_value(node_ssw, "max_source_files"));
} else {
ssw_max_files = 1;
}
if (check_for_node(node_ssw, "mcpl")) {
surf_mcpl_write = get_node_value_bool(node_ssw, "mcpl");