Skip to content

Commit

Permalink
Update nltepop.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Nov 20, 2024
1 parent cbedde4 commit d030f11
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions nltepop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,8 @@ void nltepop_matrix_add_boundbound(const int nonemptymgi, const int element, con
const auto T_e = grid::get_Te(nonemptymgi);
const float nne = grid::get_nne(nonemptymgi);
const int nlevels = get_nlevels(element, ion);
for (int level = 0; level < nlevels; level++) {
const auto levels = std::ranges::iota_view{0, nlevels};
std::for_each(levels.begin(), levels.end(), [&](const auto level) {
const int level_index = get_nlte_vector_index(element, ion, level);
const double epsilon_level = epsilon(element, ion, level);
const double statweight = stat_weight(element, ion, level);
Expand All @@ -452,7 +453,7 @@ void nltepop_matrix_add_boundbound(const int nonemptymgi, const int element, con
// de-excitation
const int ndowntrans = get_ndowntrans(element, ion, level);
const auto leveldowntrans = std::span(get_downtranslist(element, ion, level), ndowntrans);
std::for_each(EXEC_PAR leveldowntrans.begin(), leveldowntrans.end(), [&](const auto &downtransition) {
std::for_each(leveldowntrans.begin(), leveldowntrans.end(), [&](const auto &downtransition) {
const double A_ul = downtransition.einstein_A;
const int lower = downtransition.targetlevelindex;

Expand Down Expand Up @@ -481,7 +482,7 @@ void nltepop_matrix_add_boundbound(const int nonemptymgi, const int element, con
const int nuptrans = get_nuptrans(element, ion, level);
const auto *const leveluptranslist = get_uptranslist(element, ion, level);
const auto nuptransindices = std::ranges::iota_view{0, nuptrans};
std::for_each(EXEC_PAR nuptransindices.begin(), nuptransindices.end(), [&](const auto i) {
std::for_each(nuptransindices.begin(), nuptransindices.end(), [&](const auto i) {
const int lineindex = leveluptranslist[i].lineindex;
const int upper = leveluptranslist[i].targetlevelindex;
const double epsilon_trans = epsilon(element, ion, upper) - epsilon_level;
Expand Down Expand Up @@ -515,7 +516,7 @@ void nltepop_matrix_add_boundbound(const int nonemptymgi, const int element, con
level, upper);
}
});
}
});
}

void nltepop_matrix_add_ionisation(const int modelgridindex, const int element, const int ion,
Expand Down

0 comments on commit d030f11

Please sign in to comment.