mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-21 06:25:30 -04:00
Co-authored-by: Your Name <you@example.com> Co-authored-by: GuySten <62616591+GuySten@users.noreply.github.com> Co-authored-by: GuySten <guyste@post.bgu.ac.il> Co-authored-by: Eliezer214 <110336440+Eliezer214@users.noreply.github.com> Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
38 lines
1.4 KiB
C++
38 lines
1.4 KiB
C++
#ifndef OPENMC_ANGLE_ENERGY_H
|
|
#define OPENMC_ANGLE_ENERGY_H
|
|
|
|
#include <cstdint>
|
|
|
|
namespace openmc {
|
|
|
|
//==============================================================================
|
|
//! Abstract type that defines a correlated or uncorrelated angle-energy
|
|
//! distribution that is a function of incoming energy. Each derived type must
|
|
//! implement a sample() method that returns an outgoing energy and
|
|
//! scattering cosine given an incoming energy.
|
|
//==============================================================================
|
|
|
|
class AngleEnergy {
|
|
public:
|
|
//! Sample an outgoing energy and scattering cosine
|
|
//! \param[in] E_in Incoming energy in [eV]
|
|
//! \param[out] E_out Outgoing energy in [eV]
|
|
//! \param[out] mu Outgoing cosine with respect to current direction
|
|
//! \param[inout] seed Pseudorandom seed pointer
|
|
virtual void sample(
|
|
double E_in, double& E_out, double& mu, uint64_t* seed) const = 0;
|
|
|
|
//! Sample an outgoing energy and evaluate the angular PDF
|
|
//! \param[in] E_in Incoming energy in [eV]
|
|
//! \param[in] mu Scattering cosine with respect to current direction
|
|
//! \param[out] E_out Outgoing energy in [eV]
|
|
//! \param[inout] seed Pseudorandom seed pointer
|
|
//! \return Probability density for the scattering cosine
|
|
virtual double sample_energy_and_pdf(
|
|
double E_in, double mu, double& E_out, uint64_t* seed) const = 0;
|
|
virtual ~AngleEnergy() = default;
|
|
};
|
|
|
|
} // namespace openmc
|
|
|
|
#endif // OPENMC_ANGLE_ENERGY_H
|