Skip to content

Commit

Permalink
Fix variable scoping error
Browse files Browse the repository at this point in the history
  • Loading branch information
josephburkhart committed Jun 13, 2024
1 parent b8df89d commit 0d11fdb
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions hoomd/hpmc/PairPotentialExpandedGaussian.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,25 +95,19 @@ class PairPotentialExpandedGaussian : public hpmc::PairPotential
sigma_2 = 0;
epsilon = 0;
delta = 0;
r_cut = 0;
r_on = 0;
r_cut_squared = 0;
r_on_squared = 0;
}

ParamType(pybind11::dict v)
{
auto sigma(v["sigma"].cast<LongReal>());
auto epsilon(v["epsilon"].cast<LongReal>());
auto delta(v["delta"].cast<LongReal>());
auto r_cut(v["r_cut"].cast<LongReal>());
auto r_on(v["r_on"].cast<LongReal>());

sigma_2 = sigma * sigma;
epsilon = epsilon;
delta = delta;
r_cut = r_cut;
r_on = r_on;
epsilon = v["epsilon"].cast<LongReal>();
delta = v["delta"].cast<LongReal>();
r_cut_squared = r_cut * r_cut;
r_on_squared = r_on * r_on;
}
Expand Down

0 comments on commit 0d11fdb

Please sign in to comment.