mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 13:15:39 -04:00
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:
parent
989875b070
commit
d765bd031f
7 changed files with 103 additions and 2 deletions
|
|
@ -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")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue