From 6e07b1f57649a9f5fe5d37e6fe55af5d5af7b7a6 Mon Sep 17 00:00:00 2001 From: Luke Shingles Date: Wed, 20 Nov 2024 14:20:59 +0000 Subject: [PATCH] Update nonthermal.cc --- nonthermal.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nonthermal.cc b/nonthermal.cc index 3df824340..120fc0503 100644 --- a/nonthermal.cc +++ b/nonthermal.cc @@ -1824,8 +1824,7 @@ void sfmatrix_add_excitation(std::vector &sfmatrixuppertri, const int mo if (xsstartindex >= 0) { cblas_dscal(SFPTS - xsstartindex, DELTA_E, vec_xs_excitation_deltae.data() + xsstartindex, 1); - const auto arri = std::ranges::iota_view{0, SFPTS}; - std::for_each(EXEC_PAR arri.begin(), arri.end(), [&](const int i) { + for (int i = 0; i < SFPTS; i++) { const int rowoffset = uppertriangular(i, 0); const double en = engrid(i); const int stopindex = get_energyindex_ev_lteq(en + epsilon_trans_ev); @@ -1839,7 +1838,7 @@ void sfmatrix_add_excitation(std::vector &sfmatrixuppertri, const int mo const double delta_en_actual = (en + epsilon_trans_ev - engrid(stopindex)); atomicadd(sfmatrixuppertri[rowoffset + stopindex], nnlevel * vec_xs_excitation_deltae[stopindex] * delta_en_actual / DELTA_E); - }); + } } } });