Skip to content

Commit

Permalink
Update rpkt.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Aug 31, 2024
1 parent d04eca3 commit 06484a2
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions rpkt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,8 @@ auto calculate_chi_bf_gammacontr(const int modelgridindex, const double nu, Phix
const int element = globals::allcont[i].element;
const int ion = globals::allcont[i].ion;
const int level = globals::allcont[i].level;
const auto bfestimindex = globals::allcont[i].bfestimindex;
const auto bfestimindex =
(USECELLHISTANDUPDATEPHIXSLIST && DETAILED_BF_ESTIMATORS_ON) ? globals::allcont[i].bfestimindex : -1;
// The bf process happens only if the current cell contains
// the involved atomic species

Expand Down Expand Up @@ -963,20 +964,15 @@ auto calculate_chi_bf_gammacontr(const int modelgridindex, const double nu, Phix
}

chi_bf_sum += nnlevel * sigma_contr;
} else if constexpr (USECELLHISTANDUPDATEPHIXSLIST && DETAILED_BF_ESTIMATORS_ON) {
// ignore this particular process
if (bfestimindex >= 0) {
phixslist->gamma_contr[bfestimindex] = 0.;
}
}
} else if constexpr (USECELLHISTANDUPDATEPHIXSLIST && DETAILED_BF_ESTIMATORS_ON) {
// no element present or not an important level
if (bfestimindex >= 0) {
phixslist->gamma_contr[bfestimindex] = 0.;
}
}
if constexpr (USECELLHISTANDUPDATEPHIXSLIST) {
phixslist->chi_bf_sum[i] = chi_bf_sum;
if constexpr (DETAILED_BF_ESTIMATORS_ON) {
if (bfestimindex >= 0) {
phixslist->gamma_contr[bfestimindex] = 0.;
}
}
}
}

Expand Down

0 comments on commit 06484a2

Please sign in to comment.