mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
Use references consistently in physics modules
This commit is contained in:
parent
65c0dbfe46
commit
43eae72aeb
7 changed files with 276 additions and 277 deletions
|
|
@ -9,16 +9,16 @@ namespace openmc {
|
|||
// RUSSIAN_ROULETTE
|
||||
//==============================================================================
|
||||
|
||||
void russian_roulette(Particle* p)
|
||||
void russian_roulette(Particle& p)
|
||||
{
|
||||
if (p->wgt_ < settings::weight_cutoff) {
|
||||
if (prn(p->current_seed()) < p->wgt_ / settings::weight_survive) {
|
||||
p->wgt_ = settings::weight_survive;
|
||||
p->wgt_last_ = p->wgt_;
|
||||
if (p.wgt_ < settings::weight_cutoff) {
|
||||
if (prn(p.current_seed()) < p.wgt_ / settings::weight_survive) {
|
||||
p.wgt_ = settings::weight_survive;
|
||||
p.wgt_last_ = p.wgt_;
|
||||
} else {
|
||||
p->wgt_ = 0.;
|
||||
p->wgt_last_ = 0.;
|
||||
p->alive_ = false;
|
||||
p.wgt_ = 0.;
|
||||
p.wgt_last_ = 0.;
|
||||
p.alive_ = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue