From 03fe9d3200bd61965dc738911652b98df85fcb7d Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Thu, 13 Jan 2022 18:32:17 -0600 Subject: [PATCH] Don't modify wgt_last in russian_roulette --- src/physics_common.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/physics_common.cpp b/src/physics_common.cpp index f6820f81f..964678fbe 100644 --- a/src/physics_common.cpp +++ b/src/physics_common.cpp @@ -12,12 +12,10 @@ namespace openmc { void russian_roulette(Particle& p) { if (p.wgt() < settings::weight_cutoff) { - if (prn(p.current_seed()) < p.wgt() / settings::weight_survive) { + if (settings::weight_survive * prn(p.current_seed()) < p.wgt()) { p.wgt() = settings::weight_survive; - p.wgt_last() = p.wgt(); } else { p.wgt() = 0.; - p.wgt_last() = 0.; p.alive() = false; } }