diff --git a/ratecoeff.h b/ratecoeff.h index 89b5eb74f..ca7c98fcc 100644 --- a/ratecoeff.h +++ b/ratecoeff.h @@ -80,7 +80,7 @@ auto integrator(auto params, double a, double b, double epsabs, double epsrel, i double *abserr) { if constexpr (USE_SIMPSON_INTEGRATOR) { // need an odd number for Simpson rule - const int samplecount = std::max(1, static_cast((b / a) / globals::NPHIXSNUINCREMENT)) * 32 + 1; + const int samplecount = std::max(1, static_cast((b / a) / globals::NPHIXSNUINCREMENT)) * 4 + 1; *result = simpson_integrator(params, a, b, samplecount); *abserr = 0.; diff --git a/vpkt.cc b/vpkt.cc index 96933e555..f81b0f84d 100644 --- a/vpkt.cc +++ b/vpkt.cc @@ -351,12 +351,9 @@ static void rlc_emiss_vpkt(const Packet &pkt, const double t_current, const int const auto n_l = calculate_levelpop(mgi, element, ion, lower); const double tau_line = (B_lu * n_l - B_ul * n_u) * HCLIGHTOVERFOURPI * t_line; - // Check on the element to exclude - // NB: ldist before need to be computed anyway (I want to move the packets to the - // line interaction point even if I don't interact) + // Check on the element to exclude (or -1 for no line opacity) const int anumber = get_atomicnumber(element); for (int ind = 0; ind < Nspectra; ind++) { - // If exclude[ind]==-1, I do not include line opacity if (exclude[ind] != -1 && (exclude[ind] != anumber)) { tau_vpkt[ind] += tau_line; }