2018-10-07 07:18:29 -04:00
|
|
|
//! \file physics_common.h
|
|
|
|
|
//! A collection of physics methods common to MG, CE, photon, etc.
|
|
|
|
|
|
|
|
|
|
#ifndef OPENMC_PHYSICS_COMMON_H
|
|
|
|
|
#define OPENMC_PHYSICS_COMMON_H
|
|
|
|
|
|
|
|
|
|
#include "openmc/particle.h"
|
|
|
|
|
|
|
|
|
|
namespace openmc {
|
|
|
|
|
|
|
|
|
|
//! \brief Performs the russian roulette operation for a particle
|
2022-01-19 09:14:41 -06:00
|
|
|
//! \param[in,out] p Particle object
|
2022-02-16 09:34:34 -06:00
|
|
|
//! \param[in] weight_survive Weight assigned to particles that survive
|
2022-01-19 09:14:41 -06:00
|
|
|
void russian_roulette(Particle& p, double weight_survive);
|
2018-10-07 07:18:29 -04:00
|
|
|
|
2026-02-25 22:01:33 +02:00
|
|
|
//! \brief Performs the global russian roulette operation on a particle
|
|
|
|
|
//! \param[in,out] p Particle object
|
|
|
|
|
void apply_russian_roulette(Particle& p);
|
|
|
|
|
|
2018-10-07 07:18:29 -04:00
|
|
|
} // namespace openmc
|
|
|
|
|
#endif // OPENMC_PHYSICS_COMMON_H
|