Skip to content
Prev Previous commit
Next Next commit
Apply suggestions from @promano code review
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
  • Loading branch information
jtramm and paulromano authored Jul 17, 2023
commit bf5f34fb69527c020ad26000538f08512a5402f3
4 changes: 2 additions & 2 deletions include/openmc/mgxs.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class Mgxs {
//!
//! @param sqrtkT Temperature of the material.
//! @return The temperature index corresponding to sqrtkT.
int get_temperature_index(double sqrtkT);
int get_temperature_index(double sqrtkT) const;

//! \brief Sets the angle index in particle cache.
//!
Expand All @@ -179,7 +179,7 @@ class Mgxs {
//!
//! @param u Incoming particle direction.
//! @return The angle index corresponding to u.
int get_angle_index(Direction& u);
int get_angle_index(const Direction& u) const;

//! \brief Provide const access to list of XsData held by this
const vector<XsData>& get_xsdata() const { return xs; }
Expand Down
4 changes: 2 additions & 2 deletions src/mgxs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ bool Mgxs::equiv(const Mgxs& that)

//==============================================================================

int Mgxs::get_temperature_index(double sqrtkT)
int Mgxs::get_temperature_index(double sqrtkT) const
{
return xt::argmin(xt::abs(kTs - sqrtkT * sqrtkT))[0];
}
Expand All @@ -636,7 +636,7 @@ void Mgxs::set_temperature_index(Particle& p)

//==============================================================================

int Mgxs::get_angle_index(Direction& u)
int Mgxs::get_angle_index(const Direction& u) const
{
if (is_isotropic) {
return 0;
Expand Down