mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
Add a max_events setting. (#2945)
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
cfebe16127
commit
9fd096b843
8 changed files with 59 additions and 16 deletions
|
|
@ -96,6 +96,7 @@ int32_t gen_per_batch {1};
|
|||
int64_t n_particles {-1};
|
||||
|
||||
int64_t max_particles_in_flight {100000};
|
||||
int max_particle_events {1000000};
|
||||
|
||||
ElectronTreatment electron_treatment {ElectronTreatment::TTB};
|
||||
array<double, 4> energy_cutoff {0.0, 1000.0, 0.0, 0.0};
|
||||
|
|
@ -156,6 +157,12 @@ void get_run_parameters(pugi::xml_node node_base)
|
|||
std::stoll(get_node_value(node_base, "max_particles_in_flight"));
|
||||
}
|
||||
|
||||
// Get maximum number of events allowed per particle
|
||||
if (check_for_node(node_base, "max_particle_events")) {
|
||||
max_particle_events =
|
||||
std::stoll(get_node_value(node_base, "max_particle_events"));
|
||||
}
|
||||
|
||||
// Get number of basic batches
|
||||
if (check_for_node(node_base, "batches")) {
|
||||
n_batches = std::stoi(get_node_value(node_base, "batches"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue