From 70b43bb7270ab73a24ed452396baad90df4457e3 Mon Sep 17 00:00:00 2001 From: Luke Shingles Date: Mon, 2 Sep 2024 00:24:12 +0100 Subject: [PATCH] Update nonthermal.cc --- nonthermal.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nonthermal.cc b/nonthermal.cc index ed3d690dc..4b9d4115b 100644 --- a/nonthermal.cc +++ b/nonthermal.cc @@ -912,8 +912,8 @@ auto calculate_frac_heating(const int modelgridindex, const std::array(std::ceil(SF_EMIN / DELTA_E) * 10); - assert_always(nsteps > 0); + constexpr int nsteps = (static_cast(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;