diff --git a/.github/workflows/cuda.yml b/.github/workflows/cuda.yml index 2900e1d34..2277f117c 100644 --- a/.github/workflows/cuda.yml +++ b/.github/workflows/cuda.yml @@ -41,8 +41,8 @@ jobs: make realclean make NETWORK_DIR=ignition_reaclib/URCA-simple USE_CUDA=TRUE COMP=gnu USE_MPI=FALSE -j 4 - - name: compile nse_net_cell (ase) + - name: compile test_sdc (ase) run: | export PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH} - cd unit_test/nse_net_cell - make USE_CUDA=TRUE COMP=gnu USE_MPI=FALSE -j 4 + cd unit_test/test_sdc + make USE_CUDA=TRUE COMP=gnu USE_MPI=FALSE NETWORK_DIR=ase USE_NSE_NET=TRUE SCREEN_METHOD=chabrier1998 -j 4 diff --git a/networks/he-burn/ase/Make.package b/networks/he-burn/ase/Make.package index fd942a5ce..35413fdcf 100644 --- a/networks/he-burn/ase/Make.package +++ b/networks/he-burn/ase/Make.package @@ -2,13 +2,15 @@ PYNUCASTRO_NETWORK = TRUE CEXE_headers += network_properties.H ifeq ($(USE_REACT),TRUE) - CEXE_sources += actual_network_data.cpp CEXE_headers += actual_network.H CEXE_headers += tfactors.H CEXE_headers += interp_tools.H CEXE_headers += partition_functions.H CEXE_headers += actual_rhs.H + CEXE_headers += rate_type.H CEXE_headers += reaclib_rates.H + CEXE_headers += approximate_rates.H + CEXE_headers += modified_rates.H CEXE_headers += table_rates.H CEXE_headers += temperature_table_rates.H CEXE_headers += derived_rates.H diff --git a/networks/he-burn/ase/actual_network.H b/networks/he-burn/ase/actual_network.H index 294c3966d..1e53daf84 100644 --- a/networks/he-burn/ase/actual_network.H +++ b/networks/he-burn/ase/actual_network.H @@ -1,18 +1,25 @@ #ifndef actual_network_H #define actual_network_H +#include #include #include #include #include +#include #include #include using namespace amrex::literals; -void actual_network_init(); + +inline +void actual_network_init() { + + +} constexpr std::string_view network_name = "pynucastro-cxx"; @@ -217,27 +224,27 @@ namespace Rates k_p_Al27_to_He4_Mg24_reaclib = 18, k_p_P31_to_He4_Si28_reaclib = 19, k_He4_He4_He4_to_C12_reaclib = 20, - k_C12_C12_to_n_Mg23_removed = 21, - k_O16_O16_to_n_S31_removed = 22, - k_C12_O16_to_n_Si27_removed = 23, - k_He4_S32_to_Ar36_removed = 24, - k_p_Cl35_to_Ar36_removed = 25, - k_p_Cl35_to_He4_S32_removed = 26, - k_He4_Ar36_to_Ca40_removed = 27, - k_p_K39_to_Ca40_removed = 28, - k_p_K39_to_He4_Ar36_removed = 29, - k_He4_Ca40_to_Ti44_removed = 30, - k_p_Sc43_to_Ti44_removed = 31, - k_p_Sc43_to_He4_Ca40_removed = 32, - k_He4_Ti44_to_Cr48_removed = 33, - k_He4_Ti44_to_p_V47_removed = 34, - k_p_V47_to_Cr48_removed = 35, - k_He4_Cr48_to_Fe52_removed = 36, - k_He4_Cr48_to_p_Mn51_removed = 37, - k_p_Mn51_to_Fe52_removed = 38, - k_He4_Fe52_to_Ni56_removed = 39, - k_He4_Fe52_to_p_Co55_removed = 40, - k_p_Co55_to_Ni56_removed = 41, + k_C12_C12_to_n_Mg23_reaclib = 21, + k_O16_O16_to_n_S31_reaclib = 22, + k_C12_O16_to_n_Si27_reaclib = 23, + k_He4_S32_to_Ar36_reaclib = 24, + k_p_Cl35_to_Ar36_reaclib = 25, + k_p_Cl35_to_He4_S32_reaclib = 26, + k_He4_Ar36_to_Ca40_reaclib = 27, + k_p_K39_to_Ca40_reaclib = 28, + k_p_K39_to_He4_Ar36_reaclib = 29, + k_He4_Ca40_to_Ti44_reaclib = 30, + k_p_Sc43_to_Ti44_reaclib = 31, + k_p_Sc43_to_He4_Ca40_reaclib = 32, + k_He4_Ti44_to_Cr48_reaclib = 33, + k_He4_Ti44_to_p_V47_reaclib = 34, + k_p_V47_to_Cr48_reaclib = 35, + k_He4_Cr48_to_Fe52_reaclib = 36, + k_He4_Cr48_to_p_Mn51_reaclib = 37, + k_p_Mn51_to_Fe52_reaclib = 38, + k_He4_Fe52_to_Ni56_reaclib = 39, + k_He4_Fe52_to_p_Co55_reaclib = 40, + k_p_Co55_to_Ni56_reaclib = 41, k_S32_He4_to_Ar36_approx = 42, k_Ar36_to_S32_He4_approx = 43, k_Ar36_He4_to_Ca40_approx = 44, @@ -276,25 +283,59 @@ namespace Rates k_Mg24_to_C12_C12_derived = 77, k_S32_to_O16_O16_derived = 78, k_Si28_to_C12_O16_derived = 79, - k_He4_S32_to_p_Cl35_removed = 80, - k_Ar36_to_He4_S32_removed = 81, - k_Ar36_to_p_Cl35_removed = 82, - k_He4_Ar36_to_p_K39_removed = 83, - k_Ca40_to_He4_Ar36_removed = 84, - k_Ca40_to_p_K39_removed = 85, - k_He4_Ca40_to_p_Sc43_removed = 86, - k_Ti44_to_He4_Ca40_removed = 87, - k_Ti44_to_p_Sc43_removed = 88, - k_Cr48_to_He4_Ti44_removed = 89, - k_Cr48_to_p_V47_removed = 90, - k_p_V47_to_He4_Ti44_removed = 91, - k_Fe52_to_He4_Cr48_removed = 92, - k_Fe52_to_p_Mn51_removed = 93, - k_p_Mn51_to_He4_Cr48_removed = 94, - k_Ni56_to_He4_Fe52_removed = 95, - k_Ni56_to_p_Co55_removed = 96, - k_p_Co55_to_He4_Fe52_removed = 97, - NumRates = k_p_Co55_to_He4_Fe52_removed + k_He4_S32_to_p_Cl35_derived = 80, + k_Ar36_to_He4_S32_derived = 81, + k_Ar36_to_p_Cl35_derived = 82, + k_He4_Ar36_to_p_K39_derived = 83, + k_Ca40_to_He4_Ar36_derived = 84, + k_Ca40_to_p_K39_derived = 85, + k_He4_Ca40_to_p_Sc43_derived = 86, + k_Ti44_to_He4_Ca40_derived = 87, + k_Ti44_to_p_Sc43_derived = 88, + k_Cr48_to_He4_Ti44_derived = 89, + k_Cr48_to_p_V47_derived = 90, + k_p_V47_to_He4_Ti44_derived = 91, + k_Fe52_to_He4_Cr48_derived = 92, + k_Fe52_to_p_Mn51_derived = 93, + k_p_Mn51_to_He4_Cr48_derived = 94, + k_Ni56_to_He4_Fe52_derived = 95, + k_Ni56_to_p_Co55_derived = 96, + k_p_Co55_to_He4_Fe52_derived = 97, + NumRates = k_p_Co55_to_He4_Fe52_derived + }; + + enum ScreenPairs : + std::uint8_t + { + k_p_C12 = 1, + k_He4_O16 = 2, + k_p_K39 = 3, + k_He4_Ca40 = 4, + k_He4_Ar36 = 5, + k_p_Sc43 = 6, + k_He4_C12 = 7, + k_He4_Ti44 = 8, + k_He4_Mg24 = 9, + k_C12_O16 = 10, + k_p_V47 = 11, + k_He4_Cr48 = 12, + k_C12_C12 = 13, + k_p_Co55 = 14, + k_He4_Ne20 = 15, + k_p_Al27 = 16, + k_p_Mn51 = 17, + k_p_Na23 = 18, + k_He4_Fe52 = 19, + k_He4_S32 = 20, + k_p_P31 = 21, + k_He4_He4 = 22, + k_p_O16 = 23, + k_He4_Si28 = 24, + k_p_Cl35 = 25, + k_O16_O16 = 26, + k_He4_Be8 = 27, + k_He4_N13 = 28, + NumScreenPairs = k_He4_N13 }; // rate names -- note: the rates are 1-based, not zero-based, so we pad @@ -323,27 +364,27 @@ namespace Rates "p_Al27_to_He4_Mg24_reaclib", // 18, "p_P31_to_He4_Si28_reaclib", // 19, "He4_He4_He4_to_C12_reaclib", // 20, - "C12_C12_to_n_Mg23_removed", // 21, - "O16_O16_to_n_S31_removed", // 22, - "C12_O16_to_n_Si27_removed", // 23, - "He4_S32_to_Ar36_removed", // 24, - "p_Cl35_to_Ar36_removed", // 25, - "p_Cl35_to_He4_S32_removed", // 26, - "He4_Ar36_to_Ca40_removed", // 27, - "p_K39_to_Ca40_removed", // 28, - "p_K39_to_He4_Ar36_removed", // 29, - "He4_Ca40_to_Ti44_removed", // 30, - "p_Sc43_to_Ti44_removed", // 31, - "p_Sc43_to_He4_Ca40_removed", // 32, - "He4_Ti44_to_Cr48_removed", // 33, - "He4_Ti44_to_p_V47_removed", // 34, - "p_V47_to_Cr48_removed", // 35, - "He4_Cr48_to_Fe52_removed", // 36, - "He4_Cr48_to_p_Mn51_removed", // 37, - "p_Mn51_to_Fe52_removed", // 38, - "He4_Fe52_to_Ni56_removed", // 39, - "He4_Fe52_to_p_Co55_removed", // 40, - "p_Co55_to_Ni56_removed", // 41, + "C12_C12_to_n_Mg23_reaclib", // 21, + "O16_O16_to_n_S31_reaclib", // 22, + "C12_O16_to_n_Si27_reaclib", // 23, + "He4_S32_to_Ar36_reaclib", // 24, + "p_Cl35_to_Ar36_reaclib", // 25, + "p_Cl35_to_He4_S32_reaclib", // 26, + "He4_Ar36_to_Ca40_reaclib", // 27, + "p_K39_to_Ca40_reaclib", // 28, + "p_K39_to_He4_Ar36_reaclib", // 29, + "He4_Ca40_to_Ti44_reaclib", // 30, + "p_Sc43_to_Ti44_reaclib", // 31, + "p_Sc43_to_He4_Ca40_reaclib", // 32, + "He4_Ti44_to_Cr48_reaclib", // 33, + "He4_Ti44_to_p_V47_reaclib", // 34, + "p_V47_to_Cr48_reaclib", // 35, + "He4_Cr48_to_Fe52_reaclib", // 36, + "He4_Cr48_to_p_Mn51_reaclib", // 37, + "p_Mn51_to_Fe52_reaclib", // 38, + "He4_Fe52_to_Ni56_reaclib", // 39, + "He4_Fe52_to_p_Co55_reaclib", // 40, + "p_Co55_to_Ni56_reaclib", // 41, "S32_He4_to_Ar36_approx", // 42, "Ar36_to_S32_He4_approx", // 43, "Ar36_He4_to_Ca40_approx", // 44, @@ -382,26 +423,32 @@ namespace Rates "Mg24_to_C12_C12_derived", // 77, "S32_to_O16_O16_derived", // 78, "Si28_to_C12_O16_derived", // 79, - "He4_S32_to_p_Cl35_removed", // 80, - "Ar36_to_He4_S32_removed", // 81, - "Ar36_to_p_Cl35_removed", // 82, - "He4_Ar36_to_p_K39_removed", // 83, - "Ca40_to_He4_Ar36_removed", // 84, - "Ca40_to_p_K39_removed", // 85, - "He4_Ca40_to_p_Sc43_removed", // 86, - "Ti44_to_He4_Ca40_removed", // 87, - "Ti44_to_p_Sc43_removed", // 88, - "Cr48_to_He4_Ti44_removed", // 89, - "Cr48_to_p_V47_removed", // 90, - "p_V47_to_He4_Ti44_removed", // 91, - "Fe52_to_He4_Cr48_removed", // 92, - "Fe52_to_p_Mn51_removed", // 93, - "p_Mn51_to_He4_Cr48_removed", // 94, - "Ni56_to_He4_Fe52_removed", // 95, - "Ni56_to_p_Co55_removed", // 96, - "p_Co55_to_He4_Fe52_removed" // 97, + "He4_S32_to_p_Cl35_derived", // 80, + "Ar36_to_He4_S32_derived", // 81, + "Ar36_to_p_Cl35_derived", // 82, + "He4_Ar36_to_p_K39_derived", // 83, + "Ca40_to_He4_Ar36_derived", // 84, + "Ca40_to_p_K39_derived", // 85, + "He4_Ca40_to_p_Sc43_derived", // 86, + "Ti44_to_He4_Ca40_derived", // 87, + "Ti44_to_p_Sc43_derived", // 88, + "Cr48_to_He4_Ti44_derived", // 89, + "Cr48_to_p_V47_derived", // 90, + "p_V47_to_He4_Ti44_derived", // 91, + "Fe52_to_He4_Cr48_derived", // 92, + "Fe52_to_p_Mn51_derived", // 93, + "p_Mn51_to_He4_Cr48_derived", // 94, + "Ni56_to_He4_Fe52_derived", // 95, + "Ni56_to_p_Co55_derived", // 96, + "p_Co55_to_He4_Fe52_derived" // 97, }; + template + AMREX_GPU_DEVICE AMREX_INLINE + constexpr amrex::Real get_p_random() { + return 0.0_rt; + } + } #ifdef NSE_NET diff --git a/networks/he-burn/ase/actual_network_data.cpp b/networks/he-burn/ase/actual_network_data.cpp deleted file mode 100644 index 143fe945b..000000000 --- a/networks/he-burn/ase/actual_network_data.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include - -void actual_network_init() -{ - -} diff --git a/networks/he-burn/ase/actual_rhs.H b/networks/he-burn/ase/actual_rhs.H index f3ace33af..26ed1ae93 100644 --- a/networks/he-burn/ase/actual_rhs.H +++ b/networks/he-burn/ase/actual_rhs.H @@ -1,5 +1,5 @@ -#ifndef actual_rhs_H -#define actual_rhs_H +#ifndef ACTUAL_RHS_H +#define ACTUAL_RHS_H #include #include @@ -15,7 +15,10 @@ #ifdef NEUTRINOS #include #endif +#include #include +#include +#include #include #include #include @@ -28,7 +31,6 @@ using namespace Rates; using namespace rate_tables; - template AMREX_GPU_HOST_DEVICE AMREX_INLINE void ener_gener_rate(T const& dydt, amrex::Real& enuc) @@ -49,17 +51,14 @@ void ener_gener_rate(T const& dydt, amrex::Real& enuc) } +#ifdef SCREENING template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void evaluate_rates(const burn_t& state, - const amrex::Array1D& Y, - T& rate_eval) { +void evaluate_screening(const burn_t& state, + const amrex::Array1D& Y, + T& rate_eval) { - // here Y is consistent with state.xn - - [[maybe_unused]] amrex::Real rhoy = state.rho * state.y_e; - - // Calculate Reaclib rates + // Evaluate screening terms using number_t = std::conditional_t; number_t temp = state.T; @@ -68,652 +67,358 @@ void evaluate_rates(const burn_t& state, autodiff::seed(temp); } -#ifdef SCREENING plasma_state_t pstate{}; fill_plasma_state(pstate, temp, state.rho, Y); -#endif - - const tf_t tfactors = evaluate_tfactors(state.T); - - fill_reaclib_rates(tfactors, rate_eval); - - temp_tabular::fill_rates(tfactors, rate_eval); - - // Calculate Derived Rates. This should go last but before approx rates. - fill_derived_rates(tfactors, rate_eval); - - if (disable_p_C12_to_N13_reaclib) { - rate_eval.screened_rates(k_p_C12_to_N13_reaclib) = 0.0; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_C12_to_N13_reaclib) = 0.0; - } - rate_eval.screened_rates(k_N13_to_p_C12_derived) = 0.0; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_N13_to_p_C12_derived) = 0.0; - } - } - - if (disable_He4_N13_to_p_O16_reaclib) { - rate_eval.screened_rates(k_He4_N13_to_p_O16_reaclib) = 0.0; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_N13_to_p_O16_reaclib) = 0.0; - } - rate_eval.screened_rates(k_p_O16_to_He4_N13_derived) = 0.0; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_O16_to_He4_N13_derived) = 0.0; - } - } - - -#ifdef SCREENING - // Evaluate screening factors - - amrex::Real ratraw, dratraw_dT; - amrex::Real scor, dscor_dt; - [[maybe_unused]] amrex::Real scor2, dscor2_dt; + amrex::Real log_scor, dlog_scor_dT; { constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 6.0_rt, 12.0_rt); static_assert(scn_fac.z1 == 1.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } - - ratraw = rate_eval.screened_rates(k_p_C12_to_N13_reaclib); - rate_eval.screened_rates(k_p_C12_to_N13_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_C12_to_N13_reaclib); - rate_eval.dscreened_rates_dT(k_p_C12_to_N13_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_p_C12) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_p_C12) = dlog_scor_dT; + } } - { - constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 6.0_rt, 12.0_rt); + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 8.0_rt, 16.0_rt); static_assert(scn_fac.z1 == 2.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_O16) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_He4_O16) = dlog_scor_dT; + } } - ratraw = rate_eval.screened_rates(k_He4_C12_to_O16_reaclib); - rate_eval.screened_rates(k_He4_C12_to_O16_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_C12_to_O16_reaclib); - rate_eval.dscreened_rates_dT(k_He4_C12_to_O16_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 19.0_rt, 39.0_rt); + static_assert(scn_fac.z1 == 1.0_rt); + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_p_K39) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_p_K39) = dlog_scor_dT; + } } - { - constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 8.0_rt, 16.0_rt); + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 20.0_rt, 40.0_rt); static_assert(scn_fac.z1 == 2.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } - - ratraw = rate_eval.screened_rates(k_He4_O16_to_Ne20_reaclib); - rate_eval.screened_rates(k_He4_O16_to_Ne20_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_O16_to_Ne20_reaclib); - rate_eval.dscreened_rates_dT(k_He4_O16_to_Ne20_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_Ca40) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_He4_Ca40) = dlog_scor_dT; + } } - { - constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 10.0_rt, 20.0_rt); + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 18.0_rt, 36.0_rt); static_assert(scn_fac.z1 == 2.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } - - ratraw = rate_eval.screened_rates(k_He4_Ne20_to_Mg24_reaclib); - rate_eval.screened_rates(k_He4_Ne20_to_Mg24_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Ne20_to_Mg24_reaclib); - rate_eval.dscreened_rates_dT(k_He4_Ne20_to_Mg24_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_He4_Ne20_to_p_Na23_derived); - rate_eval.screened_rates(k_He4_Ne20_to_p_Na23_derived) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Ne20_to_p_Na23_derived); - rate_eval.dscreened_rates_dT(k_He4_Ne20_to_p_Na23_derived) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_He4_Ne20_to_C12_C12_derived); - rate_eval.screened_rates(k_He4_Ne20_to_C12_C12_derived) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Ne20_to_C12_C12_derived); - rate_eval.dscreened_rates_dT(k_He4_Ne20_to_C12_C12_derived) = ratraw * dscor_dt + dratraw_dT * scor; + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_Ar36) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_He4_Ar36) = dlog_scor_dT; + } } - { - constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 11.0_rt, 23.0_rt); + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 21.0_rt, 43.0_rt); static_assert(scn_fac.z1 == 1.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } - - ratraw = rate_eval.screened_rates(k_p_Na23_to_Mg24_reaclib); - rate_eval.screened_rates(k_p_Na23_to_Mg24_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Na23_to_Mg24_reaclib); - rate_eval.dscreened_rates_dT(k_p_Na23_to_Mg24_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_p_Na23_to_He4_Ne20_reaclib); - rate_eval.screened_rates(k_p_Na23_to_He4_Ne20_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Na23_to_He4_Ne20_reaclib); - rate_eval.dscreened_rates_dT(k_p_Na23_to_He4_Ne20_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_p_Na23_to_C12_C12_derived); - rate_eval.screened_rates(k_p_Na23_to_C12_C12_derived) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Na23_to_C12_C12_derived); - rate_eval.dscreened_rates_dT(k_p_Na23_to_C12_C12_derived) = ratraw * dscor_dt + dratraw_dT * scor; + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_p_Sc43) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_p_Sc43) = dlog_scor_dT; + } } - { - constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 12.0_rt, 24.0_rt); + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 6.0_rt, 12.0_rt); static_assert(scn_fac.z1 == 2.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } - - ratraw = rate_eval.screened_rates(k_He4_Mg24_to_Si28_reaclib); - rate_eval.screened_rates(k_He4_Mg24_to_Si28_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Mg24_to_Si28_reaclib); - rate_eval.dscreened_rates_dT(k_He4_Mg24_to_Si28_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_He4_Mg24_to_p_Al27_derived); - rate_eval.screened_rates(k_He4_Mg24_to_p_Al27_derived) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Mg24_to_p_Al27_derived); - rate_eval.dscreened_rates_dT(k_He4_Mg24_to_p_Al27_derived) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_He4_Mg24_to_C12_O16_derived); - rate_eval.screened_rates(k_He4_Mg24_to_C12_O16_derived) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Mg24_to_C12_O16_derived); - rate_eval.dscreened_rates_dT(k_He4_Mg24_to_C12_O16_derived) = ratraw * dscor_dt + dratraw_dT * scor; - } - - - { - constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 13.0_rt, 27.0_rt); - static_assert(scn_fac.z1 == 1.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } - - ratraw = rate_eval.screened_rates(k_p_Al27_to_Si28_reaclib); - rate_eval.screened_rates(k_p_Al27_to_Si28_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Al27_to_Si28_reaclib); - rate_eval.dscreened_rates_dT(k_p_Al27_to_Si28_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_p_Al27_to_He4_Mg24_reaclib); - rate_eval.screened_rates(k_p_Al27_to_He4_Mg24_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Al27_to_He4_Mg24_reaclib); - rate_eval.dscreened_rates_dT(k_p_Al27_to_He4_Mg24_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_p_Al27_to_C12_O16_derived); - rate_eval.screened_rates(k_p_Al27_to_C12_O16_derived) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Al27_to_C12_O16_derived); - rate_eval.dscreened_rates_dT(k_p_Al27_to_C12_O16_derived) = ratraw * dscor_dt + dratraw_dT * scor; + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_C12) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_He4_C12) = dlog_scor_dT; + } } - { - constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 14.0_rt, 28.0_rt); + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 22.0_rt, 44.0_rt); static_assert(scn_fac.z1 == 2.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } - - ratraw = rate_eval.screened_rates(k_He4_Si28_to_S32_reaclib); - rate_eval.screened_rates(k_He4_Si28_to_S32_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Si28_to_S32_reaclib); - rate_eval.dscreened_rates_dT(k_He4_Si28_to_S32_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_He4_Si28_to_p_P31_derived); - rate_eval.screened_rates(k_He4_Si28_to_p_P31_derived) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Si28_to_p_P31_derived); - rate_eval.dscreened_rates_dT(k_He4_Si28_to_p_P31_derived) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_He4_Si28_to_O16_O16_derived); - rate_eval.screened_rates(k_He4_Si28_to_O16_O16_derived) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Si28_to_O16_O16_derived); - rate_eval.dscreened_rates_dT(k_He4_Si28_to_O16_O16_derived) = ratraw * dscor_dt + dratraw_dT * scor; + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_Ti44) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_He4_Ti44) = dlog_scor_dT; + } } - { - constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 15.0_rt, 31.0_rt); - static_assert(scn_fac.z1 == 1.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } - - ratraw = rate_eval.screened_rates(k_p_P31_to_S32_reaclib); - rate_eval.screened_rates(k_p_P31_to_S32_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_P31_to_S32_reaclib); - rate_eval.dscreened_rates_dT(k_p_P31_to_S32_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_p_P31_to_He4_Si28_reaclib); - rate_eval.screened_rates(k_p_P31_to_He4_Si28_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_P31_to_He4_Si28_reaclib); - rate_eval.dscreened_rates_dT(k_p_P31_to_He4_Si28_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_p_P31_to_O16_O16_derived); - rate_eval.screened_rates(k_p_P31_to_O16_O16_derived) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_P31_to_O16_O16_derived); - rate_eval.dscreened_rates_dT(k_p_P31_to_O16_O16_derived) = ratraw * dscor_dt + dratraw_dT * scor; + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 12.0_rt, 24.0_rt); + static_assert(scn_fac.z1 == 2.0_rt); + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_Mg24) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_He4_Mg24) = dlog_scor_dT; + } } - { - constexpr auto scn_fac = scrn::calculate_screen_factor(6.0_rt, 12.0_rt, 6.0_rt, 12.0_rt); + constexpr auto scn_fac = scrn::calculate_screen_factor(6.0_rt, 12.0_rt, 8.0_rt, 16.0_rt); static_assert(scn_fac.z1 == 6.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } - - ratraw = rate_eval.screened_rates(k_C12_C12_to_p_Na23_reaclib); - rate_eval.screened_rates(k_C12_C12_to_p_Na23_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_C12_C12_to_p_Na23_reaclib); - rate_eval.dscreened_rates_dT(k_C12_C12_to_p_Na23_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_C12_C12_to_He4_Ne20_reaclib); - rate_eval.screened_rates(k_C12_C12_to_He4_Ne20_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_C12_C12_to_He4_Ne20_reaclib); - rate_eval.dscreened_rates_dT(k_C12_C12_to_He4_Ne20_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_C12_O16) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_C12_O16) = dlog_scor_dT; + } } - ratraw = rate_eval.screened_rates(k_C12_C12_to_Mg24_modified); - rate_eval.screened_rates(k_C12_C12_to_Mg24_modified) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_C12_C12_to_Mg24_modified); - rate_eval.dscreened_rates_dT(k_C12_C12_to_Mg24_modified) = ratraw * dscor_dt + dratraw_dT * scor; + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 23.0_rt, 47.0_rt); + static_assert(scn_fac.z1 == 1.0_rt); + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_p_V47) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_p_V47) = dlog_scor_dT; + } } - { - constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 7.0_rt, 13.0_rt); + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 24.0_rt, 48.0_rt); static_assert(scn_fac.z1 == 2.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } - - ratraw = rate_eval.screened_rates(k_He4_N13_to_p_O16_reaclib); - rate_eval.screened_rates(k_He4_N13_to_p_O16_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_N13_to_p_O16_reaclib); - rate_eval.dscreened_rates_dT(k_He4_N13_to_p_O16_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_Cr48) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_He4_Cr48) = dlog_scor_dT; + } } - { - constexpr auto scn_fac = scrn::calculate_screen_factor(6.0_rt, 12.0_rt, 8.0_rt, 16.0_rt); + constexpr auto scn_fac = scrn::calculate_screen_factor(6.0_rt, 12.0_rt, 6.0_rt, 12.0_rt); static_assert(scn_fac.z1 == 6.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } - - ratraw = rate_eval.screened_rates(k_C12_O16_to_p_Al27_reaclib); - rate_eval.screened_rates(k_C12_O16_to_p_Al27_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_C12_O16_to_p_Al27_reaclib); - rate_eval.dscreened_rates_dT(k_C12_O16_to_p_Al27_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_C12_O16_to_He4_Mg24_reaclib); - rate_eval.screened_rates(k_C12_O16_to_He4_Mg24_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_C12_O16_to_He4_Mg24_reaclib); - rate_eval.dscreened_rates_dT(k_C12_O16_to_He4_Mg24_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_C12_O16_to_Si28_modified); - rate_eval.screened_rates(k_C12_O16_to_Si28_modified) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_C12_O16_to_Si28_modified); - rate_eval.dscreened_rates_dT(k_C12_O16_to_Si28_modified) = ratraw * dscor_dt + dratraw_dT * scor; + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_C12_C12) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_C12_C12) = dlog_scor_dT; + } } - { - constexpr auto scn_fac = scrn::calculate_screen_factor(8.0_rt, 16.0_rt, 8.0_rt, 16.0_rt); - static_assert(scn_fac.z1 == 8.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } - - ratraw = rate_eval.screened_rates(k_O16_O16_to_p_P31_reaclib); - rate_eval.screened_rates(k_O16_O16_to_p_P31_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_O16_O16_to_p_P31_reaclib); - rate_eval.dscreened_rates_dT(k_O16_O16_to_p_P31_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_O16_O16_to_He4_Si28_reaclib); - rate_eval.screened_rates(k_O16_O16_to_He4_Si28_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_O16_O16_to_He4_Si28_reaclib); - rate_eval.dscreened_rates_dT(k_O16_O16_to_He4_Si28_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_O16_O16_to_S32_modified); - rate_eval.screened_rates(k_O16_O16_to_S32_modified) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_O16_O16_to_S32_modified); - rate_eval.dscreened_rates_dT(k_O16_O16_to_S32_modified) = ratraw * dscor_dt + dratraw_dT * scor; + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 27.0_rt, 55.0_rt); + static_assert(scn_fac.z1 == 1.0_rt); + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_p_Co55) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_p_Co55) = dlog_scor_dT; + } } - { - constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 2.0_rt, 4.0_rt); + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 10.0_rt, 20.0_rt); static_assert(scn_fac.z1 == 2.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_Ne20) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_He4_Ne20) = dlog_scor_dT; + } } - { - constexpr auto scn_fac2 = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 4.0_rt, 8.0_rt); - static_assert(scn_fac2.z1 == 2.0_rt); - actual_screen(pstate, scn_fac2, scor2, dscor2_dt); + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 13.0_rt, 27.0_rt); + static_assert(scn_fac.z1 == 1.0_rt); + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_p_Al27) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_p_Al27) = dlog_scor_dT; + } } - ratraw = rate_eval.screened_rates(k_He4_He4_He4_to_C12_reaclib); - rate_eval.screened_rates(k_He4_He4_He4_to_C12_reaclib) *= scor * scor2; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_He4_He4_to_C12_reaclib); - rate_eval.dscreened_rates_dT(k_He4_He4_He4_to_C12_reaclib) = ratraw * (scor * dscor2_dt + dscor_dt * scor2) + dratraw_dT * scor * scor2; + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 25.0_rt, 51.0_rt); + static_assert(scn_fac.z1 == 1.0_rt); + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_p_Mn51) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_p_Mn51) = dlog_scor_dT; + } } - { - constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 8.0_rt, 16.0_rt); + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 11.0_rt, 23.0_rt); static_assert(scn_fac.z1 == 1.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_p_Na23) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_p_Na23) = dlog_scor_dT; + } } - ratraw = rate_eval.screened_rates(k_p_O16_to_He4_N13_derived); - rate_eval.screened_rates(k_p_O16_to_He4_N13_derived) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_O16_to_He4_N13_derived); - rate_eval.dscreened_rates_dT(k_p_O16_to_He4_N13_derived) = ratraw * dscor_dt + dratraw_dT * scor; + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 26.0_rt, 52.0_rt); + static_assert(scn_fac.z1 == 2.0_rt); + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_Fe52) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_He4_Fe52) = dlog_scor_dT; + } } - { constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 16.0_rt, 32.0_rt); static_assert(scn_fac.z1 == 2.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } - - ratraw = rate_eval.screened_rates(k_He4_S32_to_Ar36_removed); - rate_eval.screened_rates(k_He4_S32_to_Ar36_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_S32_to_Ar36_removed); - rate_eval.dscreened_rates_dT(k_He4_S32_to_Ar36_removed) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_He4_S32_to_p_Cl35_removed); - rate_eval.screened_rates(k_He4_S32_to_p_Cl35_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_S32_to_p_Cl35_removed); - rate_eval.dscreened_rates_dT(k_He4_S32_to_p_Cl35_removed) = ratraw * dscor_dt + dratraw_dT * scor; + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_S32) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_He4_S32) = dlog_scor_dT; + } } - { - constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 17.0_rt, 35.0_rt); + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 15.0_rt, 31.0_rt); static_assert(scn_fac.z1 == 1.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } - - ratraw = rate_eval.screened_rates(k_p_Cl35_to_Ar36_removed); - rate_eval.screened_rates(k_p_Cl35_to_Ar36_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Cl35_to_Ar36_removed); - rate_eval.dscreened_rates_dT(k_p_Cl35_to_Ar36_removed) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_p_Cl35_to_He4_S32_removed); - rate_eval.screened_rates(k_p_Cl35_to_He4_S32_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Cl35_to_He4_S32_removed); - rate_eval.dscreened_rates_dT(k_p_Cl35_to_He4_S32_removed) = ratraw * dscor_dt + dratraw_dT * scor; + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_p_P31) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_p_P31) = dlog_scor_dT; + } } - { - constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 18.0_rt, 36.0_rt); + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 2.0_rt, 4.0_rt); static_assert(scn_fac.z1 == 2.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } - - ratraw = rate_eval.screened_rates(k_He4_Ar36_to_Ca40_removed); - rate_eval.screened_rates(k_He4_Ar36_to_Ca40_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Ar36_to_Ca40_removed); - rate_eval.dscreened_rates_dT(k_He4_Ar36_to_Ca40_removed) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_He4_Ar36_to_p_K39_removed); - rate_eval.screened_rates(k_He4_Ar36_to_p_K39_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Ar36_to_p_K39_removed); - rate_eval.dscreened_rates_dT(k_He4_Ar36_to_p_K39_removed) = ratraw * dscor_dt + dratraw_dT * scor; + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_He4) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_He4_He4) = dlog_scor_dT; + } } - { - constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 19.0_rt, 39.0_rt); + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 8.0_rt, 16.0_rt); static_assert(scn_fac.z1 == 1.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } - - ratraw = rate_eval.screened_rates(k_p_K39_to_Ca40_removed); - rate_eval.screened_rates(k_p_K39_to_Ca40_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_K39_to_Ca40_removed); - rate_eval.dscreened_rates_dT(k_p_K39_to_Ca40_removed) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_p_K39_to_He4_Ar36_removed); - rate_eval.screened_rates(k_p_K39_to_He4_Ar36_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_K39_to_He4_Ar36_removed); - rate_eval.dscreened_rates_dT(k_p_K39_to_He4_Ar36_removed) = ratraw * dscor_dt + dratraw_dT * scor; + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_p_O16) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_p_O16) = dlog_scor_dT; + } } - { - constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 20.0_rt, 40.0_rt); + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 14.0_rt, 28.0_rt); static_assert(scn_fac.z1 == 2.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } - - ratraw = rate_eval.screened_rates(k_He4_Ca40_to_Ti44_removed); - rate_eval.screened_rates(k_He4_Ca40_to_Ti44_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Ca40_to_Ti44_removed); - rate_eval.dscreened_rates_dT(k_He4_Ca40_to_Ti44_removed) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_He4_Ca40_to_p_Sc43_removed); - rate_eval.screened_rates(k_He4_Ca40_to_p_Sc43_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Ca40_to_p_Sc43_removed); - rate_eval.dscreened_rates_dT(k_He4_Ca40_to_p_Sc43_removed) = ratraw * dscor_dt + dratraw_dT * scor; + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_Si28) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_He4_Si28) = dlog_scor_dT; + } } - { - constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 21.0_rt, 43.0_rt); + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 17.0_rt, 35.0_rt); static_assert(scn_fac.z1 == 1.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } - - ratraw = rate_eval.screened_rates(k_p_Sc43_to_Ti44_removed); - rate_eval.screened_rates(k_p_Sc43_to_Ti44_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Sc43_to_Ti44_removed); - rate_eval.dscreened_rates_dT(k_p_Sc43_to_Ti44_removed) = ratraw * dscor_dt + dratraw_dT * scor; + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_p_Cl35) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_p_Cl35) = dlog_scor_dT; + } } - ratraw = rate_eval.screened_rates(k_p_Sc43_to_He4_Ca40_removed); - rate_eval.screened_rates(k_p_Sc43_to_He4_Ca40_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Sc43_to_He4_Ca40_removed); - rate_eval.dscreened_rates_dT(k_p_Sc43_to_He4_Ca40_removed) = ratraw * dscor_dt + dratraw_dT * scor; + { + constexpr auto scn_fac = scrn::calculate_screen_factor(8.0_rt, 16.0_rt, 8.0_rt, 16.0_rt); + static_assert(scn_fac.z1 == 8.0_rt); + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_O16_O16) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_O16_O16) = dlog_scor_dT; + } } - { - constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 22.0_rt, 44.0_rt); + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 4.0_rt, 8.0_rt); static_assert(scn_fac.z1 == 2.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } - - ratraw = rate_eval.screened_rates(k_He4_Ti44_to_Cr48_removed); - rate_eval.screened_rates(k_He4_Ti44_to_Cr48_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Ti44_to_Cr48_removed); - rate_eval.dscreened_rates_dT(k_He4_Ti44_to_Cr48_removed) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_He4_Ti44_to_p_V47_removed); - rate_eval.screened_rates(k_He4_Ti44_to_p_V47_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Ti44_to_p_V47_removed); - rate_eval.dscreened_rates_dT(k_He4_Ti44_to_p_V47_removed) = ratraw * dscor_dt + dratraw_dT * scor; + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_Be8) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_He4_Be8) = dlog_scor_dT; + } } - { - constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 23.0_rt, 47.0_rt); - static_assert(scn_fac.z1 == 1.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } - - ratraw = rate_eval.screened_rates(k_p_V47_to_Cr48_removed); - rate_eval.screened_rates(k_p_V47_to_Cr48_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_V47_to_Cr48_removed); - rate_eval.dscreened_rates_dT(k_p_V47_to_Cr48_removed) = ratraw * dscor_dt + dratraw_dT * scor; + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 7.0_rt, 13.0_rt); + static_assert(scn_fac.z1 == 2.0_rt); + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_N13) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_He4_N13) = dlog_scor_dT; + } } - ratraw = rate_eval.screened_rates(k_p_V47_to_He4_Ti44_removed); - rate_eval.screened_rates(k_p_V47_to_He4_Ti44_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_V47_to_He4_Ti44_removed); - rate_eval.dscreened_rates_dT(k_p_V47_to_He4_Ti44_removed) = ratraw * dscor_dt + dratraw_dT * scor; - } +} +#endif - { - constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 24.0_rt, 48.0_rt); - static_assert(scn_fac.z1 == 2.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } - - ratraw = rate_eval.screened_rates(k_He4_Cr48_to_Fe52_removed); - rate_eval.screened_rates(k_He4_Cr48_to_Fe52_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Cr48_to_Fe52_removed); - rate_eval.dscreened_rates_dT(k_He4_Cr48_to_Fe52_removed) = ratraw * dscor_dt + dratraw_dT * scor; - } +template +AMREX_GPU_HOST_DEVICE AMREX_INLINE +void evaluate_rates(const burn_t& state, + const amrex::Array1D& Y, + T& rate_eval) { - ratraw = rate_eval.screened_rates(k_He4_Cr48_to_p_Mn51_removed); - rate_eval.screened_rates(k_He4_Cr48_to_p_Mn51_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Cr48_to_p_Mn51_removed); - rate_eval.dscreened_rates_dT(k_He4_Cr48_to_p_Mn51_removed) = ratraw * dscor_dt + dratraw_dT * scor; - } + // here Y is consistent with state.xn + [[maybe_unused]] amrex::Real rhoy = state.rho * state.y_e; - { - constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 25.0_rt, 51.0_rt); - static_assert(scn_fac.z1 == 1.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } + const tf_t tfactors = evaluate_tfactors(state.T); - ratraw = rate_eval.screened_rates(k_p_Mn51_to_Fe52_removed); - rate_eval.screened_rates(k_p_Mn51_to_Fe52_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Mn51_to_Fe52_removed); - rate_eval.dscreened_rates_dT(k_p_Mn51_to_Fe52_removed) = ratraw * dscor_dt + dratraw_dT * scor; - } + // Precompute screening terms - ratraw = rate_eval.screened_rates(k_p_Mn51_to_He4_Cr48_removed); - rate_eval.screened_rates(k_p_Mn51_to_He4_Cr48_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Mn51_to_He4_Cr48_removed); - rate_eval.dscreened_rates_dT(k_p_Mn51_to_He4_Cr48_removed) = ratraw * dscor_dt + dratraw_dT * scor; - } +#ifdef SCREENING + evaluate_screening(state, Y, rate_eval); +#endif + // Fill in different rates - { - constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 26.0_rt, 52.0_rt); - static_assert(scn_fac.z1 == 2.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } + fill_reaclib_rates(tfactors, rate_eval); - ratraw = rate_eval.screened_rates(k_He4_Fe52_to_Ni56_removed); - rate_eval.screened_rates(k_He4_Fe52_to_Ni56_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Fe52_to_Ni56_removed); - rate_eval.dscreened_rates_dT(k_He4_Fe52_to_Ni56_removed) = ratraw * dscor_dt + dratraw_dT * scor; - } + temp_tabular::fill_rates(tfactors, rate_eval); - ratraw = rate_eval.screened_rates(k_He4_Fe52_to_p_Co55_removed); - rate_eval.screened_rates(k_He4_Fe52_to_p_Co55_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Fe52_to_p_Co55_removed); - rate_eval.dscreened_rates_dT(k_He4_Fe52_to_p_Co55_removed) = ratraw * dscor_dt + dratraw_dT * scor; - } + // fill modified rates next -- these can have ReacLib or + // TemperatureTabular/StarLib rates as the original rate + modified_rates::fill_rates(tfactors, rate_eval); + // Calculate Derived Rates next. This should go last but before + // approx rates, since those may have ReacLibRate, + // TemperatureTabularRate / StarLibRate, or DerivedRate as the + // underlying rate. - { - constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 27.0_rt, 55.0_rt); - static_assert(scn_fac.z1 == 1.0_rt); - actual_screen(pstate, scn_fac, scor, dscor_dt); - } + fill_derived_rates(tfactors, rate_eval); - ratraw = rate_eval.screened_rates(k_p_Co55_to_Ni56_removed); - rate_eval.screened_rates(k_p_Co55_to_Ni56_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Co55_to_Ni56_removed); - rate_eval.dscreened_rates_dT(k_p_Co55_to_Ni56_removed) = ratraw * dscor_dt + dratraw_dT * scor; + if (disable_p_C12_to_N13_reaclib) { + rate_eval.screened_rates(k_p_C12_to_N13_reaclib) = 0.0; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_C12_to_N13_reaclib) = 0.0; + } + rate_eval.screened_rates(k_N13_to_p_C12_derived) = 0.0; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_N13_to_p_C12_derived) = 0.0; + } } - ratraw = rate_eval.screened_rates(k_p_Co55_to_He4_Fe52_removed); - rate_eval.screened_rates(k_p_Co55_to_He4_Fe52_removed) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Co55_to_He4_Fe52_removed); - rate_eval.dscreened_rates_dT(k_p_Co55_to_He4_Fe52_removed) = ratraw * dscor_dt + dratraw_dT * scor; + if (disable_He4_N13_to_p_O16_reaclib) { + rate_eval.screened_rates(k_He4_N13_to_p_O16_reaclib) = 0.0; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_N13_to_p_O16_reaclib) = 0.0; + } + rate_eval.screened_rates(k_p_O16_to_He4_N13_derived) = 0.0; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_O16_to_He4_N13_derived) = 0.0; + } } -#endif // Fill approximate rates fill_approx_rates(tfactors, state.rho, Y, rate_eval); - // Calculate tabular rates + // Calculate tabular weak rates [[maybe_unused]] amrex::Real rate, drate_dt, edot_nu, edot_gamma; @@ -742,15 +447,17 @@ void evaluate_rates(const burn_t& state, #ifdef NSE_NET AMREX_GPU_HOST_DEVICE AMREX_INLINE void get_ydot_weak(const burn_t& state, - amrex::Array1D& ydot_nuc, - amrex::Real& enuc_weak, - [[maybe_unused]] const amrex::Array1D& Y) { + amrex::Array1D& ydot_nuc, + amrex::Real& enuc_weak, + [[maybe_unused]] const amrex::Array1D& Y) { /// /// Calculate Ydots contribute only from weak reactions. /// This is used to calculate dyedt and energy generation from /// weak reactions for self-consistent NSE /// + using namespace modified_rates; + using namespace temp_tabular; // initialize ydot_nuc to 0 @@ -760,12 +467,13 @@ void get_ydot_weak(const burn_t& state, rate_t rate_eval; - [[maybe_unused]] amrex::Real rate, drate_dt, edot_nu, edot_gamma; + constexpr int do_T_derivatives = 0; + [[maybe_unused]] amrex::Real rate, drate_dT, edot_nu, edot_gamma; [[maybe_unused]] amrex::Real rhoy = state.rho * state.y_e; rate_eval.enuc_weak = 0.0_rt; - // Calculate tabular rates and get ydot_weak + // Compute all weak rates and get ydot_weak ydot_nuc(H1) = 0.0_rt; diff --git a/networks/he-burn/ase/approximate_rates.H b/networks/he-burn/ase/approximate_rates.H new file mode 100644 index 000000000..cb7a05d24 --- /dev/null +++ b/networks/he-burn/ase/approximate_rates.H @@ -0,0 +1,355 @@ +#ifndef APPROXIMATE_RATES_H +#define APPROXIMATE_RATES_H + +#include +#include + +#include +#include +#include + +using namespace Rates; +using namespace Species; + +template +AMREX_GPU_DEVICE AMREX_INLINE +void rate_S32_He4_to_Ar36_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { + + amrex::Real r_pg = rate_eval.screened_rates(k_p_Cl35_to_Ar36_reaclib); + amrex::Real r_pa = rate_eval.screened_rates(k_p_Cl35_to_He4_S32_reaclib); + amrex::Real r_pY = 0.0_rt; + amrex::Real dd = 1.0_rt / (r_pg + r_pa + r_pY); + amrex::Real r_ag = rate_eval.screened_rates(k_He4_S32_to_Ar36_reaclib); + amrex::Real r_ap = rate_eval.screened_rates(k_He4_S32_to_p_Cl35_derived); + rate = r_ag + r_ap * r_pg * dd; + if constexpr (std::is_same_v) { + amrex::Real drdT_ag = rate_eval.dscreened_rates_dT(k_He4_S32_to_Ar36_reaclib); + amrex::Real drdT_ap = rate_eval.dscreened_rates_dT(k_He4_S32_to_p_Cl35_derived); + amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_Cl35_to_Ar36_reaclib); + amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_Cl35_to_He4_S32_reaclib); + amrex::Real drdT_pY = 0.0_rt; + drate_dT = drdT_ag + drdT_ap * r_pg * dd + r_ap * drdT_pg * dd - r_ap * r_pg * dd * dd * (drdT_pg + drdT_pa + drdT_pY); + } +} + +template +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Ar36_to_S32_He4_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { + + amrex::Real r_pg = rate_eval.screened_rates(k_p_Cl35_to_Ar36_reaclib); + amrex::Real r_pa = rate_eval.screened_rates(k_p_Cl35_to_He4_S32_reaclib); + amrex::Real r_pY = 0.0_rt; + amrex::Real dd = 1.0_rt / (r_pg + r_pa + r_pY); + amrex::Real r_ga = rate_eval.screened_rates(k_Ar36_to_He4_S32_derived); + amrex::Real r_gp = rate_eval.screened_rates(k_Ar36_to_p_Cl35_derived); + rate = r_ga + r_gp * r_pa * dd; + if constexpr (std::is_same_v) { + amrex::Real drdT_ga = rate_eval.dscreened_rates_dT(k_Ar36_to_He4_S32_derived); + amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_Cl35_to_He4_S32_reaclib); + amrex::Real drdT_gp = rate_eval.dscreened_rates_dT(k_Ar36_to_p_Cl35_derived); + amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_Cl35_to_Ar36_reaclib); + amrex::Real drdT_pY = 0.0_rt; + drate_dT = drdT_ga + drdT_gp * r_pa * dd + r_gp * drdT_pa * dd - r_gp * r_pa * dd * dd * (drdT_pg + drdT_pa + drdT_pY); + } +} + +template +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Ar36_He4_to_Ca40_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { + + amrex::Real r_pg = rate_eval.screened_rates(k_p_K39_to_Ca40_reaclib); + amrex::Real r_pa = rate_eval.screened_rates(k_p_K39_to_He4_Ar36_reaclib); + amrex::Real r_pY = 0.0_rt; + amrex::Real dd = 1.0_rt / (r_pg + r_pa + r_pY); + amrex::Real r_ag = rate_eval.screened_rates(k_He4_Ar36_to_Ca40_reaclib); + amrex::Real r_ap = rate_eval.screened_rates(k_He4_Ar36_to_p_K39_derived); + rate = r_ag + r_ap * r_pg * dd; + if constexpr (std::is_same_v) { + amrex::Real drdT_ag = rate_eval.dscreened_rates_dT(k_He4_Ar36_to_Ca40_reaclib); + amrex::Real drdT_ap = rate_eval.dscreened_rates_dT(k_He4_Ar36_to_p_K39_derived); + amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_K39_to_Ca40_reaclib); + amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_K39_to_He4_Ar36_reaclib); + amrex::Real drdT_pY = 0.0_rt; + drate_dT = drdT_ag + drdT_ap * r_pg * dd + r_ap * drdT_pg * dd - r_ap * r_pg * dd * dd * (drdT_pg + drdT_pa + drdT_pY); + } +} + +template +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Ca40_to_Ar36_He4_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { + + amrex::Real r_pg = rate_eval.screened_rates(k_p_K39_to_Ca40_reaclib); + amrex::Real r_pa = rate_eval.screened_rates(k_p_K39_to_He4_Ar36_reaclib); + amrex::Real r_pY = 0.0_rt; + amrex::Real dd = 1.0_rt / (r_pg + r_pa + r_pY); + amrex::Real r_ga = rate_eval.screened_rates(k_Ca40_to_He4_Ar36_derived); + amrex::Real r_gp = rate_eval.screened_rates(k_Ca40_to_p_K39_derived); + rate = r_ga + r_gp * r_pa * dd; + if constexpr (std::is_same_v) { + amrex::Real drdT_ga = rate_eval.dscreened_rates_dT(k_Ca40_to_He4_Ar36_derived); + amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_K39_to_He4_Ar36_reaclib); + amrex::Real drdT_gp = rate_eval.dscreened_rates_dT(k_Ca40_to_p_K39_derived); + amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_K39_to_Ca40_reaclib); + amrex::Real drdT_pY = 0.0_rt; + drate_dT = drdT_ga + drdT_gp * r_pa * dd + r_gp * drdT_pa * dd - r_gp * r_pa * dd * dd * (drdT_pg + drdT_pa + drdT_pY); + } +} + +template +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Ca40_He4_to_Ti44_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { + + amrex::Real r_pg = rate_eval.screened_rates(k_p_Sc43_to_Ti44_reaclib); + amrex::Real r_pa = rate_eval.screened_rates(k_p_Sc43_to_He4_Ca40_reaclib); + amrex::Real r_pY = 0.0_rt; + amrex::Real dd = 1.0_rt / (r_pg + r_pa + r_pY); + amrex::Real r_ag = rate_eval.screened_rates(k_He4_Ca40_to_Ti44_reaclib); + amrex::Real r_ap = rate_eval.screened_rates(k_He4_Ca40_to_p_Sc43_derived); + rate = r_ag + r_ap * r_pg * dd; + if constexpr (std::is_same_v) { + amrex::Real drdT_ag = rate_eval.dscreened_rates_dT(k_He4_Ca40_to_Ti44_reaclib); + amrex::Real drdT_ap = rate_eval.dscreened_rates_dT(k_He4_Ca40_to_p_Sc43_derived); + amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_Sc43_to_Ti44_reaclib); + amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_Sc43_to_He4_Ca40_reaclib); + amrex::Real drdT_pY = 0.0_rt; + drate_dT = drdT_ag + drdT_ap * r_pg * dd + r_ap * drdT_pg * dd - r_ap * r_pg * dd * dd * (drdT_pg + drdT_pa + drdT_pY); + } +} + +template +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Ti44_to_Ca40_He4_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { + + amrex::Real r_pg = rate_eval.screened_rates(k_p_Sc43_to_Ti44_reaclib); + amrex::Real r_pa = rate_eval.screened_rates(k_p_Sc43_to_He4_Ca40_reaclib); + amrex::Real r_pY = 0.0_rt; + amrex::Real dd = 1.0_rt / (r_pg + r_pa + r_pY); + amrex::Real r_ga = rate_eval.screened_rates(k_Ti44_to_He4_Ca40_derived); + amrex::Real r_gp = rate_eval.screened_rates(k_Ti44_to_p_Sc43_derived); + rate = r_ga + r_gp * r_pa * dd; + if constexpr (std::is_same_v) { + amrex::Real drdT_ga = rate_eval.dscreened_rates_dT(k_Ti44_to_He4_Ca40_derived); + amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_Sc43_to_He4_Ca40_reaclib); + amrex::Real drdT_gp = rate_eval.dscreened_rates_dT(k_Ti44_to_p_Sc43_derived); + amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_Sc43_to_Ti44_reaclib); + amrex::Real drdT_pY = 0.0_rt; + drate_dT = drdT_ga + drdT_gp * r_pa * dd + r_gp * drdT_pa * dd - r_gp * r_pa * dd * dd * (drdT_pg + drdT_pa + drdT_pY); + } +} + +template +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Ti44_He4_to_Cr48_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { + + amrex::Real r_pg = rate_eval.screened_rates(k_p_V47_to_Cr48_reaclib); + amrex::Real r_pa = rate_eval.screened_rates(k_p_V47_to_He4_Ti44_derived); + amrex::Real r_pY = 0.0_rt; + amrex::Real dd = 1.0_rt / (r_pg + r_pa + r_pY); + amrex::Real r_ag = rate_eval.screened_rates(k_He4_Ti44_to_Cr48_reaclib); + amrex::Real r_ap = rate_eval.screened_rates(k_He4_Ti44_to_p_V47_reaclib); + rate = r_ag + r_ap * r_pg * dd; + if constexpr (std::is_same_v) { + amrex::Real drdT_ag = rate_eval.dscreened_rates_dT(k_He4_Ti44_to_Cr48_reaclib); + amrex::Real drdT_ap = rate_eval.dscreened_rates_dT(k_He4_Ti44_to_p_V47_reaclib); + amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_V47_to_Cr48_reaclib); + amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_V47_to_He4_Ti44_derived); + amrex::Real drdT_pY = 0.0_rt; + drate_dT = drdT_ag + drdT_ap * r_pg * dd + r_ap * drdT_pg * dd - r_ap * r_pg * dd * dd * (drdT_pg + drdT_pa + drdT_pY); + } +} + +template +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Cr48_to_Ti44_He4_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { + + amrex::Real r_pg = rate_eval.screened_rates(k_p_V47_to_Cr48_reaclib); + amrex::Real r_pa = rate_eval.screened_rates(k_p_V47_to_He4_Ti44_derived); + amrex::Real r_pY = 0.0_rt; + amrex::Real dd = 1.0_rt / (r_pg + r_pa + r_pY); + amrex::Real r_ga = rate_eval.screened_rates(k_Cr48_to_He4_Ti44_derived); + amrex::Real r_gp = rate_eval.screened_rates(k_Cr48_to_p_V47_derived); + rate = r_ga + r_gp * r_pa * dd; + if constexpr (std::is_same_v) { + amrex::Real drdT_ga = rate_eval.dscreened_rates_dT(k_Cr48_to_He4_Ti44_derived); + amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_V47_to_He4_Ti44_derived); + amrex::Real drdT_gp = rate_eval.dscreened_rates_dT(k_Cr48_to_p_V47_derived); + amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_V47_to_Cr48_reaclib); + amrex::Real drdT_pY = 0.0_rt; + drate_dT = drdT_ga + drdT_gp * r_pa * dd + r_gp * drdT_pa * dd - r_gp * r_pa * dd * dd * (drdT_pg + drdT_pa + drdT_pY); + } +} + +template +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Cr48_He4_to_Fe52_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { + + amrex::Real r_pg = rate_eval.screened_rates(k_p_Mn51_to_Fe52_reaclib); + amrex::Real r_pa = rate_eval.screened_rates(k_p_Mn51_to_He4_Cr48_derived); + amrex::Real r_pY = 0.0_rt; + amrex::Real dd = 1.0_rt / (r_pg + r_pa + r_pY); + amrex::Real r_ag = rate_eval.screened_rates(k_He4_Cr48_to_Fe52_reaclib); + amrex::Real r_ap = rate_eval.screened_rates(k_He4_Cr48_to_p_Mn51_reaclib); + rate = r_ag + r_ap * r_pg * dd; + if constexpr (std::is_same_v) { + amrex::Real drdT_ag = rate_eval.dscreened_rates_dT(k_He4_Cr48_to_Fe52_reaclib); + amrex::Real drdT_ap = rate_eval.dscreened_rates_dT(k_He4_Cr48_to_p_Mn51_reaclib); + amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_Mn51_to_Fe52_reaclib); + amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_Mn51_to_He4_Cr48_derived); + amrex::Real drdT_pY = 0.0_rt; + drate_dT = drdT_ag + drdT_ap * r_pg * dd + r_ap * drdT_pg * dd - r_ap * r_pg * dd * dd * (drdT_pg + drdT_pa + drdT_pY); + } +} + +template +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Fe52_to_Cr48_He4_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { + + amrex::Real r_pg = rate_eval.screened_rates(k_p_Mn51_to_Fe52_reaclib); + amrex::Real r_pa = rate_eval.screened_rates(k_p_Mn51_to_He4_Cr48_derived); + amrex::Real r_pY = 0.0_rt; + amrex::Real dd = 1.0_rt / (r_pg + r_pa + r_pY); + amrex::Real r_ga = rate_eval.screened_rates(k_Fe52_to_He4_Cr48_derived); + amrex::Real r_gp = rate_eval.screened_rates(k_Fe52_to_p_Mn51_derived); + rate = r_ga + r_gp * r_pa * dd; + if constexpr (std::is_same_v) { + amrex::Real drdT_ga = rate_eval.dscreened_rates_dT(k_Fe52_to_He4_Cr48_derived); + amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_Mn51_to_He4_Cr48_derived); + amrex::Real drdT_gp = rate_eval.dscreened_rates_dT(k_Fe52_to_p_Mn51_derived); + amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_Mn51_to_Fe52_reaclib); + amrex::Real drdT_pY = 0.0_rt; + drate_dT = drdT_ga + drdT_gp * r_pa * dd + r_gp * drdT_pa * dd - r_gp * r_pa * dd * dd * (drdT_pg + drdT_pa + drdT_pY); + } +} + +template +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Fe52_He4_to_Ni56_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { + + amrex::Real r_pg = rate_eval.screened_rates(k_p_Co55_to_Ni56_reaclib); + amrex::Real r_pa = rate_eval.screened_rates(k_p_Co55_to_He4_Fe52_derived); + amrex::Real r_pY = 0.0_rt; + amrex::Real dd = 1.0_rt / (r_pg + r_pa + r_pY); + amrex::Real r_ag = rate_eval.screened_rates(k_He4_Fe52_to_Ni56_reaclib); + amrex::Real r_ap = rate_eval.screened_rates(k_He4_Fe52_to_p_Co55_reaclib); + rate = r_ag + r_ap * r_pg * dd; + if constexpr (std::is_same_v) { + amrex::Real drdT_ag = rate_eval.dscreened_rates_dT(k_He4_Fe52_to_Ni56_reaclib); + amrex::Real drdT_ap = rate_eval.dscreened_rates_dT(k_He4_Fe52_to_p_Co55_reaclib); + amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_Co55_to_Ni56_reaclib); + amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_Co55_to_He4_Fe52_derived); + amrex::Real drdT_pY = 0.0_rt; + drate_dT = drdT_ag + drdT_ap * r_pg * dd + r_ap * drdT_pg * dd - r_ap * r_pg * dd * dd * (drdT_pg + drdT_pa + drdT_pY); + } +} + +template +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Ni56_to_Fe52_He4_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { + + amrex::Real r_pg = rate_eval.screened_rates(k_p_Co55_to_Ni56_reaclib); + amrex::Real r_pa = rate_eval.screened_rates(k_p_Co55_to_He4_Fe52_derived); + amrex::Real r_pY = 0.0_rt; + amrex::Real dd = 1.0_rt / (r_pg + r_pa + r_pY); + amrex::Real r_ga = rate_eval.screened_rates(k_Ni56_to_He4_Fe52_derived); + amrex::Real r_gp = rate_eval.screened_rates(k_Ni56_to_p_Co55_derived); + rate = r_ga + r_gp * r_pa * dd; + if constexpr (std::is_same_v) { + amrex::Real drdT_ga = rate_eval.dscreened_rates_dT(k_Ni56_to_He4_Fe52_derived); + amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_Co55_to_He4_Fe52_derived); + amrex::Real drdT_gp = rate_eval.dscreened_rates_dT(k_Ni56_to_p_Co55_derived); + amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_Co55_to_Ni56_reaclib); + amrex::Real drdT_pY = 0.0_rt; + drate_dT = drdT_ga + drdT_gp * r_pa * dd + r_gp * drdT_pa * dd - r_gp * r_pa * dd * dd * (drdT_pg + drdT_pa + drdT_pY); + } +} + + + +template +AMREX_GPU_HOST_DEVICE AMREX_INLINE +void +fill_approx_rates([[maybe_unused]] const tf_t& tfactors, + [[maybe_unused]] const amrex::Real rho, + [[maybe_unused]] const amrex::Array1D& Y, + [[maybe_unused]] T& rate_eval) +{ + + [[maybe_unused]] amrex::Real rate{}; + [[maybe_unused]] amrex::Real drate_dT{}; + + rate_S32_He4_to_Ar36_approx(rate_eval, rate, drate_dT); + rate_eval.screened_rates(k_S32_He4_to_Ar36_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S32_He4_to_Ar36_approx) = drate_dT; + } + + rate_Ar36_to_S32_He4_approx(rate_eval, rate, drate_dT); + rate_eval.screened_rates(k_Ar36_to_S32_He4_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar36_to_S32_He4_approx) = drate_dT; + } + + rate_Ar36_He4_to_Ca40_approx(rate_eval, rate, drate_dT); + rate_eval.screened_rates(k_Ar36_He4_to_Ca40_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar36_He4_to_Ca40_approx) = drate_dT; + } + + rate_Ca40_to_Ar36_He4_approx(rate_eval, rate, drate_dT); + rate_eval.screened_rates(k_Ca40_to_Ar36_He4_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ca40_to_Ar36_He4_approx) = drate_dT; + } + + rate_Ca40_He4_to_Ti44_approx(rate_eval, rate, drate_dT); + rate_eval.screened_rates(k_Ca40_He4_to_Ti44_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ca40_He4_to_Ti44_approx) = drate_dT; + } + + rate_Ti44_to_Ca40_He4_approx(rate_eval, rate, drate_dT); + rate_eval.screened_rates(k_Ti44_to_Ca40_He4_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti44_to_Ca40_He4_approx) = drate_dT; + } + + rate_Ti44_He4_to_Cr48_approx(rate_eval, rate, drate_dT); + rate_eval.screened_rates(k_Ti44_He4_to_Cr48_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti44_He4_to_Cr48_approx) = drate_dT; + } + + rate_Cr48_to_Ti44_He4_approx(rate_eval, rate, drate_dT); + rate_eval.screened_rates(k_Cr48_to_Ti44_He4_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr48_to_Ti44_He4_approx) = drate_dT; + } + + rate_Cr48_He4_to_Fe52_approx(rate_eval, rate, drate_dT); + rate_eval.screened_rates(k_Cr48_He4_to_Fe52_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr48_He4_to_Fe52_approx) = drate_dT; + } + + rate_Fe52_to_Cr48_He4_approx(rate_eval, rate, drate_dT); + rate_eval.screened_rates(k_Fe52_to_Cr48_He4_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe52_to_Cr48_He4_approx) = drate_dT; + } + + rate_Fe52_He4_to_Ni56_approx(rate_eval, rate, drate_dT); + rate_eval.screened_rates(k_Fe52_He4_to_Ni56_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe52_He4_to_Ni56_approx) = drate_dT; + } + + rate_Ni56_to_Fe52_He4_approx(rate_eval, rate, drate_dT); + rate_eval.screened_rates(k_Ni56_to_Fe52_He4_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni56_to_Fe52_He4_approx) = drate_dT; + } + + +} + +#endif diff --git a/networks/he-burn/ase/ase.png b/networks/he-burn/ase/ase.png index 7e49601d7..c6725af3b 100644 Binary files a/networks/he-burn/ase/ase.png and b/networks/he-burn/ase/ase.png differ diff --git a/networks/he-burn/ase/derived_rates.H b/networks/he-burn/ase/derived_rates.H index d970d726d..0f37d61f6 100644 --- a/networks/he-burn/ase/derived_rates.H +++ b/networks/he-burn/ase/derived_rates.H @@ -10,8 +10,8 @@ using namespace Rates; template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_N13_to_p_C12_derived(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_N13_to_p_C12_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // N13 --> p + C12 @@ -49,13 +49,13 @@ void rate_N13_to_p_C12_derived(const tf_t& tfactors, amrex::Real& rate, amrex::R ln_set_rate = 40.059128683693466 + -22.553277271250543 * tfactors.T9i + -13.692 * tfactors.T913i + -0.230881 * tfactors.T913 + 4.44362 * tfactors.T9 + -3.15898 * tfactors.T953 + 0.833333 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 22.553277271250543 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -13.692 * tfactors.T943i + (1.0/3.0) * -0.230881 * tfactors.T923i + 4.44362 + (5.0/3.0) * -3.15898 * tfactors.T923 + 0.833333 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -70,13 +70,13 @@ void rate_N13_to_p_C12_derived(const tf_t& tfactors, amrex::Real& rate, amrex::R ln_set_rate = 40.45372868369347 + -26.331767271250545 * tfactors.T9i + -5.10735 * tfactors.T913i + -2.24111 * tfactors.T913 + 0.148883 * tfactors.T9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 26.331767271250545 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -5.10735 * tfactors.T943i + (1.0/3.0) * -2.24111 * tfactors.T923i + 0.148883; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -90,8 +90,8 @@ void rate_N13_to_p_C12_derived(const tf_t& tfactors, amrex::Real& rate, amrex::R } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_O16_to_He4_C12_derived(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_O16_to_He4_C12_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // O16 --> He4 + C12 @@ -128,13 +128,13 @@ void rate_O16_to_He4_C12_derived(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 279.29694929711803 + -84.95157686791683 * tfactors.T9i + 103.411 * tfactors.T913i + -420.567 * tfactors.T913 + 64.0874 * tfactors.T9 + -12.4624 * tfactors.T953 + 138.803 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 84.95157686791683 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 103.411 * tfactors.T943i + (1.0/3.0) * -420.567 * tfactors.T923i + 64.0874 + (5.0/3.0) * -12.4624 * tfactors.T923 + 138.803 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -149,13 +149,13 @@ void rate_O16_to_He4_C12_derived(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 94.31554929711803 + -84.50314686791683 * tfactors.T9i + 58.9128 * tfactors.T913i + -148.273 * tfactors.T913 + 9.08324 * tfactors.T9 + -0.541041 * tfactors.T953 + 71.8554 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 84.50314686791683 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 58.9128 * tfactors.T943i + (1.0/3.0) * -148.273 * tfactors.T923i + 9.08324 + (5.0/3.0) * -0.541041 * tfactors.T923 + 71.8554 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -169,8 +169,8 @@ void rate_O16_to_He4_C12_derived(const tf_t& tfactors, amrex::Real& rate, amrex: } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ne20_to_He4_O16_derived(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Ne20_to_He4_O16_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Ne20 --> He4 + O16 @@ -205,12 +205,12 @@ void rate_Ne20_to_He4_O16_derived(const tf_t& tfactors, amrex::Real& rate, amrex // ReacLib set derived from co10r ln_set_rate = 28.644822801502126 + -65.24608327101186 * tfactors.T9i; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 65.24608327101186 * tfactors.T9i * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -225,13 +225,13 @@ void rate_Ne20_to_He4_O16_derived(const tf_t& tfactors, amrex::Real& rate, amrex ln_set_rate = 48.662112801502126 + -54.887583271011856 * tfactors.T9i + -39.7262 * tfactors.T913i + -0.210799 * tfactors.T913 + 0.442879 * tfactors.T9 + -0.0797753 * tfactors.T953 + 0.833333 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 54.887583271011856 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -39.7262 * tfactors.T943i + (1.0/3.0) * -0.210799 * tfactors.T923i + 0.442879 + (5.0/3.0) * -0.0797753 * tfactors.T923 + 0.833333 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -246,13 +246,13 @@ void rate_Ne20_to_He4_O16_derived(const tf_t& tfactors, amrex::Real& rate, amrex ln_set_rate = 34.267592801502126 + -67.65188327101185 * tfactors.T9i + -3.65925 * tfactors.T913 + 0.714224 * tfactors.T9 + -0.00107508 * tfactors.T953; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 67.65188327101185 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -3.65925 * tfactors.T923i + 0.714224 + (5.0/3.0) * -0.00107508 * tfactors.T923; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -266,8 +266,8 @@ void rate_Ne20_to_He4_O16_derived(const tf_t& tfactors, amrex::Real& rate, amrex } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Mg24_to_p_Na23_derived(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Mg24_to_p_Na23_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Mg24 --> p + Na23 @@ -303,13 +303,13 @@ void rate_Mg24_to_p_Na23_derived(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 34.107544561463015 + -138.96838756220697 * tfactors.T9i + -0.360588 * tfactors.T913 + 1.4187 * tfactors.T9 + -0.184061 * tfactors.T953; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 138.96838756220697 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -0.360588 * tfactors.T923i + 1.4187 + (5.0/3.0) * -0.184061 * tfactors.T923; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -323,12 +323,12 @@ void rate_Mg24_to_p_Na23_derived(const tf_t& tfactors, amrex::Real& rate, amrex: // ReacLib set derived from il10r ln_set_rate = 20.02229456146302 + -137.30028756220696 * tfactors.T9i; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 137.30028756220696 * tfactors.T9i * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -343,13 +343,13 @@ void rate_Mg24_to_p_Na23_derived(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 43.95564456146302 + -135.68809756220696 * tfactors.T9i + -20.6428 * tfactors.T913i + 1.52954 * tfactors.T913 + 2.7487 * tfactors.T9 + -1.0 * tfactors.T953 + 0.833333 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 135.68809756220696 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -20.6428 * tfactors.T943i + (1.0/3.0) * 1.52954 * tfactors.T923i + 2.7487 + (5.0/3.0) * -1.0 * tfactors.T923 + 0.833333 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -363,8 +363,8 @@ void rate_Mg24_to_p_Na23_derived(const tf_t& tfactors, amrex::Real& rate, amrex: } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Mg24_to_He4_Ne20_derived(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Mg24_to_He4_Ne20_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Mg24 --> He4 + Ne20 @@ -400,13 +400,13 @@ void rate_Mg24_to_He4_Ne20_derived(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 16.022538839949377 + -120.89510873006793 * tfactors.T9i + 16.9229 * tfactors.T913 + -2.57325 * tfactors.T9 + 0.208997 * tfactors.T953; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 120.89510873006793 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 16.9229 * tfactors.T923i + -2.57325 + (5.0/3.0) * 0.208997 * tfactors.T923; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -420,12 +420,12 @@ void rate_Mg24_to_He4_Ne20_derived(const tf_t& tfactors, amrex::Real& rate, amre // ReacLib set derived from il10r ln_set_rate = 26.803878839949377 + -117.33446873006793 * tfactors.T9i; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 117.33446873006793 * tfactors.T9i * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -439,12 +439,12 @@ void rate_Mg24_to_He4_Ne20_derived(const tf_t& tfactors, amrex::Real& rate, amre // ReacLib set derived from il10r ln_set_rate = -13.884691160050625 + -110.62025873006793 * tfactors.T9i; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 110.62025873006793 * tfactors.T9i * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -459,13 +459,13 @@ void rate_Mg24_to_He4_Ne20_derived(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 49.32660883994937 + -108.11420873006793 * tfactors.T9i + -46.2525 * tfactors.T913i + 5.58901 * tfactors.T913 + 7.61843 * tfactors.T9 + -3.683 * tfactors.T953 + 0.833333 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 108.11420873006793 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -46.2525 * tfactors.T943i + (1.0/3.0) * 5.58901 * tfactors.T923i + 7.61843 + (5.0/3.0) * -3.683 * tfactors.T923 + 0.833333 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -479,8 +479,8 @@ void rate_Mg24_to_He4_Ne20_derived(const tf_t& tfactors, amrex::Real& rate, amre } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Si28_to_p_Al27_derived(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Si28_to_p_Al27_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Si28 --> p + Al27 @@ -516,13 +516,13 @@ void rate_Si28_to_p_Al27_derived(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 11.796402252999236 + -136.3412367256539 * tfactors.T9i + 23.8634 * tfactors.T913 + -3.70135 * tfactors.T9 + 0.28964 * tfactors.T953; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 136.3412367256539 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 23.8634 * tfactors.T923i + -3.70135 + (5.0/3.0) * 0.28964 * tfactors.T923; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -537,13 +537,13 @@ void rate_Si28_to_p_Al27_derived(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 111.48620225299923 + -134.8245897256539 * tfactors.T9i + -26.8327 * tfactors.T913i + -116.137 * tfactors.T913 + 0.00950567 * tfactors.T9 + 0.00999755 * tfactors.T953; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 134.8245897256539 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -26.8327 * tfactors.T943i + (1.0/3.0) * -116.137 * tfactors.T923i + 0.00950567 + (5.0/3.0) * 0.00999755 * tfactors.T923; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -558,13 +558,13 @@ void rate_Si28_to_p_Al27_derived(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 46.569302252999236 + -134.4372767256539 * tfactors.T9i + -23.2205 * tfactors.T913i + -2.0 * tfactors.T953 + 0.833333 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 134.4372767256539 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -23.2205 * tfactors.T943i + (5.0/3.0) * -2.0 * tfactors.T923 + 0.833333 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -578,8 +578,8 @@ void rate_Si28_to_p_Al27_derived(const tf_t& tfactors, amrex::Real& rate, amrex: } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Si28_to_He4_Mg24_derived(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Si28_to_He4_Mg24_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Si28 --> He4 + Mg24 @@ -614,12 +614,12 @@ void rate_Si28_to_He4_Mg24_derived(const tf_t& tfactors, amrex::Real& rate, amre // ReacLib set derived from st08r ln_set_rate = 32.902724006057724 + -131.4900751873663 * tfactors.T9i; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 131.4900751873663 * tfactors.T9i * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -634,13 +634,13 @@ void rate_Si28_to_He4_Mg24_derived(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = -25.68644599394228 + -128.6942751873663 * tfactors.T9i + 21.3721 * tfactors.T913i + 37.7649 * tfactors.T913 + -4.10635 * tfactors.T9 + 0.249618 * tfactors.T953; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 128.6942751873663 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 21.3721 * tfactors.T943i + (1.0/3.0) * 37.7649 * tfactors.T923i + -4.10635 + (5.0/3.0) * 0.249618 * tfactors.T923; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -654,8 +654,8 @@ void rate_Si28_to_He4_Mg24_derived(const tf_t& tfactors, amrex::Real& rate, amre } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_S32_to_p_P31_derived(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_S32_to_p_P31_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // S32 --> p + P31 @@ -691,13 +691,13 @@ void rate_S32_to_p_P31_derived(const tf_t& tfactors, amrex::Real& rate, amrex::R ln_set_rate = 25.192389422303183 + -106.63906812813134 * tfactors.T9i + 8.09341 * tfactors.T913 + -0.615971 * tfactors.T9 + 0.031159 * tfactors.T953; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 106.63906812813134 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 8.09341 * tfactors.T923i + -0.615971 + (5.0/3.0) * 0.031159 * tfactors.T923; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -711,12 +711,12 @@ void rate_S32_to_p_P31_derived(const tf_t& tfactors, amrex::Real& rate, amrex::R // ReacLib set derived from il10r ln_set_rate = 21.702443422303183 + -105.12160812813134 * tfactors.T9i; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 105.12160812813134 * tfactors.T9i * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -731,13 +731,13 @@ void rate_S32_to_p_P31_derived(const tf_t& tfactors, amrex::Real& rate, amrex::R ln_set_rate = 43.630433422303184 + -102.86202812813134 * tfactors.T9i + -25.3278 * tfactors.T913i + 6.4931 * tfactors.T913 + -9.27513 * tfactors.T9 + -0.610439 * tfactors.T953 + 0.833333 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 102.86202812813134 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -25.3278 * tfactors.T943i + (1.0/3.0) * 6.4931 * tfactors.T923i + -9.27513 + (5.0/3.0) * -0.610439 * tfactors.T923 + 0.833333 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -751,8 +751,8 @@ void rate_S32_to_p_P31_derived(const tf_t& tfactors, amrex::Real& rate, amrex::R } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_S32_to_He4_Si28_derived(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_S32_to_He4_Si28_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // S32 --> He4 + Si28 @@ -788,13 +788,13 @@ void rate_S32_to_He4_Si28_derived(const tf_t& tfactors, amrex::Real& rate, amrex ln_set_rate = 72.8147025119699 + -80.62419844573513 * tfactors.T9i + -59.4896 * tfactors.T913i + 4.47205 * tfactors.T913 + -4.78989 * tfactors.T9 + 0.557201 * tfactors.T953 + 0.833333 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 80.62419844573513 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -59.4896 * tfactors.T943i + (1.0/3.0) * 4.47205 * tfactors.T923i + -4.78989 + (5.0/3.0) * 0.557201 * tfactors.T923 + 0.833333 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -808,8 +808,8 @@ void rate_S32_to_He4_Si28_derived(const tf_t& tfactors, amrex::Real& rate, amrex } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_C12_to_He4_He4_He4_derived(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_C12_to_He4_He4_He4_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // C12 --> 3 He4 @@ -841,13 +841,13 @@ void rate_C12_to_He4_He4_He4_derived(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = 34.96090397991297 + -85.44440046993657 * tfactors.T9i + -23.57 * tfactors.T913i + 20.4886 * tfactors.T913 + -12.9882 * tfactors.T9 + -20.0 * tfactors.T953 + 0.8333300000000001 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 85.44440046993657 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -23.57 * tfactors.T943i + (1.0/3.0) * 20.4886 * tfactors.T923i + -12.9882 + (5.0/3.0) * -20.0 * tfactors.T923 + 0.8333300000000001 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -862,13 +862,13 @@ void rate_C12_to_He4_He4_He4_derived(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = 45.77825197991297 + -84.41994046993656 * tfactors.T9i + -37.06 * tfactors.T913i + 29.3493 * tfactors.T913 + -115.507 * tfactors.T9 + -10.0 * tfactors.T953 + 1.66667 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 84.41994046993656 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -37.06 * tfactors.T943i + (1.0/3.0) * 29.3493 * tfactors.T923i + -115.507 + (5.0/3.0) * -10.0 * tfactors.T923 + 1.66667 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -883,13 +883,13 @@ void rate_C12_to_He4_He4_He4_derived(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = 22.398803979912973 + -88.54650046993656 * tfactors.T9i + -13.49 * tfactors.T913i + 21.4259 * tfactors.T913 + -1.34769 * tfactors.T9 + 0.0879816 * tfactors.T953 + -10.1653 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 88.54650046993656 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -13.49 * tfactors.T943i + (1.0/3.0) * 21.4259 * tfactors.T923i + -1.34769 + (5.0/3.0) * 0.0879816 * tfactors.T923 + -10.1653 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -903,8 +903,8 @@ void rate_C12_to_He4_He4_He4_derived(const tf_t& tfactors, amrex::Real& rate, am } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_O16_to_He4_N13_derived(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_p_O16_to_He4_N13_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // O16 + p --> He4 + N13 @@ -947,13 +947,13 @@ void rate_p_O16_to_He4_N13_derived(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 42.21642061342456 + -60.557329596678294 * tfactors.T9i + -35.829 * tfactors.T913i + -0.530275 * tfactors.T913 + -0.982462 * tfactors.T9 + 0.0808059 * tfactors.T953 + -0.666667 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 60.557329596678294 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -35.829 * tfactors.T943i + (1.0/3.0) * -0.530275 * tfactors.T923i + -0.982462 + (5.0/3.0) * 0.0808059 * tfactors.T923 + -0.666667 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -967,8 +967,8 @@ void rate_p_O16_to_He4_N13_derived(const tf_t& tfactors, amrex::Real& rate, amre } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Ne20_to_p_Na23_derived(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_Ne20_to_p_Na23_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Ne20 + He4 --> p + Na23 @@ -1010,13 +1010,13 @@ void rate_He4_Ne20_to_p_Na23_derived(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = -6.360024278486355 + -29.889658832139027 * tfactors.T9i + 19.7297 * tfactors.T913 + -2.20987 * tfactors.T9 + 0.153374 * tfactors.T953 + -1.5 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 29.889658832139027 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 19.7297 * tfactors.T923i + -2.20987 + (5.0/3.0) * 0.153374 * tfactors.T923 + -1.5 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1031,13 +1031,13 @@ void rate_He4_Ne20_to_p_Na23_derived(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = 0.24516522151364528 + -29.434918832139026 * tfactors.T9i + -1.5 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 29.434918832139026 * tfactors.T9i * tfactors.T9i + -1.5 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1052,13 +1052,13 @@ void rate_He4_Ne20_to_p_Na23_derived(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = 19.202935721513644 + -27.573888832139026 * tfactors.T9i + -20.0024 * tfactors.T913i + 11.5988 * tfactors.T913 + -1.37398 * tfactors.T9 + -1.0 * tfactors.T953 + -0.666667 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 27.573888832139026 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -20.0024 * tfactors.T943i + (1.0/3.0) * 11.5988 * tfactors.T923i + -1.37398 + (5.0/3.0) * -1.0 * tfactors.T923 + -0.666667 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1072,8 +1072,8 @@ void rate_He4_Ne20_to_p_Na23_derived(const tf_t& tfactors, amrex::Real& rate, am } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Ne20_to_C12_C12_derived(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_Ne20_to_C12_C12_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Ne20 + He4 --> C12 + C12 @@ -1110,13 +1110,13 @@ void rate_He4_Ne20_to_C12_C12_derived(const tf_t& tfactors, amrex::Real& rate, a ln_set_rate = 61.474151468919175 + -53.57824966896331 * tfactors.T9i + -84.165 * tfactors.T913i + -1.56627 * tfactors.T913 + -0.0736084 * tfactors.T9 + -0.072797 * tfactors.T953 + -0.666667 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 53.57824966896331 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -84.165 * tfactors.T943i + (1.0/3.0) * -1.56627 * tfactors.T923i + -0.0736084 + (5.0/3.0) * -0.072797 * tfactors.T923 + -0.666667 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1130,8 +1130,8 @@ void rate_He4_Ne20_to_C12_C12_derived(const tf_t& tfactors, amrex::Real& rate, a } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Na23_to_C12_C12_derived(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_p_Na23_to_C12_C12_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Na23 + p --> C12 + C12 @@ -1168,13 +1168,13 @@ void rate_p_Na23_to_C12_C12_derived(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = 60.92541574740554 + -26.004360836807496 * tfactors.T9i + -84.165 * tfactors.T913i + -1.4191 * tfactors.T913 + -0.114619 * tfactors.T9 + -0.070307 * tfactors.T953 + -0.666667 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 26.004360836807496 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -84.165 * tfactors.T943i + (1.0/3.0) * -1.4191 * tfactors.T923i + -0.114619 + (5.0/3.0) * -0.070307 * tfactors.T923 + -0.666667 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1188,8 +1188,8 @@ void rate_p_Na23_to_C12_C12_derived(const tf_t& tfactors, amrex::Real& rate, amr } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Mg24_to_p_Al27_derived(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_Mg24_to_p_Al27_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Mg24 + He4 --> p + Al27 @@ -1231,13 +1231,13 @@ void rate_He4_Mg24_to_p_Al27_derived(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = -6.4280417530584835 + -22.818701538287602 * tfactors.T9i + 18.0416 * tfactors.T913 + -1.54137 * tfactors.T9 + 0.0847506 * tfactors.T953 + -1.5 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 22.818701538287602 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 18.0416 * tfactors.T923i + -1.54137 + (5.0/3.0) * 0.0847506 * tfactors.T923 + -1.5 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1252,13 +1252,13 @@ void rate_He4_Mg24_to_p_Al27_derived(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = -26.268451753058486 + -19.5392135382876 * tfactors.T9i + 5.18642 * tfactors.T913i + -34.7936 * tfactors.T913 + 168.225 * tfactors.T9 + -115.825 * tfactors.T953 + -1.5 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 19.5392135382876 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 5.18642 * tfactors.T943i + (1.0/3.0) * -34.7936 * tfactors.T923i + 168.225 + (5.0/3.0) * -115.825 * tfactors.T923 + -1.5 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1273,13 +1273,13 @@ void rate_He4_Mg24_to_p_Al27_derived(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = 30.057448246941515 + -18.576201538287602 * tfactors.T9i + -26.4162 * tfactors.T913i + -2.0 * tfactors.T953 + -0.666667 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 18.576201538287602 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -26.4162 * tfactors.T943i + (5.0/3.0) * -2.0 * tfactors.T923 + -0.666667 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1293,8 +1293,8 @@ void rate_He4_Mg24_to_p_Al27_derived(const tf_t& tfactors, amrex::Real& rate, am } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Mg24_to_C12_O16_derived(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_Mg24_to_C12_O16_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Mg24 + He4 --> C12 + O16 @@ -1336,13 +1336,13 @@ void rate_He4_Mg24_to_C12_O16_derived(const tf_t& tfactors, amrex::Real& rate, a ln_set_rate = 49.57295819231048 + -78.2098115311048 * tfactors.T9i + -133.413 * tfactors.T913i + 50.1572 * tfactors.T913 + -3.15987 * tfactors.T9 + 0.0178251 * tfactors.T953 + -23.7027 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 78.2098115311048 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -133.413 * tfactors.T943i + (1.0/3.0) * 50.1572 * tfactors.T923i + -3.15987 + (5.0/3.0) * 0.0178251 * tfactors.T923 + -23.7027 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1356,8 +1356,8 @@ void rate_He4_Mg24_to_C12_O16_derived(const tf_t& tfactors, amrex::Real& rate, a } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Al27_to_C12_O16_derived(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_p_Al27_to_C12_O16_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Al27 + p --> C12 + O16 @@ -1399,13 +1399,13 @@ void rate_p_Al27_to_C12_O16_derived(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = 68.96430994536895 + -59.8005159928172 * tfactors.T9i + -119.242 * tfactors.T913i + 13.3667 * tfactors.T913 + 0.295425 * tfactors.T9 + -0.267288 * tfactors.T953 + -9.91729 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 59.8005159928172 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -119.242 * tfactors.T943i + (1.0/3.0) * 13.3667 * tfactors.T923i + 0.295425 + (5.0/3.0) * -0.267288 * tfactors.T923 + -9.91729 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1419,8 +1419,8 @@ void rate_p_Al27_to_C12_O16_derived(const tf_t& tfactors, amrex::Real& rate, amr } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Si28_to_p_P31_derived(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_Si28_to_p_P31_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Si28 + He4 --> p + P31 @@ -1462,13 +1462,13 @@ void rate_He4_Si28_to_p_P31_derived(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = -11.415669089666713 + -25.663579682396225 * tfactors.T9i + 21.521 * tfactors.T913 + -1.90355 * tfactors.T9 + 0.092724 * tfactors.T953 + -1.5 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 25.663579682396225 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 21.521 * tfactors.T923i + -1.90355 + (5.0/3.0) * 0.092724 * tfactors.T923 + -1.5 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1483,13 +1483,13 @@ void rate_He4_Si28_to_p_P31_derived(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = -13.441669089666712 + -24.114989682396224 * tfactors.T9i + -1.5 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 24.114989682396224 * tfactors.T9i * tfactors.T9i + -1.5 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1504,13 +1504,13 @@ void rate_He4_Si28_to_p_P31_derived(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = 60.360230910333286 + -22.237829682396224 * tfactors.T9i + -31.932 * tfactors.T913i + -77.0334 * tfactors.T913 + -43.6847 * tfactors.T9 + -4.28955 * tfactors.T953 + -0.666667 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 22.237829682396224 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -31.932 * tfactors.T943i + (1.0/3.0) * -77.0334 * tfactors.T923i + -43.6847 + (5.0/3.0) * -4.28955 * tfactors.T923 + -0.666667 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1524,8 +1524,8 @@ void rate_He4_Si28_to_p_P31_derived(const tf_t& tfactors, amrex::Real& rate, amr } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Si28_to_O16_O16_derived(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_Si28_to_O16_O16_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Si28 + He4 --> O16 + O16 @@ -1561,13 +1561,13 @@ void rate_He4_Si28_to_O16_O16_derived(const tf_t& tfactors, amrex::Real& rate, a ln_set_rate = 97.78921572069022 + -111.60083385054465 * tfactors.T9i + -119.324 * tfactors.T913i + -32.2497 * tfactors.T913 + 1.46214 * tfactors.T9 + -0.200893 * tfactors.T953 + 13.2148 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 111.60083385054465 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -119.324 * tfactors.T943i + (1.0/3.0) * -32.2497 * tfactors.T923i + 1.46214 + (5.0/3.0) * -0.200893 * tfactors.T923 + 13.2148 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1581,8 +1581,8 @@ void rate_He4_Si28_to_O16_O16_derived(const tf_t& tfactors, amrex::Real& rate, a } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_P31_to_O16_O16_derived(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_p_P31_to_O16_O16_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // P31 + p --> O16 + O16 @@ -1618,13 +1618,13 @@ void rate_p_P31_to_O16_O16_derived(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 86.33118481035693 + -88.87103716814843 * tfactors.T9i + -145.844 * tfactors.T913i + 8.72612 * tfactors.T913 + -0.554035 * tfactors.T9 + -0.137562 * tfactors.T953 + -6.88807 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 88.87103716814843 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -145.844 * tfactors.T943i + (1.0/3.0) * 8.72612 * tfactors.T923i + -0.554035 + (5.0/3.0) * -0.137562 * tfactors.T923 + -6.88807 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1638,8 +1638,8 @@ void rate_p_P31_to_O16_O16_derived(const tf_t& tfactors, amrex::Real& rate, amre } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Mg24_to_C12_C12_derived(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Mg24_to_C12_C12_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Mg24 --> C12 + C12 @@ -1670,13 +1670,13 @@ void rate_Mg24_to_C12_C12_derived(const tf_t& tfactors, amrex::Real& rate, amrex ln_set_rate = 12.203060308868553 + -191.84225839903127 * tfactors.T9i + 11.4826 * tfactors.T913 + 1.82849 * tfactors.T9 + -0.34844 * tfactors.T953 + 1.5 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 191.84225839903127 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 11.4826 * tfactors.T923i + 1.82849 + (5.0/3.0) * -0.34844 * tfactors.T923 + 1.5 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1690,8 +1690,8 @@ void rate_Mg24_to_C12_C12_derived(const tf_t& tfactors, amrex::Real& rate, amrex } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_S32_to_O16_O16_derived(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_S32_to_O16_O16_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // S32 --> O16 + O16 @@ -1721,13 +1721,13 @@ void rate_S32_to_O16_O16_derived(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 102.9883182326601 + -192.3301592962798 * tfactors.T9i + -120.83 * tfactors.T913i + -7.72334 * tfactors.T913 + -2.27939 * tfactors.T9 + 0.167655 * tfactors.T953 + 9.12001 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 192.3301592962798 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -120.83 * tfactors.T943i + (1.0/3.0) * -7.72334 * tfactors.T923i + -2.27939 + (5.0/3.0) * 0.167655 * tfactors.T923 + 9.12001 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1741,8 +1741,8 @@ void rate_S32_to_O16_O16_derived(const tf_t& tfactors, amrex::Real& rate, amrex: } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Si28_to_C12_O16_derived(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Si28_to_C12_O16_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Si28 --> C12 + O16 @@ -1778,13 +1778,13 @@ void rate_Si28_to_C12_O16_derived(const tf_t& tfactors, amrex::Real& rate, amrex ln_set_rate = -106.3111878016318 + -195.9077167184711 * tfactors.T9i + -293.089 * tfactors.T913i + 414.404 * tfactors.T913 + -28.0562 * tfactors.T9 + 1.61807 * tfactors.T953 + -176.78 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 195.9077167184711 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -293.089 * tfactors.T943i + (1.0/3.0) * 414.404 * tfactors.T923i + -28.0562 + (5.0/3.0) * 1.61807 * tfactors.T923 + -176.78 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1798,8 +1798,8 @@ void rate_Si28_to_C12_O16_derived(const tf_t& tfactors, amrex::Real& rate, amrex } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_S32_to_p_Cl35_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_S32_to_p_Cl35_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // S32 + He4 --> p + Cl35 @@ -1841,13 +1841,13 @@ void rate_He4_S32_to_p_Cl35_removed(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = -0.8597847344696254 + -25.589703706656966 * tfactors.T9i + -1.5 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 25.589703706656966 * tfactors.T9i * tfactors.T9i + -1.5 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1862,13 +1862,13 @@ void rate_He4_S32_to_p_Cl35_removed(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = -57.37716473446963 + -22.187684706656967 * tfactors.T9i + 25.5338 * tfactors.T913 + 6.45824 * tfactors.T9 + -0.950294 * tfactors.T953 + -1.5 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 22.187684706656967 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 25.5338 * tfactors.T923i + 6.45824 + (5.0/3.0) * -0.950294 * tfactors.T923 + -1.5 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1883,13 +1883,13 @@ void rate_He4_S32_to_p_Cl35_removed(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = 32.27223526553037 + -21.654753706656965 * tfactors.T9i + -30.9147 * tfactors.T913i + -1.2345 * tfactors.T913 + 22.5118 * tfactors.T9 + -33.0589 * tfactors.T953 + -0.666667 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 21.654753706656965 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -30.9147 * tfactors.T943i + (1.0/3.0) * -1.2345 * tfactors.T923i + 22.5118 + (5.0/3.0) * -33.0589 * tfactors.T923 + -0.666667 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1904,13 +1904,13 @@ void rate_He4_S32_to_p_Cl35_removed(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = 2.4434452655303747 + -27.664513706656965 * tfactors.T9i + 5.33756 * tfactors.T913 + 1.64418 * tfactors.T9 + -0.246167 * tfactors.T953 + -1.5 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 27.664513706656965 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 5.33756 * tfactors.T923i + 1.64418 + (5.0/3.0) * -0.246167 * tfactors.T923 + -1.5 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1924,8 +1924,8 @@ void rate_He4_S32_to_p_Cl35_removed(const tf_t& tfactors, amrex::Real& rate, amr } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ar36_to_He4_S32_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Ar36_to_He4_S32_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Ar36 --> He4 + S32 @@ -1961,13 +1961,13 @@ void rate_Ar36_to_He4_S32_removed(const tf_t& tfactors, amrex::Real& rate, amrex ln_set_rate = 73.81807507159112 + -77.06468541928012 * tfactors.T9i + -65.3709 * tfactors.T913i + 5.68294 * tfactors.T913 + -5.00388 * tfactors.T9 + 0.571407 * tfactors.T953 + 0.833333 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 77.06468541928012 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -65.3709 * tfactors.T943i + (1.0/3.0) * 5.68294 * tfactors.T923i + -5.00388 + (5.0/3.0) * 0.571407 * tfactors.T923 + 0.833333 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1981,8 +1981,8 @@ void rate_Ar36_to_He4_S32_removed(const tf_t& tfactors, amrex::Real& rate, amrex } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ar36_to_p_Cl35_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Ar36_to_p_Cl35_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Ar36 --> p + Cl35 @@ -2017,12 +2017,12 @@ void rate_Ar36_to_p_Cl35_removed(const tf_t& tfactors, amrex::Real& rate, amrex: // ReacLib set derived from il10r ln_set_rate = -17.455589662878502 + -99.28409012589869 * tfactors.T9i; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 99.28409012589869 * tfactors.T9i * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2037,13 +2037,13 @@ void rate_Ar36_to_p_Cl35_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 60.7561103371215 + -98.71943912589869 * tfactors.T9i + -27.8971 * tfactors.T913i + -16.2304 * tfactors.T913 + 35.255 * tfactors.T9 + -25.8411 * tfactors.T953 + 0.833333 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 98.71943912589869 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -27.8971 * tfactors.T943i + (1.0/3.0) * -16.2304 * tfactors.T923i + 35.255 + (5.0/3.0) * -25.8411 * tfactors.T923 + 0.833333 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2058,13 +2058,13 @@ void rate_Ar36_to_p_Cl35_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 17.222320337121502 + -102.37035912589869 * tfactors.T9i + 18.0179 * tfactors.T913 + -2.86304 * tfactors.T9 + 0.250854 * tfactors.T953; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 102.37035912589869 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 18.0179 * tfactors.T923i + -2.86304 + (5.0/3.0) * 0.250854 * tfactors.T923; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2078,12 +2078,12 @@ void rate_Ar36_to_p_Cl35_removed(const tf_t& tfactors, amrex::Real& rate, amrex: // ReacLib set derived from il10r ln_set_rate = 16.0363703371215 + -100.7293991258987 * tfactors.T9i; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 100.7293991258987 * tfactors.T9i * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2097,8 +2097,8 @@ void rate_Ar36_to_p_Cl35_removed(const tf_t& tfactors, amrex::Real& rate, amrex: } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Ar36_to_p_K39_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_Ar36_to_p_K39_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Ar36 + He4 --> p + K39 @@ -2140,13 +2140,13 @@ void rate_He4_Ar36_to_p_K39_removed(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = 20.654451232729432 + -14.951286608188834 * tfactors.T9i + -30.0732 * tfactors.T913i + 7.03263 * tfactors.T913 + -1.10085 * tfactors.T9 + 0.133768 * tfactors.T953 + -0.666667 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 14.951286608188834 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -30.0732 * tfactors.T943i + (1.0/3.0) * 7.03263 * tfactors.T923i + -1.10085 + (5.0/3.0) * 0.133768 * tfactors.T923 + -0.666667 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2160,8 +2160,8 @@ void rate_He4_Ar36_to_p_K39_removed(const tf_t& tfactors, amrex::Real& rate, amr } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ca40_to_He4_Ar36_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Ca40_to_He4_Ar36_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Ca40 --> He4 + Ar36 @@ -2197,13 +2197,13 @@ void rate_Ca40_to_He4_Ar36_removed(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 77.28432125250924 + -81.69320665503751 * tfactors.T9i + -71.0046 * tfactors.T913i + 4.0656 * tfactors.T913 + -5.26509 * tfactors.T9 + 0.683546 * tfactors.T953 + 0.833333 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 81.69320665503751 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -71.0046 * tfactors.T943i + (1.0/3.0) * 4.0656 * tfactors.T923i + -5.26509 + (5.0/3.0) * 0.683546 * tfactors.T923 + 0.833333 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2217,8 +2217,8 @@ void rate_Ca40_to_He4_Ar36_removed(const tf_t& tfactors, amrex::Real& rate, amre } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ca40_to_p_K39_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Ca40_to_p_K39_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Ca40 --> p + K39 @@ -2254,13 +2254,13 @@ void rate_Ca40_to_p_K39_removed(const tf_t& tfactors, amrex::Real& rate, amrex:: ln_set_rate = 2786.453572485239 + -101.86683326322635 * tfactors.T9i + 802.18 * tfactors.T913i + -4010.27 * tfactors.T913 + 1137.69 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 101.86683326322635 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 802.18 * tfactors.T943i + (1.0/3.0) * -4010.27 * tfactors.T923i + 1137.69 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2275,13 +2275,13 @@ void rate_Ca40_to_p_K39_removed(const tf_t& tfactors, amrex::Real& rate, amrex:: ln_set_rate = 613.1725724852387 + -109.20919326322635 * tfactors.T9i + 641.844 * tfactors.T913i + -1248.49 * tfactors.T913 + 566.426 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 109.20919326322635 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 641.844 * tfactors.T943i + (1.0/3.0) * -1248.49 * tfactors.T923i + 566.426 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2296,13 +2296,13 @@ void rate_Ca40_to_p_K39_removed(const tf_t& tfactors, amrex::Real& rate, amrex:: ln_set_rate = 127.32557248523868 + -98.30957326322635 * tfactors.T9i + 41.1723 * tfactors.T913i + -149.299 * tfactors.T913 + 10.5229 * tfactors.T9 + -0.68208 * tfactors.T953 + 60.7367 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 98.30957326322635 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 41.1723 * tfactors.T943i + (1.0/3.0) * -149.299 * tfactors.T923i + 10.5229 + (5.0/3.0) * -0.68208 * tfactors.T923 + 60.7367 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2316,8 +2316,8 @@ void rate_Ca40_to_p_K39_removed(const tf_t& tfactors, amrex::Real& rate, amrex:: } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Ca40_to_p_Sc43_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_Ca40_to_p_Sc43_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Ca40 + He4 --> p + Sc43 @@ -2359,13 +2359,13 @@ void rate_He4_Ca40_to_p_Sc43_removed(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = 35.67546755788414 + -40.87525788838128 * tfactors.T9i + -32.1734 * tfactors.T913i + 0.0296879 * tfactors.T913 + -0.95232 * tfactors.T9 + 0.129022 * tfactors.T953 + -0.666667 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 40.87525788838128 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -32.1734 * tfactors.T943i + (1.0/3.0) * 0.0296879 * tfactors.T923i + -0.95232 + (5.0/3.0) * 0.129022 * tfactors.T923 + -0.666667 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2379,8 +2379,8 @@ void rate_He4_Ca40_to_p_Sc43_removed(const tf_t& tfactors, amrex::Real& rate, am } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ti44_to_He4_Ca40_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Ti44_to_He4_Ca40_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Ti44 --> He4 + Ca40 @@ -2416,13 +2416,13 @@ void rate_Ti44_to_He4_Ca40_removed(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 78.7006646483486 + -59.49768581557457 * tfactors.T9i + -76.4273 * tfactors.T913i + 3.87451 * tfactors.T913 + -3.61477 * tfactors.T9 + 0.367451 * tfactors.T953 + 0.833333 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 59.49768581557457 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -76.4273 * tfactors.T943i + (1.0/3.0) * 3.87451 * tfactors.T923i + -3.61477 + (5.0/3.0) * 0.367451 * tfactors.T923 + 0.833333 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2436,8 +2436,8 @@ void rate_Ti44_to_He4_Ca40_removed(const tf_t& tfactors, amrex::Real& rate, amre } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ti44_to_p_Sc43_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Ti44_to_p_Sc43_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Ti44 --> p + Sc43 @@ -2473,13 +2473,13 @@ void rate_Ti44_to_p_Sc43_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 62.61343220623275 + -100.37294370395585 * tfactors.T9i + -32.1734 * tfactors.T913i + -1.77078 * tfactors.T913 + -2.21706 * tfactors.T9 + 0.298499 * tfactors.T953 + 0.833333 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 100.37294370395585 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -32.1734 * tfactors.T943i + (1.0/3.0) * -1.77078 * tfactors.T923i + -2.21706 + (5.0/3.0) * 0.298499 * tfactors.T923 + 0.833333 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2493,8 +2493,8 @@ void rate_Ti44_to_p_Sc43_removed(const tf_t& tfactors, amrex::Real& rate, amrex: } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Cr48_to_He4_Ti44_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Cr48_to_He4_Ti44_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Cr48 --> He4 + Ti44 @@ -2530,13 +2530,13 @@ void rate_Cr48_to_He4_Ti44_removed(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 89.75906465832496 + -89.32364150067336 * tfactors.T9i + -81.667 * tfactors.T913i + -10.6333 * tfactors.T913 + -0.672613 * tfactors.T9 + 0.161209 * tfactors.T953 + 0.833333 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 89.32364150067336 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -81.667 * tfactors.T943i + (1.0/3.0) * -10.6333 * tfactors.T923i + -0.672613 + (5.0/3.0) * 0.161209 * tfactors.T923 + 0.833333 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2550,8 +2550,8 @@ void rate_Cr48_to_He4_Ti44_removed(const tf_t& tfactors, amrex::Real& rate, amre } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Cr48_to_p_V47_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Cr48_to_p_V47_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Cr48 --> p + V47 @@ -2587,13 +2587,13 @@ void rate_Cr48_to_p_V47_removed(const tf_t& tfactors, amrex::Real& rate, amrex:: ln_set_rate = 67.75975303984967 + -100.08956223422913 * tfactors.T9i + -34.0548 * tfactors.T913i + -3.41973 * tfactors.T913 + 1.16501 * tfactors.T9 + -0.105543 * tfactors.T953 + -6.20886 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 100.08956223422913 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -34.0548 * tfactors.T943i + (1.0/3.0) * -3.41973 * tfactors.T923i + 1.16501 + (5.0/3.0) * -0.105543 * tfactors.T923 + -6.20886 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2608,13 +2608,13 @@ void rate_Cr48_to_p_V47_removed(const tf_t& tfactors, amrex::Real& rate, amrex:: ln_set_rate = 536.5429530398497 + -99.32517223422914 * tfactors.T9i + 317.171 * tfactors.T913i + -911.679 * tfactors.T913 + 94.4245 * tfactors.T9 + -10.1973 * tfactors.T953 + 332.227 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 99.32517223422914 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 317.171 * tfactors.T943i + (1.0/3.0) * -911.679 * tfactors.T923i + 94.4245 + (5.0/3.0) * -10.1973 * tfactors.T923 + 332.227 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2629,13 +2629,13 @@ void rate_Cr48_to_p_V47_removed(const tf_t& tfactors, amrex::Real& rate, amrex:: ln_set_rate = 48.911453039849675 + -93.78359723422915 * tfactors.T9i + -45.9868 * tfactors.T913i + 13.6822 * tfactors.T913 + -0.376902 * tfactors.T9 + -0.0194875 * tfactors.T953 + -6.9232499999999995 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 93.78359723422915 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -45.9868 * tfactors.T943i + (1.0/3.0) * 13.6822 * tfactors.T923i + -0.376902 + (5.0/3.0) * -0.0194875 * tfactors.T923 + -6.9232499999999995 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2650,13 +2650,13 @@ void rate_Cr48_to_p_V47_removed(const tf_t& tfactors, amrex::Real& rate, amrex:: ln_set_rate = 65.64255303984967 + -94.54467623422914 * tfactors.T9i + -110.655 * tfactors.T913i + 83.0232 * tfactors.T913 + -19.7762 * tfactors.T9 + 3.03961 * tfactors.T953 + -47.9742 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 94.54467623422914 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -110.655 * tfactors.T943i + (1.0/3.0) * 83.0232 * tfactors.T923i + -19.7762 + (5.0/3.0) * 3.03961 * tfactors.T923 + -47.9742 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2670,8 +2670,8 @@ void rate_Cr48_to_p_V47_removed(const tf_t& tfactors, amrex::Real& rate, amrex:: } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_V47_to_He4_Ti44_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_p_V47_to_He4_Ti44_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // V47 + p --> He4 + Ti44 @@ -2713,13 +2713,13 @@ void rate_p_V47_to_He4_Ti44_removed(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = -76.63208838152472 + -6.086479266444236 * tfactors.T9i + 70.2835 * tfactors.T913 + -7.99061 * tfactors.T9 + 0.486213 * tfactors.T953 + -1.5 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 6.086479266444236 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 70.2835 * tfactors.T923i + -7.99061 + (5.0/3.0) * 0.486213 * tfactors.T923 + -1.5 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2733,8 +2733,8 @@ void rate_p_V47_to_He4_Ti44_removed(const tf_t& tfactors, amrex::Real& rate, amr } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Fe52_to_He4_Cr48_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Fe52_to_He4_Cr48_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Fe52 --> He4 + Cr48 @@ -2770,13 +2770,13 @@ void rate_Fe52_to_He4_Cr48_removed(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 90.149113992515 + -92.09363997638769 * tfactors.T9i + -86.7459 * tfactors.T913i + -9.79373 * tfactors.T913 + -0.772169 * tfactors.T9 + 0.155883 * tfactors.T953 + 0.833333 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 92.09363997638769 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -86.7459 * tfactors.T943i + (1.0/3.0) * -9.79373 * tfactors.T923i + -0.772169 + (5.0/3.0) * 0.155883 * tfactors.T923 + 0.833333 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2790,8 +2790,8 @@ void rate_Fe52_to_He4_Cr48_removed(const tf_t& tfactors, amrex::Real& rate, amre } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Fe52_to_p_Mn51_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Fe52_to_p_Mn51_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Fe52 --> p + Mn51 @@ -2827,13 +2827,13 @@ void rate_Fe52_to_p_Mn51_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 61.74743132228039 + -85.61663846070292 * tfactors.T9i + -36.1825 * tfactors.T913i + 0.873042 * tfactors.T913 + -2.89731 * tfactors.T9 + 0.364394 * tfactors.T953 + 0.833333 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 85.61663846070292 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -36.1825 * tfactors.T943i + (1.0/3.0) * 0.873042 * tfactors.T923i + -2.89731 + (5.0/3.0) * 0.364394 * tfactors.T923 + 0.833333 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2847,8 +2847,8 @@ void rate_Fe52_to_p_Mn51_removed(const tf_t& tfactors, amrex::Real& rate, amrex: } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Mn51_to_He4_Cr48_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_p_Mn51_to_He4_Cr48_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Mn51 + p --> He4 + Cr48 @@ -2890,13 +2890,13 @@ void rate_p_Mn51_to_He4_Cr48_removed(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = 58.71348267023461 + -6.47700151570639 * tfactors.T9i + -86.7459 * tfactors.T913i + 1.05653 * tfactors.T913 + -1.15757 * tfactors.T9 + 0.0877546 * tfactors.T953 + -0.666667 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 6.47700151570639 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -86.7459 * tfactors.T943i + (1.0/3.0) * 1.05653 * tfactors.T923i + -1.15757 + (5.0/3.0) * 0.0877546 * tfactors.T923 + -0.666667 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2910,8 +2910,8 @@ void rate_p_Mn51_to_He4_Cr48_removed(const tf_t& tfactors, amrex::Real& rate, am } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ni56_to_He4_Fe52_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Ni56_to_He4_Fe52_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Ni56 --> He4 + Fe52 @@ -2947,13 +2947,13 @@ void rate_Ni56_to_He4_Fe52_removed(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 91.62430485073777 + -92.84097094326391 * tfactors.T9i + -91.6819 * tfactors.T913i + -9.51885 * tfactors.T913 + -0.533014 * tfactors.T9 + 0.0892607 * tfactors.T953 + 0.833333 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 92.84097094326391 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -91.6819 * tfactors.T943i + (1.0/3.0) * -9.51885 * tfactors.T923i + -0.533014 + (5.0/3.0) * 0.0892607 * tfactors.T923 + 0.833333 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2967,8 +2967,8 @@ void rate_Ni56_to_He4_Fe52_removed(const tf_t& tfactors, amrex::Real& rate, amre } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ni56_to_p_Co55_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_Ni56_to_p_Co55_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Ni56 --> p + Co55 @@ -3004,13 +3004,13 @@ void rate_Ni56_to_p_Co55_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 63.15120404192561 + -83.16460378149378 * tfactors.T9i + -38.1053 * tfactors.T913i + -0.210947 * tfactors.T913 + -2.68377 * tfactors.T9 + 0.355814 * tfactors.T953 + 0.833333 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 83.16460378149378 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -38.1053 * tfactors.T943i + (1.0/3.0) * -0.210947 * tfactors.T923i + -2.68377 + (5.0/3.0) * 0.355814 * tfactors.T923 + 0.833333 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -3024,8 +3024,8 @@ void rate_Ni56_to_p_Co55_removed(const tf_t& tfactors, amrex::Real& rate, amrex: } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Co55_to_He4_Fe52_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_p_Co55_to_He4_Fe52_derived(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT, [[maybe_unused]] const T& rate_eval, [[maybe_unused]] part_fun::pf_cache_t& pf_cache) { // Co55 + p --> He4 + Fe52 @@ -3067,13 +3067,13 @@ void rate_p_Co55_to_He4_Fe52_removed(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = 61.42570080881217 + -9.676367161770125 * tfactors.T9i + -91.6819 * tfactors.T913i + -0.329235 * tfactors.T913 + -0.780924 * tfactors.T9 + 0.0425179 * tfactors.T953 + -0.666667 * tfactors.lnT9; - ln_set_rate += net_log_pf; + ln_set_rate += net_log_pf + log_scor; if constexpr (std::is_same_v) { dln_set_rate_dT9 = 9.676367161770125 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -91.6819 * tfactors.T943i + (1.0/3.0) * -0.329235 * tfactors.T923i + -0.780924 + (5.0/3.0) * 0.0425179 * tfactors.T923 + -0.666667 * tfactors.T9i; - dln_set_rate_dT9 += net_dlog_pf_dT9; + dln_set_rate_dT9 += net_dlog_pf_dT9 + dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -3103,252 +3103,594 @@ fill_derived_rates(const tf_t& tfactors, T& rate_eval) pf_cache.index_temp_array_1 = interp_net::find_index(tfactors.T9, part_fun::temp_array_1); - rate_N13_to_p_C12_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_N13_to_p_C12_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_N13_to_p_C12_derived) = drate_dT; + { + // N13_to_p_C12_derived + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_N13_to_p_C12_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_N13_to_p_C12_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_N13_to_p_C12_derived) = drate_dT; + } } - rate_O16_to_He4_C12_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_O16_to_He4_C12_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_O16_to_He4_C12_derived) = drate_dT; - } - rate_Ne20_to_He4_O16_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Ne20_to_He4_O16_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Ne20_to_He4_O16_derived) = drate_dT; + { + // O16_to_He4_C12_derived + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_O16_to_He4_C12_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_O16_to_He4_C12_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_O16_to_He4_C12_derived) = drate_dT; + } } - rate_Mg24_to_p_Na23_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Mg24_to_p_Na23_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Mg24_to_p_Na23_derived) = drate_dT; - } - rate_Mg24_to_He4_Ne20_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Mg24_to_He4_Ne20_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Mg24_to_He4_Ne20_derived) = drate_dT; + { + // Ne20_to_He4_O16_derived + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Ne20_to_He4_O16_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Ne20_to_He4_O16_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ne20_to_He4_O16_derived) = drate_dT; + } } - rate_Si28_to_p_Al27_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Si28_to_p_Al27_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Si28_to_p_Al27_derived) = drate_dT; - } - rate_Si28_to_He4_Mg24_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Si28_to_He4_Mg24_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Si28_to_He4_Mg24_derived) = drate_dT; + { + // Mg24_to_p_Na23_derived + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Mg24_to_p_Na23_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Mg24_to_p_Na23_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mg24_to_p_Na23_derived) = drate_dT; + } } - rate_S32_to_p_P31_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_S32_to_p_P31_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_S32_to_p_P31_derived) = drate_dT; - } - rate_S32_to_He4_Si28_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_S32_to_He4_Si28_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_S32_to_He4_Si28_derived) = drate_dT; + { + // Mg24_to_He4_Ne20_derived + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Mg24_to_He4_Ne20_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Mg24_to_He4_Ne20_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mg24_to_He4_Ne20_derived) = drate_dT; + } } - rate_C12_to_He4_He4_He4_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_C12_to_He4_He4_He4_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_C12_to_He4_He4_He4_derived) = drate_dT; - } - rate_p_O16_to_He4_N13_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_p_O16_to_He4_N13_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_O16_to_He4_N13_derived) = drate_dT; + { + // Si28_to_p_Al27_derived + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Si28_to_p_Al27_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Si28_to_p_Al27_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si28_to_p_Al27_derived) = drate_dT; + } } - rate_He4_Ne20_to_p_Na23_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_He4_Ne20_to_p_Na23_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Ne20_to_p_Na23_derived) = drate_dT; - } - rate_He4_Ne20_to_C12_C12_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_He4_Ne20_to_C12_C12_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Ne20_to_C12_C12_derived) = drate_dT; + { + // Si28_to_He4_Mg24_derived + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Si28_to_He4_Mg24_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Si28_to_He4_Mg24_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si28_to_He4_Mg24_derived) = drate_dT; + } } - rate_p_Na23_to_C12_C12_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_p_Na23_to_C12_C12_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_Na23_to_C12_C12_derived) = drate_dT; - } - rate_He4_Mg24_to_p_Al27_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_He4_Mg24_to_p_Al27_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Mg24_to_p_Al27_derived) = drate_dT; + { + // S32_to_p_P31_derived + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_S32_to_p_P31_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_S32_to_p_P31_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S32_to_p_P31_derived) = drate_dT; + } } - rate_He4_Mg24_to_C12_O16_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_He4_Mg24_to_C12_O16_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Mg24_to_C12_O16_derived) = drate_dT; - } - rate_p_Al27_to_C12_O16_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_p_Al27_to_C12_O16_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_Al27_to_C12_O16_derived) = drate_dT; + { + // S32_to_He4_Si28_derived - } - rate_He4_Si28_to_p_P31_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_He4_Si28_to_p_P31_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Si28_to_p_P31_derived) = drate_dT; + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_S32_to_He4_Si28_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_S32_to_He4_Si28_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S32_to_He4_Si28_derived) = drate_dT; + } + } - } - rate_He4_Si28_to_O16_O16_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_He4_Si28_to_O16_O16_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Si28_to_O16_O16_derived) = drate_dT; + { + // C12_to_He4_He4_He4_derived - } - rate_p_P31_to_O16_O16_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_p_P31_to_O16_O16_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_P31_to_O16_O16_derived) = drate_dT; + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_C12_to_He4_He4_He4_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_C12_to_He4_He4_He4_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_C12_to_He4_He4_He4_derived) = drate_dT; + } + } - } - rate_Mg24_to_C12_C12_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Mg24_to_C12_C12_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Mg24_to_C12_C12_derived) = drate_dT; - - } - rate_S32_to_O16_O16_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_S32_to_O16_O16_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_S32_to_O16_O16_derived) = drate_dT; - - } - rate_Si28_to_C12_O16_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Si28_to_C12_O16_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Si28_to_C12_O16_derived) = drate_dT; - - } - rate_He4_S32_to_p_Cl35_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_He4_S32_to_p_Cl35_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_S32_to_p_Cl35_removed) = drate_dT; - - } - rate_Ar36_to_He4_S32_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Ar36_to_He4_S32_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Ar36_to_He4_S32_removed) = drate_dT; - - } - rate_Ar36_to_p_Cl35_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Ar36_to_p_Cl35_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Ar36_to_p_Cl35_removed) = drate_dT; - - } - rate_He4_Ar36_to_p_K39_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_He4_Ar36_to_p_K39_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Ar36_to_p_K39_removed) = drate_dT; - - } - rate_Ca40_to_He4_Ar36_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Ca40_to_He4_Ar36_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Ca40_to_He4_Ar36_removed) = drate_dT; - - } - rate_Ca40_to_p_K39_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Ca40_to_p_K39_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Ca40_to_p_K39_removed) = drate_dT; - - } - rate_He4_Ca40_to_p_Sc43_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_He4_Ca40_to_p_Sc43_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Ca40_to_p_Sc43_removed) = drate_dT; - - } - rate_Ti44_to_He4_Ca40_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Ti44_to_He4_Ca40_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Ti44_to_He4_Ca40_removed) = drate_dT; - - } - rate_Ti44_to_p_Sc43_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Ti44_to_p_Sc43_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Ti44_to_p_Sc43_removed) = drate_dT; - - } - rate_Cr48_to_He4_Ti44_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Cr48_to_He4_Ti44_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Cr48_to_He4_Ti44_removed) = drate_dT; - - } - rate_Cr48_to_p_V47_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Cr48_to_p_V47_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Cr48_to_p_V47_removed) = drate_dT; - - } - rate_p_V47_to_He4_Ti44_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_p_V47_to_He4_Ti44_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_V47_to_He4_Ti44_removed) = drate_dT; - - } - rate_Fe52_to_He4_Cr48_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Fe52_to_He4_Cr48_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Fe52_to_He4_Cr48_removed) = drate_dT; - - } - rate_Fe52_to_p_Mn51_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Fe52_to_p_Mn51_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Fe52_to_p_Mn51_removed) = drate_dT; - - } - rate_p_Mn51_to_He4_Cr48_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_p_Mn51_to_He4_Cr48_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_Mn51_to_He4_Cr48_removed) = drate_dT; - - } - rate_Ni56_to_He4_Fe52_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Ni56_to_He4_Fe52_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Ni56_to_He4_Fe52_removed) = drate_dT; - - } - rate_Ni56_to_p_Co55_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Ni56_to_p_Co55_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Ni56_to_p_Co55_removed) = drate_dT; + { + // p_O16_to_He4_N13_derived + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_O16); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_O16); + } +#endif + rate_p_O16_to_He4_N13_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_p_O16_to_He4_N13_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_O16_to_He4_N13_derived) = drate_dT; + } + } + + { + // He4_Ne20_to_p_Na23_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ne20); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ne20); + } +#endif + rate_He4_Ne20_to_p_Na23_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_He4_Ne20_to_p_Na23_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Ne20_to_p_Na23_derived) = drate_dT; + } + } + + { + // He4_Ne20_to_C12_C12_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ne20); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ne20); + } +#endif + rate_He4_Ne20_to_C12_C12_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_He4_Ne20_to_C12_C12_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Ne20_to_C12_C12_derived) = drate_dT; + } + } + + { + // p_Na23_to_C12_C12_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Na23); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Na23); + } +#endif + rate_p_Na23_to_C12_C12_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_p_Na23_to_C12_C12_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Na23_to_C12_C12_derived) = drate_dT; + } + } + + { + // He4_Mg24_to_p_Al27_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Mg24); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Mg24); + } +#endif + rate_He4_Mg24_to_p_Al27_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_He4_Mg24_to_p_Al27_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Mg24_to_p_Al27_derived) = drate_dT; + } + } + + { + // He4_Mg24_to_C12_O16_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Mg24); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Mg24); + } +#endif + rate_He4_Mg24_to_C12_O16_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_He4_Mg24_to_C12_O16_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Mg24_to_C12_O16_derived) = drate_dT; + } + } + + { + // p_Al27_to_C12_O16_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Al27); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Al27); + } +#endif + rate_p_Al27_to_C12_O16_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_p_Al27_to_C12_O16_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Al27_to_C12_O16_derived) = drate_dT; + } + } + + { + // He4_Si28_to_p_P31_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Si28); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Si28); + } +#endif + rate_He4_Si28_to_p_P31_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_He4_Si28_to_p_P31_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Si28_to_p_P31_derived) = drate_dT; + } + } + + { + // He4_Si28_to_O16_O16_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Si28); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Si28); + } +#endif + rate_He4_Si28_to_O16_O16_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_He4_Si28_to_O16_O16_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Si28_to_O16_O16_derived) = drate_dT; + } + } + + { + // p_P31_to_O16_O16_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_P31); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_P31); + } +#endif + rate_p_P31_to_O16_O16_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_p_P31_to_O16_O16_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_P31_to_O16_O16_derived) = drate_dT; + } + } + + { + // Mg24_to_C12_C12_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Mg24_to_C12_C12_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Mg24_to_C12_C12_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mg24_to_C12_C12_derived) = drate_dT; + } + } + + { + // S32_to_O16_O16_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_S32_to_O16_O16_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_S32_to_O16_O16_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S32_to_O16_O16_derived) = drate_dT; + } + } + + { + // Si28_to_C12_O16_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Si28_to_C12_O16_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Si28_to_C12_O16_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si28_to_C12_O16_derived) = drate_dT; + } + } + + { + // He4_S32_to_p_Cl35_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_S32); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_S32); + } +#endif + rate_He4_S32_to_p_Cl35_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_He4_S32_to_p_Cl35_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_S32_to_p_Cl35_derived) = drate_dT; + } + } + + { + // Ar36_to_He4_S32_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Ar36_to_He4_S32_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Ar36_to_He4_S32_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar36_to_He4_S32_derived) = drate_dT; + } + } + + { + // Ar36_to_p_Cl35_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Ar36_to_p_Cl35_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Ar36_to_p_Cl35_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar36_to_p_Cl35_derived) = drate_dT; + } + } + + { + // He4_Ar36_to_p_K39_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ar36); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ar36); + } +#endif + rate_He4_Ar36_to_p_K39_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_He4_Ar36_to_p_K39_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Ar36_to_p_K39_derived) = drate_dT; + } + } + + { + // Ca40_to_He4_Ar36_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Ca40_to_He4_Ar36_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Ca40_to_He4_Ar36_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ca40_to_He4_Ar36_derived) = drate_dT; + } + } + + { + // Ca40_to_p_K39_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Ca40_to_p_K39_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Ca40_to_p_K39_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ca40_to_p_K39_derived) = drate_dT; + } + } + + { + // He4_Ca40_to_p_Sc43_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ca40); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ca40); + } +#endif + rate_He4_Ca40_to_p_Sc43_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_He4_Ca40_to_p_Sc43_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Ca40_to_p_Sc43_derived) = drate_dT; + } + } + + { + // Ti44_to_He4_Ca40_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Ti44_to_He4_Ca40_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Ti44_to_He4_Ca40_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti44_to_He4_Ca40_derived) = drate_dT; + } + } + + { + // Ti44_to_p_Sc43_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Ti44_to_p_Sc43_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Ti44_to_p_Sc43_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti44_to_p_Sc43_derived) = drate_dT; + } + } + + { + // Cr48_to_He4_Ti44_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Cr48_to_He4_Ti44_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Cr48_to_He4_Ti44_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr48_to_He4_Ti44_derived) = drate_dT; + } + } + + { + // Cr48_to_p_V47_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Cr48_to_p_V47_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Cr48_to_p_V47_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr48_to_p_V47_derived) = drate_dT; + } + } + + { + // p_V47_to_He4_Ti44_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_V47); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_V47); + } +#endif + rate_p_V47_to_He4_Ti44_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_p_V47_to_He4_Ti44_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_V47_to_He4_Ti44_derived) = drate_dT; + } + } + + { + // Fe52_to_He4_Cr48_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Fe52_to_He4_Cr48_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Fe52_to_He4_Cr48_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe52_to_He4_Cr48_derived) = drate_dT; + } + } + + { + // Fe52_to_p_Mn51_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Fe52_to_p_Mn51_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Fe52_to_p_Mn51_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe52_to_p_Mn51_derived) = drate_dT; + } + } + + { + // p_Mn51_to_He4_Cr48_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Mn51); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Mn51); + } +#endif + rate_p_Mn51_to_He4_Cr48_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_p_Mn51_to_He4_Cr48_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Mn51_to_He4_Cr48_derived) = drate_dT; + } + } + + { + // Ni56_to_He4_Fe52_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Ni56_to_He4_Fe52_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Ni56_to_He4_Fe52_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni56_to_He4_Fe52_derived) = drate_dT; + } + } + + { + // Ni56_to_p_Co55_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Ni56_to_p_Co55_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Ni56_to_p_Co55_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni56_to_p_Co55_derived) = drate_dT; + } + } + + { + // p_Co55_to_He4_Fe52_derived + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Co55); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Co55); + } +#endif + rate_p_Co55_to_He4_Fe52_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_p_Co55_to_He4_Fe52_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Co55_to_He4_Fe52_derived) = drate_dT; + } } - rate_p_Co55_to_He4_Fe52_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_p_Co55_to_He4_Fe52_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_Co55_to_He4_Fe52_removed) = drate_dT; - } } #endif diff --git a/networks/he-burn/ase/interp_tools.H b/networks/he-burn/ase/interp_tools.H index 5444bb552..bbc0d2685 100644 --- a/networks/he-burn/ase/interp_tools.H +++ b/networks/he-burn/ase/interp_tools.H @@ -55,7 +55,7 @@ namespace interp_net { if (x0 < x_array(left)) { idx = left; - } else if (x0 > x_array(right)) { + } else if (x0 >= x_array(right)) { idx = right - 1; } else { idx = find_index(x0, x_array); diff --git a/networks/he-burn/ase/modified_rates.H b/networks/he-burn/ase/modified_rates.H new file mode 100644 index 000000000..e63de5077 --- /dev/null +++ b/networks/he-burn/ase/modified_rates.H @@ -0,0 +1,112 @@ +#ifndef MODIFIED_RATES_H +#define MODIFIED_RATES_H + +#include +#include + +#include +#include +#include +#include +#include + +namespace modified_rates { + + using namespace temp_tabular; + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_C12_C12_to_Mg24_modified(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { + + // C12 + C12 --> Mg24 (calls the underlying rate) + + rate_C12_C12_to_n_Mg23_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_O16_O16_to_S32_modified(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { + + // O16 + O16 --> S32 (calls the underlying rate) + + rate_O16_O16_to_n_S31_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_C12_O16_to_Si28_modified(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { + + // O16 + C12 --> Si28 (calls the underlying rate) + + rate_C12_O16_to_n_Si27_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + } + + + template + AMREX_GPU_HOST_DEVICE AMREX_INLINE + void + fill_rates([[maybe_unused]] const tf_t& tfactors, + [[maybe_unused]] T& rate_eval) + { + + [[maybe_unused]] amrex::Real rate; + [[maybe_unused]] amrex::Real drate_dT; + + { + // C12_C12_to_Mg24_modified + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_C12_C12); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_C12_C12); + } +#endif + rate_C12_C12_to_Mg24_modified(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_C12_C12_to_Mg24_modified) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_C12_C12_to_Mg24_modified) = drate_dT; + } + } + + { + // O16_O16_to_S32_modified + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_O16_O16); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_O16_O16); + } +#endif + rate_O16_O16_to_S32_modified(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_O16_O16_to_S32_modified) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_O16_O16_to_S32_modified) = drate_dT; + } + } + + { + // C12_O16_to_Si28_modified + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_C12_O16); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_C12_O16); + } +#endif + rate_C12_O16_to_Si28_modified(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_C12_O16_to_Si28_modified) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_C12_O16_to_Si28_modified) = drate_dT; + } + } + + + } +} +#endif diff --git a/networks/he-burn/ase/partition_functions.H b/networks/he-burn/ase/partition_functions.H index 915f5412e..aed45f869 100644 --- a/networks/he-burn/ase/partition_functions.H +++ b/networks/he-burn/ase/partition_functions.H @@ -22,7 +22,7 @@ namespace part_fun { // this is T9 - inline AMREX_GPU_MANAGED amrex::Array1D temp_array_1 = { + inline AMREX_GPU_DEVICE amrex::Array1D temp_array_1 = { 0.01, 0.15, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.5, 2.0, 2.5, 3.0, @@ -45,7 +45,7 @@ namespace part_fun { // this is log(partition function) - inline AMREX_GPU_MANAGED amrex::Array1D O16_pf_array = { + inline AMREX_GPU_DEVICE amrex::Array1D O16_pf_array = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, @@ -69,7 +69,7 @@ namespace part_fun { // this is log(partition function) - inline AMREX_GPU_MANAGED amrex::Array1D Ne20_pf_array = { + inline AMREX_GPU_DEVICE amrex::Array1D Ne20_pf_array = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5999872001381317e-05, 0.00038192705657577196, 0.0025407695097516073, 0.008962714607884434, @@ -93,7 +93,7 @@ namespace part_fun { // this is log(partition function) - inline AMREX_GPU_MANAGED amrex::Array1D Na23_pf_array = { + inline AMREX_GPU_DEVICE amrex::Array1D Na23_pf_array = { 0.0, 0.0, 0.0, 0.0, 3.999991999914312e-06, 5.499848755537228e-05, 0.0003019544071791481, 0.0010184811719273939, 0.002532789778269521, 0.0051397687298581594, 0.00904794362623629, 0.048651106882368046, 0.11044327651595648, 0.1779034781081781, 0.24236561796080108, @@ -117,7 +117,7 @@ namespace part_fun { // this is log(partition function) - inline AMREX_GPU_MANAGED amrex::Array1D Mg24_pf_array = { + inline AMREX_GPU_DEVICE amrex::Array1D Mg24_pf_array = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.999994999180668e-07, 0.0001259920626667995, 0.0017764212290928272, 0.008665347199341391, 0.02478529122240376, @@ -141,7 +141,7 @@ namespace part_fun { // this is log(partition function) - inline AMREX_GPU_MANAGED amrex::Array1D Al27_pf_array = { + inline AMREX_GPU_DEVICE amrex::Array1D Al27_pf_array = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.9999980000601777e-06, 7.999968000178667e-06, 2.3999712004631918e-05, 0.0007467211343664971, 0.0043365834151270505, 0.012613119117341724, 0.025879225360058624, @@ -165,7 +165,7 @@ namespace part_fun { // this is log(partition function) - inline AMREX_GPU_MANAGED amrex::Array1D Si28_pf_array = { + inline AMREX_GPU_DEVICE amrex::Array1D Si28_pf_array = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.999987500074422e-06, 0.00016398655347018683, 0.0012951609168895288, 0.005118876169847203, @@ -189,7 +189,7 @@ namespace part_fun { // this is log(partition function) - inline AMREX_GPU_MANAGED amrex::Array1D P31_pf_array = { + inline AMREX_GPU_DEVICE amrex::Array1D P31_pf_array = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.999994999180668e-07, 0.00011099383995581128, 0.0012951609168895288, 0.005682822135497365, 0.015358452840402968, @@ -213,7 +213,7 @@ namespace part_fun { // this is log(partition function) - inline AMREX_GPU_MANAGED amrex::Array1D S32_pf_array = { + inline AMREX_GPU_DEVICE amrex::Array1D S32_pf_array = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.1999928000476974e-05, 0.0001599872013651075, 0.0008965979359162839, @@ -237,7 +237,7 @@ namespace part_fun { // this is log(partition function) - inline AMREX_GPU_MANAGED amrex::Array1D Cl35_pf_array = { + inline AMREX_GPU_DEVICE amrex::Array1D Cl35_pf_array = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.1999118024792734e-05, 0.0004768862716642343, 0.002171640281399847, 0.006214649003101918, @@ -261,7 +261,7 @@ namespace part_fun { // this is log(partition function) - inline AMREX_GPU_MANAGED amrex::Array1D Ar36_pf_array = { + inline AMREX_GPU_DEVICE amrex::Array1D Ar36_pf_array = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.999994999180668e-07, 5.399854205248437e-05, 0.0005328580059528724, 0.0024460060865663185, @@ -285,7 +285,7 @@ namespace part_fun { // this is log(partition function) - inline AMREX_GPU_MANAGED amrex::Array1D K39_pf_array = { + inline AMREX_GPU_DEVICE amrex::Array1D K39_pf_array = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 8.999959500168733e-06, 7.899687966427683e-05, @@ -309,7 +309,7 @@ namespace part_fun { // this is log(partition function) - inline AMREX_GPU_MANAGED amrex::Array1D Ca40_pf_array = { + inline AMREX_GPU_DEVICE amrex::Array1D Ca40_pf_array = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 7.999968000178667e-06, @@ -333,7 +333,7 @@ namespace part_fun { // this is log(partition function) - inline AMREX_GPU_MANAGED amrex::Array1D Sc43_pf_array = { + inline AMREX_GPU_DEVICE amrex::Array1D Sc43_pf_array = { 0.0, 3.999991999914312e-06, 7.399726213497465e-05, 0.001402016715091746, 0.006077494560027172, 0.014618625311574956, 0.02619392408247513, 0.039701366851552046, 0.05424762604898671, 0.06923404240290812, 0.08429886812818674, 0.15680885802481764, 0.22576092300652262, 0.2958459074810483, 0.3697667707656917, @@ -357,7 +357,7 @@ namespace part_fun { // this is log(partition function) - inline AMREX_GPU_MANAGED amrex::Array1D Ti44_pf_array = { + inline AMREX_GPU_DEVICE amrex::Array1D Ti44_pf_array = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.999994999180668e-07, 3.999991999914312e-06, 1.6999855501571383e-05, 0.001148340404701717, 0.009309531525720607, 0.03254753540924965, 0.07466488847560604, @@ -381,7 +381,7 @@ namespace part_fun { // this is log(partition function) - inline AMREX_GPU_MANAGED amrex::Array1D V47_pf_array = { + inline AMREX_GPU_DEVICE amrex::Array1D V47_pf_array = { 5.799831806492598e-05, 0.0017464740260096463, 0.009732485344379859, 0.056357648868795907, 0.13811537012749586, 0.23671188375470134, 0.33785770498795076, 0.4340856062023528, 0.5224146112876673, 0.6021781642551665, 0.6737563884480131, 0.9374767156169274, 1.1057414821365488, 1.2270658944596067, 1.3241582851318665, @@ -405,7 +405,7 @@ namespace part_fun { // this is log(partition function) - inline AMREX_GPU_MANAGED amrex::Array1D Cr48_pf_array = { + inline AMREX_GPU_DEVICE amrex::Array1D Cr48_pf_array = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.9999980000601777e-06, 1.8999819502277547e-05, 9.099585975123644e-05, 0.0003069528851426514, 0.0008086729358847522, 0.01474081832149851, 0.06183142275093884, 0.143112843568674, 0.24629820135844444, @@ -429,7 +429,7 @@ namespace part_fun { // this is log(partition function) - inline AMREX_GPU_MANAGED amrex::Array1D Mn51_pf_array = { + inline AMREX_GPU_DEVICE amrex::Array1D Mn51_pf_array = { 0.0, 0.0, 9.999994999180668e-07, 0.00013899034039500225, 0.001371059667992007, 0.005417299897942013, 0.013501443923597083, 0.02583439952789853, 0.0418873468309038, 0.060801547340661864, 0.08168044277606486, 0.19327880627694072, 0.29229193070917964, 0.3745845060072903, 0.44569620808461924, @@ -453,7 +453,7 @@ namespace part_fun { // this is log(partition function) - inline AMREX_GPU_MANAGED amrex::Array1D Fe52_pf_array = { + inline AMREX_GPU_DEVICE amrex::Array1D Fe52_pf_array = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3.999991999914312e-06, 2.1999758003515767e-05, 8.699621571943491e-05, 0.00026096594542543384, 0.006963697081509575, 0.035510955889664755, 0.09259923578662213, 0.17220724583011637, @@ -477,7 +477,7 @@ namespace part_fun { // this is log(partition function) - inline AMREX_GPU_MANAGED amrex::Array1D Co55_pf_array = { + inline AMREX_GPU_DEVICE amrex::Array1D Co55_pf_array = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.9999980000601777e-06, 3.299945551192844e-05, 0.0002149768908123338, @@ -501,7 +501,7 @@ namespace part_fun { // this is log(partition function) - inline AMREX_GPU_MANAGED amrex::Array1D Ni56_pf_array = { + inline AMREX_GPU_DEVICE amrex::Array1D Ni56_pf_array = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.999994999180668e-07, 1.7999838002017484e-05, 0.00014798904908051437, @@ -525,7 +525,7 @@ namespace part_fun { // interpolation routine template - AMREX_GPU_HOST_DEVICE AMREX_INLINE + AMREX_GPU_DEVICE AMREX_INLINE void interpolate_pf(const amrex::Real t9, int idx, const T& temp_array, const T& pf_array, amrex::Real& logpf, amrex::Real& dlogpf_dT9) { @@ -571,7 +571,7 @@ namespace part_fun { amrex::Array2D data; int index_temp_array_1{-1}; - AMREX_GPU_HOST_DEVICE AMREX_INLINE + AMREX_GPU_DEVICE AMREX_INLINE pf_cache_t() { // The entries will be default-initialized to -900, // log(partition_function) should never be -900. @@ -587,7 +587,7 @@ namespace part_fun { // get the partition function for nucleus inuc. Here pf_cache // should already contain the index into the temp / pf arrays -AMREX_GPU_HOST_DEVICE AMREX_INLINE +AMREX_GPU_DEVICE AMREX_INLINE void get_partition_function(const int inuc, [[maybe_unused]] const amrex::Real T9, const part_fun::pf_cache_t& pf_cache, @@ -735,7 +735,7 @@ void get_partition_function(const int inuc, // index into the arrays. Uses tfactors instead of T9 as argument, // and returns pf and dpf_dT instead of logpf and dlogpf_dT9 -AMREX_GPU_HOST_DEVICE AMREX_INLINE +AMREX_GPU_DEVICE AMREX_INLINE void get_partition_function(const int inuc, [[maybe_unused]] const tf_t& tfactors, amrex::Real& pf, amrex::Real& dpf_dT) { @@ -755,7 +755,7 @@ void get_partition_function(const int inuc, } -AMREX_GPU_HOST_DEVICE AMREX_INLINE +AMREX_GPU_DEVICE AMREX_INLINE void get_partition_function_cached(const int inuc, const amrex::Real T9, part_fun::pf_cache_t& pf_cache, amrex::Real& logpf, amrex::Real& dlogpf_dT9) { @@ -773,7 +773,7 @@ void get_partition_function_cached(const int inuc, const amrex::Real T9, template -AMREX_GPU_HOST_DEVICE AMREX_INLINE +AMREX_GPU_DEVICE AMREX_INLINE constexpr amrex::Real get_spin_state() { static_assert(spec >= 1 && spec <= NumSpec); @@ -823,7 +823,7 @@ constexpr amrex::Real get_spin_state() { // Legacy (non-templated) interface -AMREX_GPU_HOST_DEVICE AMREX_INLINE +AMREX_GPU_DEVICE AMREX_INLINE amrex::Real get_spin_state (int spec) { amrex::Real s = -1.0_rt; diff --git a/networks/he-burn/ase/pynucastro-info.txt b/networks/he-burn/ase/pynucastro-info.txt index e055581de..a8c40442c 100644 --- a/networks/he-burn/ase/pynucastro-info.txt +++ b/networks/he-burn/ase/pynucastro-info.txt @@ -1 +1 @@ -pynucastro version: 2.9.0-28-gbcc09d414 +pynucastro version: 2.11.0-10-ge524a06ef diff --git a/networks/he-burn/ase/rate_type.H b/networks/he-burn/ase/rate_type.H new file mode 100644 index 000000000..4819ade44 --- /dev/null +++ b/networks/he-burn/ase/rate_type.H @@ -0,0 +1,25 @@ +#ifndef NET_RATE_TYPE_H +#define NET_RATE_TYPE_H + +#include + +struct rate_t { + amrex::Array1D screened_rates; +#ifdef SCREENING + amrex::Array1D log_screen; +#endif + amrex::Real enuc_weak; +}; + +struct rate_derivs_t { + amrex::Array1D screened_rates; + amrex::Array1D dscreened_rates_dT; +#ifdef SCREENING + amrex::Array1D log_screen; + amrex::Array1D dlog_screen_dT; +#endif + amrex::Real enuc_weak; +}; + + +#endif \ No newline at end of file diff --git a/networks/he-burn/ase/reaclib_rates.H b/networks/he-burn/ase/reaclib_rates.H index fdaa029b8..3a36f7af9 100644 --- a/networks/he-burn/ase/reaclib_rates.H +++ b/networks/he-burn/ase/reaclib_rates.H @@ -6,25 +6,14 @@ #include #include +#include using namespace Rates; using namespace Species; -struct rate_t { - amrex::Array1D screened_rates; - amrex::Real enuc_weak; -}; - -struct rate_derivs_t { - amrex::Array1D screened_rates; - amrex::Array1D dscreened_rates_dT; - amrex::Real enuc_weak; -}; - - template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_C12_to_N13_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_p_C12_to_N13_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // C12 + p --> N13 @@ -39,9 +28,13 @@ void rate_p_C12_to_N13_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::R ln_set_rate = 17.1482 + -13.692 * tfactors.T913i + -0.230881 * tfactors.T913 + 4.44362 * tfactors.T9 + -3.15898 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -13.692 * tfactors.T943i + (1.0/3.0) * -0.230881 * tfactors.T923i + 4.44362 + (5.0/3.0) * -3.15898 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -56,9 +49,13 @@ void rate_p_C12_to_N13_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::R ln_set_rate = 17.5428 + -3.77849 * tfactors.T9i + -5.10735 * tfactors.T913i + -2.24111 * tfactors.T913 + 0.148883 * tfactors.T9 + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 3.77849 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -5.10735 * tfactors.T943i + (1.0/3.0) * -2.24111 * tfactors.T923i + 0.148883 + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -72,8 +69,8 @@ void rate_p_C12_to_N13_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::R } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_C12_to_O16_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_C12_to_O16_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // C12 + He4 --> O16 @@ -88,9 +85,13 @@ void rate_He4_C12_to_O16_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 254.634 + -1.84097 * tfactors.T9i + 103.411 * tfactors.T913i + -420.567 * tfactors.T913 + 64.0874 * tfactors.T9 + -12.4624 * tfactors.T953 + 137.303 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 1.84097 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 103.411 * tfactors.T943i + (1.0/3.0) * -420.567 * tfactors.T923i + 64.0874 + (5.0/3.0) * -12.4624 * tfactors.T923 + 137.303 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -105,9 +106,13 @@ void rate_He4_C12_to_O16_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 69.6526 + -1.39254 * tfactors.T9i + 58.9128 * tfactors.T913i + -148.273 * tfactors.T913 + 9.08324 * tfactors.T9 + -0.541041 * tfactors.T953 + 70.3554 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 1.39254 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 58.9128 * tfactors.T943i + (1.0/3.0) * -148.273 * tfactors.T923i + 9.08324 + (5.0/3.0) * -0.541041 * tfactors.T923 + 70.3554 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -121,8 +126,8 @@ void rate_He4_C12_to_O16_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex: } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_O16_to_Ne20_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_O16_to_Ne20_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // O16 + He4 --> Ne20 @@ -137,9 +142,13 @@ void rate_He4_O16_to_Ne20_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex ln_set_rate = 3.88571 + -10.3585 * tfactors.T9i + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 10.3585 * tfactors.T9i * tfactors.T9i + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -154,9 +163,13 @@ void rate_He4_O16_to_Ne20_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex ln_set_rate = 23.903 + -39.7262 * tfactors.T913i + -0.210799 * tfactors.T913 + 0.442879 * tfactors.T9 + -0.0797753 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -39.7262 * tfactors.T943i + (1.0/3.0) * -0.210799 * tfactors.T923i + 0.442879 + (5.0/3.0) * -0.0797753 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -171,9 +184,13 @@ void rate_He4_O16_to_Ne20_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex ln_set_rate = 9.50848 + -12.7643 * tfactors.T9i + -3.65925 * tfactors.T913 + 0.714224 * tfactors.T9 + -0.00107508 * tfactors.T953 + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 12.7643 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -3.65925 * tfactors.T923i + 0.714224 + (5.0/3.0) * -0.00107508 * tfactors.T923 + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -187,8 +204,8 @@ void rate_He4_O16_to_Ne20_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Ne20_to_Mg24_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_Ne20_to_Mg24_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Ne20 + He4 --> Mg24 @@ -203,9 +220,13 @@ void rate_He4_Ne20_to_Mg24_reaclib(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = -8.79827 + -12.7809 * tfactors.T9i + 16.9229 * tfactors.T913 + -2.57325 * tfactors.T9 + 0.208997 * tfactors.T953 + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 12.7809 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 16.9229 * tfactors.T923i + -2.57325 + (5.0/3.0) * 0.208997 * tfactors.T923 + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -220,9 +241,13 @@ void rate_He4_Ne20_to_Mg24_reaclib(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 1.98307 + -9.22026 * tfactors.T9i + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 9.22026 * tfactors.T9i * tfactors.T9i + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -237,9 +262,13 @@ void rate_He4_Ne20_to_Mg24_reaclib(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = -38.7055 + -2.50605 * tfactors.T9i + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 2.50605 * tfactors.T9i * tfactors.T9i + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -254,9 +283,13 @@ void rate_He4_Ne20_to_Mg24_reaclib(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 24.5058 + -46.2525 * tfactors.T913i + 5.58901 * tfactors.T913 + 7.61843 * tfactors.T9 + -3.683 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -46.2525 * tfactors.T943i + (1.0/3.0) * 5.58901 * tfactors.T923i + 7.61843 + (5.0/3.0) * -3.683 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -270,8 +303,8 @@ void rate_He4_Ne20_to_Mg24_reaclib(const tf_t& tfactors, amrex::Real& rate, amre } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Na23_to_Mg24_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_p_Na23_to_Mg24_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Na23 + p --> Mg24 @@ -286,9 +319,13 @@ void rate_p_Na23_to_Mg24_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 9.0594 + -3.28029 * tfactors.T9i + -0.360588 * tfactors.T913 + 1.4187 * tfactors.T9 + -0.184061 * tfactors.T953 + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 3.28029 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -0.360588 * tfactors.T923i + 1.4187 + (5.0/3.0) * -0.184061 * tfactors.T923 + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -303,9 +340,13 @@ void rate_p_Na23_to_Mg24_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = -5.02585 + -1.61219 * tfactors.T9i + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 1.61219 * tfactors.T9i * tfactors.T9i + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -320,9 +361,13 @@ void rate_p_Na23_to_Mg24_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 18.9075 + -20.6428 * tfactors.T913i + 1.52954 * tfactors.T913 + 2.7487 * tfactors.T9 + -1.0 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -20.6428 * tfactors.T943i + (1.0/3.0) * 1.52954 * tfactors.T923i + 2.7487 + (5.0/3.0) * -1.0 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -336,8 +381,8 @@ void rate_p_Na23_to_Mg24_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex: } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Mg24_to_Si28_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_Mg24_to_Si28_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Mg24 + He4 --> Si28 @@ -352,9 +397,13 @@ void rate_He4_Mg24_to_Si28_reaclib(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 8.03977 + -15.629 * tfactors.T9i + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 15.629 * tfactors.T9i * tfactors.T9i + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -369,9 +418,13 @@ void rate_He4_Mg24_to_Si28_reaclib(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = -50.5494 + -12.8332 * tfactors.T9i + 21.3721 * tfactors.T913i + 37.7649 * tfactors.T913 + -4.10635 * tfactors.T9 + 0.249618 * tfactors.T953 + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 12.8332 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 21.3721 * tfactors.T943i + (1.0/3.0) * 37.7649 * tfactors.T923i + -4.10635 + (5.0/3.0) * 0.249618 * tfactors.T923 + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -385,8 +438,8 @@ void rate_He4_Mg24_to_Si28_reaclib(const tf_t& tfactors, amrex::Real& rate, amre } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Al27_to_Si28_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_p_Al27_to_Si28_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Al27 + p --> Si28 @@ -401,9 +454,13 @@ void rate_p_Al27_to_Si28_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = -13.6664 + -1.90396 * tfactors.T9i + 23.8634 * tfactors.T913 + -3.70135 * tfactors.T9 + 0.28964 * tfactors.T953 + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 1.90396 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 23.8634 * tfactors.T923i + -3.70135 + (5.0/3.0) * 0.28964 * tfactors.T923 + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -418,9 +475,13 @@ void rate_p_Al27_to_Si28_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 86.0234 + -0.387313 * tfactors.T9i + -26.8327 * tfactors.T913i + -116.137 * tfactors.T913 + 0.00950567 * tfactors.T9 + 0.00999755 * tfactors.T953 + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 0.387313 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -26.8327 * tfactors.T943i + (1.0/3.0) * -116.137 * tfactors.T923i + 0.00950567 + (5.0/3.0) * 0.00999755 * tfactors.T923 + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -435,9 +496,13 @@ void rate_p_Al27_to_Si28_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 21.1065 + -23.2205 * tfactors.T913i + -2.0 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -23.2205 * tfactors.T943i + (5.0/3.0) * -2.0 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -451,8 +516,8 @@ void rate_p_Al27_to_Si28_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex: } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Si28_to_S32_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_Si28_to_S32_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Si28 + He4 --> S32 @@ -467,9 +532,13 @@ void rate_He4_Si28_to_S32_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex ln_set_rate = 47.9212 + -59.4896 * tfactors.T913i + 4.47205 * tfactors.T913 + -4.78989 * tfactors.T9 + 0.557201 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -59.4896 * tfactors.T943i + (1.0/3.0) * 4.47205 * tfactors.T923i + -4.78989 + (5.0/3.0) * 0.557201 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -483,8 +552,8 @@ void rate_He4_Si28_to_S32_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_P31_to_S32_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_p_P31_to_S32_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // P31 + p --> S32 @@ -499,9 +568,13 @@ void rate_p_P31_to_S32_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::R ln_set_rate = 0.821556 + -3.77704 * tfactors.T9i + 8.09341 * tfactors.T913 + -0.615971 * tfactors.T9 + 0.031159 * tfactors.T953 + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 3.77704 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 8.09341 * tfactors.T923i + -0.615971 + (5.0/3.0) * 0.031159 * tfactors.T923 + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -516,9 +589,13 @@ void rate_p_P31_to_S32_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::R ln_set_rate = -2.66839 + -2.25958 * tfactors.T9i + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 2.25958 * tfactors.T9i * tfactors.T9i + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -533,9 +610,13 @@ void rate_p_P31_to_S32_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::R ln_set_rate = 19.2596 + -25.3278 * tfactors.T913i + 6.4931 * tfactors.T913 + -9.27513 * tfactors.T9 + -0.610439 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -25.3278 * tfactors.T943i + (1.0/3.0) * 6.4931 * tfactors.T923i + -9.27513 + (5.0/3.0) * -0.610439 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -549,8 +630,8 @@ void rate_p_P31_to_S32_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::R } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_C12_C12_to_p_Na23_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_C12_C12_to_p_Na23_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // C12 + C12 --> p + Na23 @@ -565,9 +646,13 @@ void rate_C12_C12_to_p_Na23_reaclib(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = 60.9649 + -84.165 * tfactors.T913i + -1.4191 * tfactors.T913 + -0.114619 * tfactors.T9 + -0.070307 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -84.165 * tfactors.T943i + (1.0/3.0) * -1.4191 * tfactors.T923i + -0.114619 + (5.0/3.0) * -0.070307 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -581,8 +666,8 @@ void rate_C12_C12_to_p_Na23_reaclib(const tf_t& tfactors, amrex::Real& rate, amr } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_C12_C12_to_He4_Ne20_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_C12_C12_to_He4_Ne20_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // C12 + C12 --> He4 + Ne20 @@ -597,9 +682,13 @@ void rate_C12_C12_to_He4_Ne20_reaclib(const tf_t& tfactors, amrex::Real& rate, a ln_set_rate = 61.2863 + -84.165 * tfactors.T913i + -1.56627 * tfactors.T913 + -0.0736084 * tfactors.T9 + -0.072797 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -84.165 * tfactors.T943i + (1.0/3.0) * -1.56627 * tfactors.T923i + -0.0736084 + (5.0/3.0) * -0.072797 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -613,8 +702,8 @@ void rate_C12_C12_to_He4_Ne20_reaclib(const tf_t& tfactors, amrex::Real& rate, a } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_N13_to_p_O16_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_N13_to_p_O16_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // N13 + He4 --> p + O16 @@ -629,9 +718,13 @@ void rate_He4_N13_to_p_O16_reaclib(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 40.4644 + -35.829 * tfactors.T913i + -0.530275 * tfactors.T913 + -0.982462 * tfactors.T9 + 0.0808059 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -35.829 * tfactors.T943i + (1.0/3.0) * -0.530275 * tfactors.T923i + -0.982462 + (5.0/3.0) * 0.0808059 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -645,8 +738,8 @@ void rate_He4_N13_to_p_O16_reaclib(const tf_t& tfactors, amrex::Real& rate, amre } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_C12_O16_to_p_Al27_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_C12_O16_to_p_Al27_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // O16 + C12 --> p + Al27 @@ -661,9 +754,13 @@ void rate_C12_O16_to_p_Al27_reaclib(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = 68.5253 + 0.205134 * tfactors.T9i + -119.242 * tfactors.T913i + 13.3667 * tfactors.T913 + 0.295425 * tfactors.T9 + -0.267288 * tfactors.T953 + -9.91729 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = -0.205134 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -119.242 * tfactors.T943i + (1.0/3.0) * 13.3667 * tfactors.T923i + 0.295425 + (5.0/3.0) * -0.267288 * tfactors.T923 + -9.91729 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -677,8 +774,8 @@ void rate_C12_O16_to_p_Al27_reaclib(const tf_t& tfactors, amrex::Real& rate, amr } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_C12_O16_to_He4_Mg24_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_C12_O16_to_He4_Mg24_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // O16 + C12 --> He4 + Mg24 @@ -693,9 +790,13 @@ void rate_C12_O16_to_He4_Mg24_reaclib(const tf_t& tfactors, amrex::Real& rate, a ln_set_rate = 48.5341 + 0.37204 * tfactors.T9i + -133.413 * tfactors.T913i + 50.1572 * tfactors.T913 + -3.15987 * tfactors.T9 + 0.0178251 * tfactors.T953 + -23.7027 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = -0.37204 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -133.413 * tfactors.T943i + (1.0/3.0) * 50.1572 * tfactors.T923i + -3.15987 + (5.0/3.0) * 0.0178251 * tfactors.T923 + -23.7027 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -709,8 +810,8 @@ void rate_C12_O16_to_He4_Mg24_reaclib(const tf_t& tfactors, amrex::Real& rate, a } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_O16_O16_to_p_P31_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_O16_O16_to_p_P31_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // O16 + O16 --> p + P31 @@ -725,9 +826,13 @@ void rate_O16_O16_to_p_P31_reaclib(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 85.2628 + 0.223453 * tfactors.T9i + -145.844 * tfactors.T913i + 8.72612 * tfactors.T913 + -0.554035 * tfactors.T9 + -0.137562 * tfactors.T953 + -6.88807 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = -0.223453 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -145.844 * tfactors.T943i + (1.0/3.0) * 8.72612 * tfactors.T923i + -0.554035 + (5.0/3.0) * -0.137562 * tfactors.T923 + -6.88807 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -741,8 +846,8 @@ void rate_O16_O16_to_p_P31_reaclib(const tf_t& tfactors, amrex::Real& rate, amre } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_O16_O16_to_He4_Si28_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_O16_O16_to_He4_Si28_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // O16 + O16 --> He4 + Si28 @@ -757,9 +862,13 @@ void rate_O16_O16_to_He4_Si28_reaclib(const tf_t& tfactors, amrex::Real& rate, a ln_set_rate = 97.2435 + -0.268514 * tfactors.T9i + -119.324 * tfactors.T913i + -32.2497 * tfactors.T913 + 1.46214 * tfactors.T9 + -0.200893 * tfactors.T953 + 13.2148 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 0.268514 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -119.324 * tfactors.T943i + (1.0/3.0) * -32.2497 * tfactors.T923i + 1.46214 + (5.0/3.0) * -0.200893 * tfactors.T923 + 13.2148 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -773,8 +882,8 @@ void rate_O16_O16_to_He4_Si28_reaclib(const tf_t& tfactors, amrex::Real& rate, a } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Na23_to_He4_Ne20_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_p_Na23_to_He4_Ne20_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Na23 + p --> He4 + Ne20 @@ -789,9 +898,13 @@ void rate_p_Na23_to_He4_Ne20_reaclib(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = -6.58736 + -2.31577 * tfactors.T9i + 19.7297 * tfactors.T913 + -2.20987 * tfactors.T9 + 0.153374 * tfactors.T953 + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 2.31577 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 19.7297 * tfactors.T923i + -2.20987 + (5.0/3.0) * 0.153374 * tfactors.T923 + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -806,9 +919,13 @@ void rate_p_Na23_to_He4_Ne20_reaclib(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = 0.0178295 + -1.86103 * tfactors.T9i + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 1.86103 * tfactors.T9i * tfactors.T9i + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -823,9 +940,13 @@ void rate_p_Na23_to_He4_Ne20_reaclib(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = 18.9756 + -20.0024 * tfactors.T913i + 11.5988 * tfactors.T913 + -1.37398 * tfactors.T9 + -1.0 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -20.0024 * tfactors.T943i + (1.0/3.0) * 11.5988 * tfactors.T923i + -1.37398 + (5.0/3.0) * -1.0 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -839,8 +960,8 @@ void rate_p_Na23_to_He4_Ne20_reaclib(const tf_t& tfactors, amrex::Real& rate, am } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Al27_to_He4_Mg24_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_p_Al27_to_He4_Mg24_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Al27 + p --> He4 + Mg24 @@ -855,9 +976,13 @@ void rate_p_Al27_to_He4_Mg24_reaclib(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = -7.02789 + -4.2425 * tfactors.T9i + 18.0416 * tfactors.T913 + -1.54137 * tfactors.T9 + 0.0847506 * tfactors.T953 + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 4.2425 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 18.0416 * tfactors.T923i + -1.54137 + (5.0/3.0) * 0.0847506 * tfactors.T923 + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -872,9 +997,13 @@ void rate_p_Al27_to_He4_Mg24_reaclib(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = -26.8683 + -0.963012 * tfactors.T9i + 5.18642 * tfactors.T913i + -34.7936 * tfactors.T913 + 168.225 * tfactors.T9 + -115.825 * tfactors.T953 + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 0.963012 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 5.18642 * tfactors.T943i + (1.0/3.0) * -34.7936 * tfactors.T923i + 168.225 + (5.0/3.0) * -115.825 * tfactors.T923 + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -889,9 +1018,13 @@ void rate_p_Al27_to_He4_Mg24_reaclib(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = 29.4576 + -26.4162 * tfactors.T913i + -2.0 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -26.4162 * tfactors.T943i + (5.0/3.0) * -2.0 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -905,8 +1038,8 @@ void rate_p_Al27_to_He4_Mg24_reaclib(const tf_t& tfactors, amrex::Real& rate, am } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_P31_to_He4_Si28_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_p_P31_to_He4_Si28_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // P31 + p --> He4 + Si28 @@ -921,9 +1054,13 @@ void rate_p_P31_to_He4_Si28_reaclib(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = -10.893 + -3.42575 * tfactors.T9i + 21.521 * tfactors.T913 + -1.90355 * tfactors.T9 + 0.092724 * tfactors.T953 + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 3.42575 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 21.521 * tfactors.T923i + -1.90355 + (5.0/3.0) * 0.092724 * tfactors.T923 + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -938,9 +1075,13 @@ void rate_p_P31_to_He4_Si28_reaclib(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = -12.919 + -1.87716 * tfactors.T9i + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 1.87716 * tfactors.T9i * tfactors.T9i + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -955,9 +1096,13 @@ void rate_p_P31_to_He4_Si28_reaclib(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = 60.8829 + -31.932 * tfactors.T913i + -77.0334 * tfactors.T913 + -43.6847 * tfactors.T9 + -4.28955 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -31.932 * tfactors.T943i + (1.0/3.0) * -77.0334 * tfactors.T923i + -43.6847 + (5.0/3.0) * -4.28955 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -971,8 +1116,8 @@ void rate_p_P31_to_He4_Si28_reaclib(const tf_t& tfactors, amrex::Real& rate, amr } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_He4_He4_to_C12_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_He4_He4_to_C12_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // 3 He4 --> C12 @@ -987,9 +1132,13 @@ void rate_He4_He4_He4_to_C12_reaclib(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = -11.7884 + -1.02446 * tfactors.T9i + -23.57 * tfactors.T913i + 20.4886 * tfactors.T913 + -12.9882 * tfactors.T9 + -20.0 * tfactors.T953 + -2.16667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 1.02446 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -23.57 * tfactors.T943i + (1.0/3.0) * 20.4886 * tfactors.T923i + -12.9882 + (5.0/3.0) * -20.0 * tfactors.T923 + -2.16667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1004,9 +1153,13 @@ void rate_He4_He4_He4_to_C12_reaclib(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = -0.971052 + -37.06 * tfactors.T913i + 29.3493 * tfactors.T913 + -115.507 * tfactors.T9 + -10.0 * tfactors.T953 + -1.33333 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -37.06 * tfactors.T943i + (1.0/3.0) * 29.3493 * tfactors.T923i + -115.507 + (5.0/3.0) * -10.0 * tfactors.T923 + -1.33333 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1021,9 +1174,13 @@ void rate_He4_He4_He4_to_C12_reaclib(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = -24.3505 + -4.12656 * tfactors.T9i + -13.49 * tfactors.T913i + 21.4259 * tfactors.T913 + -1.34769 * tfactors.T9 + 0.0879816 * tfactors.T953 + -13.1653 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 4.12656 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -13.49 * tfactors.T943i + (1.0/3.0) * 21.4259 * tfactors.T923i + -1.34769 + (5.0/3.0) * 0.0879816 * tfactors.T923 + -13.1653 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1037,8 +1194,8 @@ void rate_He4_He4_He4_to_C12_reaclib(const tf_t& tfactors, amrex::Real& rate, am } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_C12_C12_to_n_Mg23_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_C12_C12_to_n_Mg23_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // C12 + C12 --> n + Mg23 @@ -1053,9 +1210,13 @@ void rate_C12_C12_to_n_Mg23_removed(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = -12.8056 + -30.1498 * tfactors.T9i + 11.4826 * tfactors.T913 + 1.82849 * tfactors.T9 + -0.34844 * tfactors.T953; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 30.1498 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 11.4826 * tfactors.T923i + 1.82849 + (5.0/3.0) * -0.34844 * tfactors.T923; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1069,8 +1230,8 @@ void rate_C12_C12_to_n_Mg23_removed(const tf_t& tfactors, amrex::Real& rate, amr } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_O16_O16_to_n_S31_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_O16_O16_to_n_S31_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // O16 + O16 --> n + S31 @@ -1085,9 +1246,13 @@ void rate_O16_O16_to_n_S31_removed(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 77.5491 + -0.373641 * tfactors.T9i + -120.83 * tfactors.T913i + -7.72334 * tfactors.T913 + -2.27939 * tfactors.T9 + 0.167655 * tfactors.T953 + 7.62001 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 0.373641 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -120.83 * tfactors.T943i + (1.0/3.0) * -7.72334 * tfactors.T923i + -2.27939 + (5.0/3.0) * 0.167655 * tfactors.T923 + 7.62001 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1101,8 +1266,8 @@ void rate_O16_O16_to_n_S31_removed(const tf_t& tfactors, amrex::Real& rate, amre } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_C12_O16_to_n_Si27_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_C12_O16_to_n_Si27_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // O16 + C12 --> n + Si27 @@ -1117,9 +1282,13 @@ void rate_C12_O16_to_n_Si27_removed(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = -132.213 + -1.46479 * tfactors.T9i + -293.089 * tfactors.T913i + 414.404 * tfactors.T913 + -28.0562 * tfactors.T9 + 1.61807 * tfactors.T953 + -178.28 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 1.46479 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -293.089 * tfactors.T943i + (1.0/3.0) * 414.404 * tfactors.T923i + -28.0562 + (5.0/3.0) * 1.61807 * tfactors.T923 + -178.28 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1133,8 +1302,8 @@ void rate_C12_O16_to_n_Si27_removed(const tf_t& tfactors, amrex::Real& rate, amr } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_S32_to_Ar36_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_S32_to_Ar36_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // S32 + He4 --> Ar36 @@ -1149,9 +1318,13 @@ void rate_He4_S32_to_Ar36_removed(const tf_t& tfactors, amrex::Real& rate, amrex ln_set_rate = 48.901 + -65.3709 * tfactors.T913i + 5.68294 * tfactors.T913 + -5.00388 * tfactors.T9 + 0.571407 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -65.3709 * tfactors.T943i + (1.0/3.0) * 5.68294 * tfactors.T923i + -5.00388 + (5.0/3.0) * 0.571407 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1165,8 +1338,8 @@ void rate_He4_S32_to_Ar36_removed(const tf_t& tfactors, amrex::Real& rate, amrex } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Cl35_to_Ar36_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_p_Cl35_to_Ar36_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Cl35 + p --> Ar36 @@ -1181,9 +1354,13 @@ void rate_p_Cl35_to_Ar36_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = -42.5249 + -0.564651 * tfactors.T9i + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 0.564651 * tfactors.T9i * tfactors.T9i + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1198,9 +1375,13 @@ void rate_p_Cl35_to_Ar36_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 35.6868 + -27.8971 * tfactors.T913i + -16.2304 * tfactors.T913 + 35.255 * tfactors.T9 + -25.8411 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -27.8971 * tfactors.T943i + (1.0/3.0) * -16.2304 * tfactors.T923i + 35.255 + (5.0/3.0) * -25.8411 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1215,9 +1396,13 @@ void rate_p_Cl35_to_Ar36_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = -7.84699 + -3.65092 * tfactors.T9i + 18.0179 * tfactors.T913 + -2.86304 * tfactors.T9 + 0.250854 * tfactors.T953 + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 3.65092 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 18.0179 * tfactors.T923i + -2.86304 + (5.0/3.0) * 0.250854 * tfactors.T923 + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1232,9 +1417,13 @@ void rate_p_Cl35_to_Ar36_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = -9.03294 + -2.00996 * tfactors.T9i + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 2.00996 * tfactors.T9i * tfactors.T9i + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1248,8 +1437,8 @@ void rate_p_Cl35_to_Ar36_removed(const tf_t& tfactors, amrex::Real& rate, amrex: } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Cl35_to_He4_S32_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_p_Cl35_to_He4_S32_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Cl35 + p --> He4 + S32 @@ -1264,9 +1453,13 @@ void rate_p_Cl35_to_He4_S32_removed(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = -1.01202 + -3.93495 * tfactors.T9i + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 3.93495 * tfactors.T9i * tfactors.T9i + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1281,9 +1474,13 @@ void rate_p_Cl35_to_He4_S32_removed(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = -57.5294 + -0.532931 * tfactors.T9i + 25.5338 * tfactors.T913 + 6.45824 * tfactors.T9 + -0.950294 * tfactors.T953 + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 0.532931 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 25.5338 * tfactors.T923i + 6.45824 + (5.0/3.0) * -0.950294 * tfactors.T923 + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1298,9 +1495,13 @@ void rate_p_Cl35_to_He4_S32_removed(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = 32.12 + -30.9147 * tfactors.T913i + -1.2345 * tfactors.T913 + 22.5118 * tfactors.T9 + -33.0589 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -30.9147 * tfactors.T943i + (1.0/3.0) * -1.2345 * tfactors.T923i + 22.5118 + (5.0/3.0) * -33.0589 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1315,9 +1516,13 @@ void rate_p_Cl35_to_He4_S32_removed(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = 2.29121 + -6.00976 * tfactors.T9i + 5.33756 * tfactors.T913 + 1.64418 * tfactors.T9 + -0.246167 * tfactors.T953 + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 6.00976 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 5.33756 * tfactors.T923i + 1.64418 + (5.0/3.0) * -0.246167 * tfactors.T923 + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1331,8 +1536,8 @@ void rate_p_Cl35_to_He4_S32_removed(const tf_t& tfactors, amrex::Real& rate, amr } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Ar36_to_Ca40_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_Ar36_to_Ca40_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Ar36 + He4 --> Ca40 @@ -1347,9 +1552,13 @@ void rate_He4_Ar36_to_Ca40_removed(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 52.3486 + -71.0046 * tfactors.T913i + 4.0656 * tfactors.T913 + -5.26509 * tfactors.T9 + 0.683546 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -71.0046 * tfactors.T943i + (1.0/3.0) * 4.0656 * tfactors.T923i + -5.26509 + (5.0/3.0) * 0.683546 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1363,8 +1572,8 @@ void rate_He4_Ar36_to_Ca40_removed(const tf_t& tfactors, amrex::Real& rate, amre } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_K39_to_Ca40_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_p_K39_to_Ca40_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // K39 + p --> Ca40 @@ -1379,9 +1588,13 @@ void rate_p_K39_to_Ca40_removed(const tf_t& tfactors, amrex::Real& rate, amrex:: ln_set_rate = 2761.38 + -5.22234 * tfactors.T9i + 802.18 * tfactors.T913i + -4010.27 * tfactors.T913 + 1136.19 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 5.22234 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 802.18 * tfactors.T943i + (1.0/3.0) * -4010.27 * tfactors.T923i + 1136.19 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1396,9 +1609,13 @@ void rate_p_K39_to_Ca40_removed(const tf_t& tfactors, amrex::Real& rate, amrex:: ln_set_rate = 588.099 + -12.5647 * tfactors.T9i + 641.844 * tfactors.T913i + -1248.49 * tfactors.T913 + 564.926 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 12.5647 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 641.844 * tfactors.T943i + (1.0/3.0) * -1248.49 * tfactors.T923i + 564.926 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1413,9 +1630,13 @@ void rate_p_K39_to_Ca40_removed(const tf_t& tfactors, amrex::Real& rate, amrex:: ln_set_rate = 102.252 + -1.66508 * tfactors.T9i + 41.1723 * tfactors.T913i + -149.299 * tfactors.T913 + 10.5229 * tfactors.T9 + -0.68208 * tfactors.T953 + 59.2367 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 1.66508 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 41.1723 * tfactors.T943i + (1.0/3.0) * -149.299 * tfactors.T923i + 10.5229 + (5.0/3.0) * -0.68208 * tfactors.T923 + 59.2367 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1429,8 +1650,8 @@ void rate_p_K39_to_Ca40_removed(const tf_t& tfactors, amrex::Real& rate, amrex:: } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_K39_to_He4_Ar36_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_p_K39_to_He4_Ar36_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // K39 + p --> He4 + Ar36 @@ -1445,9 +1666,13 @@ void rate_p_K39_to_He4_Ar36_removed(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = 20.5166 + -30.0732 * tfactors.T913i + 7.03263 * tfactors.T913 + -1.10085 * tfactors.T9 + 0.133768 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -30.0732 * tfactors.T943i + (1.0/3.0) * 7.03263 * tfactors.T923i + -1.10085 + (5.0/3.0) * 0.133768 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1461,8 +1686,8 @@ void rate_p_K39_to_He4_Ar36_removed(const tf_t& tfactors, amrex::Real& rate, amr } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Ca40_to_Ti44_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_Ca40_to_Ti44_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Ca40 + He4 --> Ti44 @@ -1477,9 +1702,13 @@ void rate_He4_Ca40_to_Ti44_removed(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 53.75 + -76.4273 * tfactors.T913i + 3.87451 * tfactors.T913 + -3.61477 * tfactors.T9 + 0.367451 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -76.4273 * tfactors.T943i + (1.0/3.0) * 3.87451 * tfactors.T923i + -3.61477 + (5.0/3.0) * 0.367451 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1493,8 +1722,8 @@ void rate_He4_Ca40_to_Ti44_removed(const tf_t& tfactors, amrex::Real& rate, amre } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Sc43_to_Ti44_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_p_Sc43_to_Ti44_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Sc43 + p --> Ti44 @@ -1509,9 +1738,13 @@ void rate_p_Sc43_to_Ti44_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 36.8432 + -32.1734 * tfactors.T913i + -1.77078 * tfactors.T913 + -2.21706 * tfactors.T9 + 0.298499 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -32.1734 * tfactors.T943i + (1.0/3.0) * -1.77078 * tfactors.T923i + -2.21706 + (5.0/3.0) * 0.298499 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1525,8 +1758,8 @@ void rate_p_Sc43_to_Ti44_removed(const tf_t& tfactors, amrex::Real& rate, amrex: } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Sc43_to_He4_Ca40_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_p_Sc43_to_He4_Ca40_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Sc43 + p --> He4 + Ca40 @@ -1541,9 +1774,13 @@ void rate_p_Sc43_to_He4_Ca40_removed(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = 34.8559 + -32.1734 * tfactors.T913i + 0.0296879 * tfactors.T913 + -0.95232 * tfactors.T9 + 0.129022 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -32.1734 * tfactors.T943i + (1.0/3.0) * 0.0296879 * tfactors.T923i + -0.95232 + (5.0/3.0) * 0.129022 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1557,8 +1794,8 @@ void rate_p_Sc43_to_He4_Ca40_removed(const tf_t& tfactors, amrex::Real& rate, am } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Ti44_to_Cr48_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_Ti44_to_Cr48_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Ti44 + He4 --> Cr48 @@ -1573,9 +1810,13 @@ void rate_He4_Ti44_to_Cr48_removed(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 64.7958 + -81.667 * tfactors.T913i + -10.6333 * tfactors.T913 + -0.672613 * tfactors.T9 + 0.161209 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -81.667 * tfactors.T943i + (1.0/3.0) * -10.6333 * tfactors.T923i + -0.672613 + (5.0/3.0) * 0.161209 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1589,8 +1830,8 @@ void rate_He4_Ti44_to_Cr48_removed(const tf_t& tfactors, amrex::Real& rate, amre } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Ti44_to_p_V47_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_Ti44_to_p_V47_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Ti44 + He4 --> p + V47 @@ -1605,9 +1846,13 @@ void rate_He4_Ti44_to_p_V47_removed(const tf_t& tfactors, amrex::Real& rate, amr ln_set_rate = -76.5154 + -10.7931 * tfactors.T9i + 70.2835 * tfactors.T913 + -7.99061 * tfactors.T9 + 0.486213 * tfactors.T953 + -1.5 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 10.7931 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 70.2835 * tfactors.T923i + -7.99061 + (5.0/3.0) * 0.486213 * tfactors.T923 + -1.5 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1621,8 +1866,8 @@ void rate_He4_Ti44_to_p_V47_removed(const tf_t& tfactors, amrex::Real& rate, amr } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_V47_to_Cr48_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_p_V47_to_Cr48_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // V47 + p --> Cr48 @@ -1637,9 +1882,13 @@ void rate_p_V47_to_Cr48_removed(const tf_t& tfactors, amrex::Real& rate, amrex:: ln_set_rate = 42.6798 + -6.0593 * tfactors.T9i + -34.0548 * tfactors.T913i + -3.41973 * tfactors.T913 + 1.16501 * tfactors.T9 + -0.105543 * tfactors.T953 + -7.70886 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 6.0593 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -34.0548 * tfactors.T943i + (1.0/3.0) * -3.41973 * tfactors.T923i + 1.16501 + (5.0/3.0) * -0.105543 * tfactors.T923 + -7.70886 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1654,9 +1903,13 @@ void rate_p_V47_to_Cr48_removed(const tf_t& tfactors, amrex::Real& rate, amrex:: ln_set_rate = 511.463 + -5.29491 * tfactors.T9i + 317.171 * tfactors.T913i + -911.679 * tfactors.T913 + 94.4245 * tfactors.T9 + -10.1973 * tfactors.T953 + 330.727 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 5.29491 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 317.171 * tfactors.T943i + (1.0/3.0) * -911.679 * tfactors.T923i + 94.4245 + (5.0/3.0) * -10.1973 * tfactors.T923 + 330.727 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1671,9 +1924,13 @@ void rate_p_V47_to_Cr48_removed(const tf_t& tfactors, amrex::Real& rate, amrex:: ln_set_rate = 23.8315 + 0.246665 * tfactors.T9i + -45.9868 * tfactors.T913i + 13.6822 * tfactors.T913 + -0.376902 * tfactors.T9 + -0.0194875 * tfactors.T953 + -8.42325 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = -0.246665 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -45.9868 * tfactors.T943i + (1.0/3.0) * 13.6822 * tfactors.T923i + -0.376902 + (5.0/3.0) * -0.0194875 * tfactors.T923 + -8.42325 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1688,9 +1945,13 @@ void rate_p_V47_to_Cr48_removed(const tf_t& tfactors, amrex::Real& rate, amrex:: ln_set_rate = 40.5626 + -0.514414 * tfactors.T9i + -110.655 * tfactors.T913i + 83.0232 * tfactors.T913 + -19.7762 * tfactors.T9 + 3.03961 * tfactors.T953 + -49.4742 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 0.514414 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -110.655 * tfactors.T943i + (1.0/3.0) * 83.0232 * tfactors.T923i + -19.7762 + (5.0/3.0) * 3.03961 * tfactors.T923 + -49.4742 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1704,8 +1965,8 @@ void rate_p_V47_to_Cr48_removed(const tf_t& tfactors, amrex::Real& rate, amrex:: } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Cr48_to_Fe52_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_Cr48_to_Fe52_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Cr48 + He4 --> Fe52 @@ -1720,9 +1981,13 @@ void rate_He4_Cr48_to_Fe52_removed(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 65.1754 + -86.7459 * tfactors.T913i + -9.79373 * tfactors.T913 + -0.772169 * tfactors.T9 + 0.155883 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -86.7459 * tfactors.T943i + (1.0/3.0) * -9.79373 * tfactors.T923i + -0.772169 + (5.0/3.0) * 0.155883 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1736,8 +2001,8 @@ void rate_He4_Cr48_to_Fe52_removed(const tf_t& tfactors, amrex::Real& rate, amre } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Cr48_to_p_Mn51_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_Cr48_to_p_Mn51_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Cr48 + He4 --> p + Mn51 @@ -1752,9 +2017,13 @@ void rate_He4_Cr48_to_p_Mn51_removed(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = 59.2276 + -86.7459 * tfactors.T913i + 1.05653 * tfactors.T913 + -1.15757 * tfactors.T9 + 0.0877546 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -86.7459 * tfactors.T943i + (1.0/3.0) * 1.05653 * tfactors.T923i + -1.15757 + (5.0/3.0) * 0.0877546 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1768,8 +2037,8 @@ void rate_He4_Cr48_to_p_Mn51_removed(const tf_t& tfactors, amrex::Real& rate, am } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Mn51_to_Fe52_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_p_Mn51_to_Fe52_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Mn51 + p --> Fe52 @@ -1784,9 +2053,13 @@ void rate_p_Mn51_to_Fe52_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 36.2596 + -36.1825 * tfactors.T913i + 0.873042 * tfactors.T913 + -2.89731 * tfactors.T9 + 0.364394 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -36.1825 * tfactors.T943i + (1.0/3.0) * 0.873042 * tfactors.T923i + -2.89731 + (5.0/3.0) * 0.364394 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1800,8 +2073,8 @@ void rate_p_Mn51_to_Fe52_removed(const tf_t& tfactors, amrex::Real& rate, amrex: } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Fe52_to_Ni56_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_Fe52_to_Ni56_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Fe52 + He4 --> Ni56 @@ -1816,9 +2089,13 @@ void rate_He4_Fe52_to_Ni56_removed(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 66.6417 + -91.6819 * tfactors.T913i + -9.51885 * tfactors.T913 + -0.533014 * tfactors.T9 + 0.0892607 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -91.6819 * tfactors.T943i + (1.0/3.0) * -9.51885 * tfactors.T923i + -0.533014 + (5.0/3.0) * 0.0892607 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1832,8 +2109,8 @@ void rate_He4_Fe52_to_Ni56_removed(const tf_t& tfactors, amrex::Real& rate, amre } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Fe52_to_p_Co55_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_He4_Fe52_to_p_Co55_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Fe52 + He4 --> p + Co55 @@ -1848,9 +2125,13 @@ void rate_He4_Fe52_to_p_Co55_removed(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = 62.2207 + -91.6819 * tfactors.T913i + -0.329235 * tfactors.T913 + -0.780924 * tfactors.T9 + 0.0425179 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -91.6819 * tfactors.T943i + (1.0/3.0) * -0.329235 * tfactors.T923i + -0.780924 + (5.0/3.0) * 0.0425179 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1864,8 +2145,8 @@ void rate_He4_Fe52_to_p_Co55_removed(const tf_t& tfactors, amrex::Real& rate, am } template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Co55_to_Ni56_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +AMREX_GPU_DEVICE AMREX_INLINE +void rate_p_Co55_to_Ni56_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Co55 + p --> Ni56 @@ -1880,9 +2161,13 @@ void rate_p_Co55_to_Ni56_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 37.3736 + -38.1053 * tfactors.T913i + -0.210947 * tfactors.T913 + -2.68377 * tfactors.T9 + 0.355814 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -38.1053 * tfactors.T943i + (1.0/3.0) * -0.210947 * tfactors.T923i + -2.68377 + (5.0/3.0) * 0.355814 * tfactors.T923 + -0.666667 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1895,623 +2180,755 @@ void rate_p_Co55_to_Ni56_removed(const tf_t& tfactors, amrex::Real& rate, amrex: } -template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_C12_C12_to_Mg24_modified(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { - - // C12 + C12 --> Mg24 (calls the underlying rate) - - rate_C12_C12_to_n_Mg23_removed(tfactors, rate, drate_dT); -} - -template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_O16_O16_to_S32_modified(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { - - // O16 + O16 --> S32 (calls the underlying rate) - - rate_O16_O16_to_n_S31_removed(tfactors, rate, drate_dT); -} - -template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_C12_O16_to_Si28_modified(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { - - // O16 + C12 --> Si28 (calls the underlying rate) - - rate_C12_O16_to_n_Si27_removed(tfactors, rate, drate_dT); -} - - -template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_S32_He4_to_Ar36_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { - - amrex::Real r_ag = rate_eval.screened_rates(k_He4_S32_to_Ar36_removed); - amrex::Real r_ap = rate_eval.screened_rates(k_He4_S32_to_p_Cl35_removed); - amrex::Real r_pg = rate_eval.screened_rates(k_p_Cl35_to_Ar36_removed); - amrex::Real r_pa = rate_eval.screened_rates(k_p_Cl35_to_He4_S32_removed); - amrex::Real dd = 1.0_rt / (r_pg + r_pa); - rate = r_ag + r_ap * r_pg * dd; - if constexpr (std::is_same_v) { - amrex::Real drdT_ag = rate_eval.dscreened_rates_dT(k_He4_S32_to_Ar36_removed); - amrex::Real drdT_ap = rate_eval.dscreened_rates_dT(k_He4_S32_to_p_Cl35_removed); - amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_Cl35_to_Ar36_removed); - amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_Cl35_to_He4_S32_removed); - drate_dT = drdT_ag + drdT_ap * r_pg * dd + r_ap * drdT_pg * dd - r_ap * r_pg * dd * dd * (drdT_pg + drdT_pa); - } -} - -template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ar36_to_S32_He4_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { - - amrex::Real r_ga = rate_eval.screened_rates(k_Ar36_to_He4_S32_removed); - amrex::Real r_pa = rate_eval.screened_rates(k_p_Cl35_to_He4_S32_removed); - amrex::Real r_gp = rate_eval.screened_rates(k_Ar36_to_p_Cl35_removed); - amrex::Real r_pg = rate_eval.screened_rates(k_p_Cl35_to_Ar36_removed); - amrex::Real dd = 1.0_rt / (r_pg + r_pa); - rate = r_ga + r_gp * r_pa * dd; - if constexpr (std::is_same_v) { - amrex::Real drdT_ga = rate_eval.dscreened_rates_dT(k_Ar36_to_He4_S32_removed); - amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_Cl35_to_He4_S32_removed); - amrex::Real drdT_gp = rate_eval.dscreened_rates_dT(k_Ar36_to_p_Cl35_removed); - amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_Cl35_to_Ar36_removed); - drate_dT = drdT_ga + drdT_gp * r_pa * dd + r_gp * drdT_pa * dd - r_gp * r_pa * dd * dd * (drdT_pg + drdT_pa); - } -} - -template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ar36_He4_to_Ca40_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { - - amrex::Real r_ag = rate_eval.screened_rates(k_He4_Ar36_to_Ca40_removed); - amrex::Real r_ap = rate_eval.screened_rates(k_He4_Ar36_to_p_K39_removed); - amrex::Real r_pg = rate_eval.screened_rates(k_p_K39_to_Ca40_removed); - amrex::Real r_pa = rate_eval.screened_rates(k_p_K39_to_He4_Ar36_removed); - amrex::Real dd = 1.0_rt / (r_pg + r_pa); - rate = r_ag + r_ap * r_pg * dd; - if constexpr (std::is_same_v) { - amrex::Real drdT_ag = rate_eval.dscreened_rates_dT(k_He4_Ar36_to_Ca40_removed); - amrex::Real drdT_ap = rate_eval.dscreened_rates_dT(k_He4_Ar36_to_p_K39_removed); - amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_K39_to_Ca40_removed); - amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_K39_to_He4_Ar36_removed); - drate_dT = drdT_ag + drdT_ap * r_pg * dd + r_ap * drdT_pg * dd - r_ap * r_pg * dd * dd * (drdT_pg + drdT_pa); - } -} - -template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ca40_to_Ar36_He4_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { - - amrex::Real r_ga = rate_eval.screened_rates(k_Ca40_to_He4_Ar36_removed); - amrex::Real r_pa = rate_eval.screened_rates(k_p_K39_to_He4_Ar36_removed); - amrex::Real r_gp = rate_eval.screened_rates(k_Ca40_to_p_K39_removed); - amrex::Real r_pg = rate_eval.screened_rates(k_p_K39_to_Ca40_removed); - amrex::Real dd = 1.0_rt / (r_pg + r_pa); - rate = r_ga + r_gp * r_pa * dd; - if constexpr (std::is_same_v) { - amrex::Real drdT_ga = rate_eval.dscreened_rates_dT(k_Ca40_to_He4_Ar36_removed); - amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_K39_to_He4_Ar36_removed); - amrex::Real drdT_gp = rate_eval.dscreened_rates_dT(k_Ca40_to_p_K39_removed); - amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_K39_to_Ca40_removed); - drate_dT = drdT_ga + drdT_gp * r_pa * dd + r_gp * drdT_pa * dd - r_gp * r_pa * dd * dd * (drdT_pg + drdT_pa); - } -} - -template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ca40_He4_to_Ti44_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { - - amrex::Real r_ag = rate_eval.screened_rates(k_He4_Ca40_to_Ti44_removed); - amrex::Real r_ap = rate_eval.screened_rates(k_He4_Ca40_to_p_Sc43_removed); - amrex::Real r_pg = rate_eval.screened_rates(k_p_Sc43_to_Ti44_removed); - amrex::Real r_pa = rate_eval.screened_rates(k_p_Sc43_to_He4_Ca40_removed); - amrex::Real dd = 1.0_rt / (r_pg + r_pa); - rate = r_ag + r_ap * r_pg * dd; - if constexpr (std::is_same_v) { - amrex::Real drdT_ag = rate_eval.dscreened_rates_dT(k_He4_Ca40_to_Ti44_removed); - amrex::Real drdT_ap = rate_eval.dscreened_rates_dT(k_He4_Ca40_to_p_Sc43_removed); - amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_Sc43_to_Ti44_removed); - amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_Sc43_to_He4_Ca40_removed); - drate_dT = drdT_ag + drdT_ap * r_pg * dd + r_ap * drdT_pg * dd - r_ap * r_pg * dd * dd * (drdT_pg + drdT_pa); - } -} - -template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ti44_to_Ca40_He4_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { - - amrex::Real r_ga = rate_eval.screened_rates(k_Ti44_to_He4_Ca40_removed); - amrex::Real r_pa = rate_eval.screened_rates(k_p_Sc43_to_He4_Ca40_removed); - amrex::Real r_gp = rate_eval.screened_rates(k_Ti44_to_p_Sc43_removed); - amrex::Real r_pg = rate_eval.screened_rates(k_p_Sc43_to_Ti44_removed); - amrex::Real dd = 1.0_rt / (r_pg + r_pa); - rate = r_ga + r_gp * r_pa * dd; - if constexpr (std::is_same_v) { - amrex::Real drdT_ga = rate_eval.dscreened_rates_dT(k_Ti44_to_He4_Ca40_removed); - amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_Sc43_to_He4_Ca40_removed); - amrex::Real drdT_gp = rate_eval.dscreened_rates_dT(k_Ti44_to_p_Sc43_removed); - amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_Sc43_to_Ti44_removed); - drate_dT = drdT_ga + drdT_gp * r_pa * dd + r_gp * drdT_pa * dd - r_gp * r_pa * dd * dd * (drdT_pg + drdT_pa); - } -} - -template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ti44_He4_to_Cr48_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { - - amrex::Real r_ag = rate_eval.screened_rates(k_He4_Ti44_to_Cr48_removed); - amrex::Real r_ap = rate_eval.screened_rates(k_He4_Ti44_to_p_V47_removed); - amrex::Real r_pg = rate_eval.screened_rates(k_p_V47_to_Cr48_removed); - amrex::Real r_pa = rate_eval.screened_rates(k_p_V47_to_He4_Ti44_removed); - amrex::Real dd = 1.0_rt / (r_pg + r_pa); - rate = r_ag + r_ap * r_pg * dd; - if constexpr (std::is_same_v) { - amrex::Real drdT_ag = rate_eval.dscreened_rates_dT(k_He4_Ti44_to_Cr48_removed); - amrex::Real drdT_ap = rate_eval.dscreened_rates_dT(k_He4_Ti44_to_p_V47_removed); - amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_V47_to_Cr48_removed); - amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_V47_to_He4_Ti44_removed); - drate_dT = drdT_ag + drdT_ap * r_pg * dd + r_ap * drdT_pg * dd - r_ap * r_pg * dd * dd * (drdT_pg + drdT_pa); - } -} - -template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Cr48_to_Ti44_He4_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { - - amrex::Real r_ga = rate_eval.screened_rates(k_Cr48_to_He4_Ti44_removed); - amrex::Real r_pa = rate_eval.screened_rates(k_p_V47_to_He4_Ti44_removed); - amrex::Real r_gp = rate_eval.screened_rates(k_Cr48_to_p_V47_removed); - amrex::Real r_pg = rate_eval.screened_rates(k_p_V47_to_Cr48_removed); - amrex::Real dd = 1.0_rt / (r_pg + r_pa); - rate = r_ga + r_gp * r_pa * dd; - if constexpr (std::is_same_v) { - amrex::Real drdT_ga = rate_eval.dscreened_rates_dT(k_Cr48_to_He4_Ti44_removed); - amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_V47_to_He4_Ti44_removed); - amrex::Real drdT_gp = rate_eval.dscreened_rates_dT(k_Cr48_to_p_V47_removed); - amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_V47_to_Cr48_removed); - drate_dT = drdT_ga + drdT_gp * r_pa * dd + r_gp * drdT_pa * dd - r_gp * r_pa * dd * dd * (drdT_pg + drdT_pa); - } -} - -template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Cr48_He4_to_Fe52_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { - - amrex::Real r_ag = rate_eval.screened_rates(k_He4_Cr48_to_Fe52_removed); - amrex::Real r_ap = rate_eval.screened_rates(k_He4_Cr48_to_p_Mn51_removed); - amrex::Real r_pg = rate_eval.screened_rates(k_p_Mn51_to_Fe52_removed); - amrex::Real r_pa = rate_eval.screened_rates(k_p_Mn51_to_He4_Cr48_removed); - amrex::Real dd = 1.0_rt / (r_pg + r_pa); - rate = r_ag + r_ap * r_pg * dd; - if constexpr (std::is_same_v) { - amrex::Real drdT_ag = rate_eval.dscreened_rates_dT(k_He4_Cr48_to_Fe52_removed); - amrex::Real drdT_ap = rate_eval.dscreened_rates_dT(k_He4_Cr48_to_p_Mn51_removed); - amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_Mn51_to_Fe52_removed); - amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_Mn51_to_He4_Cr48_removed); - drate_dT = drdT_ag + drdT_ap * r_pg * dd + r_ap * drdT_pg * dd - r_ap * r_pg * dd * dd * (drdT_pg + drdT_pa); - } -} - -template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Fe52_to_Cr48_He4_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { - - amrex::Real r_ga = rate_eval.screened_rates(k_Fe52_to_He4_Cr48_removed); - amrex::Real r_pa = rate_eval.screened_rates(k_p_Mn51_to_He4_Cr48_removed); - amrex::Real r_gp = rate_eval.screened_rates(k_Fe52_to_p_Mn51_removed); - amrex::Real r_pg = rate_eval.screened_rates(k_p_Mn51_to_Fe52_removed); - amrex::Real dd = 1.0_rt / (r_pg + r_pa); - rate = r_ga + r_gp * r_pa * dd; - if constexpr (std::is_same_v) { - amrex::Real drdT_ga = rate_eval.dscreened_rates_dT(k_Fe52_to_He4_Cr48_removed); - amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_Mn51_to_He4_Cr48_removed); - amrex::Real drdT_gp = rate_eval.dscreened_rates_dT(k_Fe52_to_p_Mn51_removed); - amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_Mn51_to_Fe52_removed); - drate_dT = drdT_ga + drdT_gp * r_pa * dd + r_gp * drdT_pa * dd - r_gp * r_pa * dd * dd * (drdT_pg + drdT_pa); - } -} - -template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Fe52_He4_to_Ni56_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { - - amrex::Real r_ag = rate_eval.screened_rates(k_He4_Fe52_to_Ni56_removed); - amrex::Real r_ap = rate_eval.screened_rates(k_He4_Fe52_to_p_Co55_removed); - amrex::Real r_pg = rate_eval.screened_rates(k_p_Co55_to_Ni56_removed); - amrex::Real r_pa = rate_eval.screened_rates(k_p_Co55_to_He4_Fe52_removed); - amrex::Real dd = 1.0_rt / (r_pg + r_pa); - rate = r_ag + r_ap * r_pg * dd; - if constexpr (std::is_same_v) { - amrex::Real drdT_ag = rate_eval.dscreened_rates_dT(k_He4_Fe52_to_Ni56_removed); - amrex::Real drdT_ap = rate_eval.dscreened_rates_dT(k_He4_Fe52_to_p_Co55_removed); - amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_Co55_to_Ni56_removed); - amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_Co55_to_He4_Fe52_removed); - drate_dT = drdT_ag + drdT_ap * r_pg * dd + r_ap * drdT_pg * dd - r_ap * r_pg * dd * dd * (drdT_pg + drdT_pa); - } -} - -template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ni56_to_Fe52_He4_approx(const T& rate_eval, amrex::Real& rate, amrex::Real& drate_dT) { - - amrex::Real r_ga = rate_eval.screened_rates(k_Ni56_to_He4_Fe52_removed); - amrex::Real r_pa = rate_eval.screened_rates(k_p_Co55_to_He4_Fe52_removed); - amrex::Real r_gp = rate_eval.screened_rates(k_Ni56_to_p_Co55_removed); - amrex::Real r_pg = rate_eval.screened_rates(k_p_Co55_to_Ni56_removed); - amrex::Real dd = 1.0_rt / (r_pg + r_pa); - rate = r_ga + r_gp * r_pa * dd; - if constexpr (std::is_same_v) { - amrex::Real drdT_ga = rate_eval.dscreened_rates_dT(k_Ni56_to_He4_Fe52_removed); - amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_p_Co55_to_He4_Fe52_removed); - amrex::Real drdT_gp = rate_eval.dscreened_rates_dT(k_Ni56_to_p_Co55_removed); - amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_p_Co55_to_Ni56_removed); - drate_dT = drdT_ga + drdT_gp * r_pa * dd + r_gp * drdT_pa * dd - r_gp * r_pa * dd * dd * (drdT_pg + drdT_pa); - } -} - template AMREX_GPU_HOST_DEVICE AMREX_INLINE void -fill_reaclib_rates(const tf_t& tfactors, T& rate_eval) +fill_reaclib_rates([[maybe_unused]] const tf_t& tfactors, + [[maybe_unused]] T& rate_eval) { - amrex::Real rate; - amrex::Real drate_dT; + [[maybe_unused]] amrex::Real rate; + [[maybe_unused]] amrex::Real drate_dT; - rate_p_C12_to_N13_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_p_C12_to_N13_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_C12_to_N13_reaclib) = drate_dT; - - } - rate_He4_C12_to_O16_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_He4_C12_to_O16_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_C12_to_O16_reaclib) = drate_dT; - - } - rate_He4_O16_to_Ne20_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_He4_O16_to_Ne20_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_O16_to_Ne20_reaclib) = drate_dT; - - } - rate_He4_Ne20_to_Mg24_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_He4_Ne20_to_Mg24_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Ne20_to_Mg24_reaclib) = drate_dT; - - } - rate_p_Na23_to_Mg24_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_p_Na23_to_Mg24_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_Na23_to_Mg24_reaclib) = drate_dT; - - } - rate_He4_Mg24_to_Si28_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_He4_Mg24_to_Si28_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Mg24_to_Si28_reaclib) = drate_dT; - - } - rate_p_Al27_to_Si28_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_p_Al27_to_Si28_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_Al27_to_Si28_reaclib) = drate_dT; - - } - rate_He4_Si28_to_S32_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_He4_Si28_to_S32_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Si28_to_S32_reaclib) = drate_dT; - - } - rate_p_P31_to_S32_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_p_P31_to_S32_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_P31_to_S32_reaclib) = drate_dT; - - } - rate_C12_C12_to_p_Na23_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_C12_C12_to_p_Na23_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_C12_C12_to_p_Na23_reaclib) = drate_dT; - - } - rate_C12_C12_to_He4_Ne20_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_C12_C12_to_He4_Ne20_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_C12_C12_to_He4_Ne20_reaclib) = drate_dT; - - } - rate_He4_N13_to_p_O16_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_He4_N13_to_p_O16_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_N13_to_p_O16_reaclib) = drate_dT; - - } - rate_C12_O16_to_p_Al27_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_C12_O16_to_p_Al27_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_C12_O16_to_p_Al27_reaclib) = drate_dT; - - } - rate_C12_O16_to_He4_Mg24_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_C12_O16_to_He4_Mg24_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_C12_O16_to_He4_Mg24_reaclib) = drate_dT; - - } - rate_O16_O16_to_p_P31_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_O16_O16_to_p_P31_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_O16_O16_to_p_P31_reaclib) = drate_dT; - - } - rate_O16_O16_to_He4_Si28_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_O16_O16_to_He4_Si28_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_O16_O16_to_He4_Si28_reaclib) = drate_dT; - - } - rate_p_Na23_to_He4_Ne20_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_p_Na23_to_He4_Ne20_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_Na23_to_He4_Ne20_reaclib) = drate_dT; - - } - rate_p_Al27_to_He4_Mg24_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_p_Al27_to_He4_Mg24_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_Al27_to_He4_Mg24_reaclib) = drate_dT; - - } - rate_p_P31_to_He4_Si28_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_p_P31_to_He4_Si28_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_P31_to_He4_Si28_reaclib) = drate_dT; - - } - rate_He4_He4_He4_to_C12_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_He4_He4_He4_to_C12_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_He4_He4_to_C12_reaclib) = drate_dT; - - } - rate_C12_C12_to_n_Mg23_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_C12_C12_to_n_Mg23_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_C12_C12_to_n_Mg23_removed) = drate_dT; - - } - rate_O16_O16_to_n_S31_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_O16_O16_to_n_S31_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_O16_O16_to_n_S31_removed) = drate_dT; - - } - rate_C12_O16_to_n_Si27_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_C12_O16_to_n_Si27_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_C12_O16_to_n_Si27_removed) = drate_dT; - - } - rate_He4_S32_to_Ar36_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_He4_S32_to_Ar36_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_S32_to_Ar36_removed) = drate_dT; - - } - rate_p_Cl35_to_Ar36_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_p_Cl35_to_Ar36_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_Cl35_to_Ar36_removed) = drate_dT; - - } - rate_p_Cl35_to_He4_S32_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_p_Cl35_to_He4_S32_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_Cl35_to_He4_S32_removed) = drate_dT; - - } - rate_He4_Ar36_to_Ca40_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_He4_Ar36_to_Ca40_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Ar36_to_Ca40_removed) = drate_dT; - - } - rate_p_K39_to_Ca40_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_p_K39_to_Ca40_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_K39_to_Ca40_removed) = drate_dT; - - } - rate_p_K39_to_He4_Ar36_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_p_K39_to_He4_Ar36_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_K39_to_He4_Ar36_removed) = drate_dT; - - } - rate_He4_Ca40_to_Ti44_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_He4_Ca40_to_Ti44_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Ca40_to_Ti44_removed) = drate_dT; - - } - rate_p_Sc43_to_Ti44_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_p_Sc43_to_Ti44_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_Sc43_to_Ti44_removed) = drate_dT; - - } - rate_p_Sc43_to_He4_Ca40_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_p_Sc43_to_He4_Ca40_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_Sc43_to_He4_Ca40_removed) = drate_dT; - - } - rate_He4_Ti44_to_Cr48_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_He4_Ti44_to_Cr48_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Ti44_to_Cr48_removed) = drate_dT; - - } - rate_He4_Ti44_to_p_V47_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_He4_Ti44_to_p_V47_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Ti44_to_p_V47_removed) = drate_dT; - - } - rate_p_V47_to_Cr48_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_p_V47_to_Cr48_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_V47_to_Cr48_removed) = drate_dT; - - } - rate_He4_Cr48_to_Fe52_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_He4_Cr48_to_Fe52_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Cr48_to_Fe52_removed) = drate_dT; - - } - rate_He4_Cr48_to_p_Mn51_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_He4_Cr48_to_p_Mn51_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Cr48_to_p_Mn51_removed) = drate_dT; - - } - rate_p_Mn51_to_Fe52_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_p_Mn51_to_Fe52_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_Mn51_to_Fe52_removed) = drate_dT; - - } - rate_He4_Fe52_to_Ni56_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_He4_Fe52_to_Ni56_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Fe52_to_Ni56_removed) = drate_dT; - - } - rate_He4_Fe52_to_p_Co55_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_He4_Fe52_to_p_Co55_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Fe52_to_p_Co55_removed) = drate_dT; - - } - rate_p_Co55_to_Ni56_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_p_Co55_to_Ni56_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_Co55_to_Ni56_removed) = drate_dT; - - } - rate_C12_C12_to_Mg24_modified(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_C12_C12_to_Mg24_modified) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_C12_C12_to_Mg24_modified) = drate_dT; - - } - rate_O16_O16_to_S32_modified(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_O16_O16_to_S32_modified) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_O16_O16_to_S32_modified) = drate_dT; - - } - rate_C12_O16_to_Si28_modified(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_C12_O16_to_Si28_modified) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_C12_O16_to_Si28_modified) = drate_dT; - - } - -} - -template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void -fill_approx_rates([[maybe_unused]] const tf_t& tfactors, - [[maybe_unused]] const amrex::Real rho, - [[maybe_unused]] const amrex::Array1D& Y, - [[maybe_unused]] T& rate_eval) -{ - - [[maybe_unused]] amrex::Real rate{}; - [[maybe_unused]] amrex::Real drate_dT{}; - - rate_S32_He4_to_Ar36_approx(rate_eval, rate, drate_dT); - rate_eval.screened_rates(k_S32_He4_to_Ar36_approx) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_S32_He4_to_Ar36_approx) = drate_dT; - - } - rate_Ar36_to_S32_He4_approx(rate_eval, rate, drate_dT); - rate_eval.screened_rates(k_Ar36_to_S32_He4_approx) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Ar36_to_S32_He4_approx) = drate_dT; - - } - rate_Ar36_He4_to_Ca40_approx(rate_eval, rate, drate_dT); - rate_eval.screened_rates(k_Ar36_He4_to_Ca40_approx) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Ar36_He4_to_Ca40_approx) = drate_dT; - - } - rate_Ca40_to_Ar36_He4_approx(rate_eval, rate, drate_dT); - rate_eval.screened_rates(k_Ca40_to_Ar36_He4_approx) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Ca40_to_Ar36_He4_approx) = drate_dT; - - } - rate_Ca40_He4_to_Ti44_approx(rate_eval, rate, drate_dT); - rate_eval.screened_rates(k_Ca40_He4_to_Ti44_approx) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Ca40_He4_to_Ti44_approx) = drate_dT; - - } - rate_Ti44_to_Ca40_He4_approx(rate_eval, rate, drate_dT); - rate_eval.screened_rates(k_Ti44_to_Ca40_He4_approx) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Ti44_to_Ca40_He4_approx) = drate_dT; - - } - rate_Ti44_He4_to_Cr48_approx(rate_eval, rate, drate_dT); - rate_eval.screened_rates(k_Ti44_He4_to_Cr48_approx) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Ti44_He4_to_Cr48_approx) = drate_dT; - - } - rate_Cr48_to_Ti44_He4_approx(rate_eval, rate, drate_dT); - rate_eval.screened_rates(k_Cr48_to_Ti44_He4_approx) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Cr48_to_Ti44_He4_approx) = drate_dT; - - } - rate_Cr48_He4_to_Fe52_approx(rate_eval, rate, drate_dT); - rate_eval.screened_rates(k_Cr48_He4_to_Fe52_approx) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Cr48_He4_to_Fe52_approx) = drate_dT; - - } - rate_Fe52_to_Cr48_He4_approx(rate_eval, rate, drate_dT); - rate_eval.screened_rates(k_Fe52_to_Cr48_He4_approx) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Fe52_to_Cr48_He4_approx) = drate_dT; - - } - rate_Fe52_He4_to_Ni56_approx(rate_eval, rate, drate_dT); - rate_eval.screened_rates(k_Fe52_He4_to_Ni56_approx) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Fe52_He4_to_Ni56_approx) = drate_dT; + { + // p_C12_to_N13_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_C12); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_C12); + } +#endif + rate_p_C12_to_N13_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_p_C12_to_N13_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_C12_to_N13_reaclib) = drate_dT; + } + } + + { + // He4_C12_to_O16_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_C12); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_C12); + } +#endif + rate_He4_C12_to_O16_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_He4_C12_to_O16_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_C12_to_O16_reaclib) = drate_dT; + } + } + + { + // He4_O16_to_Ne20_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_O16); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_O16); + } +#endif + rate_He4_O16_to_Ne20_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_He4_O16_to_Ne20_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_O16_to_Ne20_reaclib) = drate_dT; + } + } + + { + // He4_Ne20_to_Mg24_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ne20); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ne20); + } +#endif + rate_He4_Ne20_to_Mg24_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_He4_Ne20_to_Mg24_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Ne20_to_Mg24_reaclib) = drate_dT; + } + } + + { + // p_Na23_to_Mg24_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Na23); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Na23); + } +#endif + rate_p_Na23_to_Mg24_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_p_Na23_to_Mg24_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Na23_to_Mg24_reaclib) = drate_dT; + } + } + + { + // He4_Mg24_to_Si28_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Mg24); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Mg24); + } +#endif + rate_He4_Mg24_to_Si28_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_He4_Mg24_to_Si28_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Mg24_to_Si28_reaclib) = drate_dT; + } + } + + { + // p_Al27_to_Si28_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Al27); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Al27); + } +#endif + rate_p_Al27_to_Si28_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_p_Al27_to_Si28_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Al27_to_Si28_reaclib) = drate_dT; + } + } + + { + // He4_Si28_to_S32_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Si28); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Si28); + } +#endif + rate_He4_Si28_to_S32_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_He4_Si28_to_S32_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Si28_to_S32_reaclib) = drate_dT; + } + } + + { + // p_P31_to_S32_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_P31); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_P31); + } +#endif + rate_p_P31_to_S32_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_p_P31_to_S32_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_P31_to_S32_reaclib) = drate_dT; + } + } + + { + // C12_C12_to_p_Na23_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_C12_C12); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_C12_C12); + } +#endif + rate_C12_C12_to_p_Na23_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_C12_C12_to_p_Na23_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_C12_C12_to_p_Na23_reaclib) = drate_dT; + } + } + + { + // C12_C12_to_He4_Ne20_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_C12_C12); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_C12_C12); + } +#endif + rate_C12_C12_to_He4_Ne20_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_C12_C12_to_He4_Ne20_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_C12_C12_to_He4_Ne20_reaclib) = drate_dT; + } + } + + { + // He4_N13_to_p_O16_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_N13); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_N13); + } +#endif + rate_He4_N13_to_p_O16_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_He4_N13_to_p_O16_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_N13_to_p_O16_reaclib) = drate_dT; + } + } + + { + // C12_O16_to_p_Al27_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_C12_O16); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_C12_O16); + } +#endif + rate_C12_O16_to_p_Al27_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_C12_O16_to_p_Al27_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_C12_O16_to_p_Al27_reaclib) = drate_dT; + } + } + + { + // C12_O16_to_He4_Mg24_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_C12_O16); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_C12_O16); + } +#endif + rate_C12_O16_to_He4_Mg24_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_C12_O16_to_He4_Mg24_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_C12_O16_to_He4_Mg24_reaclib) = drate_dT; + } + } + + { + // O16_O16_to_p_P31_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_O16_O16); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_O16_O16); + } +#endif + rate_O16_O16_to_p_P31_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_O16_O16_to_p_P31_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_O16_O16_to_p_P31_reaclib) = drate_dT; + } + } + + { + // O16_O16_to_He4_Si28_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_O16_O16); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_O16_O16); + } +#endif + rate_O16_O16_to_He4_Si28_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_O16_O16_to_He4_Si28_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_O16_O16_to_He4_Si28_reaclib) = drate_dT; + } + } + + { + // p_Na23_to_He4_Ne20_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Na23); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Na23); + } +#endif + rate_p_Na23_to_He4_Ne20_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_p_Na23_to_He4_Ne20_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Na23_to_He4_Ne20_reaclib) = drate_dT; + } + } + + { + // p_Al27_to_He4_Mg24_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Al27); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Al27); + } +#endif + rate_p_Al27_to_He4_Mg24_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_p_Al27_to_He4_Mg24_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Al27_to_He4_Mg24_reaclib) = drate_dT; + } + } + + { + // p_P31_to_He4_Si28_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_P31); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_P31); + } +#endif + rate_p_P31_to_He4_Si28_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_p_P31_to_He4_Si28_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_P31_to_He4_Si28_reaclib) = drate_dT; + } + } + + { + // He4_He4_He4_to_C12_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_He4) + rate_eval.log_screen(k_He4_Be8); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_He4) + rate_eval.dlog_screen_dT(k_He4_Be8); + } +#endif + rate_He4_He4_He4_to_C12_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_He4_He4_He4_to_C12_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_He4_He4_to_C12_reaclib) = drate_dT; + } + } + + { + // C12_C12_to_n_Mg23_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_C12_C12); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_C12_C12); + } +#endif + rate_C12_C12_to_n_Mg23_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_C12_C12_to_n_Mg23_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_C12_C12_to_n_Mg23_reaclib) = drate_dT; + } + } + + { + // O16_O16_to_n_S31_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_O16_O16); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_O16_O16); + } +#endif + rate_O16_O16_to_n_S31_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_O16_O16_to_n_S31_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_O16_O16_to_n_S31_reaclib) = drate_dT; + } + } + + { + // C12_O16_to_n_Si27_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_C12_O16); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_C12_O16); + } +#endif + rate_C12_O16_to_n_Si27_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_C12_O16_to_n_Si27_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_C12_O16_to_n_Si27_reaclib) = drate_dT; + } + } + + { + // He4_S32_to_Ar36_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_S32); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_S32); + } +#endif + rate_He4_S32_to_Ar36_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_He4_S32_to_Ar36_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_S32_to_Ar36_reaclib) = drate_dT; + } + } + + { + // p_Cl35_to_Ar36_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Cl35); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Cl35); + } +#endif + rate_p_Cl35_to_Ar36_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_p_Cl35_to_Ar36_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Cl35_to_Ar36_reaclib) = drate_dT; + } + } + + { + // p_Cl35_to_He4_S32_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Cl35); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Cl35); + } +#endif + rate_p_Cl35_to_He4_S32_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_p_Cl35_to_He4_S32_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Cl35_to_He4_S32_reaclib) = drate_dT; + } + } + + { + // He4_Ar36_to_Ca40_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ar36); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ar36); + } +#endif + rate_He4_Ar36_to_Ca40_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_He4_Ar36_to_Ca40_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Ar36_to_Ca40_reaclib) = drate_dT; + } + } + + { + // p_K39_to_Ca40_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_K39); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_K39); + } +#endif + rate_p_K39_to_Ca40_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_p_K39_to_Ca40_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_K39_to_Ca40_reaclib) = drate_dT; + } + } + + { + // p_K39_to_He4_Ar36_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_K39); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_K39); + } +#endif + rate_p_K39_to_He4_Ar36_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_p_K39_to_He4_Ar36_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_K39_to_He4_Ar36_reaclib) = drate_dT; + } + } + + { + // He4_Ca40_to_Ti44_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ca40); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ca40); + } +#endif + rate_He4_Ca40_to_Ti44_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_He4_Ca40_to_Ti44_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Ca40_to_Ti44_reaclib) = drate_dT; + } + } + + { + // p_Sc43_to_Ti44_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Sc43); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Sc43); + } +#endif + rate_p_Sc43_to_Ti44_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_p_Sc43_to_Ti44_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Sc43_to_Ti44_reaclib) = drate_dT; + } + } + + { + // p_Sc43_to_He4_Ca40_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Sc43); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Sc43); + } +#endif + rate_p_Sc43_to_He4_Ca40_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_p_Sc43_to_He4_Ca40_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Sc43_to_He4_Ca40_reaclib) = drate_dT; + } + } + + { + // He4_Ti44_to_Cr48_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ti44); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ti44); + } +#endif + rate_He4_Ti44_to_Cr48_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_He4_Ti44_to_Cr48_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Ti44_to_Cr48_reaclib) = drate_dT; + } + } + + { + // He4_Ti44_to_p_V47_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ti44); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ti44); + } +#endif + rate_He4_Ti44_to_p_V47_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_He4_Ti44_to_p_V47_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Ti44_to_p_V47_reaclib) = drate_dT; + } + } + + { + // p_V47_to_Cr48_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_V47); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_V47); + } +#endif + rate_p_V47_to_Cr48_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_p_V47_to_Cr48_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_V47_to_Cr48_reaclib) = drate_dT; + } + } + + { + // He4_Cr48_to_Fe52_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Cr48); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Cr48); + } +#endif + rate_He4_Cr48_to_Fe52_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_He4_Cr48_to_Fe52_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Cr48_to_Fe52_reaclib) = drate_dT; + } + } + + { + // He4_Cr48_to_p_Mn51_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Cr48); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Cr48); + } +#endif + rate_He4_Cr48_to_p_Mn51_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_He4_Cr48_to_p_Mn51_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Cr48_to_p_Mn51_reaclib) = drate_dT; + } + } + + { + // p_Mn51_to_Fe52_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Mn51); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Mn51); + } +#endif + rate_p_Mn51_to_Fe52_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_p_Mn51_to_Fe52_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Mn51_to_Fe52_reaclib) = drate_dT; + } + } + + { + // He4_Fe52_to_Ni56_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Fe52); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Fe52); + } +#endif + rate_He4_Fe52_to_Ni56_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_He4_Fe52_to_Ni56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Fe52_to_Ni56_reaclib) = drate_dT; + } + } + + { + // He4_Fe52_to_p_Co55_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Fe52); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Fe52); + } +#endif + rate_He4_Fe52_to_p_Co55_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_He4_Fe52_to_p_Co55_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Fe52_to_p_Co55_reaclib) = drate_dT; + } + } + + { + // p_Co55_to_Ni56_reaclib + + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Co55); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Co55); + } +#endif + rate_p_Co55_to_Ni56_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_p_Co55_to_Ni56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Co55_to_Ni56_reaclib) = drate_dT; + } } - rate_Ni56_to_Fe52_He4_approx(rate_eval, rate, drate_dT); - rate_eval.screened_rates(k_Ni56_to_Fe52_He4_approx) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Ni56_to_Fe52_He4_approx) = drate_dT; - } } diff --git a/networks/he-burn/ase/table_rates.H b/networks/he-burn/ase/table_rates.H index 6d3fff3c9..27520b6fb 100644 --- a/networks/he-burn/ase/table_rates.H +++ b/networks/he-burn/ase/table_rates.H @@ -57,7 +57,7 @@ namespace rate_tables } -AMREX_INLINE AMREX_GPU_HOST_DEVICE +AMREX_INLINE AMREX_GPU_DEVICE amrex::Real evaluate_linear_1d(const amrex::Real fhi, const amrex::Real flo, const amrex::Real xhi, const amrex::Real xlo, const amrex::Real x) { @@ -70,7 +70,7 @@ evaluate_linear_1d(const amrex::Real fhi, const amrex::Real flo, const amrex::Re return f; } -AMREX_INLINE AMREX_GPU_HOST_DEVICE +AMREX_INLINE AMREX_GPU_DEVICE amrex::Real evaluate_linear_2d(const amrex::Real fip1jp1, const amrex::Real fip1j, const amrex::Real fijp1, const amrex::Real fij, const amrex::Real xhi, const amrex::Real xlo, const amrex::Real yhi, const amrex::Real ylo, @@ -102,7 +102,7 @@ evaluate_linear_2d(const amrex::Real fip1jp1, const amrex::Real fip1j, const amr template -AMREX_INLINE AMREX_GPU_HOST_DEVICE +AMREX_INLINE AMREX_GPU_DEVICE amrex::Real evaluate_vars(const int irhoy_lo, const int jtemp_lo, const R& log_rhoy_table, const T& log_temp_table, const D& data, @@ -132,7 +132,7 @@ evaluate_vars(const int irhoy_lo, const int jtemp_lo, template -AMREX_INLINE AMREX_GPU_HOST_DEVICE +AMREX_INLINE AMREX_GPU_DEVICE amrex::Real evaluate_dr_dtemp(const int irhoy_lo, const int jtemp_lo, const table_t& table_meta, const R& log_rhoy_table, const T& log_temp_table, const D& data, @@ -275,7 +275,7 @@ evaluate_dr_dtemp(const int irhoy_lo, const int jtemp_lo, template -AMREX_INLINE AMREX_GPU_HOST_DEVICE +AMREX_INLINE AMREX_GPU_DEVICE void get_entries(const int irhoy_lo, const int jtemp_lo, const table_t& table_meta, const R& log_rhoy_table, const T& log_temp_table, const D& data, @@ -303,7 +303,7 @@ get_entries(const int irhoy_lo, const int jtemp_lo, } template -AMREX_INLINE AMREX_GPU_HOST_DEVICE +AMREX_INLINE AMREX_GPU_DEVICE void tabular_evaluate(const table_t& table_meta, const R& log_rhoy_table, const T& log_temp_table, const D& data, diff --git a/networks/he-burn/ase/temperature_table_rates.H b/networks/he-burn/ase/temperature_table_rates.H index 4fdd0d89c..849033267 100644 --- a/networks/he-burn/ase/temperature_table_rates.H +++ b/networks/he-burn/ase/temperature_table_rates.H @@ -5,7 +5,7 @@ #include #include - +#include using namespace amrex::literals; @@ -28,6 +28,7 @@ namespace temp_tabular { [[maybe_unused]] amrex::Real drate_dT; + } diff --git a/nse_solver/nse_eqns.H b/nse_solver/nse_eqns.H index 3395cbd0b..90ac76fea 100644 --- a/nse_solver/nse_eqns.H +++ b/nse_solver/nse_eqns.H @@ -28,7 +28,7 @@ struct nse_solver_data template -AMREX_GPU_HOST_DEVICE AMREX_INLINE +AMREX_GPU_DEVICE AMREX_INLINE T get_T_independent_nse_state(const T& state) { // Computes (2J + 1) m^{5/2} (kB 1e9 / 2 π ħ^2)^{3/2} / ρ // a portion of the nse_state that is not dependent on Temperature. @@ -114,7 +114,7 @@ void compute_coulomb_contribution(amrex::Array1D& u_c, template -AMREX_GPU_HOST_DEVICE AMREX_INLINE +AMREX_GPU_DEVICE AMREX_INLINE void get_T_dependent_nse_state(nse_solver_data& state_data) { // It does two things: // 1. Applies T9^{3/2} to the input state, diff --git a/unit_test/test_sdc/main.cpp b/unit_test/test_sdc/main.cpp index cbcdcaada..c2d30c5d3 100644 --- a/unit_test/test_sdc/main.cpp +++ b/unit_test/test_sdc/main.cpp @@ -145,7 +145,7 @@ void main_main () auto state_arr = state.array(mfi); amrex::ParallelFor(bx, - [=] AMREX_GPU_HOST_DEVICE (int i, int j, int k) + [=] AMREX_GPU_DEVICE (int i, int j, int k) { state_arr(i, j, k, vars.itemp) = @@ -199,7 +199,7 @@ void main_main () auto n_rhs = integrator_n_rhs.array(mfi); amrex::ParallelFor(bx, - [=] AMREX_GPU_HOST_DEVICE (int i, int j, int k) + [=] AMREX_GPU_DEVICE (int i, int j, int k) { bool success = do_react(vars, i, j, k, s, n_rhs); diff --git a/unit_test/test_sdc/react_zones.H b/unit_test/test_sdc/react_zones.H index 49041b34b..de78ccc99 100644 --- a/unit_test/test_sdc/react_zones.H +++ b/unit_test/test_sdc/react_zones.H @@ -9,7 +9,7 @@ #include #include -AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE +AMREX_GPU_DEVICE AMREX_FORCE_INLINE bool do_react (const plot_t& p, const int i, const int j, const int k, Array4 const& state, Array4 const& n_rhs) {