Skip to content

Commit

Permalink
Update nonthermal.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Sep 1, 2024
1 parent 70b43bb commit 8f499b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nonthermal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -914,9 +914,9 @@ auto calculate_frac_heating(const int modelgridindex, const std::array<double, S
// third term (integral from zero to SF_EMIN)
constexpr int nsteps = (static_cast<int>(SF_EMIN / DELTA_E) + 1) * 10;
static_assert(nsteps > 0);
const double delta_endash = SF_EMIN / nsteps;
for (int j = 0; j < nsteps; j++) {
const double endash = SF_EMIN * j / nsteps;
constexpr double delta_endash = SF_EMIN / nsteps;
for (int j = 1; j < nsteps; j++) {
const double endash = delta_endash * j;
N_e_contrib += N_e(modelgridindex, endash * EV, yfunc) * endash * delta_endash;
}
frac_heating_Einit += N_e_contrib;
Expand Down

0 comments on commit 8f499b8

Please sign in to comment.