mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45: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
|
|
@ -16,55 +16,55 @@ namespace openmc {
|
|||
//==============================================================================
|
||||
|
||||
//! Sample a nuclide and reaction and then calls the appropriate routine
|
||||
void collision(Particle* p);
|
||||
void collision(Particle& p);
|
||||
|
||||
//! Samples an incident neutron reaction
|
||||
void sample_neutron_reaction(Particle* p);
|
||||
void sample_neutron_reaction(Particle& p);
|
||||
|
||||
//! Samples an element based on the macroscopic cross sections for each nuclide
|
||||
//! within a material and then samples a reaction for that element and calls the
|
||||
//! appropriate routine to process the physics.
|
||||
void sample_photon_reaction(Particle* p);
|
||||
void sample_photon_reaction(Particle& p);
|
||||
|
||||
//! Terminates the particle and either deposits all energy locally
|
||||
//! (electron_treatment = ElectronTreatment::LED) or creates secondary bremsstrahlung
|
||||
//! photons from electron deflections with charged particles (electron_treatment
|
||||
//! = ElectronTreatment::TTB).
|
||||
void sample_electron_reaction(Particle* p);
|
||||
void sample_electron_reaction(Particle& p);
|
||||
|
||||
//! Terminates the particle and either deposits all energy locally
|
||||
//! (electron_treatment = ElectronTreatment::LED) or creates secondary bremsstrahlung
|
||||
//! photons from electron deflections with charged particles (electron_treatment
|
||||
//! = ElectronTreatment::TTB). Two annihilation photons of energy MASS_ELECTRON_EV (0.511
|
||||
//! MeV) are created and travel in opposite directions.
|
||||
void sample_positron_reaction(Particle* p);
|
||||
void sample_positron_reaction(Particle& p);
|
||||
|
||||
//! Sample a nuclide based on their total cross sections and densities within
|
||||
//! the current material
|
||||
//!
|
||||
//! \param[in] p Particle
|
||||
//! \return Index in the data::nuclides vector
|
||||
int sample_nuclide(Particle* p);
|
||||
int sample_nuclide(Particle& p);
|
||||
|
||||
//! Determine the average total, prompt, and delayed neutrons produced from
|
||||
//! fission and creates appropriate bank sites.
|
||||
void create_fission_sites(Particle* p, int i_nuclide, const Reaction* rx);
|
||||
void create_fission_sites(Particle& p, int i_nuclide, const Reaction* rx);
|
||||
|
||||
int sample_element(Particle* p);
|
||||
int sample_element(Particle& p);
|
||||
|
||||
Reaction* sample_fission(int i_nuclide, Particle* p);
|
||||
Reaction* sample_fission(int i_nuclide, Particle& p);
|
||||
|
||||
void sample_photon_product(int i_nuclide, Particle* p, int* i_rx, int* i_product);
|
||||
void sample_photon_product(int i_nuclide, Particle& p, int* i_rx, int* i_product);
|
||||
|
||||
void absorption(Particle* p, int i_nuclide);
|
||||
void absorption(Particle& p, int i_nuclide);
|
||||
|
||||
void scatter(Particle* p, int i_nuclide);
|
||||
void scatter(Particle& p, int i_nuclide);
|
||||
|
||||
//! Treats the elastic scattering of a neutron with a target.
|
||||
void elastic_scatter(int i_nuclide, const Reaction& rx, double kT,
|
||||
Particle* p);
|
||||
Particle& p);
|
||||
|
||||
void sab_scatter(int i_nuclide, int i_sab, Particle* p);
|
||||
void sab_scatter(int i_nuclide, int i_sab, Particle& p);
|
||||
|
||||
//! samples the target velocity. The constant cross section free gas model is
|
||||
//! the default method. Methods for correctly accounting for the energy
|
||||
|
|
@ -85,9 +85,9 @@ void sample_fission_neutron(int i_nuclide, const Reaction* rx, double E_in,
|
|||
|
||||
//! handles all reactions with a single secondary neutron (other than fission),
|
||||
//! i.e. level scattering, (n,np), (n,na), etc.
|
||||
void inelastic_scatter(const Nuclide* nuc, const Reaction* rx, Particle* p);
|
||||
void inelastic_scatter(const Nuclide* nuc, const Reaction* rx, Particle& p);
|
||||
|
||||
void sample_secondary_photons(Particle* p, int i_nuclide);
|
||||
void sample_secondary_photons(Particle& p, int i_nuclide);
|
||||
|
||||
} // namespace openmc
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@
|
|||
namespace openmc {
|
||||
|
||||
//! \brief Performs the russian roulette operation for a particle
|
||||
extern "C" void
|
||||
russian_roulette(Particle* p);
|
||||
void russian_roulette(Particle& p);
|
||||
|
||||
} // namespace openmc
|
||||
#endif // OPENMC_PHYSICS_COMMON_H
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace openmc {
|
|||
//! \brief samples particle behavior after a collision event.
|
||||
//! \param p Particle to operate on
|
||||
void
|
||||
collision_mg(Particle* p);
|
||||
collision_mg(Particle& p);
|
||||
|
||||
//! \brief samples a reaction type.
|
||||
//!
|
||||
|
|
@ -23,23 +23,23 @@ collision_mg(Particle* p);
|
|||
//! fission and disappearance are treated implicitly.
|
||||
//! \param p Particle to operate on
|
||||
void
|
||||
sample_reaction(Particle* p);
|
||||
sample_reaction(Particle& p);
|
||||
|
||||
//! \brief Samples the scattering event
|
||||
//! \param p Particle to operate on
|
||||
void
|
||||
scatter(Particle* p);
|
||||
scatter(Particle& p);
|
||||
|
||||
//! \brief Determines the average total, prompt and delayed neutrons produced
|
||||
//! from fission and creates the appropriate bank sites.
|
||||
//! \param p Particle to operate on
|
||||
void
|
||||
create_fission_sites(Particle* p);
|
||||
create_fission_sites(Particle& p);
|
||||
|
||||
//! \brief Handles an absorption event
|
||||
//! \param p Particle to operate on
|
||||
void
|
||||
absorption(Particle* p);
|
||||
absorption(Particle& p);
|
||||
|
||||
} // namespace openmc
|
||||
#endif // OPENMC_PHYSICS_MG_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue