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 7cb10ef commit 70b43bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nonthermal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -912,8 +912,8 @@ auto calculate_frac_heating(const int modelgridindex, const std::array<double, S

double N_e_contrib = 0.;
// third term (integral from zero to SF_EMIN)
const int nsteps = static_cast<int>(std::ceil(SF_EMIN / DELTA_E) * 10);
assert_always(nsteps > 0);
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;
Expand Down

0 comments on commit 70b43bb

Please sign in to comment.