mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
Generalize russian_roulette function
This commit is contained in:
parent
f18caa1712
commit
de50a7bfca
5 changed files with 18 additions and 23 deletions
|
|
@ -151,9 +151,9 @@ void sample_neutron_reaction(Particle& p)
|
|||
|
||||
// Play russian roulette if survival biasing is turned on
|
||||
if (settings::survival_biasing) {
|
||||
russian_roulette(p);
|
||||
if (!p.alive())
|
||||
return;
|
||||
if (p.wgt() < settings::weight_cutoff) {
|
||||
russian_roulette(p, settings::weight_survive);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue