Skip to content

Commit bb3bf58

Browse files
The9CatCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 20c5ce9 commit bb3bf58

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎utils/SL/Orbit1d.cc‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,11 @@ void OneDOrbit::new_orbit(double ENERGY, double VPARA)
138138

139139
void OneDOrbit::compute_freq(void)
140140
{
141-
double E = energy;
142-
fct_zmax fct(model, E);
141+
const double E = energy;
142+
auto fct = [mdl=model, E](double z) { return E - mdl->get_pot(z); };
143143

144-
double mmin = model->get_min_radius();
145-
double mmax = model->get_max_radius();
144+
const double mmin = model->get_min_radius();
145+
const double mmax = model->get_max_radius();
146146

147147
zmax = zbrent(fct, mmin, 4.0*mmax, TOL);
148148

0 commit comments

Comments
 (0)