diff --git a/docs/source/pythonapi/data.rst b/docs/source/pythonapi/data.rst index 144d26306..92cb78548 100644 --- a/docs/source/pythonapi/data.rst +++ b/docs/source/pythonapi/data.rst @@ -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: diff --git a/include/openmc/secondary_thermal.h b/include/openmc/secondary_thermal.h index 998143d0f..7b876334f 100644 --- a/include/openmc/secondary_thermal.h +++ b/include/openmc/secondary_thermal.h @@ -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& 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& energy_; //!< Incoherent inelastic scattering cross section + const std::vector& energy_; //!< Energies at which cosines are tabulated xt::xtensor 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& 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& 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 diff --git a/src/secondary_thermal.cpp b/src/secondary_thermal.cpp index 5fdf6201a..696907a17 100644 --- a/src/secondary_thermal.cpp +++ b/src/secondary_thermal.cpp @@ -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);