mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Respond to @nelsonag comments on #1271
This commit is contained in:
parent
97ea3287c2
commit
d9b27cca53
3 changed files with 34 additions and 5 deletions
|
|
@ -5,6 +5,9 @@
|
|||
Core Classes
|
||||
------------
|
||||
|
||||
The following classes are used for incident neutron data, decay data, fission
|
||||
and product yields.
|
||||
|
||||
.. autosummary::
|
||||
:toctree: generated
|
||||
:nosignatures:
|
||||
|
|
|
|||
|
|
@ -42,6 +42,9 @@ private:
|
|||
|
||||
class IncoherentElasticAE : public AngleEnergy {
|
||||
public:
|
||||
//! Construct from HDF5 file
|
||||
//
|
||||
//! \param[in] group HDF5 group
|
||||
explicit IncoherentElasticAE(hid_t group);
|
||||
|
||||
//! Sample distribution for an angle and energy
|
||||
|
|
@ -59,11 +62,19 @@ private:
|
|||
|
||||
class IncoherentElasticAEDiscrete : public AngleEnergy {
|
||||
public:
|
||||
//! Construct from HDF5 file
|
||||
//
|
||||
//! \param[in] group HDF5 group
|
||||
//! \param[in] energy Energies at which cosines are tabulated
|
||||
explicit IncoherentElasticAEDiscrete(hid_t group, const std::vector<double>& energy);
|
||||
|
||||
//! Sample distribution for an angle and energy
|
||||
//! \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
|
||||
void sample(double E_in, double& E_out, double& mu) const override;
|
||||
private:
|
||||
const std::vector<double>& energy_; //!< Incoherent inelastic scattering cross section
|
||||
const std::vector<double>& energy_; //!< Energies at which cosines are tabulated
|
||||
xt::xtensor<double, 2> mu_out_; //!< Cosines for each incident energy
|
||||
};
|
||||
|
||||
|
|
@ -73,8 +84,16 @@ private:
|
|||
|
||||
class IncoherentInelasticAEDiscrete : public AngleEnergy {
|
||||
public:
|
||||
//! Construct from HDF5 file
|
||||
//
|
||||
//! \param[in] group HDF5 group
|
||||
//! \param[in] energy Incident energies at which distributions are tabulated
|
||||
explicit IncoherentInelasticAEDiscrete(hid_t group, const std::vector<double>& energy);
|
||||
|
||||
//! Sample distribution for an angle and energy
|
||||
//! \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
|
||||
void sample(double E_in, double& E_out, double& mu) const override;
|
||||
private:
|
||||
const std::vector<double>& energy_; //!< Incident energies
|
||||
|
|
@ -89,8 +108,15 @@ private:
|
|||
|
||||
class IncoherentInelasticAE : public AngleEnergy {
|
||||
public:
|
||||
//! Construct from HDF5 file
|
||||
//
|
||||
//! \param[in] group HDF5 group
|
||||
explicit IncoherentInelasticAE(hid_t group);
|
||||
|
||||
//! Sample distribution for an angle and energy
|
||||
//! \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
|
||||
void sample(double E_in, double& E_out, double& mu) const override;
|
||||
private:
|
||||
//! Secondary energy/angle distribution
|
||||
|
|
|
|||
|
|
@ -240,13 +240,13 @@ IncoherentInelasticAE::sample(double E_in, double& E_out, double& mu) const
|
|||
|
||||
// Determine endpoints on grid i
|
||||
auto n = distribution_[i].e_out.size();
|
||||
double E_i_1 = distribution_[i].e_out(0);
|
||||
double E_i_J = distribution_[i].e_out(n - 1);
|
||||
double E_i_1 = distribution_[i].e_out[0];
|
||||
double E_i_J = distribution_[i].e_out[n - 1];
|
||||
|
||||
// Determine endpoints on grid i + 1
|
||||
n = distribution_[i + 1].e_out.size();
|
||||
double E_i1_1 = distribution_[i + 1].e_out(0);
|
||||
double E_i1_J = distribution_[i + 1].e_out(n - 1);
|
||||
double E_i1_1 = distribution_[i + 1].e_out[0];
|
||||
double E_i1_J = distribution_[i + 1].e_out[n - 1];
|
||||
|
||||
double E_1 = E_i_1 + f * (E_i1_1 - E_i_1);
|
||||
double E_J = E_i_J + f * (E_i1_J - E_i_J);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue