Skip to content

Commit

Permalink
Update nonthermal.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Nov 20, 2024
1 parent 312a9b5 commit 6e07b1f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nonthermal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1824,8 +1824,7 @@ void sfmatrix_add_excitation(std::vector<double> &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);
Expand All @@ -1839,7 +1838,7 @@ void sfmatrix_add_excitation(std::vector<double> &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);
});
}
}
}
});
Expand Down

0 comments on commit 6e07b1f

Please sign in to comment.