Skip to content

Commit

Permalink
Fix tunneling path standalone (#153)
Browse files Browse the repository at this point in the history
* Fix bug, missing "&"

* Version bump

* Convert loop to const auto &BAInt

* Another version bump

* Apply suggestions from code review

---------

Co-authored-by: Philipp Basler <[email protected]>
  • Loading branch information
vollous and phbasler authored Jul 31, 2024
1 parent d4e7f55 commit 76a1c88
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/BSMPT/utility/const_velocity_spline.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ class cvspline
* @param l
* @return std::vector<double>
*/
std::vector<double> operator()(double l);
std::vector<double> operator()(double l) const;
/**
* @brief print the current knots of the spline
*
*/
void print_path();
void print_path() const;
/**
* @brief save the knots of the splien into a file
*
Expand Down
4 changes: 2 additions & 2 deletions src/utility/const_velocity_spline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ std::vector<double> cvspline::d2l(double l)

return rr;
}
std::vector<double> cvspline::operator()(double l)
std::vector<double> cvspline::operator()(double l) const
{
// Calculates the VEV at the position l in spline length,
l = l_to_x(l); // Convert from spline length to linear length.
Expand All @@ -278,7 +278,7 @@ std::vector<double> cvspline::operator()(double l)
return r;
}

void cvspline::print_path()
void cvspline::print_path() const
{
int wid = 15;

Expand Down
4 changes: 2 additions & 2 deletions standalone/TunnelingPath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ int main()
bounce.CalculatePercolationTemp();
if (bounce.GetPercolationTemp() == -1) continue;
double errorTtoTp = 1e100;
BounceActionInt *ClosestBounceActionInt;
BounceActionInt const *ClosestBounceActionInt;
std::cout << "Found a transitions with Tp =\t"
<< bounce.GetPercolationTemp() << " GeV.\n";
for (auto BAInt : bounce.SolutionList)
for (const auto &BAInt : bounce.SolutionList)
{
if (abs(BAInt.T - bounce.GetPercolationTemp()) < errorTtoTp)
{
Expand Down

0 comments on commit 76a1c88

Please sign in to comment.