diff --git a/networks/CNO_He_burn/CNO_He_burn.png b/networks/CNO_He_burn/CNO_He_burn.png index 24c454e17..456c50495 100644 Binary files a/networks/CNO_He_burn/CNO_He_burn.png and b/networks/CNO_He_burn/CNO_He_burn.png differ diff --git a/networks/CNO_He_burn/Make.package b/networks/CNO_He_burn/Make.package index 39c65eca7..3c406e47f 100644 --- a/networks/CNO_He_burn/Make.package +++ b/networks/CNO_He_burn/Make.package @@ -5,6 +5,7 @@ ifeq ($(USE_REACT),TRUE) CEXE_headers += actual_network.H CEXE_headers += tfactors.H CEXE_headers += partition_functions.H + CEXE_sources += partition_functions_data.cpp CEXE_headers += actual_rhs.H CEXE_headers += reaclib_rates.H CEXE_headers += table_rates.H diff --git a/networks/CNO_He_burn/actual_network.H b/networks/CNO_He_burn/actual_network.H index a4c922e62..5d2e23184 100644 --- a/networks/CNO_He_burn/actual_network.H +++ b/networks/CNO_He_burn/actual_network.H @@ -30,100 +30,100 @@ namespace network return 0.0_rt; } else if constexpr (spec == He4) { - return 28.29566_rt; + return 28.295662457999697_rt; } else if constexpr (spec == C12) { - return 92.16172800000001_rt; + return 92.16173498399803_rt; } else if constexpr (spec == C13) { - return 97.108037_rt; + return 97.10804378399916_rt; } else if constexpr (spec == N13) { - return 94.105219_rt; + return 94.10522604799917_rt; } else if constexpr (spec == N14) { - return 104.65859599999999_rt; + return 104.65860734799753_rt; } else if constexpr (spec == N15) { - return 115.4919_rt; + return 115.49190414799887_rt; } else if constexpr (spec == O14) { - return 98.731892_rt; + return 98.73189611199996_rt; } else if constexpr (spec == O15) { - return 111.95538_rt; + return 111.95539521199862_rt; } else if constexpr (spec == O16) { - return 127.619296_rt; + return 127.6193154119992_rt; } else if constexpr (spec == O17) { - return 131.76237600000002_rt; + return 131.76239561199873_rt; } else if constexpr (spec == O18) { - return 139.807746_rt; + return 139.8077658120019_rt; } else if constexpr (spec == F17) { - return 128.21957600000002_rt; + return 128.21958437599824_rt; } else if constexpr (spec == F18) { - return 137.369484_rt; + return 137.36950247599816_rt; } else if constexpr (spec == F19) { - return 147.801342_rt; + return 147.80136567599766_rt; } else if constexpr (spec == Ne18) { - return 132.142626_rt; + return 132.14265544000227_rt; } else if constexpr (spec == Ne19) { - return 143.779517_rt; + return 143.7795235400008_rt; } else if constexpr (spec == Ne20) { - return 160.6448_rt; + return 160.64482384000075_rt; } else if constexpr (spec == Ne21) { - return 167.405973_rt; + return 167.40598973999658_rt; } else if constexpr (spec == Na22) { - return 174.144674_rt; + return 174.14457080400098_rt; } else if constexpr (spec == Na23) { - return 186.56433900000002_rt; + return 186.56435240400242_rt; } else if constexpr (spec == Mg22) { - return 168.58074200000001_rt; + return 168.58082376800303_rt; } else if constexpr (spec == Mg24) { - return 198.25701600000002_rt; + return 198.2570479679962_rt; } else if constexpr (spec == Al27) { - return 224.951931_rt; + return 224.95193723199915_rt; } else if constexpr (spec == Si28) { - return 236.536832_rt; + return 236.53684539599638_rt; } else if constexpr (spec == P31) { - return 262.91617699999995_rt; + return 262.9161999600037_rt; } else if constexpr (spec == S32) { - return 271.78012800000005_rt; + return 271.78016372399725_rt; } else if constexpr (spec == Ar36) { - return 306.716724_rt; + return 306.7167469519991_rt; } else if constexpr (spec == Ca40) { - return 342.05212000000006_rt; + return 342.05218528000114_rt; } else if constexpr (spec == Ti44) { - return 375.47488000000004_rt; + return 375.47496160800074_rt; } else if constexpr (spec == Cr48) { - return 411.46891200000005_rt; + return 411.4679399359957_rt; } else if constexpr (spec == Fe52) { - return 447.697848_rt; + return 447.6996182639923_rt; } else if constexpr (spec == Ni56) { - return 483.995624_rt; + return 483.9956965919919_rt; } diff --git a/networks/CNO_He_burn/partition_functions.H b/networks/CNO_He_burn/partition_functions.H index 38f06a550..14f930e5e 100644 --- a/networks/CNO_He_burn/partition_functions.H +++ b/networks/CNO_He_burn/partition_functions.H @@ -17,21 +17,21 @@ namespace part_fun { // interpolation routine - template + template AMREX_GPU_HOST_DEVICE AMREX_INLINE - void interpolate_pf(const amrex::Real t9, const amrex::Real (&temp_array)[npts], const amrex::Real (&pf_array)[npts], + void interpolate_pf(const amrex::Real t9, const T& temp_array, const T& pf_array, amrex::Real& pf, amrex::Real& dpf_dT) { - if (t9 >= temp_array[0] && t9 < temp_array[npts-1]) { + if (t9 >= temp_array.lo() && t9 < temp_array.hi()) { // find the largest temperature element <= t9 using a binary search - int left = 0; - int right = npts; + int left = temp_array.lo(); + int right = temp_array.hi(); while (left < right) { int mid = (left + right) / 2; - if (temp_array[mid] > t9) { + if (temp_array(mid) > t9) { right = mid; } else { left = mid + 1; @@ -44,11 +44,12 @@ namespace part_fun { // construct the slope -- this is (log10(pf_{i+1}) - log10(pf_i)) / (T_{i+1} - T_i) - amrex::Real slope = (pf_array[idx+1] - pf_array[idx]) / (temp_array[idx+1] - temp_array[idx]); + amrex::Real slope = (pf_array(idx+1) - pf_array(idx)) / + (temp_array(idx+1) - temp_array(idx)); // find the PF - amrex::Real log10_pf = pf_array[idx] + slope * (t9 - temp_array[idx]); + amrex::Real log10_pf = pf_array(idx) + slope * (t9 - temp_array(idx)); pf = std::pow(10.0_rt, log10_pf); // find the derivative (with respect to T, not T9)