• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openmc-dev / openmc / 23084721708

14 Mar 2026 08:56AM UTC coverage: 81.599% (-0.5%) from 82.058%
23084721708

Pull #2693

github

web-flow
Merge 0ed23ee59 into bc9c31e0f
Pull Request #2693: Add reactivity control to coupled transport-depletion analyses

17575 of 25275 branches covered (69.54%)

Branch coverage included in aggregate %.

74 of 85 new or added lines in 4 files covered. (87.06%)

3755 existing lines in 99 files now uncovered.

58074 of 67433 relevant lines covered (86.12%)

47252067.37 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

77.27
/src/physics_common.cpp
1
#include "openmc/physics_common.h"
2

3
#include "openmc/random_lcg.h"
4
#include "openmc/settings.h"
5

6
namespace openmc {
7

8
//==============================================================================
9
// RUSSIAN_ROULETTE
10
//==============================================================================
11

12
void russian_roulette(Particle& p, double weight_survive)
1,662,536✔
13
{
14
  if (weight_survive * prn(p.current_seed()) < p.wgt()) {
1,662,536✔
15
    p.wgt() = weight_survive;
313,714✔
16
  } else {
17
    p.wgt() = 0.;
1,348,822✔
18
  }
19
}
1,662,536✔
20

21
void apply_russian_roulette(Particle& p)
2,147,483,647✔
22
{
23
  // Exit if survival biasing is turned off
24
  if (!settings::survival_biasing)
2,147,483,647✔
25
    return;
26

27
  // if survival normalization is on, use normalized weight cutoff and
28
  // normalized weight survive
29
  if (settings::survival_normalization) {
4,719,209!
UNCOV
30
    if (p.wgt() < settings::weight_cutoff * p.wgt_born()) {
×
UNCOV
31
      russian_roulette(p, settings::weight_survive * p.wgt_born());
×
32
    }
33
  } else if (p.wgt() < settings::weight_cutoff) {
4,719,209✔
34
    russian_roulette(p, settings::weight_survive);
199,331✔
35
  }
36
}
37
} // namespace openmc
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc