OpenMC/include/openmc/angle_energy.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
1.4 KiB
C
Raw Permalink Normal View History

2018-07-09 23:02:27 -05:00
#ifndef OPENMC_ANGLE_ENERGY_H
#define OPENMC_ANGLE_ENERGY_H
#include <cstdint>
2018-07-09 23:02:27 -05:00
namespace openmc {
2018-08-08 07:00:48 -05:00
//==============================================================================
//! 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.
//==============================================================================
2018-07-09 23:02:27 -05:00
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;
2018-07-09 23:02:27 -05:00
virtual ~AngleEnergy() = default;
};
} // namespace openmc
#endif // OPENMC_ANGLE_ENERGY_H