Limit number of lost particles written to disk. (#2688)

Co-authored-by: John Tramm <john.tramm@gmail.com>
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
Erik B Knudsen 2023-09-26 03:12:04 +02:00 committed by GitHub
parent 989875b070
commit d765bd031f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 103 additions and 2 deletions

View file

@ -89,6 +89,7 @@ std::string weight_windows_file;
int32_t n_inactive {0};
int32_t max_lost_particles {10};
double rel_max_lost_particles {1.0e-6};
int32_t max_write_lost_particles {-1};
int32_t gen_per_batch {1};
int64_t n_particles {-1};
@ -172,6 +173,12 @@ void get_run_parameters(pugi::xml_node node_base)
std::stod(get_node_value(node_base, "rel_max_lost_particles"));
}
// Get relative number of lost particles
if (check_for_node(node_base, "max_write_lost_particles")) {
max_write_lost_particles =
std::stoi(get_node_value(node_base, "max_write_lost_particles"));
}
// Get number of inactive batches
if (run_mode == RunMode::EIGENVALUE) {
if (check_for_node(node_base, "inactive")) {