diff --git a/Docs/source/networks.rst b/Docs/source/networks.rst index ac6ebc07d..cde8808dd 100644 --- a/Docs/source/networks.rst +++ b/Docs/source/networks.rst @@ -415,13 +415,14 @@ The full network appears as: As with ``ase``, this network is constructed to have reverse rates for all forward rates, allowing it to be used with the :ref:`self_consistent_nse` solver. It builds off of ``ase`` by including -more iron-group nuclei (using the same nuclei as ``he-burn-28amnp``). +more iron-group nuclei. The full network appears as: .. figure:: ../../networks/he-burn/ase-iron/ase-iron.png :align: center +Overall there are 28 nuclei with 7 approximated-out nuclei and 153 rates. ``cno_he_burn_33a`` ------------------- diff --git a/networks/he-burn/ase-iron/Make.package b/networks/he-burn/ase-iron/Make.package index fd942a5ce..35413fdcf 100644 --- a/networks/he-burn/ase-iron/Make.package +++ b/networks/he-burn/ase-iron/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-iron/actual_network.H b/networks/he-burn/ase-iron/actual_network.H index 0aaa22d7c..3ff57c477 100644 --- a/networks/he-burn/ase-iron/actual_network.H +++ b/networks/he-burn/ase-iron/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"; @@ -106,6 +113,12 @@ namespace network else if constexpr (spec == Ni58) { return 506.4596327920008_rt; } + else if constexpr (spec == Cu59) { + return 509.8782038560021_rt; + } + else if constexpr (spec == Zn60) { + return 514.9831749199948_rt; + } // Return zero if we don't recognize the species. @@ -199,6 +212,12 @@ namespace network else if constexpr (spec == Ni58) { return 9.620389809618879e-23_rt; } + else if constexpr (spec == Cu59) { + return 9.787133677749025e-23_rt; + } + else if constexpr (spec == Zn60) { + return 9.953576917772707e-23_rt; + } // Return zero if we don't recognize the species. @@ -259,134 +278,191 @@ namespace Rates k_He4_Mn51_to_Co55_reaclib = 12, k_He4_Fe52_to_Ni56_reaclib = 13, k_p_Co55_to_Ni56_reaclib = 14, - k_C12_C12_to_p_Na23_reaclib = 15, - k_C12_C12_to_He4_Ne20_reaclib = 16, - k_He4_N13_to_p_O16_reaclib = 17, - k_C12_O16_to_p_Al27_reaclib = 18, - k_C12_O16_to_He4_Mg24_reaclib = 19, - k_O16_O16_to_p_P31_reaclib = 20, - k_O16_O16_to_He4_Si28_reaclib = 21, - k_p_Na23_to_He4_Ne20_reaclib = 22, - k_p_Al27_to_He4_Mg24_reaclib = 23, - k_p_P31_to_He4_Si28_reaclib = 24, - k_He4_Cr48_to_p_Mn51_reaclib = 25, - k_He4_Fe52_to_p_Co55_reaclib = 26, - k_He4_He4_He4_to_C12_reaclib = 27, - k_C12_C12_to_n_Mg23_removed = 28, - k_O16_O16_to_n_S31_removed = 29, - k_C12_O16_to_n_Si27_removed = 30, - k_p_Fe54_to_Co55_reaclib = 31, - k_He4_Fe54_to_Ni58_reaclib = 32, - k_p_Fe56_to_Co57_reaclib = 33, - k_n_Co55_to_Co56_reaclib = 34, - k_n_Co56_to_Co57_reaclib = 35, - k_p_Co57_to_Ni58_reaclib = 36, - k_He4_Mn51_to_p_Fe54_reaclib = 37, - k_He4_Co55_to_p_Ni58_reaclib = 38, - k_n_Co56_to_p_Fe56_reaclib = 39, - k_p_Co57_to_He4_Fe54_reaclib = 40, - k_n_Ni56_to_p_Co56_reaclib = 41, - k_He4_S32_to_Ar36_removed = 42, - k_p_Cl35_to_Ar36_removed = 43, - k_p_Cl35_to_He4_S32_removed = 44, - k_He4_Ar36_to_Ca40_removed = 45, - k_p_K39_to_Ca40_removed = 46, - k_p_K39_to_He4_Ar36_removed = 47, - k_He4_Ca40_to_Ti44_removed = 48, - k_p_Sc43_to_Ti44_removed = 49, - k_p_Sc43_to_He4_Ca40_removed = 50, - k_He4_Ti44_to_Cr48_removed = 51, - k_He4_Ti44_to_p_V47_removed = 52, - k_p_V47_to_Cr48_removed = 53, - k_n_Fe52_to_Fe53_removed = 54, - k_n_Fe53_to_Fe54_removed = 55, - k_n_Fe54_to_Fe55_removed = 56, - k_n_Fe55_to_Fe56_removed = 57, - k_n_Ni56_to_Ni57_removed = 58, - k_n_Ni57_to_Ni58_removed = 59, - k_Co56_to_Fe56_weaktab = 60, - k_Co56_to_Ni56_weaktab = 61, - k_Fe56_to_Co56_weaktab = 62, - k_Ni56_to_Co56_weaktab = 63, - k_n_to_p_weaktab = 64, - k_p_to_n_weaktab = 65, - k_S32_He4_to_Ar36_approx = 66, - k_Ar36_to_S32_He4_approx = 67, - k_Ar36_He4_to_Ca40_approx = 68, - k_Ca40_to_Ar36_He4_approx = 69, - k_Ca40_He4_to_Ti44_approx = 70, - k_Ti44_to_Ca40_He4_approx = 71, - k_Ti44_He4_to_Cr48_approx = 72, - k_Cr48_to_Ti44_He4_approx = 73, - k_Fe52_n_n_to_Fe54_approx = 74, - k_Fe54_to_Fe52_n_n_approx = 75, - k_Fe54_n_n_to_Fe56_approx = 76, - k_Fe56_to_Fe54_n_n_approx = 77, - k_Ni56_n_n_to_Ni58_approx = 78, - k_Ni58_to_Ni56_n_n_approx = 79, - k_C12_C12_to_Mg24_modified = 80, - k_O16_O16_to_S32_modified = 81, - k_C12_O16_to_Si28_modified = 82, - k_N13_to_p_C12_derived = 83, - k_O16_to_He4_C12_derived = 84, - k_Ne20_to_He4_O16_derived = 85, - k_Mg24_to_p_Na23_derived = 86, - k_Mg24_to_He4_Ne20_derived = 87, - k_Si28_to_p_Al27_derived = 88, - k_Si28_to_He4_Mg24_derived = 89, - k_S32_to_p_P31_derived = 90, - k_S32_to_He4_Si28_derived = 91, - k_Fe52_to_p_Mn51_derived = 92, - k_Fe52_to_He4_Cr48_derived = 93, - k_Co55_to_He4_Mn51_derived = 94, - k_Ni56_to_p_Co55_derived = 95, - k_Ni56_to_He4_Fe52_derived = 96, - k_C12_to_He4_He4_He4_derived = 97, - k_p_O16_to_He4_N13_derived = 98, - k_He4_Ne20_to_p_Na23_derived = 99, - k_He4_Ne20_to_C12_C12_derived = 100, - k_p_Na23_to_C12_C12_derived = 101, - k_He4_Mg24_to_p_Al27_derived = 102, - k_He4_Mg24_to_C12_O16_derived = 103, - k_p_Al27_to_C12_O16_derived = 104, - k_He4_Si28_to_p_P31_derived = 105, - k_He4_Si28_to_O16_O16_derived = 106, - k_p_P31_to_O16_O16_derived = 107, - k_p_Mn51_to_He4_Cr48_derived = 108, - k_p_Co55_to_He4_Fe52_derived = 109, - k_Mg24_to_C12_C12_derived = 110, - k_S32_to_O16_O16_derived = 111, - k_Si28_to_C12_O16_derived = 112, - k_Co55_to_p_Fe54_derived = 113, - k_Co56_to_n_Co55_derived = 114, - k_Co57_to_n_Co56_derived = 115, - k_Co57_to_p_Fe56_derived = 116, - k_Ni58_to_p_Co57_derived = 117, - k_Ni58_to_He4_Fe54_derived = 118, - k_p_Fe54_to_He4_Mn51_derived = 119, - k_He4_Fe54_to_p_Co57_derived = 120, - k_p_Fe56_to_n_Co56_derived = 121, - k_p_Co56_to_n_Ni56_derived = 122, - k_p_Ni58_to_He4_Co55_derived = 123, - k_He4_S32_to_p_Cl35_removed = 124, - k_Ar36_to_He4_S32_removed = 125, - k_Ar36_to_p_Cl35_removed = 126, - k_He4_Ar36_to_p_K39_removed = 127, - k_Ca40_to_He4_Ar36_removed = 128, - k_Ca40_to_p_K39_removed = 129, - k_He4_Ca40_to_p_Sc43_removed = 130, - k_Ti44_to_He4_Ca40_removed = 131, - k_Ti44_to_p_Sc43_removed = 132, - k_Cr48_to_He4_Ti44_removed = 133, - k_Cr48_to_p_V47_removed = 134, - k_p_V47_to_He4_Ti44_removed = 135, - k_Fe54_to_n_Fe53_removed = 136, - k_Fe53_to_n_Fe52_removed = 137, - k_Fe56_to_n_Fe55_removed = 138, - k_Fe55_to_n_Fe54_removed = 139, - k_Ni58_to_n_Ni57_removed = 140, - k_Ni57_to_n_Ni56_removed = 141, - NumRates = k_Ni57_to_n_Ni56_removed + k_He4_Co55_to_Cu59_reaclib = 15, + k_He4_Ni56_to_Zn60_reaclib = 16, + k_p_Cu59_to_Zn60_reaclib = 17, + k_C12_C12_to_p_Na23_reaclib = 18, + k_C12_C12_to_He4_Ne20_reaclib = 19, + k_He4_N13_to_p_O16_reaclib = 20, + k_C12_O16_to_p_Al27_reaclib = 21, + k_C12_O16_to_He4_Mg24_reaclib = 22, + k_O16_O16_to_p_P31_reaclib = 23, + k_O16_O16_to_He4_Si28_reaclib = 24, + k_p_Na23_to_He4_Ne20_reaclib = 25, + k_p_Al27_to_He4_Mg24_reaclib = 26, + k_p_P31_to_He4_Si28_reaclib = 27, + k_He4_Cr48_to_p_Mn51_reaclib = 28, + k_He4_Fe52_to_p_Co55_reaclib = 29, + k_p_Cu59_to_He4_Ni56_reaclib = 30, + k_He4_He4_He4_to_C12_reaclib = 31, + k_C12_C12_to_n_Mg23_reaclib = 32, + k_O16_O16_to_n_S31_reaclib = 33, + k_C12_O16_to_n_Si27_reaclib = 34, + k_p_Fe54_to_Co55_reaclib = 35, + k_He4_Fe54_to_Ni58_reaclib = 36, + k_p_Fe56_to_Co57_reaclib = 37, + k_n_Co55_to_Co56_reaclib = 38, + k_n_Co56_to_Co57_reaclib = 39, + k_p_Co57_to_Ni58_reaclib = 40, + k_p_Ni58_to_Cu59_reaclib = 41, + k_He4_Mn51_to_p_Fe54_reaclib = 42, + k_He4_Co55_to_p_Ni58_reaclib = 43, + k_n_Co56_to_p_Fe56_reaclib = 44, + k_p_Co57_to_He4_Fe54_reaclib = 45, + k_n_Ni56_to_p_Co56_reaclib = 46, + k_n_Cu59_to_He4_Co56_reaclib = 47, + k_He4_S32_to_Ar36_reaclib = 48, + k_p_Cl35_to_Ar36_reaclib = 49, + k_p_Cl35_to_He4_S32_reaclib = 50, + k_He4_Ar36_to_Ca40_reaclib = 51, + k_p_K39_to_Ca40_reaclib = 52, + k_p_K39_to_He4_Ar36_reaclib = 53, + k_He4_Ca40_to_Ti44_reaclib = 54, + k_p_Sc43_to_Ti44_reaclib = 55, + k_p_Sc43_to_He4_Ca40_reaclib = 56, + k_He4_Ti44_to_Cr48_reaclib = 57, + k_He4_Ti44_to_p_V47_reaclib = 58, + k_p_V47_to_Cr48_reaclib = 59, + k_n_Fe52_to_Fe53_reaclib = 60, + k_n_Fe53_to_Fe54_reaclib = 61, + k_n_Fe54_to_Fe55_reaclib = 62, + k_n_Fe55_to_Fe56_reaclib = 63, + k_n_Ni56_to_Ni57_reaclib = 64, + k_n_Ni57_to_Ni58_reaclib = 65, + k_Co56_to_Fe56_weaktab = 66, + k_Co56_to_Ni56_weaktab = 67, + k_Fe56_to_Co56_weaktab = 68, + k_Ni56_to_Co56_weaktab = 69, + k_n_to_p_weaktab = 70, + k_p_to_n_weaktab = 71, + k_S32_He4_to_Ar36_approx = 72, + k_Ar36_to_S32_He4_approx = 73, + k_Ar36_He4_to_Ca40_approx = 74, + k_Ca40_to_Ar36_He4_approx = 75, + k_Ca40_He4_to_Ti44_approx = 76, + k_Ti44_to_Ca40_He4_approx = 77, + k_Ti44_He4_to_Cr48_approx = 78, + k_Cr48_to_Ti44_He4_approx = 79, + k_Fe52_n_n_to_Fe54_approx = 80, + k_Fe54_to_Fe52_n_n_approx = 81, + k_Fe54_n_n_to_Fe56_approx = 82, + k_Fe56_to_Fe54_n_n_approx = 83, + k_Ni56_n_n_to_Ni58_approx = 84, + k_Ni58_to_Ni56_n_n_approx = 85, + k_C12_C12_to_Mg24_modified = 86, + k_O16_O16_to_S32_modified = 87, + k_C12_O16_to_Si28_modified = 88, + k_N13_to_p_C12_derived = 89, + k_O16_to_He4_C12_derived = 90, + k_Ne20_to_He4_O16_derived = 91, + k_Mg24_to_p_Na23_derived = 92, + k_Mg24_to_He4_Ne20_derived = 93, + k_Si28_to_p_Al27_derived = 94, + k_Si28_to_He4_Mg24_derived = 95, + k_S32_to_p_P31_derived = 96, + k_S32_to_He4_Si28_derived = 97, + k_Fe52_to_p_Mn51_derived = 98, + k_Fe52_to_He4_Cr48_derived = 99, + k_Co55_to_He4_Mn51_derived = 100, + k_Ni56_to_p_Co55_derived = 101, + k_Ni56_to_He4_Fe52_derived = 102, + k_Cu59_to_He4_Co55_derived = 103, + k_Zn60_to_p_Cu59_derived = 104, + k_Zn60_to_He4_Ni56_derived = 105, + k_C12_to_He4_He4_He4_derived = 106, + k_p_O16_to_He4_N13_derived = 107, + k_He4_Ne20_to_p_Na23_derived = 108, + k_He4_Ne20_to_C12_C12_derived = 109, + k_p_Na23_to_C12_C12_derived = 110, + k_He4_Mg24_to_p_Al27_derived = 111, + k_He4_Mg24_to_C12_O16_derived = 112, + k_p_Al27_to_C12_O16_derived = 113, + k_He4_Si28_to_p_P31_derived = 114, + k_He4_Si28_to_O16_O16_derived = 115, + k_p_P31_to_O16_O16_derived = 116, + k_p_Mn51_to_He4_Cr48_derived = 117, + k_p_Co55_to_He4_Fe52_derived = 118, + k_He4_Ni56_to_p_Cu59_derived = 119, + k_Mg24_to_C12_C12_derived = 120, + k_S32_to_O16_O16_derived = 121, + k_Si28_to_C12_O16_derived = 122, + k_Co55_to_p_Fe54_derived = 123, + k_Co56_to_n_Co55_derived = 124, + k_Co57_to_n_Co56_derived = 125, + k_Co57_to_p_Fe56_derived = 126, + k_Ni58_to_p_Co57_derived = 127, + k_Ni58_to_He4_Fe54_derived = 128, + k_Cu59_to_p_Ni58_derived = 129, + k_p_Fe54_to_He4_Mn51_derived = 130, + k_He4_Fe54_to_p_Co57_derived = 131, + k_p_Fe56_to_n_Co56_derived = 132, + k_p_Co56_to_n_Ni56_derived = 133, + k_He4_Co56_to_n_Cu59_derived = 134, + k_p_Ni58_to_He4_Co55_derived = 135, + k_He4_S32_to_p_Cl35_derived = 136, + k_Ar36_to_He4_S32_derived = 137, + k_Ar36_to_p_Cl35_derived = 138, + k_He4_Ar36_to_p_K39_derived = 139, + k_Ca40_to_He4_Ar36_derived = 140, + k_Ca40_to_p_K39_derived = 141, + k_He4_Ca40_to_p_Sc43_derived = 142, + k_Ti44_to_He4_Ca40_derived = 143, + k_Ti44_to_p_Sc43_derived = 144, + k_Cr48_to_He4_Ti44_derived = 145, + k_Cr48_to_p_V47_derived = 146, + k_p_V47_to_He4_Ti44_derived = 147, + k_Fe54_to_n_Fe53_derived = 148, + k_Fe53_to_n_Fe52_derived = 149, + k_Fe56_to_n_Fe55_derived = 150, + k_Fe55_to_n_Fe54_derived = 151, + k_Ni58_to_n_Ni57_derived = 152, + k_Ni57_to_n_Ni56_derived = 153, + NumRates = k_Ni57_to_n_Ni56_derived + }; + + enum ScreenPairs : + std::uint8_t + { + k_p_C12 = 1, + k_He4_O16 = 2, + k_p_Co57 = 3, + k_p_K39 = 4, + k_He4_Ca40 = 5, + k_He4_Ar36 = 6, + k_p_Sc43 = 7, + k_p_Fe56 = 8, + k_He4_C12 = 9, + k_He4_Ti44 = 10, + k_He4_Mg24 = 11, + k_C12_O16 = 12, + k_p_V47 = 13, + k_He4_Cr48 = 14, + k_p_Co55 = 15, + k_C12_C12 = 16, + k_He4_Ne20 = 17, + k_p_Al27 = 18, + k_p_Mn51 = 19, + k_p_Na23 = 20, + k_p_Co56 = 21, + k_p_Fe54 = 22, + k_He4_Fe52 = 23, + k_p_Cu59 = 24, + k_He4_S32 = 25, + k_He4_Mn51 = 26, + k_He4_Co55 = 27, + k_He4_Ni56 = 28, + k_p_P31 = 29, + k_He4_He4 = 30, + k_p_Ni58 = 31, + k_p_O16 = 32, + k_He4_Co56 = 33, + k_He4_Si28 = 34, + k_He4_Fe54 = 35, + k_p_Cl35 = 36, + k_O16_O16 = 37, + k_He4_Be8 = 38, + k_He4_N13 = 39, + NumScreenPairs = k_He4_N13 }; // rate names -- note: the rates are 1-based, not zero-based, so we pad @@ -409,135 +485,153 @@ namespace Rates "He4_Mn51_to_Co55_reaclib", // 12, "He4_Fe52_to_Ni56_reaclib", // 13, "p_Co55_to_Ni56_reaclib", // 14, - "C12_C12_to_p_Na23_reaclib", // 15, - "C12_C12_to_He4_Ne20_reaclib", // 16, - "He4_N13_to_p_O16_reaclib", // 17, - "C12_O16_to_p_Al27_reaclib", // 18, - "C12_O16_to_He4_Mg24_reaclib", // 19, - "O16_O16_to_p_P31_reaclib", // 20, - "O16_O16_to_He4_Si28_reaclib", // 21, - "p_Na23_to_He4_Ne20_reaclib", // 22, - "p_Al27_to_He4_Mg24_reaclib", // 23, - "p_P31_to_He4_Si28_reaclib", // 24, - "He4_Cr48_to_p_Mn51_reaclib", // 25, - "He4_Fe52_to_p_Co55_reaclib", // 26, - "He4_He4_He4_to_C12_reaclib", // 27, - "C12_C12_to_n_Mg23_removed", // 28, - "O16_O16_to_n_S31_removed", // 29, - "C12_O16_to_n_Si27_removed", // 30, - "p_Fe54_to_Co55_reaclib", // 31, - "He4_Fe54_to_Ni58_reaclib", // 32, - "p_Fe56_to_Co57_reaclib", // 33, - "n_Co55_to_Co56_reaclib", // 34, - "n_Co56_to_Co57_reaclib", // 35, - "p_Co57_to_Ni58_reaclib", // 36, - "He4_Mn51_to_p_Fe54_reaclib", // 37, - "He4_Co55_to_p_Ni58_reaclib", // 38, - "n_Co56_to_p_Fe56_reaclib", // 39, - "p_Co57_to_He4_Fe54_reaclib", // 40, - "n_Ni56_to_p_Co56_reaclib", // 41, - "He4_S32_to_Ar36_removed", // 42, - "p_Cl35_to_Ar36_removed", // 43, - "p_Cl35_to_He4_S32_removed", // 44, - "He4_Ar36_to_Ca40_removed", // 45, - "p_K39_to_Ca40_removed", // 46, - "p_K39_to_He4_Ar36_removed", // 47, - "He4_Ca40_to_Ti44_removed", // 48, - "p_Sc43_to_Ti44_removed", // 49, - "p_Sc43_to_He4_Ca40_removed", // 50, - "He4_Ti44_to_Cr48_removed", // 51, - "He4_Ti44_to_p_V47_removed", // 52, - "p_V47_to_Cr48_removed", // 53, - "n_Fe52_to_Fe53_removed", // 54, - "n_Fe53_to_Fe54_removed", // 55, - "n_Fe54_to_Fe55_removed", // 56, - "n_Fe55_to_Fe56_removed", // 57, - "n_Ni56_to_Ni57_removed", // 58, - "n_Ni57_to_Ni58_removed", // 59, - "Co56_to_Fe56_weaktab", // 60, - "Co56_to_Ni56_weaktab", // 61, - "Fe56_to_Co56_weaktab", // 62, - "Ni56_to_Co56_weaktab", // 63, - "n_to_p_weaktab", // 64, - "p_to_n_weaktab", // 65, - "S32_He4_to_Ar36_approx", // 66, - "Ar36_to_S32_He4_approx", // 67, - "Ar36_He4_to_Ca40_approx", // 68, - "Ca40_to_Ar36_He4_approx", // 69, - "Ca40_He4_to_Ti44_approx", // 70, - "Ti44_to_Ca40_He4_approx", // 71, - "Ti44_He4_to_Cr48_approx", // 72, - "Cr48_to_Ti44_He4_approx", // 73, - "Fe52_n_n_to_Fe54_approx", // 74, - "Fe54_to_Fe52_n_n_approx", // 75, - "Fe54_n_n_to_Fe56_approx", // 76, - "Fe56_to_Fe54_n_n_approx", // 77, - "Ni56_n_n_to_Ni58_approx", // 78, - "Ni58_to_Ni56_n_n_approx", // 79, - "C12_C12_to_Mg24_modified", // 80, - "O16_O16_to_S32_modified", // 81, - "C12_O16_to_Si28_modified", // 82, - "N13_to_p_C12_derived", // 83, - "O16_to_He4_C12_derived", // 84, - "Ne20_to_He4_O16_derived", // 85, - "Mg24_to_p_Na23_derived", // 86, - "Mg24_to_He4_Ne20_derived", // 87, - "Si28_to_p_Al27_derived", // 88, - "Si28_to_He4_Mg24_derived", // 89, - "S32_to_p_P31_derived", // 90, - "S32_to_He4_Si28_derived", // 91, - "Fe52_to_p_Mn51_derived", // 92, - "Fe52_to_He4_Cr48_derived", // 93, - "Co55_to_He4_Mn51_derived", // 94, - "Ni56_to_p_Co55_derived", // 95, - "Ni56_to_He4_Fe52_derived", // 96, - "C12_to_He4_He4_He4_derived", // 97, - "p_O16_to_He4_N13_derived", // 98, - "He4_Ne20_to_p_Na23_derived", // 99, - "He4_Ne20_to_C12_C12_derived", // 100, - "p_Na23_to_C12_C12_derived", // 101, - "He4_Mg24_to_p_Al27_derived", // 102, - "He4_Mg24_to_C12_O16_derived", // 103, - "p_Al27_to_C12_O16_derived", // 104, - "He4_Si28_to_p_P31_derived", // 105, - "He4_Si28_to_O16_O16_derived", // 106, - "p_P31_to_O16_O16_derived", // 107, - "p_Mn51_to_He4_Cr48_derived", // 108, - "p_Co55_to_He4_Fe52_derived", // 109, - "Mg24_to_C12_C12_derived", // 110, - "S32_to_O16_O16_derived", // 111, - "Si28_to_C12_O16_derived", // 112, - "Co55_to_p_Fe54_derived", // 113, - "Co56_to_n_Co55_derived", // 114, - "Co57_to_n_Co56_derived", // 115, - "Co57_to_p_Fe56_derived", // 116, - "Ni58_to_p_Co57_derived", // 117, - "Ni58_to_He4_Fe54_derived", // 118, - "p_Fe54_to_He4_Mn51_derived", // 119, - "He4_Fe54_to_p_Co57_derived", // 120, - "p_Fe56_to_n_Co56_derived", // 121, - "p_Co56_to_n_Ni56_derived", // 122, - "p_Ni58_to_He4_Co55_derived", // 123, - "He4_S32_to_p_Cl35_removed", // 124, - "Ar36_to_He4_S32_removed", // 125, - "Ar36_to_p_Cl35_removed", // 126, - "He4_Ar36_to_p_K39_removed", // 127, - "Ca40_to_He4_Ar36_removed", // 128, - "Ca40_to_p_K39_removed", // 129, - "He4_Ca40_to_p_Sc43_removed", // 130, - "Ti44_to_He4_Ca40_removed", // 131, - "Ti44_to_p_Sc43_removed", // 132, - "Cr48_to_He4_Ti44_removed", // 133, - "Cr48_to_p_V47_removed", // 134, - "p_V47_to_He4_Ti44_removed", // 135, - "Fe54_to_n_Fe53_removed", // 136, - "Fe53_to_n_Fe52_removed", // 137, - "Fe56_to_n_Fe55_removed", // 138, - "Fe55_to_n_Fe54_removed", // 139, - "Ni58_to_n_Ni57_removed", // 140, - "Ni57_to_n_Ni56_removed" // 141, + "He4_Co55_to_Cu59_reaclib", // 15, + "He4_Ni56_to_Zn60_reaclib", // 16, + "p_Cu59_to_Zn60_reaclib", // 17, + "C12_C12_to_p_Na23_reaclib", // 18, + "C12_C12_to_He4_Ne20_reaclib", // 19, + "He4_N13_to_p_O16_reaclib", // 20, + "C12_O16_to_p_Al27_reaclib", // 21, + "C12_O16_to_He4_Mg24_reaclib", // 22, + "O16_O16_to_p_P31_reaclib", // 23, + "O16_O16_to_He4_Si28_reaclib", // 24, + "p_Na23_to_He4_Ne20_reaclib", // 25, + "p_Al27_to_He4_Mg24_reaclib", // 26, + "p_P31_to_He4_Si28_reaclib", // 27, + "He4_Cr48_to_p_Mn51_reaclib", // 28, + "He4_Fe52_to_p_Co55_reaclib", // 29, + "p_Cu59_to_He4_Ni56_reaclib", // 30, + "He4_He4_He4_to_C12_reaclib", // 31, + "C12_C12_to_n_Mg23_reaclib", // 32, + "O16_O16_to_n_S31_reaclib", // 33, + "C12_O16_to_n_Si27_reaclib", // 34, + "p_Fe54_to_Co55_reaclib", // 35, + "He4_Fe54_to_Ni58_reaclib", // 36, + "p_Fe56_to_Co57_reaclib", // 37, + "n_Co55_to_Co56_reaclib", // 38, + "n_Co56_to_Co57_reaclib", // 39, + "p_Co57_to_Ni58_reaclib", // 40, + "p_Ni58_to_Cu59_reaclib", // 41, + "He4_Mn51_to_p_Fe54_reaclib", // 42, + "He4_Co55_to_p_Ni58_reaclib", // 43, + "n_Co56_to_p_Fe56_reaclib", // 44, + "p_Co57_to_He4_Fe54_reaclib", // 45, + "n_Ni56_to_p_Co56_reaclib", // 46, + "n_Cu59_to_He4_Co56_reaclib", // 47, + "He4_S32_to_Ar36_reaclib", // 48, + "p_Cl35_to_Ar36_reaclib", // 49, + "p_Cl35_to_He4_S32_reaclib", // 50, + "He4_Ar36_to_Ca40_reaclib", // 51, + "p_K39_to_Ca40_reaclib", // 52, + "p_K39_to_He4_Ar36_reaclib", // 53, + "He4_Ca40_to_Ti44_reaclib", // 54, + "p_Sc43_to_Ti44_reaclib", // 55, + "p_Sc43_to_He4_Ca40_reaclib", // 56, + "He4_Ti44_to_Cr48_reaclib", // 57, + "He4_Ti44_to_p_V47_reaclib", // 58, + "p_V47_to_Cr48_reaclib", // 59, + "n_Fe52_to_Fe53_reaclib", // 60, + "n_Fe53_to_Fe54_reaclib", // 61, + "n_Fe54_to_Fe55_reaclib", // 62, + "n_Fe55_to_Fe56_reaclib", // 63, + "n_Ni56_to_Ni57_reaclib", // 64, + "n_Ni57_to_Ni58_reaclib", // 65, + "Co56_to_Fe56_weaktab", // 66, + "Co56_to_Ni56_weaktab", // 67, + "Fe56_to_Co56_weaktab", // 68, + "Ni56_to_Co56_weaktab", // 69, + "n_to_p_weaktab", // 70, + "p_to_n_weaktab", // 71, + "S32_He4_to_Ar36_approx", // 72, + "Ar36_to_S32_He4_approx", // 73, + "Ar36_He4_to_Ca40_approx", // 74, + "Ca40_to_Ar36_He4_approx", // 75, + "Ca40_He4_to_Ti44_approx", // 76, + "Ti44_to_Ca40_He4_approx", // 77, + "Ti44_He4_to_Cr48_approx", // 78, + "Cr48_to_Ti44_He4_approx", // 79, + "Fe52_n_n_to_Fe54_approx", // 80, + "Fe54_to_Fe52_n_n_approx", // 81, + "Fe54_n_n_to_Fe56_approx", // 82, + "Fe56_to_Fe54_n_n_approx", // 83, + "Ni56_n_n_to_Ni58_approx", // 84, + "Ni58_to_Ni56_n_n_approx", // 85, + "C12_C12_to_Mg24_modified", // 86, + "O16_O16_to_S32_modified", // 87, + "C12_O16_to_Si28_modified", // 88, + "N13_to_p_C12_derived", // 89, + "O16_to_He4_C12_derived", // 90, + "Ne20_to_He4_O16_derived", // 91, + "Mg24_to_p_Na23_derived", // 92, + "Mg24_to_He4_Ne20_derived", // 93, + "Si28_to_p_Al27_derived", // 94, + "Si28_to_He4_Mg24_derived", // 95, + "S32_to_p_P31_derived", // 96, + "S32_to_He4_Si28_derived", // 97, + "Fe52_to_p_Mn51_derived", // 98, + "Fe52_to_He4_Cr48_derived", // 99, + "Co55_to_He4_Mn51_derived", // 100, + "Ni56_to_p_Co55_derived", // 101, + "Ni56_to_He4_Fe52_derived", // 102, + "Cu59_to_He4_Co55_derived", // 103, + "Zn60_to_p_Cu59_derived", // 104, + "Zn60_to_He4_Ni56_derived", // 105, + "C12_to_He4_He4_He4_derived", // 106, + "p_O16_to_He4_N13_derived", // 107, + "He4_Ne20_to_p_Na23_derived", // 108, + "He4_Ne20_to_C12_C12_derived", // 109, + "p_Na23_to_C12_C12_derived", // 110, + "He4_Mg24_to_p_Al27_derived", // 111, + "He4_Mg24_to_C12_O16_derived", // 112, + "p_Al27_to_C12_O16_derived", // 113, + "He4_Si28_to_p_P31_derived", // 114, + "He4_Si28_to_O16_O16_derived", // 115, + "p_P31_to_O16_O16_derived", // 116, + "p_Mn51_to_He4_Cr48_derived", // 117, + "p_Co55_to_He4_Fe52_derived", // 118, + "He4_Ni56_to_p_Cu59_derived", // 119, + "Mg24_to_C12_C12_derived", // 120, + "S32_to_O16_O16_derived", // 121, + "Si28_to_C12_O16_derived", // 122, + "Co55_to_p_Fe54_derived", // 123, + "Co56_to_n_Co55_derived", // 124, + "Co57_to_n_Co56_derived", // 125, + "Co57_to_p_Fe56_derived", // 126, + "Ni58_to_p_Co57_derived", // 127, + "Ni58_to_He4_Fe54_derived", // 128, + "Cu59_to_p_Ni58_derived", // 129, + "p_Fe54_to_He4_Mn51_derived", // 130, + "He4_Fe54_to_p_Co57_derived", // 131, + "p_Fe56_to_n_Co56_derived", // 132, + "p_Co56_to_n_Ni56_derived", // 133, + "He4_Co56_to_n_Cu59_derived", // 134, + "p_Ni58_to_He4_Co55_derived", // 135, + "He4_S32_to_p_Cl35_derived", // 136, + "Ar36_to_He4_S32_derived", // 137, + "Ar36_to_p_Cl35_derived", // 138, + "He4_Ar36_to_p_K39_derived", // 139, + "Ca40_to_He4_Ar36_derived", // 140, + "Ca40_to_p_K39_derived", // 141, + "He4_Ca40_to_p_Sc43_derived", // 142, + "Ti44_to_He4_Ca40_derived", // 143, + "Ti44_to_p_Sc43_derived", // 144, + "Cr48_to_He4_Ti44_derived", // 145, + "Cr48_to_p_V47_derived", // 146, + "p_V47_to_He4_Ti44_derived", // 147, + "Fe54_to_n_Fe53_derived", // 148, + "Fe53_to_n_Fe52_derived", // 149, + "Fe56_to_n_Fe55_derived", // 150, + "Fe55_to_n_Fe54_derived", // 151, + "Ni58_to_n_Ni57_derived", // 152, + "Ni57_to_n_Ni56_derived" // 153, }; + template + AMREX_GPU_HOST_DEVICE AMREX_INLINE + constexpr amrex::Real get_p_random() { + return 0.0_rt; + } + } #ifdef NSE_NET @@ -559,7 +653,7 @@ namespace NSE_INDEX constexpr int H1_index = 2; constexpr int N_index = 1; constexpr int He4_index = 3; - constexpr int NumNSERatePairs = 36; + constexpr int NumNSERatePairs = 42; inline AMREX_GPU_MANAGED amrex::Array2D rate_pair_data { H1, C12, -1, N13, -1, -1, C12, N13, k_p_C12_to_N13_reaclib, k_N13_to_p_C12_derived, @@ -576,12 +670,16 @@ namespace NSE_INDEX He4, Mn51, -1, Co55, -1, -1, Mn51, Co55, k_He4_Mn51_to_Co55_reaclib, k_Co55_to_He4_Mn51_derived, He4, Fe52, -1, Ni56, -1, -1, Fe52, Ni56, k_He4_Fe52_to_Ni56_reaclib, k_Ni56_to_He4_Fe52_derived, H1, Co55, -1, Ni56, -1, -1, Co55, Ni56, k_p_Co55_to_Ni56_reaclib, k_Ni56_to_p_Co55_derived, + He4, Co55, -1, Cu59, -1, -1, Co55, Cu59, k_He4_Co55_to_Cu59_reaclib, k_Cu59_to_He4_Co55_derived, + He4, Ni56, -1, Zn60, -1, -1, Ni56, Zn60, k_He4_Ni56_to_Zn60_reaclib, k_Zn60_to_He4_Ni56_derived, + H1, Cu59, -1, Zn60, -1, -1, Cu59, Zn60, k_p_Cu59_to_Zn60_reaclib, k_Zn60_to_p_Cu59_derived, He4, N13, -1, H1, O16, -1, N13, O16, k_He4_N13_to_p_O16_reaclib, k_p_O16_to_He4_N13_derived, H1, Na23, -1, He4, Ne20, -1, Na23, Ne20, k_p_Na23_to_He4_Ne20_reaclib, k_He4_Ne20_to_p_Na23_derived, H1, Al27, -1, He4, Mg24, -1, Al27, Mg24, k_p_Al27_to_He4_Mg24_reaclib, k_He4_Mg24_to_p_Al27_derived, H1, P31, -1, He4, Si28, -1, P31, Si28, k_p_P31_to_He4_Si28_reaclib, k_He4_Si28_to_p_P31_derived, He4, Cr48, -1, H1, Mn51, -1, Cr48, Mn51, k_He4_Cr48_to_p_Mn51_reaclib, k_p_Mn51_to_He4_Cr48_derived, He4, Fe52, -1, H1, Co55, -1, Fe52, Co55, k_He4_Fe52_to_p_Co55_reaclib, k_p_Co55_to_He4_Fe52_derived, + H1, Cu59, -1, He4, Ni56, -1, Cu59, Ni56, k_p_Cu59_to_He4_Ni56_reaclib, k_He4_Ni56_to_p_Cu59_derived, He4, He4, He4, C12, -1, -1, C12, -1, k_He4_He4_He4_to_C12_reaclib, k_C12_to_He4_He4_He4_derived, H1, Fe54, -1, Co55, -1, -1, Fe54, Co55, k_p_Fe54_to_Co55_reaclib, k_Co55_to_p_Fe54_derived, He4, Fe54, -1, Ni58, -1, -1, Fe54, Ni58, k_He4_Fe54_to_Ni58_reaclib, k_Ni58_to_He4_Fe54_derived, @@ -589,11 +687,13 @@ namespace NSE_INDEX N, Co55, -1, Co56, -1, -1, Co55, Co56, k_n_Co55_to_Co56_reaclib, k_Co56_to_n_Co55_derived, N, Co56, -1, Co57, -1, -1, Co56, Co57, k_n_Co56_to_Co57_reaclib, k_Co57_to_n_Co56_derived, H1, Co57, -1, Ni58, -1, -1, Co57, Ni58, k_p_Co57_to_Ni58_reaclib, k_Ni58_to_p_Co57_derived, + H1, Ni58, -1, Cu59, -1, -1, Ni58, Cu59, k_p_Ni58_to_Cu59_reaclib, k_Cu59_to_p_Ni58_derived, He4, Mn51, -1, H1, Fe54, -1, Mn51, Fe54, k_He4_Mn51_to_p_Fe54_reaclib, k_p_Fe54_to_He4_Mn51_derived, He4, Co55, -1, H1, Ni58, -1, Co55, Ni58, k_He4_Co55_to_p_Ni58_reaclib, k_p_Ni58_to_He4_Co55_derived, N, Co56, -1, H1, Fe56, -1, Co56, Fe56, k_n_Co56_to_p_Fe56_reaclib, k_p_Fe56_to_n_Co56_derived, H1, Co57, -1, He4, Fe54, -1, Co57, Fe54, k_p_Co57_to_He4_Fe54_reaclib, k_He4_Fe54_to_p_Co57_derived, N, Ni56, -1, H1, Co56, -1, Ni56, Co56, k_n_Ni56_to_p_Co56_reaclib, k_p_Co56_to_n_Ni56_derived, + N, Cu59, -1, He4, Co56, -1, Cu59, Co56, k_n_Cu59_to_He4_Co56_reaclib, k_He4_Co56_to_n_Cu59_derived, S32, He4, -1, Ar36, -1, -1, S32, Ar36, k_S32_He4_to_Ar36_approx, k_Ar36_to_S32_He4_approx, Ar36, He4, -1, Ca40, -1, -1, Ar36, Ca40, k_Ar36_He4_to_Ca40_approx, k_Ca40_to_Ar36_He4_approx, Ca40, He4, -1, Ti44, -1, -1, Ca40, Ti44, k_Ca40_He4_to_Ti44_approx, k_Ti44_to_Ca40_He4_approx, diff --git a/networks/he-burn/ase-iron/actual_rhs.H b/networks/he-burn/ase-iron/actual_rhs.H index 7440354fe..eb26913b3 100644 --- a/networks/he-burn/ase-iron/actual_rhs.H +++ b/networks/he-burn/ase-iron/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) { - - // here Y is consistent with state.xn +void evaluate_screening(const burn_t& state, + const amrex::Array1D& Y, + T& rate_eval) { - [[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,777 +67,446 @@ 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); - - -#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; - } - - - { - 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_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; + 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, 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_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; - } - - { - 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); - } - - 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; + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 27.0_rt, 57.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_Co57) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_p_Co57) = 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, 19.0_rt, 39.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_K39) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_p_K39) = dlog_scor_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; - } - - { - 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, 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_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; + 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(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; - } - - - { - 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, 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_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; + 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; + } } - 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; - } - - { - constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 15.0_rt, 31.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_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; + 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; + } } - 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(1.0_rt, 1.0_rt, 26.0_rt, 56.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_Fe56) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_p_Fe56) = dlog_scor_dT; + } } - { - constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 24.0_rt, 48.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_Cr48_to_Fe52_reaclib); - rate_eval.screened_rates(k_He4_Cr48_to_Fe52_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Cr48_to_Fe52_reaclib); - rate_eval.dscreened_rates_dT(k_He4_Cr48_to_Fe52_reaclib) = 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; + } } - ratraw = rate_eval.screened_rates(k_He4_Cr48_to_p_Mn51_reaclib); - rate_eval.screened_rates(k_He4_Cr48_to_p_Mn51_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Cr48_to_p_Mn51_reaclib); - rate_eval.dscreened_rates_dT(k_He4_Cr48_to_p_Mn51_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; - } - - { - 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); - } - - ratraw = rate_eval.screened_rates(k_p_Mn51_to_Fe52_reaclib); - rate_eval.screened_rates(k_p_Mn51_to_Fe52_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Mn51_to_Fe52_reaclib); - rate_eval.dscreened_rates_dT(k_p_Mn51_to_Fe52_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_p_Mn51_to_He4_Cr48_derived); - rate_eval.screened_rates(k_p_Mn51_to_He4_Cr48_derived) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Mn51_to_He4_Cr48_derived); - rate_eval.dscreened_rates_dT(k_p_Mn51_to_He4_Cr48_derived) = ratraw * dscor_dt + dratraw_dT * scor; + 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_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(2.0_rt, 4.0_rt, 25.0_rt, 51.0_rt); + 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_screen(pstate, scn_fac, scor, dscor_dt); + 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; + } } - ratraw = rate_eval.screened_rates(k_He4_Mn51_to_Co55_reaclib); - rate_eval.screened_rates(k_He4_Mn51_to_Co55_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Mn51_to_Co55_reaclib); - rate_eval.dscreened_rates_dT(k_He4_Mn51_to_Co55_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; + { + 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_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_He4_Mn51_to_p_Fe54_reaclib); - rate_eval.screened_rates(k_He4_Mn51_to_p_Fe54_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Mn51_to_p_Fe54_reaclib); - rate_eval.dscreened_rates_dT(k_He4_Mn51_to_p_Fe54_reaclib) = 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, 26.0_rt, 52.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_Fe52_to_Ni56_reaclib); - rate_eval.screened_rates(k_He4_Fe52_to_Ni56_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Fe52_to_Ni56_reaclib); - rate_eval.dscreened_rates_dT(k_He4_Fe52_to_Ni56_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_He4_Fe52_to_p_Co55_reaclib); - rate_eval.screened_rates(k_He4_Fe52_to_p_Co55_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Fe52_to_p_Co55_reaclib); - rate_eval.dscreened_rates_dT(k_He4_Fe52_to_p_Co55_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(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); - } - - ratraw = rate_eval.screened_rates(k_p_Co55_to_Ni56_reaclib); - rate_eval.screened_rates(k_p_Co55_to_Ni56_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Co55_to_Ni56_reaclib); - rate_eval.dscreened_rates_dT(k_p_Co55_to_Ni56_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_p_Co55_to_He4_Fe52_derived); - rate_eval.screened_rates(k_p_Co55_to_He4_Fe52_derived) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Co55_to_He4_Fe52_derived); - rate_eval.dscreened_rates_dT(k_p_Co55_to_He4_Fe52_derived) = ratraw * dscor_dt + dratraw_dT * scor; + 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(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_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; + 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; + } } - 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; - } - - 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(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, 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; + } } - 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; - } - - { - 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_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; + 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; + } } - { - 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, 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(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); + 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_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; + } } - { - 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); - } - - 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, 27.0_rt, 56.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_Co56) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_p_Co56) = dlog_scor_dT; + } } - { constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 26.0_rt, 54.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_Fe54) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_p_Fe54) = dlog_scor_dT; + } } - ratraw = rate_eval.screened_rates(k_p_Fe54_to_Co55_reaclib); - rate_eval.screened_rates(k_p_Fe54_to_Co55_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Fe54_to_Co55_reaclib); - rate_eval.dscreened_rates_dT(k_p_Fe54_to_Co55_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_p_Fe54_to_He4_Mn51_derived); - rate_eval.screened_rates(k_p_Fe54_to_He4_Mn51_derived) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Fe54_to_He4_Mn51_derived); - rate_eval.dscreened_rates_dT(k_p_Fe54_to_He4_Mn51_derived) = ratraw * dscor_dt + dratraw_dT * scor; - } - - { - constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 26.0_rt, 54.0_rt); + 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); - } - - ratraw = rate_eval.screened_rates(k_He4_Fe54_to_Ni58_reaclib); - rate_eval.screened_rates(k_He4_Fe54_to_Ni58_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Fe54_to_Ni58_reaclib); - rate_eval.dscreened_rates_dT(k_He4_Fe54_to_Ni58_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_He4_Fe54_to_p_Co57_derived); - rate_eval.screened_rates(k_He4_Fe54_to_p_Co57_derived) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Fe54_to_p_Co57_derived); - rate_eval.dscreened_rates_dT(k_He4_Fe54_to_p_Co57_derived) = ratraw * dscor_dt + dratraw_dT * scor; + 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(1.0_rt, 1.0_rt, 26.0_rt, 56.0_rt); + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 29.0_rt, 59.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_Fe56_to_Co57_reaclib); - rate_eval.screened_rates(k_p_Fe56_to_Co57_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Fe56_to_Co57_reaclib); - rate_eval.dscreened_rates_dT(k_p_Fe56_to_Co57_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; - } - - ratraw = rate_eval.screened_rates(k_p_Fe56_to_n_Co56_derived); - rate_eval.screened_rates(k_p_Fe56_to_n_Co56_derived) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Fe56_to_n_Co56_derived); - rate_eval.dscreened_rates_dT(k_p_Fe56_to_n_Co56_derived) = ratraw * dscor_dt + dratraw_dT * scor; + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_p_Cu59) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_p_Cu59) = dlog_scor_dT; + } } - { - constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 27.0_rt, 57.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_Co57_to_Ni58_reaclib); - rate_eval.screened_rates(k_p_Co57_to_Ni58_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Co57_to_Ni58_reaclib); - rate_eval.dscreened_rates_dT(k_p_Co57_to_Ni58_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; + 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_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; + } } - ratraw = rate_eval.screened_rates(k_p_Co57_to_He4_Fe54_reaclib); - rate_eval.screened_rates(k_p_Co57_to_He4_Fe54_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Co57_to_He4_Fe54_reaclib); - rate_eval.dscreened_rates_dT(k_p_Co57_to_He4_Fe54_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 25.0_rt, 51.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_Mn51) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_He4_Mn51) = dlog_scor_dT; + } } - { constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 27.0_rt, 55.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_Co55_to_p_Ni58_reaclib); - rate_eval.screened_rates(k_He4_Co55_to_p_Ni58_reaclib) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_He4_Co55_to_p_Ni58_reaclib); - rate_eval.dscreened_rates_dT(k_He4_Co55_to_p_Ni58_reaclib) = ratraw * dscor_dt + dratraw_dT * scor; + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_Co55) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_He4_Co55) = dlog_scor_dT; + } } - { - 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_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, 28.0_rt, 56.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_Ni56) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_He4_Ni56) = dlog_scor_dT; + } } - { - constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 27.0_rt, 56.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); + 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; + } } - ratraw = rate_eval.screened_rates(k_p_Co56_to_n_Ni56_derived); - rate_eval.screened_rates(k_p_Co56_to_n_Ni56_derived) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Co56_to_n_Ni56_derived); - rate_eval.dscreened_rates_dT(k_p_Co56_to_n_Ni56_derived) = ratraw * dscor_dt + dratraw_dT * scor; + { + 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_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, 28.0_rt, 58.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_Ni58) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_p_Ni58) = dlog_scor_dT; + } } - ratraw = rate_eval.screened_rates(k_p_Ni58_to_He4_Co55_derived); - rate_eval.screened_rates(k_p_Ni58_to_He4_Co55_derived) *= scor; - if constexpr (std::is_same_v) { - dratraw_dT = rate_eval.dscreened_rates_dT(k_p_Ni58_to_He4_Co55_derived); - rate_eval.dscreened_rates_dT(k_p_Ni58_to_He4_Co55_derived) = ratraw * dscor_dt + dratraw_dT * scor; + { + 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_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, 16.0_rt, 32.0_rt); + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 27.0_rt, 56.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; + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_Co56) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_He4_Co56) = dlog_scor_dT; + } } - 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; - } - - { - 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_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; + 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_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(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, 26.0_rt, 54.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_Fe54) = log_scor; + if constexpr (do_T_derivatives) { + rate_eval.dlog_screen_dT(k_He4_Fe54) = 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, 17.0_rt, 35.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_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_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; + { + 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; + } } - 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; + { + 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_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(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, 7.0_rt, 13.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_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_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; - } +} +#endif - 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; - } +template +AMREX_GPU_HOST_DEVICE AMREX_INLINE +void evaluate_rates(const burn_t& state, + const amrex::Array1D& Y, + T& rate_eval) { - { - 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); - } + // here Y is consistent with state.xn - 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; - } + [[maybe_unused]] amrex::Real rhoy = state.rho * state.y_e; - 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; - } + const tf_t tfactors = evaluate_tfactors(state.T); + // Precompute screening terms - { - 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); - } +#ifdef SCREENING + evaluate_screening(state, Y, rate_eval); +#endif - 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; - } + // Fill in different rates - 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; - } + fill_reaclib_rates(tfactors, rate_eval); + temp_tabular::fill_rates(tfactors, rate_eval); - { - 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); - } + // fill modified rates next -- these can have ReacLib or + // TemperatureTabular/StarLib rates as the original rate + modified_rates::fill_rates(tfactors, rate_eval); - 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; - } + // 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. - 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; - } + fill_derived_rates(tfactors, rate_eval); -#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; @@ -976,7 +644,7 @@ void get_ydot_weak(const burn_t& state, rate_eval.screened_rates(k_p_to_n_weaktab) = rate; rate_eval.enuc_weak += C::n_A * Y(H1) * (edot_nu + edot_gamma); - auto screened_rates = rate_eval.screened_rates; + const auto& screened_rates = rate_eval.screened_rates; ydot_nuc(N) = (-screened_rates(k_n_to_p_weaktab)*Y(N) + screened_rates(k_p_to_n_weaktab)*Y(H1)); @@ -1036,6 +704,10 @@ void get_ydot_weak(const burn_t& state, ydot_nuc(Ni58) = 0.0_rt; + ydot_nuc(Cu59) = 0.0_rt; + + ydot_nuc(Zn60) = 0.0_rt; + enuc_weak = rate_eval.enuc_weak; } #endif @@ -1054,6 +726,7 @@ void rhs_nuc(const burn_t& state, (-screened_rates(k_n_Co56_to_Co57_reaclib)*Y(Co56)*Y(N)*state.rho + screened_rates(k_Co57_to_n_Co56_derived)*Y(Co57)) + (-screened_rates(k_n_Co56_to_p_Fe56_reaclib)*Y(Co56)*Y(N)*state.rho + screened_rates(k_p_Fe56_to_n_Co56_derived)*Y(Fe56)*Y(H1)*state.rho) + (-screened_rates(k_n_Ni56_to_p_Co56_reaclib)*Y(Ni56)*Y(N)*state.rho + screened_rates(k_p_Co56_to_n_Ni56_derived)*Y(Co56)*Y(H1)*state.rho) + + (-screened_rates(k_n_Cu59_to_He4_Co56_reaclib)*Y(Cu59)*Y(N)*state.rho + screened_rates(k_He4_Co56_to_n_Cu59_derived)*Y(Co56)*Y(He4)*state.rho) + (-2.0*screened_rates(k_Fe52_n_n_to_Fe54_approx)*Y(Fe52)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + 2.0*screened_rates(k_Fe54_to_Fe52_n_n_approx)*Y(Fe54)) + (-2.0*screened_rates(k_Fe54_n_n_to_Fe56_approx)*Y(Fe54)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + 2.0*screened_rates(k_Fe56_to_Fe54_n_n_approx)*Y(Fe56)) + (-2.0*screened_rates(k_Ni56_n_n_to_Ni58_approx)*Y(Ni56)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + 2.0*screened_rates(k_Ni58_to_Ni56_n_n_approx)*Y(Ni58)) + @@ -1066,6 +739,7 @@ void rhs_nuc(const burn_t& state, (-screened_rates(k_p_P31_to_S32_reaclib)*Y(P31)*Y(H1)*state.rho + screened_rates(k_S32_to_p_P31_derived)*Y(S32)) + (-screened_rates(k_p_Mn51_to_Fe52_reaclib)*Y(Mn51)*Y(H1)*state.rho + screened_rates(k_Fe52_to_p_Mn51_derived)*Y(Fe52)) + (-screened_rates(k_p_Co55_to_Ni56_reaclib)*Y(Co55)*Y(H1)*state.rho + screened_rates(k_Ni56_to_p_Co55_derived)*Y(Ni56)) + + (-screened_rates(k_p_Cu59_to_Zn60_reaclib)*Y(Cu59)*Y(H1)*state.rho + screened_rates(k_Zn60_to_p_Cu59_derived)*Y(Zn60)) + (0.5*screened_rates(k_C12_C12_to_p_Na23_reaclib)*amrex::Math::powi<2>(Y(C12))*state.rho + -screened_rates(k_p_Na23_to_C12_C12_derived)*Y(Na23)*Y(H1)*state.rho) + (screened_rates(k_He4_N13_to_p_O16_reaclib)*Y(He4)*Y(N13)*state.rho + -screened_rates(k_p_O16_to_He4_N13_derived)*Y(O16)*Y(H1)*state.rho) + (screened_rates(k_C12_O16_to_p_Al27_reaclib)*Y(C12)*Y(O16)*state.rho + -screened_rates(k_p_Al27_to_C12_O16_derived)*Y(Al27)*Y(H1)*state.rho) + @@ -1075,9 +749,11 @@ void rhs_nuc(const burn_t& state, (-screened_rates(k_p_P31_to_He4_Si28_reaclib)*Y(P31)*Y(H1)*state.rho + screened_rates(k_He4_Si28_to_p_P31_derived)*Y(He4)*Y(Si28)*state.rho) + (screened_rates(k_He4_Cr48_to_p_Mn51_reaclib)*Y(Cr48)*Y(He4)*state.rho + -screened_rates(k_p_Mn51_to_He4_Cr48_derived)*Y(Mn51)*Y(H1)*state.rho) + (screened_rates(k_He4_Fe52_to_p_Co55_reaclib)*Y(Fe52)*Y(He4)*state.rho + -screened_rates(k_p_Co55_to_He4_Fe52_derived)*Y(Co55)*Y(H1)*state.rho) + + (-screened_rates(k_p_Cu59_to_He4_Ni56_reaclib)*Y(Cu59)*Y(H1)*state.rho + screened_rates(k_He4_Ni56_to_p_Cu59_derived)*Y(He4)*Y(Ni56)*state.rho) + (-screened_rates(k_p_Fe54_to_Co55_reaclib)*Y(Fe54)*Y(H1)*state.rho + screened_rates(k_Co55_to_p_Fe54_derived)*Y(Co55)) + (-screened_rates(k_p_Fe56_to_Co57_reaclib)*Y(Fe56)*Y(H1)*state.rho + screened_rates(k_Co57_to_p_Fe56_derived)*Y(Co57)) + (-screened_rates(k_p_Co57_to_Ni58_reaclib)*Y(Co57)*Y(H1)*state.rho + screened_rates(k_Ni58_to_p_Co57_derived)*Y(Ni58)) + + (-screened_rates(k_p_Ni58_to_Cu59_reaclib)*Y(Ni58)*Y(H1)*state.rho + screened_rates(k_Cu59_to_p_Ni58_derived)*Y(Cu59)) + (screened_rates(k_He4_Mn51_to_p_Fe54_reaclib)*Y(He4)*Y(Mn51)*state.rho + -screened_rates(k_p_Fe54_to_He4_Mn51_derived)*Y(Fe54)*Y(H1)*state.rho) + (screened_rates(k_He4_Co55_to_p_Ni58_reaclib)*Y(Co55)*Y(He4)*state.rho + -screened_rates(k_p_Ni58_to_He4_Co55_derived)*Y(Ni58)*Y(H1)*state.rho) + (screened_rates(k_n_Co56_to_p_Fe56_reaclib)*Y(Co56)*Y(N)*state.rho + -screened_rates(k_p_Fe56_to_n_Co56_derived)*Y(Fe56)*Y(H1)*state.rho) + @@ -1094,6 +770,8 @@ void rhs_nuc(const burn_t& state, (-screened_rates(k_He4_Cr48_to_Fe52_reaclib)*Y(Cr48)*Y(He4)*state.rho + screened_rates(k_Fe52_to_He4_Cr48_derived)*Y(Fe52)) + (-screened_rates(k_He4_Mn51_to_Co55_reaclib)*Y(He4)*Y(Mn51)*state.rho + screened_rates(k_Co55_to_He4_Mn51_derived)*Y(Co55)) + (-screened_rates(k_He4_Fe52_to_Ni56_reaclib)*Y(Fe52)*Y(He4)*state.rho + screened_rates(k_Ni56_to_He4_Fe52_derived)*Y(Ni56)) + + (-screened_rates(k_He4_Co55_to_Cu59_reaclib)*Y(Co55)*Y(He4)*state.rho + screened_rates(k_Cu59_to_He4_Co55_derived)*Y(Cu59)) + + (-screened_rates(k_He4_Ni56_to_Zn60_reaclib)*Y(He4)*Y(Ni56)*state.rho + screened_rates(k_Zn60_to_He4_Ni56_derived)*Y(Zn60)) + (0.5*screened_rates(k_C12_C12_to_He4_Ne20_reaclib)*amrex::Math::powi<2>(Y(C12))*state.rho + -screened_rates(k_He4_Ne20_to_C12_C12_derived)*Y(He4)*Y(Ne20)*state.rho) + (-screened_rates(k_He4_N13_to_p_O16_reaclib)*Y(He4)*Y(N13)*state.rho + screened_rates(k_p_O16_to_He4_N13_derived)*Y(O16)*Y(H1)*state.rho) + (screened_rates(k_C12_O16_to_He4_Mg24_reaclib)*Y(C12)*Y(O16)*state.rho + -screened_rates(k_He4_Mg24_to_C12_O16_derived)*Y(He4)*Y(Mg24)*state.rho) + @@ -1103,11 +781,13 @@ void rhs_nuc(const burn_t& state, (screened_rates(k_p_P31_to_He4_Si28_reaclib)*Y(P31)*Y(H1)*state.rho + -screened_rates(k_He4_Si28_to_p_P31_derived)*Y(He4)*Y(Si28)*state.rho) + (-screened_rates(k_He4_Cr48_to_p_Mn51_reaclib)*Y(Cr48)*Y(He4)*state.rho + screened_rates(k_p_Mn51_to_He4_Cr48_derived)*Y(Mn51)*Y(H1)*state.rho) + (-screened_rates(k_He4_Fe52_to_p_Co55_reaclib)*Y(Fe52)*Y(He4)*state.rho + screened_rates(k_p_Co55_to_He4_Fe52_derived)*Y(Co55)*Y(H1)*state.rho) + + (screened_rates(k_p_Cu59_to_He4_Ni56_reaclib)*Y(Cu59)*Y(H1)*state.rho + -screened_rates(k_He4_Ni56_to_p_Cu59_derived)*Y(He4)*Y(Ni56)*state.rho) + (-0.5*screened_rates(k_He4_He4_He4_to_C12_reaclib)*amrex::Math::powi<3>(Y(He4))*amrex::Math::powi<2>(state.rho) + 3.0*screened_rates(k_C12_to_He4_He4_He4_derived)*Y(C12)) + (-screened_rates(k_He4_Fe54_to_Ni58_reaclib)*Y(Fe54)*Y(He4)*state.rho + screened_rates(k_Ni58_to_He4_Fe54_derived)*Y(Ni58)) + (-screened_rates(k_He4_Mn51_to_p_Fe54_reaclib)*Y(He4)*Y(Mn51)*state.rho + screened_rates(k_p_Fe54_to_He4_Mn51_derived)*Y(Fe54)*Y(H1)*state.rho) + (-screened_rates(k_He4_Co55_to_p_Ni58_reaclib)*Y(Co55)*Y(He4)*state.rho + screened_rates(k_p_Ni58_to_He4_Co55_derived)*Y(Ni58)*Y(H1)*state.rho) + (screened_rates(k_p_Co57_to_He4_Fe54_reaclib)*Y(Co57)*Y(H1)*state.rho + -screened_rates(k_He4_Fe54_to_p_Co57_derived)*Y(Fe54)*Y(He4)*state.rho) + + (screened_rates(k_n_Cu59_to_He4_Co56_reaclib)*Y(Cu59)*Y(N)*state.rho + -screened_rates(k_He4_Co56_to_n_Cu59_derived)*Y(Co56)*Y(He4)*state.rho) + (-screened_rates(k_S32_He4_to_Ar36_approx)*Y(He4)*Y(S32)*state.rho + screened_rates(k_Ar36_to_S32_He4_approx)*Y(Ar36)) + (-screened_rates(k_Ar36_He4_to_Ca40_approx)*Y(Ar36)*Y(He4)*state.rho + screened_rates(k_Ca40_to_Ar36_He4_approx)*Y(Ca40)) + (-screened_rates(k_Ca40_He4_to_Ti44_approx)*Y(Ca40)*Y(He4)*state.rho + screened_rates(k_Ti44_to_Ca40_He4_approx)*Y(Ti44)) + @@ -1229,6 +909,7 @@ void rhs_nuc(const burn_t& state, ydot_nuc(Co55) = (screened_rates(k_He4_Mn51_to_Co55_reaclib)*Y(He4)*Y(Mn51)*state.rho + -screened_rates(k_Co55_to_He4_Mn51_derived)*Y(Co55)) + (-screened_rates(k_p_Co55_to_Ni56_reaclib)*Y(Co55)*Y(H1)*state.rho + screened_rates(k_Ni56_to_p_Co55_derived)*Y(Ni56)) + + (-screened_rates(k_He4_Co55_to_Cu59_reaclib)*Y(Co55)*Y(He4)*state.rho + screened_rates(k_Cu59_to_He4_Co55_derived)*Y(Cu59)) + (screened_rates(k_He4_Fe52_to_p_Co55_reaclib)*Y(Fe52)*Y(He4)*state.rho + -screened_rates(k_p_Co55_to_He4_Fe52_derived)*Y(Co55)*Y(H1)*state.rho) + (screened_rates(k_p_Fe54_to_Co55_reaclib)*Y(Fe54)*Y(H1)*state.rho + -screened_rates(k_Co55_to_p_Fe54_derived)*Y(Co55)) + (-screened_rates(k_n_Co55_to_Co56_reaclib)*Y(Co55)*Y(N)*state.rho + screened_rates(k_Co56_to_n_Co55_derived)*Y(Co56)) + @@ -1239,6 +920,7 @@ void rhs_nuc(const burn_t& state, (-screened_rates(k_n_Co56_to_Co57_reaclib)*Y(Co56)*Y(N)*state.rho + screened_rates(k_Co57_to_n_Co56_derived)*Y(Co57)) + (-screened_rates(k_n_Co56_to_p_Fe56_reaclib)*Y(Co56)*Y(N)*state.rho + screened_rates(k_p_Fe56_to_n_Co56_derived)*Y(Fe56)*Y(H1)*state.rho) + (screened_rates(k_n_Ni56_to_p_Co56_reaclib)*Y(Ni56)*Y(N)*state.rho + -screened_rates(k_p_Co56_to_n_Ni56_derived)*Y(Co56)*Y(H1)*state.rho) + + (screened_rates(k_n_Cu59_to_He4_Co56_reaclib)*Y(Cu59)*Y(N)*state.rho + -screened_rates(k_He4_Co56_to_n_Cu59_derived)*Y(Co56)*Y(He4)*state.rho) + (-screened_rates(k_Co56_to_Fe56_weaktab)*Y(Co56) + screened_rates(k_Fe56_to_Co56_weaktab)*Y(Fe56)) + (screened_rates(k_Ni56_to_Co56_weaktab)*Y(Ni56) + -screened_rates(k_Co56_to_Ni56_weaktab)*Y(Co56)); @@ -1251,6 +933,8 @@ void rhs_nuc(const burn_t& state, ydot_nuc(Ni56) = (screened_rates(k_He4_Fe52_to_Ni56_reaclib)*Y(Fe52)*Y(He4)*state.rho + -screened_rates(k_Ni56_to_He4_Fe52_derived)*Y(Ni56)) + (screened_rates(k_p_Co55_to_Ni56_reaclib)*Y(Co55)*Y(H1)*state.rho + -screened_rates(k_Ni56_to_p_Co55_derived)*Y(Ni56)) + + (-screened_rates(k_He4_Ni56_to_Zn60_reaclib)*Y(He4)*Y(Ni56)*state.rho + screened_rates(k_Zn60_to_He4_Ni56_derived)*Y(Zn60)) + + (screened_rates(k_p_Cu59_to_He4_Ni56_reaclib)*Y(Cu59)*Y(H1)*state.rho + -screened_rates(k_He4_Ni56_to_p_Cu59_derived)*Y(He4)*Y(Ni56)*state.rho) + (-screened_rates(k_n_Ni56_to_p_Co56_reaclib)*Y(Ni56)*Y(N)*state.rho + screened_rates(k_p_Co56_to_n_Ni56_derived)*Y(Co56)*Y(H1)*state.rho) + (-screened_rates(k_Ni56_n_n_to_Ni58_approx)*Y(Ni56)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + screened_rates(k_Ni58_to_Ni56_n_n_approx)*Y(Ni58)) + (-screened_rates(k_Ni56_to_Co56_weaktab)*Y(Ni56) + screened_rates(k_Co56_to_Ni56_weaktab)*Y(Co56)); @@ -1258,9 +942,21 @@ void rhs_nuc(const burn_t& state, ydot_nuc(Ni58) = (screened_rates(k_He4_Fe54_to_Ni58_reaclib)*Y(Fe54)*Y(He4)*state.rho + -screened_rates(k_Ni58_to_He4_Fe54_derived)*Y(Ni58)) + (screened_rates(k_p_Co57_to_Ni58_reaclib)*Y(Co57)*Y(H1)*state.rho + -screened_rates(k_Ni58_to_p_Co57_derived)*Y(Ni58)) + + (-screened_rates(k_p_Ni58_to_Cu59_reaclib)*Y(Ni58)*Y(H1)*state.rho + screened_rates(k_Cu59_to_p_Ni58_derived)*Y(Cu59)) + (screened_rates(k_He4_Co55_to_p_Ni58_reaclib)*Y(Co55)*Y(He4)*state.rho + -screened_rates(k_p_Ni58_to_He4_Co55_derived)*Y(Ni58)*Y(H1)*state.rho) + (screened_rates(k_Ni56_n_n_to_Ni58_approx)*Y(Ni56)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + -screened_rates(k_Ni58_to_Ni56_n_n_approx)*Y(Ni58)); + ydot_nuc(Cu59) = + (screened_rates(k_He4_Co55_to_Cu59_reaclib)*Y(Co55)*Y(He4)*state.rho + -screened_rates(k_Cu59_to_He4_Co55_derived)*Y(Cu59)) + + (-screened_rates(k_p_Cu59_to_Zn60_reaclib)*Y(Cu59)*Y(H1)*state.rho + screened_rates(k_Zn60_to_p_Cu59_derived)*Y(Zn60)) + + (-screened_rates(k_p_Cu59_to_He4_Ni56_reaclib)*Y(Cu59)*Y(H1)*state.rho + screened_rates(k_He4_Ni56_to_p_Cu59_derived)*Y(He4)*Y(Ni56)*state.rho) + + (screened_rates(k_p_Ni58_to_Cu59_reaclib)*Y(Ni58)*Y(H1)*state.rho + -screened_rates(k_Cu59_to_p_Ni58_derived)*Y(Cu59)) + + (-screened_rates(k_n_Cu59_to_He4_Co56_reaclib)*Y(Cu59)*Y(N)*state.rho + screened_rates(k_He4_Co56_to_n_Cu59_derived)*Y(Co56)*Y(He4)*state.rho); + + ydot_nuc(Zn60) = + (screened_rates(k_He4_Ni56_to_Zn60_reaclib)*Y(He4)*Y(Ni56)*state.rho + -screened_rates(k_Zn60_to_He4_Ni56_derived)*Y(Zn60)) + + (screened_rates(k_p_Cu59_to_Zn60_reaclib)*Y(Cu59)*Y(H1)*state.rho + -screened_rates(k_Zn60_to_p_Cu59_derived)*Y(Zn60)); + } @@ -1320,13 +1016,14 @@ void jac_nuc(const burn_t& state, amrex::Real scratch; - scratch = -4.0*screened_rates(k_Fe52_n_n_to_Fe54_approx)*Y(Fe52)*Y(N)*amrex::Math::powi<2>(state.rho) - 4.0*screened_rates(k_Fe54_n_n_to_Fe56_approx)*Y(Fe54)*Y(N)*amrex::Math::powi<2>(state.rho) - 4.0*screened_rates(k_Ni56_n_n_to_Ni58_approx)*Y(Ni56)*Y(N)*amrex::Math::powi<2>(state.rho) - screened_rates(k_n_Co55_to_Co56_reaclib)*Y(Co55)*state.rho - screened_rates(k_n_Co56_to_Co57_reaclib)*Y(Co56)*state.rho - screened_rates(k_n_Co56_to_p_Fe56_reaclib)*Y(Co56)*state.rho - screened_rates(k_n_Ni56_to_p_Co56_reaclib)*Y(Ni56)*state.rho - screened_rates(k_n_to_p_weaktab); + scratch = -4.0*screened_rates(k_Fe52_n_n_to_Fe54_approx)*Y(Fe52)*Y(N)*amrex::Math::powi<2>(state.rho) - 4.0*screened_rates(k_Fe54_n_n_to_Fe56_approx)*Y(Fe54)*Y(N)*amrex::Math::powi<2>(state.rho) - 4.0*screened_rates(k_Ni56_n_n_to_Ni58_approx)*Y(Ni56)*Y(N)*amrex::Math::powi<2>(state.rho) - screened_rates(k_n_Co55_to_Co56_reaclib)*Y(Co55)*state.rho - screened_rates(k_n_Co56_to_Co57_reaclib)*Y(Co56)*state.rho - screened_rates(k_n_Co56_to_p_Fe56_reaclib)*Y(Co56)*state.rho - screened_rates(k_n_Cu59_to_He4_Co56_reaclib)*Y(Cu59)*state.rho - screened_rates(k_n_Ni56_to_p_Co56_reaclib)*Y(Ni56)*state.rho - screened_rates(k_n_to_p_weaktab); jac.set(N, N, scratch); scratch = screened_rates(k_p_Co56_to_n_Ni56_derived)*Y(Co56)*state.rho + screened_rates(k_p_Fe56_to_n_Co56_derived)*Y(Fe56)*state.rho + screened_rates(k_p_to_n_weaktab); jac.set(N, H1, scratch); - jac.set(N, He4, 0.0); + scratch = screened_rates(k_He4_Co56_to_n_Cu59_derived)*Y(Co56)*state.rho; + jac.set(N, He4, scratch); jac.set(N, C12, 0.0); @@ -1370,7 +1067,7 @@ void jac_nuc(const burn_t& state, scratch = -screened_rates(k_n_Co55_to_Co56_reaclib)*Y(N)*state.rho; jac.set(N, Co55, scratch); - scratch = screened_rates(k_Co56_to_n_Co55_derived) - screened_rates(k_n_Co56_to_Co57_reaclib)*Y(N)*state.rho - screened_rates(k_n_Co56_to_p_Fe56_reaclib)*Y(N)*state.rho + screened_rates(k_p_Co56_to_n_Ni56_derived)*Y(H1)*state.rho; + scratch = screened_rates(k_Co56_to_n_Co55_derived) + screened_rates(k_He4_Co56_to_n_Cu59_derived)*Y(He4)*state.rho - screened_rates(k_n_Co56_to_Co57_reaclib)*Y(N)*state.rho - screened_rates(k_n_Co56_to_p_Fe56_reaclib)*Y(N)*state.rho + screened_rates(k_p_Co56_to_n_Ni56_derived)*Y(H1)*state.rho; jac.set(N, Co56, scratch); scratch = screened_rates(k_Co57_to_n_Co56_derived); @@ -1382,13 +1079,18 @@ void jac_nuc(const burn_t& state, scratch = 2.0*screened_rates(k_Ni58_to_Ni56_n_n_approx); jac.set(N, Ni58, scratch); + scratch = -screened_rates(k_n_Cu59_to_He4_Co56_reaclib)*Y(N)*state.rho; + jac.set(N, Cu59, scratch); + + jac.set(N, Zn60, 0.0); + scratch = screened_rates(k_n_Co56_to_p_Fe56_reaclib)*Y(Co56)*state.rho + screened_rates(k_n_Ni56_to_p_Co56_reaclib)*Y(Ni56)*state.rho + screened_rates(k_n_to_p_weaktab); jac.set(H1, N, scratch); - scratch = -screened_rates(k_p_Al27_to_C12_O16_derived)*Y(Al27)*state.rho - screened_rates(k_p_Al27_to_He4_Mg24_reaclib)*Y(Al27)*state.rho - screened_rates(k_p_Al27_to_Si28_reaclib)*Y(Al27)*state.rho - screened_rates(k_p_C12_to_N13_reaclib)*Y(C12)*state.rho - screened_rates(k_p_Co55_to_He4_Fe52_derived)*Y(Co55)*state.rho - screened_rates(k_p_Co55_to_Ni56_reaclib)*Y(Co55)*state.rho - screened_rates(k_p_Co56_to_n_Ni56_derived)*Y(Co56)*state.rho - screened_rates(k_p_Co57_to_He4_Fe54_reaclib)*Y(Co57)*state.rho - screened_rates(k_p_Co57_to_Ni58_reaclib)*Y(Co57)*state.rho - screened_rates(k_p_Fe54_to_Co55_reaclib)*Y(Fe54)*state.rho - screened_rates(k_p_Fe54_to_He4_Mn51_derived)*Y(Fe54)*state.rho - screened_rates(k_p_Fe56_to_Co57_reaclib)*Y(Fe56)*state.rho - screened_rates(k_p_Fe56_to_n_Co56_derived)*Y(Fe56)*state.rho - screened_rates(k_p_Mn51_to_Fe52_reaclib)*Y(Mn51)*state.rho - screened_rates(k_p_Mn51_to_He4_Cr48_derived)*Y(Mn51)*state.rho - screened_rates(k_p_Na23_to_C12_C12_derived)*Y(Na23)*state.rho - screened_rates(k_p_Na23_to_He4_Ne20_reaclib)*Y(Na23)*state.rho - screened_rates(k_p_Na23_to_Mg24_reaclib)*Y(Na23)*state.rho - screened_rates(k_p_Ni58_to_He4_Co55_derived)*Y(Ni58)*state.rho - screened_rates(k_p_O16_to_He4_N13_derived)*Y(O16)*state.rho - screened_rates(k_p_P31_to_He4_Si28_reaclib)*Y(P31)*state.rho - screened_rates(k_p_P31_to_O16_O16_derived)*Y(P31)*state.rho - screened_rates(k_p_P31_to_S32_reaclib)*Y(P31)*state.rho - screened_rates(k_p_to_n_weaktab); + scratch = -screened_rates(k_p_Al27_to_C12_O16_derived)*Y(Al27)*state.rho - screened_rates(k_p_Al27_to_He4_Mg24_reaclib)*Y(Al27)*state.rho - screened_rates(k_p_Al27_to_Si28_reaclib)*Y(Al27)*state.rho - screened_rates(k_p_C12_to_N13_reaclib)*Y(C12)*state.rho - screened_rates(k_p_Co55_to_He4_Fe52_derived)*Y(Co55)*state.rho - screened_rates(k_p_Co55_to_Ni56_reaclib)*Y(Co55)*state.rho - screened_rates(k_p_Co56_to_n_Ni56_derived)*Y(Co56)*state.rho - screened_rates(k_p_Co57_to_He4_Fe54_reaclib)*Y(Co57)*state.rho - screened_rates(k_p_Co57_to_Ni58_reaclib)*Y(Co57)*state.rho - screened_rates(k_p_Cu59_to_He4_Ni56_reaclib)*Y(Cu59)*state.rho - screened_rates(k_p_Cu59_to_Zn60_reaclib)*Y(Cu59)*state.rho - screened_rates(k_p_Fe54_to_Co55_reaclib)*Y(Fe54)*state.rho - screened_rates(k_p_Fe54_to_He4_Mn51_derived)*Y(Fe54)*state.rho - screened_rates(k_p_Fe56_to_Co57_reaclib)*Y(Fe56)*state.rho - screened_rates(k_p_Fe56_to_n_Co56_derived)*Y(Fe56)*state.rho - screened_rates(k_p_Mn51_to_Fe52_reaclib)*Y(Mn51)*state.rho - screened_rates(k_p_Mn51_to_He4_Cr48_derived)*Y(Mn51)*state.rho - screened_rates(k_p_Na23_to_C12_C12_derived)*Y(Na23)*state.rho - screened_rates(k_p_Na23_to_He4_Ne20_reaclib)*Y(Na23)*state.rho - screened_rates(k_p_Na23_to_Mg24_reaclib)*Y(Na23)*state.rho - screened_rates(k_p_Ni58_to_Cu59_reaclib)*Y(Ni58)*state.rho - screened_rates(k_p_Ni58_to_He4_Co55_derived)*Y(Ni58)*state.rho - screened_rates(k_p_O16_to_He4_N13_derived)*Y(O16)*state.rho - screened_rates(k_p_P31_to_He4_Si28_reaclib)*Y(P31)*state.rho - screened_rates(k_p_P31_to_O16_O16_derived)*Y(P31)*state.rho - screened_rates(k_p_P31_to_S32_reaclib)*Y(P31)*state.rho - screened_rates(k_p_to_n_weaktab); jac.set(H1, H1, scratch); - scratch = screened_rates(k_He4_Co55_to_p_Ni58_reaclib)*Y(Co55)*state.rho + screened_rates(k_He4_Cr48_to_p_Mn51_reaclib)*Y(Cr48)*state.rho + screened_rates(k_He4_Fe52_to_p_Co55_reaclib)*Y(Fe52)*state.rho + screened_rates(k_He4_Fe54_to_p_Co57_derived)*Y(Fe54)*state.rho + screened_rates(k_He4_Mg24_to_p_Al27_derived)*Y(Mg24)*state.rho + screened_rates(k_He4_Mn51_to_p_Fe54_reaclib)*Y(Mn51)*state.rho + screened_rates(k_He4_N13_to_p_O16_reaclib)*Y(N13)*state.rho + screened_rates(k_He4_Ne20_to_p_Na23_derived)*Y(Ne20)*state.rho + screened_rates(k_He4_Si28_to_p_P31_derived)*Y(Si28)*state.rho; + scratch = screened_rates(k_He4_Co55_to_p_Ni58_reaclib)*Y(Co55)*state.rho + screened_rates(k_He4_Cr48_to_p_Mn51_reaclib)*Y(Cr48)*state.rho + screened_rates(k_He4_Fe52_to_p_Co55_reaclib)*Y(Fe52)*state.rho + screened_rates(k_He4_Fe54_to_p_Co57_derived)*Y(Fe54)*state.rho + screened_rates(k_He4_Mg24_to_p_Al27_derived)*Y(Mg24)*state.rho + screened_rates(k_He4_Mn51_to_p_Fe54_reaclib)*Y(Mn51)*state.rho + screened_rates(k_He4_N13_to_p_O16_reaclib)*Y(N13)*state.rho + screened_rates(k_He4_Ne20_to_p_Na23_derived)*Y(Ne20)*state.rho + screened_rates(k_He4_Ni56_to_p_Cu59_derived)*Y(Ni56)*state.rho + screened_rates(k_He4_Si28_to_p_P31_derived)*Y(Si28)*state.rho; jac.set(H1, He4, scratch); scratch = 1.0*screened_rates(k_C12_C12_to_p_Na23_reaclib)*Y(C12)*state.rho + screened_rates(k_C12_O16_to_p_Al27_reaclib)*Y(O16)*state.rho - screened_rates(k_p_C12_to_N13_reaclib)*Y(H1)*state.rho; @@ -1451,18 +1153,25 @@ void jac_nuc(const burn_t& state, scratch = screened_rates(k_Co57_to_p_Fe56_derived) - screened_rates(k_p_Co57_to_He4_Fe54_reaclib)*Y(H1)*state.rho - screened_rates(k_p_Co57_to_Ni58_reaclib)*Y(H1)*state.rho; jac.set(H1, Co57, scratch); - scratch = screened_rates(k_Ni56_to_p_Co55_derived) + screened_rates(k_n_Ni56_to_p_Co56_reaclib)*Y(N)*state.rho; + scratch = screened_rates(k_He4_Ni56_to_p_Cu59_derived)*Y(He4)*state.rho + screened_rates(k_Ni56_to_p_Co55_derived) + screened_rates(k_n_Ni56_to_p_Co56_reaclib)*Y(N)*state.rho; jac.set(H1, Ni56, scratch); - scratch = screened_rates(k_Ni58_to_p_Co57_derived) - screened_rates(k_p_Ni58_to_He4_Co55_derived)*Y(H1)*state.rho; + scratch = screened_rates(k_Ni58_to_p_Co57_derived) - screened_rates(k_p_Ni58_to_Cu59_reaclib)*Y(H1)*state.rho - screened_rates(k_p_Ni58_to_He4_Co55_derived)*Y(H1)*state.rho; jac.set(H1, Ni58, scratch); - jac.set(He4, N, 0.0); + scratch = screened_rates(k_Cu59_to_p_Ni58_derived) - screened_rates(k_p_Cu59_to_He4_Ni56_reaclib)*Y(H1)*state.rho - screened_rates(k_p_Cu59_to_Zn60_reaclib)*Y(H1)*state.rho; + jac.set(H1, Cu59, scratch); - scratch = screened_rates(k_p_Al27_to_He4_Mg24_reaclib)*Y(Al27)*state.rho + screened_rates(k_p_Co55_to_He4_Fe52_derived)*Y(Co55)*state.rho + screened_rates(k_p_Co57_to_He4_Fe54_reaclib)*Y(Co57)*state.rho + screened_rates(k_p_Fe54_to_He4_Mn51_derived)*Y(Fe54)*state.rho + screened_rates(k_p_Mn51_to_He4_Cr48_derived)*Y(Mn51)*state.rho + screened_rates(k_p_Na23_to_He4_Ne20_reaclib)*Y(Na23)*state.rho + screened_rates(k_p_Ni58_to_He4_Co55_derived)*Y(Ni58)*state.rho + screened_rates(k_p_O16_to_He4_N13_derived)*Y(O16)*state.rho + screened_rates(k_p_P31_to_He4_Si28_reaclib)*Y(P31)*state.rho; + scratch = screened_rates(k_Zn60_to_p_Cu59_derived); + jac.set(H1, Zn60, scratch); + + scratch = screened_rates(k_n_Cu59_to_He4_Co56_reaclib)*Y(Cu59)*state.rho; + jac.set(He4, N, scratch); + + scratch = screened_rates(k_p_Al27_to_He4_Mg24_reaclib)*Y(Al27)*state.rho + screened_rates(k_p_Co55_to_He4_Fe52_derived)*Y(Co55)*state.rho + screened_rates(k_p_Co57_to_He4_Fe54_reaclib)*Y(Co57)*state.rho + screened_rates(k_p_Cu59_to_He4_Ni56_reaclib)*Y(Cu59)*state.rho + screened_rates(k_p_Fe54_to_He4_Mn51_derived)*Y(Fe54)*state.rho + screened_rates(k_p_Mn51_to_He4_Cr48_derived)*Y(Mn51)*state.rho + screened_rates(k_p_Na23_to_He4_Ne20_reaclib)*Y(Na23)*state.rho + screened_rates(k_p_Ni58_to_He4_Co55_derived)*Y(Ni58)*state.rho + screened_rates(k_p_O16_to_He4_N13_derived)*Y(O16)*state.rho + screened_rates(k_p_P31_to_He4_Si28_reaclib)*Y(P31)*state.rho; jac.set(He4, H1, scratch); - scratch = -screened_rates(k_Ar36_He4_to_Ca40_approx)*Y(Ar36)*state.rho - screened_rates(k_Ca40_He4_to_Ti44_approx)*Y(Ca40)*state.rho - screened_rates(k_He4_C12_to_O16_reaclib)*Y(C12)*state.rho - screened_rates(k_He4_Co55_to_p_Ni58_reaclib)*Y(Co55)*state.rho - screened_rates(k_He4_Cr48_to_Fe52_reaclib)*Y(Cr48)*state.rho - screened_rates(k_He4_Cr48_to_p_Mn51_reaclib)*Y(Cr48)*state.rho - screened_rates(k_He4_Fe52_to_Ni56_reaclib)*Y(Fe52)*state.rho - screened_rates(k_He4_Fe52_to_p_Co55_reaclib)*Y(Fe52)*state.rho - screened_rates(k_He4_Fe54_to_Ni58_reaclib)*Y(Fe54)*state.rho - screened_rates(k_He4_Fe54_to_p_Co57_derived)*Y(Fe54)*state.rho - 1.5*screened_rates(k_He4_He4_He4_to_C12_reaclib)*amrex::Math::powi<2>(Y(He4))*amrex::Math::powi<2>(state.rho) - screened_rates(k_He4_Mg24_to_C12_O16_derived)*Y(Mg24)*state.rho - screened_rates(k_He4_Mg24_to_Si28_reaclib)*Y(Mg24)*state.rho - screened_rates(k_He4_Mg24_to_p_Al27_derived)*Y(Mg24)*state.rho - screened_rates(k_He4_Mn51_to_Co55_reaclib)*Y(Mn51)*state.rho - screened_rates(k_He4_Mn51_to_p_Fe54_reaclib)*Y(Mn51)*state.rho - screened_rates(k_He4_N13_to_p_O16_reaclib)*Y(N13)*state.rho - screened_rates(k_He4_Ne20_to_C12_C12_derived)*Y(Ne20)*state.rho - screened_rates(k_He4_Ne20_to_Mg24_reaclib)*Y(Ne20)*state.rho - screened_rates(k_He4_Ne20_to_p_Na23_derived)*Y(Ne20)*state.rho - screened_rates(k_He4_O16_to_Ne20_reaclib)*Y(O16)*state.rho - screened_rates(k_He4_Si28_to_O16_O16_derived)*Y(Si28)*state.rho - screened_rates(k_He4_Si28_to_S32_reaclib)*Y(Si28)*state.rho - screened_rates(k_He4_Si28_to_p_P31_derived)*Y(Si28)*state.rho - screened_rates(k_S32_He4_to_Ar36_approx)*Y(S32)*state.rho - screened_rates(k_Ti44_He4_to_Cr48_approx)*Y(Ti44)*state.rho; + scratch = -screened_rates(k_Ar36_He4_to_Ca40_approx)*Y(Ar36)*state.rho - screened_rates(k_Ca40_He4_to_Ti44_approx)*Y(Ca40)*state.rho - screened_rates(k_He4_C12_to_O16_reaclib)*Y(C12)*state.rho - screened_rates(k_He4_Co55_to_Cu59_reaclib)*Y(Co55)*state.rho - screened_rates(k_He4_Co55_to_p_Ni58_reaclib)*Y(Co55)*state.rho - screened_rates(k_He4_Co56_to_n_Cu59_derived)*Y(Co56)*state.rho - screened_rates(k_He4_Cr48_to_Fe52_reaclib)*Y(Cr48)*state.rho - screened_rates(k_He4_Cr48_to_p_Mn51_reaclib)*Y(Cr48)*state.rho - screened_rates(k_He4_Fe52_to_Ni56_reaclib)*Y(Fe52)*state.rho - screened_rates(k_He4_Fe52_to_p_Co55_reaclib)*Y(Fe52)*state.rho - screened_rates(k_He4_Fe54_to_Ni58_reaclib)*Y(Fe54)*state.rho - screened_rates(k_He4_Fe54_to_p_Co57_derived)*Y(Fe54)*state.rho - 1.5*screened_rates(k_He4_He4_He4_to_C12_reaclib)*amrex::Math::powi<2>(Y(He4))*amrex::Math::powi<2>(state.rho) - screened_rates(k_He4_Mg24_to_C12_O16_derived)*Y(Mg24)*state.rho - screened_rates(k_He4_Mg24_to_Si28_reaclib)*Y(Mg24)*state.rho - screened_rates(k_He4_Mg24_to_p_Al27_derived)*Y(Mg24)*state.rho - screened_rates(k_He4_Mn51_to_Co55_reaclib)*Y(Mn51)*state.rho - screened_rates(k_He4_Mn51_to_p_Fe54_reaclib)*Y(Mn51)*state.rho - screened_rates(k_He4_N13_to_p_O16_reaclib)*Y(N13)*state.rho - screened_rates(k_He4_Ne20_to_C12_C12_derived)*Y(Ne20)*state.rho - screened_rates(k_He4_Ne20_to_Mg24_reaclib)*Y(Ne20)*state.rho - screened_rates(k_He4_Ne20_to_p_Na23_derived)*Y(Ne20)*state.rho - screened_rates(k_He4_Ni56_to_Zn60_reaclib)*Y(Ni56)*state.rho - screened_rates(k_He4_Ni56_to_p_Cu59_derived)*Y(Ni56)*state.rho - screened_rates(k_He4_O16_to_Ne20_reaclib)*Y(O16)*state.rho - screened_rates(k_He4_Si28_to_O16_O16_derived)*Y(Si28)*state.rho - screened_rates(k_He4_Si28_to_S32_reaclib)*Y(Si28)*state.rho - screened_rates(k_He4_Si28_to_p_P31_derived)*Y(Si28)*state.rho - screened_rates(k_S32_He4_to_Ar36_approx)*Y(S32)*state.rho - screened_rates(k_Ti44_He4_to_Cr48_approx)*Y(Ti44)*state.rho; jac.set(He4, He4, scratch); scratch = 1.0*screened_rates(k_C12_C12_to_He4_Ne20_reaclib)*Y(C12)*state.rho + screened_rates(k_C12_O16_to_He4_Mg24_reaclib)*Y(O16)*state.rho + 3.0*screened_rates(k_C12_to_He4_He4_He4_derived) - screened_rates(k_He4_C12_to_O16_reaclib)*Y(He4)*state.rho; @@ -1518,20 +1227,27 @@ void jac_nuc(const burn_t& state, jac.set(He4, Fe56, 0.0); - scratch = screened_rates(k_Co55_to_He4_Mn51_derived) - screened_rates(k_He4_Co55_to_p_Ni58_reaclib)*Y(He4)*state.rho + screened_rates(k_p_Co55_to_He4_Fe52_derived)*Y(H1)*state.rho; + scratch = screened_rates(k_Co55_to_He4_Mn51_derived) - screened_rates(k_He4_Co55_to_Cu59_reaclib)*Y(He4)*state.rho - screened_rates(k_He4_Co55_to_p_Ni58_reaclib)*Y(He4)*state.rho + screened_rates(k_p_Co55_to_He4_Fe52_derived)*Y(H1)*state.rho; jac.set(He4, Co55, scratch); - jac.set(He4, Co56, 0.0); + scratch = -screened_rates(k_He4_Co56_to_n_Cu59_derived)*Y(He4)*state.rho; + jac.set(He4, Co56, scratch); scratch = screened_rates(k_p_Co57_to_He4_Fe54_reaclib)*Y(H1)*state.rho; jac.set(He4, Co57, scratch); - scratch = screened_rates(k_Ni56_to_He4_Fe52_derived); + scratch = -screened_rates(k_He4_Ni56_to_Zn60_reaclib)*Y(He4)*state.rho - screened_rates(k_He4_Ni56_to_p_Cu59_derived)*Y(He4)*state.rho + screened_rates(k_Ni56_to_He4_Fe52_derived); jac.set(He4, Ni56, scratch); scratch = screened_rates(k_Ni58_to_He4_Fe54_derived) + screened_rates(k_p_Ni58_to_He4_Co55_derived)*Y(H1)*state.rho; jac.set(He4, Ni58, scratch); + scratch = screened_rates(k_Cu59_to_He4_Co55_derived) + screened_rates(k_n_Cu59_to_He4_Co56_reaclib)*Y(N)*state.rho + screened_rates(k_p_Cu59_to_He4_Ni56_reaclib)*Y(H1)*state.rho; + jac.set(He4, Cu59, scratch); + + scratch = screened_rates(k_Zn60_to_He4_Ni56_derived); + jac.set(He4, Zn60, scratch); + jac.set(C12, N, 0.0); scratch = screened_rates(k_p_Al27_to_C12_O16_derived)*Y(Al27)*state.rho - screened_rates(k_p_C12_to_N13_reaclib)*Y(C12)*state.rho + 2.0*screened_rates(k_p_Na23_to_C12_C12_derived)*Y(Na23)*state.rho; @@ -1594,6 +1310,10 @@ void jac_nuc(const burn_t& state, jac.set(C12, Ni58, 0.0); + jac.set(C12, Cu59, 0.0); + + jac.set(C12, Zn60, 0.0); + jac.set(N13, N, 0.0); scratch = screened_rates(k_p_C12_to_N13_reaclib)*Y(C12)*state.rho + screened_rates(k_p_O16_to_He4_N13_derived)*Y(O16)*state.rho; @@ -1651,6 +1371,10 @@ void jac_nuc(const burn_t& state, jac.set(N13, Ni58, 0.0); + jac.set(N13, Cu59, 0.0); + + jac.set(N13, Zn60, 0.0); + jac.set(O16, N, 0.0); scratch = screened_rates(k_p_Al27_to_C12_O16_derived)*Y(Al27)*state.rho - screened_rates(k_p_O16_to_He4_N13_derived)*Y(O16)*state.rho + 2.0*screened_rates(k_p_P31_to_O16_O16_derived)*Y(P31)*state.rho; @@ -1714,6 +1438,10 @@ void jac_nuc(const burn_t& state, jac.set(O16, Ni58, 0.0); + jac.set(O16, Cu59, 0.0); + + jac.set(O16, Zn60, 0.0); + jac.set(Ne20, N, 0.0); scratch = screened_rates(k_p_Na23_to_He4_Ne20_reaclib)*Y(Na23)*state.rho; @@ -1773,6 +1501,10 @@ void jac_nuc(const burn_t& state, jac.set(Ne20, Ni58, 0.0); + jac.set(Ne20, Cu59, 0.0); + + jac.set(Ne20, Zn60, 0.0); + jac.set(Na23, N, 0.0); scratch = -screened_rates(k_p_Na23_to_C12_C12_derived)*Y(Na23)*state.rho - screened_rates(k_p_Na23_to_He4_Ne20_reaclib)*Y(Na23)*state.rho - screened_rates(k_p_Na23_to_Mg24_reaclib)*Y(Na23)*state.rho; @@ -1831,6 +1563,10 @@ void jac_nuc(const burn_t& state, jac.set(Na23, Ni58, 0.0); + jac.set(Na23, Cu59, 0.0); + + jac.set(Na23, Zn60, 0.0); + jac.set(Mg24, N, 0.0); scratch = screened_rates(k_p_Al27_to_He4_Mg24_reaclib)*Y(Al27)*state.rho + screened_rates(k_p_Na23_to_Mg24_reaclib)*Y(Na23)*state.rho; @@ -1892,6 +1628,10 @@ void jac_nuc(const burn_t& state, jac.set(Mg24, Ni58, 0.0); + jac.set(Mg24, Cu59, 0.0); + + jac.set(Mg24, Zn60, 0.0); + jac.set(Al27, N, 0.0); scratch = -screened_rates(k_p_Al27_to_C12_O16_derived)*Y(Al27)*state.rho - screened_rates(k_p_Al27_to_He4_Mg24_reaclib)*Y(Al27)*state.rho - screened_rates(k_p_Al27_to_Si28_reaclib)*Y(Al27)*state.rho; @@ -1951,6 +1691,10 @@ void jac_nuc(const burn_t& state, jac.set(Al27, Ni58, 0.0); + jac.set(Al27, Cu59, 0.0); + + jac.set(Al27, Zn60, 0.0); + jac.set(Si28, N, 0.0); scratch = screened_rates(k_p_Al27_to_Si28_reaclib)*Y(Al27)*state.rho + screened_rates(k_p_P31_to_He4_Si28_reaclib)*Y(P31)*state.rho; @@ -2012,6 +1756,10 @@ void jac_nuc(const burn_t& state, jac.set(Si28, Ni58, 0.0); + jac.set(Si28, Cu59, 0.0); + + jac.set(Si28, Zn60, 0.0); + jac.set(P31, N, 0.0); scratch = -screened_rates(k_p_P31_to_He4_Si28_reaclib)*Y(P31)*state.rho - screened_rates(k_p_P31_to_O16_O16_derived)*Y(P31)*state.rho - screened_rates(k_p_P31_to_S32_reaclib)*Y(P31)*state.rho; @@ -2070,6 +1818,10 @@ void jac_nuc(const burn_t& state, jac.set(P31, Ni58, 0.0); + jac.set(P31, Cu59, 0.0); + + jac.set(P31, Zn60, 0.0); + jac.set(S32, N, 0.0); scratch = screened_rates(k_p_P31_to_S32_reaclib)*Y(P31)*state.rho; @@ -2129,6 +1881,10 @@ void jac_nuc(const burn_t& state, jac.set(S32, Ni58, 0.0); + jac.set(S32, Cu59, 0.0); + + jac.set(S32, Zn60, 0.0); + jac.set(Ar36, N, 0.0); jac.set(Ar36, H1, 0.0); @@ -2185,6 +1941,10 @@ void jac_nuc(const burn_t& state, jac.set(Ar36, Ni58, 0.0); + jac.set(Ar36, Cu59, 0.0); + + jac.set(Ar36, Zn60, 0.0); + jac.set(Ca40, N, 0.0); jac.set(Ca40, H1, 0.0); @@ -2241,6 +2001,10 @@ void jac_nuc(const burn_t& state, jac.set(Ca40, Ni58, 0.0); + jac.set(Ca40, Cu59, 0.0); + + jac.set(Ca40, Zn60, 0.0); + jac.set(Ti44, N, 0.0); jac.set(Ti44, H1, 0.0); @@ -2297,6 +2061,10 @@ void jac_nuc(const burn_t& state, jac.set(Ti44, Ni58, 0.0); + jac.set(Ti44, Cu59, 0.0); + + jac.set(Ti44, Zn60, 0.0); + jac.set(Cr48, N, 0.0); scratch = screened_rates(k_p_Mn51_to_He4_Cr48_derived)*Y(Mn51)*state.rho; @@ -2355,6 +2123,10 @@ void jac_nuc(const burn_t& state, jac.set(Cr48, Ni58, 0.0); + jac.set(Cr48, Cu59, 0.0); + + jac.set(Cr48, Zn60, 0.0); + jac.set(Mn51, N, 0.0); scratch = screened_rates(k_p_Fe54_to_He4_Mn51_derived)*Y(Fe54)*state.rho - screened_rates(k_p_Mn51_to_Fe52_reaclib)*Y(Mn51)*state.rho - screened_rates(k_p_Mn51_to_He4_Cr48_derived)*Y(Mn51)*state.rho; @@ -2414,6 +2186,10 @@ void jac_nuc(const burn_t& state, jac.set(Mn51, Ni58, 0.0); + jac.set(Mn51, Cu59, 0.0); + + jac.set(Mn51, Zn60, 0.0); + scratch = -2.0*screened_rates(k_Fe52_n_n_to_Fe54_approx)*Y(Fe52)*Y(N)*amrex::Math::powi<2>(state.rho); jac.set(Fe52, N, scratch); @@ -2475,6 +2251,10 @@ void jac_nuc(const burn_t& state, jac.set(Fe52, Ni58, 0.0); + jac.set(Fe52, Cu59, 0.0); + + jac.set(Fe52, Zn60, 0.0); + scratch = 2.0*screened_rates(k_Fe52_n_n_to_Fe54_approx)*Y(Fe52)*Y(N)*amrex::Math::powi<2>(state.rho) - 2.0*screened_rates(k_Fe54_n_n_to_Fe56_approx)*Y(Fe54)*Y(N)*amrex::Math::powi<2>(state.rho); jac.set(Fe54, N, scratch); @@ -2537,6 +2317,10 @@ void jac_nuc(const burn_t& state, scratch = screened_rates(k_Ni58_to_He4_Fe54_derived); jac.set(Fe54, Ni58, scratch); + jac.set(Fe54, Cu59, 0.0); + + jac.set(Fe54, Zn60, 0.0); + scratch = 2.0*screened_rates(k_Fe54_n_n_to_Fe56_approx)*Y(Fe54)*Y(N)*amrex::Math::powi<2>(state.rho) + screened_rates(k_n_Co56_to_p_Fe56_reaclib)*Y(Co56)*state.rho; jac.set(Fe56, N, scratch); @@ -2595,13 +2379,17 @@ void jac_nuc(const burn_t& state, jac.set(Fe56, Ni58, 0.0); + jac.set(Fe56, Cu59, 0.0); + + jac.set(Fe56, Zn60, 0.0); + scratch = -screened_rates(k_n_Co55_to_Co56_reaclib)*Y(Co55)*state.rho; jac.set(Co55, N, scratch); scratch = -screened_rates(k_p_Co55_to_He4_Fe52_derived)*Y(Co55)*state.rho - screened_rates(k_p_Co55_to_Ni56_reaclib)*Y(Co55)*state.rho + screened_rates(k_p_Fe54_to_Co55_reaclib)*Y(Fe54)*state.rho + screened_rates(k_p_Ni58_to_He4_Co55_derived)*Y(Ni58)*state.rho; jac.set(Co55, H1, scratch); - scratch = -screened_rates(k_He4_Co55_to_p_Ni58_reaclib)*Y(Co55)*state.rho + screened_rates(k_He4_Fe52_to_p_Co55_reaclib)*Y(Fe52)*state.rho + screened_rates(k_He4_Mn51_to_Co55_reaclib)*Y(Mn51)*state.rho; + scratch = -screened_rates(k_He4_Co55_to_Cu59_reaclib)*Y(Co55)*state.rho - screened_rates(k_He4_Co55_to_p_Ni58_reaclib)*Y(Co55)*state.rho + screened_rates(k_He4_Fe52_to_p_Co55_reaclib)*Y(Fe52)*state.rho + screened_rates(k_He4_Mn51_to_Co55_reaclib)*Y(Mn51)*state.rho; jac.set(Co55, He4, scratch); jac.set(Co55, C12, 0.0); @@ -2643,7 +2431,7 @@ void jac_nuc(const burn_t& state, jac.set(Co55, Fe56, 0.0); - scratch = -screened_rates(k_Co55_to_He4_Mn51_derived) - screened_rates(k_Co55_to_p_Fe54_derived) - screened_rates(k_He4_Co55_to_p_Ni58_reaclib)*Y(He4)*state.rho - screened_rates(k_n_Co55_to_Co56_reaclib)*Y(N)*state.rho - screened_rates(k_p_Co55_to_He4_Fe52_derived)*Y(H1)*state.rho - screened_rates(k_p_Co55_to_Ni56_reaclib)*Y(H1)*state.rho; + scratch = -screened_rates(k_Co55_to_He4_Mn51_derived) - screened_rates(k_Co55_to_p_Fe54_derived) - screened_rates(k_He4_Co55_to_Cu59_reaclib)*Y(He4)*state.rho - screened_rates(k_He4_Co55_to_p_Ni58_reaclib)*Y(He4)*state.rho - screened_rates(k_n_Co55_to_Co56_reaclib)*Y(N)*state.rho - screened_rates(k_p_Co55_to_He4_Fe52_derived)*Y(H1)*state.rho - screened_rates(k_p_Co55_to_Ni56_reaclib)*Y(H1)*state.rho; jac.set(Co55, Co55, scratch); scratch = screened_rates(k_Co56_to_n_Co55_derived); @@ -2657,13 +2445,19 @@ void jac_nuc(const burn_t& state, scratch = screened_rates(k_p_Ni58_to_He4_Co55_derived)*Y(H1)*state.rho; jac.set(Co55, Ni58, scratch); - scratch = screened_rates(k_n_Co55_to_Co56_reaclib)*Y(Co55)*state.rho - screened_rates(k_n_Co56_to_Co57_reaclib)*Y(Co56)*state.rho - screened_rates(k_n_Co56_to_p_Fe56_reaclib)*Y(Co56)*state.rho + screened_rates(k_n_Ni56_to_p_Co56_reaclib)*Y(Ni56)*state.rho; + scratch = screened_rates(k_Cu59_to_He4_Co55_derived); + jac.set(Co55, Cu59, scratch); + + jac.set(Co55, Zn60, 0.0); + + scratch = screened_rates(k_n_Co55_to_Co56_reaclib)*Y(Co55)*state.rho - screened_rates(k_n_Co56_to_Co57_reaclib)*Y(Co56)*state.rho - screened_rates(k_n_Co56_to_p_Fe56_reaclib)*Y(Co56)*state.rho + screened_rates(k_n_Cu59_to_He4_Co56_reaclib)*Y(Cu59)*state.rho + screened_rates(k_n_Ni56_to_p_Co56_reaclib)*Y(Ni56)*state.rho; jac.set(Co56, N, scratch); scratch = -screened_rates(k_p_Co56_to_n_Ni56_derived)*Y(Co56)*state.rho + screened_rates(k_p_Fe56_to_n_Co56_derived)*Y(Fe56)*state.rho; jac.set(Co56, H1, scratch); - jac.set(Co56, He4, 0.0); + scratch = -screened_rates(k_He4_Co56_to_n_Cu59_derived)*Y(Co56)*state.rho; + jac.set(Co56, He4, scratch); jac.set(Co56, C12, 0.0); @@ -2705,7 +2499,7 @@ void jac_nuc(const burn_t& state, scratch = screened_rates(k_n_Co55_to_Co56_reaclib)*Y(N)*state.rho; jac.set(Co56, Co55, scratch); - scratch = -screened_rates(k_Co56_to_Fe56_weaktab) - screened_rates(k_Co56_to_Ni56_weaktab) - screened_rates(k_Co56_to_n_Co55_derived) - screened_rates(k_n_Co56_to_Co57_reaclib)*Y(N)*state.rho - screened_rates(k_n_Co56_to_p_Fe56_reaclib)*Y(N)*state.rho - screened_rates(k_p_Co56_to_n_Ni56_derived)*Y(H1)*state.rho; + scratch = -screened_rates(k_Co56_to_Fe56_weaktab) - screened_rates(k_Co56_to_Ni56_weaktab) - screened_rates(k_Co56_to_n_Co55_derived) - screened_rates(k_He4_Co56_to_n_Cu59_derived)*Y(He4)*state.rho - screened_rates(k_n_Co56_to_Co57_reaclib)*Y(N)*state.rho - screened_rates(k_n_Co56_to_p_Fe56_reaclib)*Y(N)*state.rho - screened_rates(k_p_Co56_to_n_Ni56_derived)*Y(H1)*state.rho; jac.set(Co56, Co56, scratch); scratch = screened_rates(k_Co57_to_n_Co56_derived); @@ -2716,6 +2510,11 @@ void jac_nuc(const burn_t& state, jac.set(Co56, Ni58, 0.0); + scratch = screened_rates(k_n_Cu59_to_He4_Co56_reaclib)*Y(N)*state.rho; + jac.set(Co56, Cu59, scratch); + + jac.set(Co56, Zn60, 0.0); + scratch = screened_rates(k_n_Co56_to_Co57_reaclib)*Y(Co56)*state.rho; jac.set(Co57, N, scratch); @@ -2776,13 +2575,17 @@ void jac_nuc(const burn_t& state, scratch = screened_rates(k_Ni58_to_p_Co57_derived); jac.set(Co57, Ni58, scratch); + jac.set(Co57, Cu59, 0.0); + + jac.set(Co57, Zn60, 0.0); + scratch = -2.0*screened_rates(k_Ni56_n_n_to_Ni58_approx)*Y(Ni56)*Y(N)*amrex::Math::powi<2>(state.rho) - screened_rates(k_n_Ni56_to_p_Co56_reaclib)*Y(Ni56)*state.rho; jac.set(Ni56, N, scratch); - scratch = screened_rates(k_p_Co55_to_Ni56_reaclib)*Y(Co55)*state.rho + screened_rates(k_p_Co56_to_n_Ni56_derived)*Y(Co56)*state.rho; + scratch = screened_rates(k_p_Co55_to_Ni56_reaclib)*Y(Co55)*state.rho + screened_rates(k_p_Co56_to_n_Ni56_derived)*Y(Co56)*state.rho + screened_rates(k_p_Cu59_to_He4_Ni56_reaclib)*Y(Cu59)*state.rho; jac.set(Ni56, H1, scratch); - scratch = screened_rates(k_He4_Fe52_to_Ni56_reaclib)*Y(Fe52)*state.rho; + scratch = screened_rates(k_He4_Fe52_to_Ni56_reaclib)*Y(Fe52)*state.rho - screened_rates(k_He4_Ni56_to_Zn60_reaclib)*Y(Ni56)*state.rho - screened_rates(k_He4_Ni56_to_p_Cu59_derived)*Y(Ni56)*state.rho; jac.set(Ni56, He4, scratch); jac.set(Ni56, C12, 0.0); @@ -2830,16 +2633,22 @@ void jac_nuc(const burn_t& state, jac.set(Ni56, Co57, 0.0); - scratch = -screened_rates(k_Ni56_n_n_to_Ni58_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) - screened_rates(k_Ni56_to_Co56_weaktab) - screened_rates(k_Ni56_to_He4_Fe52_derived) - screened_rates(k_Ni56_to_p_Co55_derived) - screened_rates(k_n_Ni56_to_p_Co56_reaclib)*Y(N)*state.rho; + scratch = -screened_rates(k_He4_Ni56_to_Zn60_reaclib)*Y(He4)*state.rho - screened_rates(k_He4_Ni56_to_p_Cu59_derived)*Y(He4)*state.rho - screened_rates(k_Ni56_n_n_to_Ni58_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) - screened_rates(k_Ni56_to_Co56_weaktab) - screened_rates(k_Ni56_to_He4_Fe52_derived) - screened_rates(k_Ni56_to_p_Co55_derived) - screened_rates(k_n_Ni56_to_p_Co56_reaclib)*Y(N)*state.rho; jac.set(Ni56, Ni56, scratch); scratch = screened_rates(k_Ni58_to_Ni56_n_n_approx); jac.set(Ni56, Ni58, scratch); + scratch = screened_rates(k_p_Cu59_to_He4_Ni56_reaclib)*Y(H1)*state.rho; + jac.set(Ni56, Cu59, scratch); + + scratch = screened_rates(k_Zn60_to_He4_Ni56_derived); + jac.set(Ni56, Zn60, scratch); + scratch = 2.0*screened_rates(k_Ni56_n_n_to_Ni58_approx)*Y(Ni56)*Y(N)*amrex::Math::powi<2>(state.rho); jac.set(Ni58, N, scratch); - scratch = screened_rates(k_p_Co57_to_Ni58_reaclib)*Y(Co57)*state.rho - screened_rates(k_p_Ni58_to_He4_Co55_derived)*Y(Ni58)*state.rho; + scratch = screened_rates(k_p_Co57_to_Ni58_reaclib)*Y(Co57)*state.rho - screened_rates(k_p_Ni58_to_Cu59_reaclib)*Y(Ni58)*state.rho - screened_rates(k_p_Ni58_to_He4_Co55_derived)*Y(Ni58)*state.rho; jac.set(Ni58, H1, scratch); scratch = screened_rates(k_He4_Co55_to_p_Ni58_reaclib)*Y(Co55)*state.rho + screened_rates(k_He4_Fe54_to_Ni58_reaclib)*Y(Fe54)*state.rho; @@ -2893,9 +2702,140 @@ void jac_nuc(const burn_t& state, scratch = screened_rates(k_Ni56_n_n_to_Ni58_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); jac.set(Ni58, Ni56, scratch); - scratch = -screened_rates(k_Ni58_to_He4_Fe54_derived) - screened_rates(k_Ni58_to_Ni56_n_n_approx) - screened_rates(k_Ni58_to_p_Co57_derived) - screened_rates(k_p_Ni58_to_He4_Co55_derived)*Y(H1)*state.rho; + scratch = -screened_rates(k_Ni58_to_He4_Fe54_derived) - screened_rates(k_Ni58_to_Ni56_n_n_approx) - screened_rates(k_Ni58_to_p_Co57_derived) - screened_rates(k_p_Ni58_to_Cu59_reaclib)*Y(H1)*state.rho - screened_rates(k_p_Ni58_to_He4_Co55_derived)*Y(H1)*state.rho; jac.set(Ni58, Ni58, scratch); + scratch = screened_rates(k_Cu59_to_p_Ni58_derived); + jac.set(Ni58, Cu59, scratch); + + jac.set(Ni58, Zn60, 0.0); + + scratch = -screened_rates(k_n_Cu59_to_He4_Co56_reaclib)*Y(Cu59)*state.rho; + jac.set(Cu59, N, scratch); + + scratch = -screened_rates(k_p_Cu59_to_He4_Ni56_reaclib)*Y(Cu59)*state.rho - screened_rates(k_p_Cu59_to_Zn60_reaclib)*Y(Cu59)*state.rho + screened_rates(k_p_Ni58_to_Cu59_reaclib)*Y(Ni58)*state.rho; + jac.set(Cu59, H1, scratch); + + scratch = screened_rates(k_He4_Co55_to_Cu59_reaclib)*Y(Co55)*state.rho + screened_rates(k_He4_Co56_to_n_Cu59_derived)*Y(Co56)*state.rho + screened_rates(k_He4_Ni56_to_p_Cu59_derived)*Y(Ni56)*state.rho; + jac.set(Cu59, He4, scratch); + + jac.set(Cu59, C12, 0.0); + + jac.set(Cu59, N13, 0.0); + + jac.set(Cu59, O16, 0.0); + + jac.set(Cu59, Ne20, 0.0); + + jac.set(Cu59, Na23, 0.0); + + jac.set(Cu59, Mg24, 0.0); + + jac.set(Cu59, Al27, 0.0); + + jac.set(Cu59, Si28, 0.0); + + jac.set(Cu59, P31, 0.0); + + jac.set(Cu59, S32, 0.0); + + jac.set(Cu59, Ar36, 0.0); + + jac.set(Cu59, Ca40, 0.0); + + jac.set(Cu59, Ti44, 0.0); + + jac.set(Cu59, Cr48, 0.0); + + jac.set(Cu59, Mn51, 0.0); + + jac.set(Cu59, Fe52, 0.0); + + jac.set(Cu59, Fe54, 0.0); + + jac.set(Cu59, Fe56, 0.0); + + scratch = screened_rates(k_He4_Co55_to_Cu59_reaclib)*Y(He4)*state.rho; + jac.set(Cu59, Co55, scratch); + + scratch = screened_rates(k_He4_Co56_to_n_Cu59_derived)*Y(He4)*state.rho; + jac.set(Cu59, Co56, scratch); + + jac.set(Cu59, Co57, 0.0); + + scratch = screened_rates(k_He4_Ni56_to_p_Cu59_derived)*Y(He4)*state.rho; + jac.set(Cu59, Ni56, scratch); + + scratch = screened_rates(k_p_Ni58_to_Cu59_reaclib)*Y(H1)*state.rho; + jac.set(Cu59, Ni58, scratch); + + scratch = -screened_rates(k_Cu59_to_He4_Co55_derived) - screened_rates(k_Cu59_to_p_Ni58_derived) - screened_rates(k_n_Cu59_to_He4_Co56_reaclib)*Y(N)*state.rho - screened_rates(k_p_Cu59_to_He4_Ni56_reaclib)*Y(H1)*state.rho - screened_rates(k_p_Cu59_to_Zn60_reaclib)*Y(H1)*state.rho; + jac.set(Cu59, Cu59, scratch); + + scratch = screened_rates(k_Zn60_to_p_Cu59_derived); + jac.set(Cu59, Zn60, scratch); + + jac.set(Zn60, N, 0.0); + + scratch = screened_rates(k_p_Cu59_to_Zn60_reaclib)*Y(Cu59)*state.rho; + jac.set(Zn60, H1, scratch); + + scratch = screened_rates(k_He4_Ni56_to_Zn60_reaclib)*Y(Ni56)*state.rho; + jac.set(Zn60, He4, scratch); + + jac.set(Zn60, C12, 0.0); + + jac.set(Zn60, N13, 0.0); + + jac.set(Zn60, O16, 0.0); + + jac.set(Zn60, Ne20, 0.0); + + jac.set(Zn60, Na23, 0.0); + + jac.set(Zn60, Mg24, 0.0); + + jac.set(Zn60, Al27, 0.0); + + jac.set(Zn60, Si28, 0.0); + + jac.set(Zn60, P31, 0.0); + + jac.set(Zn60, S32, 0.0); + + jac.set(Zn60, Ar36, 0.0); + + jac.set(Zn60, Ca40, 0.0); + + jac.set(Zn60, Ti44, 0.0); + + jac.set(Zn60, Cr48, 0.0); + + jac.set(Zn60, Mn51, 0.0); + + jac.set(Zn60, Fe52, 0.0); + + jac.set(Zn60, Fe54, 0.0); + + jac.set(Zn60, Fe56, 0.0); + + jac.set(Zn60, Co55, 0.0); + + jac.set(Zn60, Co56, 0.0); + + jac.set(Zn60, Co57, 0.0); + + scratch = screened_rates(k_He4_Ni56_to_Zn60_reaclib)*Y(He4)*state.rho; + jac.set(Zn60, Ni56, scratch); + + jac.set(Zn60, Ni58, 0.0); + + scratch = screened_rates(k_p_Cu59_to_Zn60_reaclib)*Y(H1)*state.rho; + jac.set(Zn60, Cu59, scratch); + + scratch = -screened_rates(k_Zn60_to_He4_Ni56_derived) - screened_rates(k_Zn60_to_p_Cu59_derived); + jac.set(Zn60, Zn60, scratch); + } diff --git a/networks/he-burn/ase-iron/ase-iron.png b/networks/he-burn/ase-iron/ase-iron.png index d8a00636c..87a853fd6 100644 Binary files a/networks/he-burn/ase-iron/ase-iron.png and b/networks/he-burn/ase-iron/ase-iron.png differ diff --git a/networks/he-burn/ase-iron/ase_iron.py b/networks/he-burn/ase-iron/ase_iron.py index 2439cdbca..f8275c598 100644 --- a/networks/he-burn/ase-iron/ase_iron.py +++ b/networks/he-burn/ase-iron/ase_iron.py @@ -13,7 +13,7 @@ def get_library(): all_reactants = ["p", "he4", "c12", "o16", "ne20", "mg24", "si28", "s32", - "ar36", "ca40", "ti44", "cr48", "fe52", "ni56", + "ar36", "ca40", "ti44", "cr48", "fe52", "ni56", "cu59", "zn60", "al27", "p31", "cl35", "k39", "sc43", "v47", "mn51", "co55", "n13", "na23"] @@ -54,7 +54,7 @@ def get_library(): "mn51", "fe52", "fe53", "fe54", "fe55", "fe56", "co55", "co56", "co57", - "ni56", "ni57", "ni58"] + "ni56", "ni57", "ni58", "cu59", "zn60"] subch += reaclib_lib.linking_nuclei(iron_peak) weak_lib = pyna.TabularLibrary(ordering=["ffn", "langanke", "oda"]) iron_weak_lib = weak_lib.linking_nuclei(set(iron_peak + all_reactants)) @@ -110,7 +110,7 @@ def doit(): rotated=True, hide_xalpha=True, size=(1500, 450), node_size=600, node_font_size=9, - Z_range=(1, 29)) + Z_range=(1, 31)) net.write_network() diff --git a/networks/he-burn/ase-iron/derived_rates.H b/networks/he-burn/ase-iron/derived_rates.H index 36ccd5901..ac0e5a488 100644 --- a/networks/he-burn/ase-iron/derived_rates.H +++ b/networks/he-burn/ase-iron/derived_rates.H @@ -11,7 +11,7 @@ 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) { +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] @@ -91,7 +91,7 @@ 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) { +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] @@ -170,7 +170,7 @@ 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) { +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] @@ -267,7 +267,7 @@ 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) { +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] @@ -364,7 +364,7 @@ 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) { +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] @@ -480,7 +480,7 @@ 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) { +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] @@ -579,7 +579,7 @@ 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) { +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] @@ -655,7 +655,7 @@ 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) { +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] @@ -752,7 +752,7 @@ 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) { +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] @@ -809,7 +809,7 @@ void rate_S32_to_He4_Si28_derived(const tf_t& tfactors, amrex::Real& rate, amrex template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Fe52_to_p_Mn51_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) { +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 @@ -845,13 +845,13 @@ void rate_Fe52_to_p_Mn51_derived(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] @@ -866,7 +866,7 @@ void rate_Fe52_to_p_Mn51_derived(const tf_t& tfactors, amrex::Real& rate, amrex: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Fe52_to_He4_Cr48_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) { +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 @@ -902,13 +902,13 @@ void rate_Fe52_to_He4_Cr48_derived(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] @@ -923,7 +923,7 @@ void rate_Fe52_to_He4_Cr48_derived(const tf_t& tfactors, amrex::Real& rate, amre template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Co55_to_He4_Mn51_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) { +void rate_Co55_to_He4_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) { // Co55 --> He4 + Mn51 @@ -959,13 +959,13 @@ void rate_Co55_to_He4_Mn51_derived(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 90.61473213109255 + -95.29300562248025 * tfactors.T9i + -89.274 * tfactors.T913i + -10.4373 * tfactors.T913 + 1.00492 * tfactors.T9 + -0.125548 * 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 = 95.29300562248025 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -89.274 * tfactors.T943i + (1.0/3.0) * -10.4373 * tfactors.T923i + 1.00492 + (5.0/3.0) * -0.125548 * 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] @@ -980,7 +980,7 @@ void rate_Co55_to_He4_Mn51_derived(const tf_t& tfactors, amrex::Real& rate, amre template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ni56_to_p_Co55_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) { +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 @@ -1016,13 +1016,13 @@ void rate_Ni56_to_p_Co55_derived(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] @@ -1037,7 +1037,7 @@ void rate_Ni56_to_p_Co55_derived(const tf_t& tfactors, amrex::Real& rate, amrex: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ni56_to_He4_Fe52_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) { +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 @@ -1073,13 +1073,13 @@ void rate_Ni56_to_He4_Fe52_derived(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] @@ -1094,7 +1094,178 @@ void rate_Ni56_to_He4_Fe52_derived(const tf_t& tfactors, amrex::Real& rate, amre 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) { +void rate_Cu59_to_He4_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) { + + // Cu59 --> He4 + Co55 + + rate = 0.0; + drate_dT = 0.0; + + // Evaluate partition function terms + + amrex::Real Cu59_log_pf, dCu59_log_pf_dT9; + + // interpolating Cu59 partition function + get_partition_function_cached(Cu59, tfactors.T9, pf_cache, Cu59_log_pf, dCu59_log_pf_dT9); + + amrex::Real He4_log_pf, dHe4_log_pf_dT9; + + // setting He4 log(partition function) to 0.0 by default, independent of T + He4_log_pf = 0.0_rt; + dHe4_log_pf_dT9 = 0.0_rt; + + amrex::Real Co55_log_pf, dCo55_log_pf_dT9; + + // interpolating Co55 partition function + get_partition_function_cached(Co55, tfactors.T9, pf_cache, Co55_log_pf, dCo55_log_pf_dT9); + + amrex::Real net_log_pf = He4_log_pf + Co55_log_pf - Cu59_log_pf; + [[maybe_unused]] amrex::Real net_dlog_pf_dT9 = dHe4_log_pf_dT9 + dCo55_log_pf_dT9 - dCu59_log_pf_dT9; + + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ReacLib set derived from ths8r + ln_set_rate = 90.97354557942113 + -55.1611006026015 * tfactors.T9i + -94.1404 * tfactors.T913i + -2.62786 * tfactors.T913 + + -2.12066 * tfactors.T9 + 0.237999 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + ln_set_rate += net_log_pf + log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 55.1611006026015 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -94.1404 * tfactors.T943i + (1.0/3.0) * -2.62786 * tfactors.T923i + + -2.12066 + (5.0/3.0) * 0.237999 * tfactors.T923 + 0.833333 * tfactors.T9i; + + 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] + ln_set_rate = std::max(ln_set_rate, -230.0); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9_rt; + } + +} + +template +AMREX_GPU_HOST_DEVICE AMREX_INLINE +void rate_Zn60_to_p_Cu59_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) { + + // Zn60 --> p + Cu59 + + rate = 0.0; + drate_dT = 0.0; + + // Evaluate partition function terms + + amrex::Real Cu59_log_pf, dCu59_log_pf_dT9; + + // interpolating Cu59 partition function + get_partition_function_cached(Cu59, tfactors.T9, pf_cache, Cu59_log_pf, dCu59_log_pf_dT9); + + amrex::Real p_log_pf, dp_log_pf_dT9; + + // setting p log(partition function) to 0.0 by default, independent of T + p_log_pf = 0.0_rt; + dp_log_pf_dT9 = 0.0_rt; + + amrex::Real Zn60_log_pf, dZn60_log_pf_dT9; + + // interpolating Zn60 partition function + get_partition_function_cached(Zn60, tfactors.T9, pf_cache, Zn60_log_pf, dZn60_log_pf_dT9); + + amrex::Real net_log_pf = p_log_pf + Cu59_log_pf - Zn60_log_pf; + [[maybe_unused]] amrex::Real net_dlog_pf_dT9 = dp_log_pf_dT9 + dCu59_log_pf_dT9 - dZn60_log_pf_dT9; + + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ReacLib set derived from ths8r + ln_set_rate = 62.31218638341413 + -59.240729222177784 * tfactors.T9i + -39.9808 * tfactors.T913i + 1.17311 * tfactors.T913 + + -2.90486 * tfactors.T9 + 0.339644 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + ln_set_rate += net_log_pf + log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 59.240729222177784 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -39.9808 * tfactors.T943i + (1.0/3.0) * 1.17311 * tfactors.T923i + + -2.90486 + (5.0/3.0) * 0.339644 * tfactors.T923 + 0.833333 * tfactors.T9i; + + 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] + ln_set_rate = std::max(ln_set_rate, -230.0); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9_rt; + } + +} + +template +AMREX_GPU_HOST_DEVICE AMREX_INLINE +void rate_Zn60_to_He4_Ni56_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) { + + // Zn60 --> He4 + Ni56 + + rate = 0.0; + drate_dT = 0.0; + + // Evaluate partition function terms + + amrex::Real Ni56_log_pf, dNi56_log_pf_dT9; + + // interpolating Ni56 partition function + get_partition_function_cached(Ni56, tfactors.T9, pf_cache, Ni56_log_pf, dNi56_log_pf_dT9); + + amrex::Real He4_log_pf, dHe4_log_pf_dT9; + + // setting He4 log(partition function) to 0.0 by default, independent of T + He4_log_pf = 0.0_rt; + dHe4_log_pf_dT9 = 0.0_rt; + + amrex::Real Zn60_log_pf, dZn60_log_pf_dT9; + + // interpolating Zn60 partition function + get_partition_function_cached(Zn60, tfactors.T9, pf_cache, Zn60_log_pf, dZn60_log_pf_dT9); + + amrex::Real net_log_pf = He4_log_pf + Ni56_log_pf - Zn60_log_pf; + [[maybe_unused]] amrex::Real net_dlog_pf_dT9 = dHe4_log_pf_dT9 + dNi56_log_pf_dT9 - dZn60_log_pf_dT9; + + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ReacLib set derived from ths8r + ln_set_rate = 86.06332792090964 + -31.2372260432927 * tfactors.T9i + -96.4898 * tfactors.T913i + 6.47209 * tfactors.T913 + + -5.2029 * tfactors.T9 + 0.533391 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + ln_set_rate += net_log_pf + log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 31.2372260432927 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -96.4898 * tfactors.T943i + (1.0/3.0) * 6.47209 * tfactors.T923i + + -5.2029 + (5.0/3.0) * 0.533391 * tfactors.T923 + 0.833333 * tfactors.T9i; + + 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] + ln_set_rate = std::max(ln_set_rate, -230.0); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9_rt; + } + +} + +template +AMREX_GPU_HOST_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 @@ -1126,13 +1297,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] @@ -1147,13 +1318,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] @@ -1168,13 +1339,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] @@ -1189,7 +1360,7 @@ 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) { +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 @@ -1232,13 +1403,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] @@ -1253,7 +1424,7 @@ 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) { +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 @@ -1295,13 +1466,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] @@ -1316,13 +1487,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] @@ -1337,13 +1508,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] @@ -1358,7 +1529,7 @@ 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) { +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 @@ -1395,13 +1566,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] @@ -1416,7 +1587,7 @@ 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) { +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 @@ -1453,13 +1624,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] @@ -1474,7 +1645,7 @@ 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) { +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 @@ -1516,13 +1687,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] @@ -1537,13 +1708,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] @@ -1558,13 +1729,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] @@ -1579,7 +1750,7 @@ 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) { +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 @@ -1621,13 +1792,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] @@ -1642,7 +1813,7 @@ 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) { +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 @@ -1684,13 +1855,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] @@ -1705,7 +1876,7 @@ 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) { +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 @@ -1747,13 +1918,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] @@ -1768,13 +1939,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] @@ -1789,13 +1960,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] @@ -1810,7 +1981,7 @@ 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) { +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 @@ -1846,13 +2017,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] @@ -1867,7 +2038,7 @@ 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) { +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 @@ -1903,13 +2074,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] @@ -1924,7 +2095,7 @@ 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_p_Mn51_to_He4_Cr48_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) { +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 @@ -1966,13 +2137,13 @@ void rate_p_Mn51_to_He4_Cr48_derived(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] @@ -1987,7 +2158,7 @@ void rate_p_Mn51_to_He4_Cr48_derived(const tf_t& tfactors, amrex::Real& rate, am template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Co55_to_He4_Fe52_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) { +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 @@ -2029,13 +2200,13 @@ void rate_p_Co55_to_He4_Fe52_derived(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] @@ -2050,7 +2221,70 @@ void rate_p_Co55_to_He4_Fe52_derived(const tf_t& tfactors, amrex::Real& rate, am 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) { +void rate_He4_Ni56_to_p_Cu59_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 --> p + Cu59 + + rate = 0.0; + drate_dT = 0.0; + + // Evaluate partition function terms + + amrex::Real Cu59_log_pf, dCu59_log_pf_dT9; + + // interpolating Cu59 partition function + get_partition_function_cached(Cu59, tfactors.T9, pf_cache, Cu59_log_pf, dCu59_log_pf_dT9); + + amrex::Real Ni56_log_pf, dNi56_log_pf_dT9; + + // interpolating Ni56 partition function + get_partition_function_cached(Ni56, tfactors.T9, pf_cache, Ni56_log_pf, dNi56_log_pf_dT9); + + amrex::Real p_log_pf, dp_log_pf_dT9; + + // setting p log(partition function) to 0.0 by default, independent of T + p_log_pf = 0.0_rt; + dp_log_pf_dT9 = 0.0_rt; + + amrex::Real He4_log_pf, dHe4_log_pf_dT9; + + // setting He4 log(partition function) to 0.0 by default, independent of T + He4_log_pf = 0.0_rt; + dHe4_log_pf_dT9 = 0.0_rt; + + amrex::Real net_log_pf = p_log_pf + Cu59_log_pf - He4_log_pf - Ni56_log_pf; + [[maybe_unused]] amrex::Real net_dlog_pf_dT9 = dp_log_pf_dT9 + dCu59_log_pf_dT9 - dHe4_log_pf_dT9 - dNi56_log_pf_dT9; + + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ReacLib set derived from ths8r + ln_set_rate = 20.864958462504486 + -28.003503178913892 * tfactors.T9i + -39.9808 * tfactors.T913i + 13.6773 * tfactors.T913 + + -3.76429 * tfactors.T9 + 0.438096 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += net_log_pf + log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 28.003503178913892 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -39.9808 * tfactors.T943i + (1.0/3.0) * 13.6773 * tfactors.T923i + + -3.76429 + (5.0/3.0) * 0.438096 * tfactors.T923 + -0.666667 * tfactors.T9i; + + 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] + ln_set_rate = std::max(ln_set_rate, -230.0); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9_rt; + } + +} + +template +AMREX_GPU_HOST_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 @@ -2081,13 +2315,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] @@ -2102,7 +2336,7 @@ 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) { +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 @@ -2132,13 +2366,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] @@ -2153,7 +2387,7 @@ 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) { +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 @@ -2189,13 +2423,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] @@ -2210,7 +2444,7 @@ void rate_Si28_to_C12_O16_derived(const tf_t& tfactors, amrex::Real& rate, amrex template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Co55_to_p_Fe54_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) { +void rate_Co55_to_p_Fe54_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 + Fe54 @@ -2246,13 +2480,13 @@ void rate_Co55_to_p_Fe54_derived(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 57.84851844810452 + -58.76958578644693 * tfactors.T9i + -37.1544 * tfactors.T913i + 0.950364 * tfactors.T913 + -1.77529 * tfactors.T9 + 0.198562 * 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 = 58.76958578644693 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -37.1544 * tfactors.T943i + (1.0/3.0) * 0.950364 * tfactors.T923i + -1.77529 + (5.0/3.0) * 0.198562 * 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] @@ -2267,7 +2501,7 @@ void rate_Co55_to_p_Fe54_derived(const tf_t& tfactors, amrex::Real& rate, amrex: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Co56_to_n_Co55_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) { +void rate_Co56_to_n_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) { // Co56 --> n + Co55 @@ -2303,13 +2537,13 @@ void rate_Co56_to_n_Co55_derived(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 40.647564333711024 + -116.994640839646 * tfactors.T9i + -1.86357 * tfactors.T913 + 0.616591 * tfactors.T9 + -0.0839313 * 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 = 116.994640839646 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -1.86357 * tfactors.T923i + 0.616591 + (5.0/3.0) * -0.0839313 * 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] @@ -2324,7 +2558,7 @@ void rate_Co56_to_n_Co55_derived(const tf_t& tfactors, amrex::Real& rate, amrex: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Co57_to_n_Co56_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) { +void rate_Co57_to_n_Co56_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) { // Co57 --> n + Co56 @@ -2360,13 +2594,13 @@ void rate_Co57_to_n_Co56_derived(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 41.17386809654295 + -132.01901045161702 * tfactors.T9i + -1.37855 * tfactors.T913 + 0.299896 * tfactors.T9 + -0.04382 * 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 = 132.01901045161702 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -1.37855 * tfactors.T923i + 0.299896 + (5.0/3.0) * -0.04382 * 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] @@ -2381,7 +2615,7 @@ void rate_Co57_to_n_Co56_derived(const tf_t& tfactors, amrex::Real& rate, amrex: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Co57_to_p_Fe56_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) { +void rate_Co57_to_p_Fe56_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) { // Co57 --> p + Fe56 @@ -2417,13 +2651,13 @@ void rate_Co57_to_p_Fe56_derived(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 57.68564187237867 + -69.94636137001572 * tfactors.T9i + -37.1625 * tfactors.T913i + 1.06776 * tfactors.T913 + -1.31689 * tfactors.T9 + 0.122089 * 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 = 69.94636137001572 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -37.1625 * tfactors.T943i + (1.0/3.0) * 1.06776 * tfactors.T923i + -1.31689 + (5.0/3.0) * 0.122089 * 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] @@ -2438,7 +2672,7 @@ void rate_Co57_to_p_Fe56_derived(const tf_t& tfactors, amrex::Real& rate, amrex: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ni58_to_p_Co57_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) { +void rate_Ni58_to_p_Co57_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) { // Ni58 --> p + Co57 @@ -2474,13 +2708,13 @@ void rate_Ni58_to_p_Co57_derived(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 61.794489871251855 + -94.83410720454592 * tfactors.T9i + -38.1133 * tfactors.T913i + 1.77414 * tfactors.T913 + -1.48268 * tfactors.T9 + 0.121073 * 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 = 94.83410720454592 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -38.1133 * tfactors.T943i + (1.0/3.0) * 1.77414 * tfactors.T923i + -1.48268 + (5.0/3.0) * 0.121073 * 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] @@ -2495,7 +2729,7 @@ void rate_Ni58_to_p_Co57_derived(const tf_t& tfactors, amrex::Real& rate, amrex: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ni58_to_He4_Fe54_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) { +void rate_Ni58_to_He4_Fe54_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) { // Ni58 --> He4 + Fe54 @@ -2531,13 +2765,70 @@ void rate_Ni58_to_He4_Fe54_derived(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 85.23428031558652 + -74.25981652709197 * tfactors.T9i + -91.7628 * tfactors.T913i + 4.23027 * tfactors.T913 + -3.31305 * tfactors.T9 + 0.271293 * 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 = 74.25981652709197 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -91.7628 * tfactors.T943i + (1.0/3.0) * 4.23027 * tfactors.T923i + -3.31305 + (5.0/3.0) * 0.271293 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9_rt; + } + +} + +template +AMREX_GPU_HOST_DEVICE AMREX_INLINE +void rate_Cu59_to_p_Ni58_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) { + + // Cu59 --> p + Ni58 + + rate = 0.0; + drate_dT = 0.0; + + // Evaluate partition function terms + + amrex::Real Cu59_log_pf, dCu59_log_pf_dT9; + + // interpolating Cu59 partition function + get_partition_function_cached(Cu59, tfactors.T9, pf_cache, Cu59_log_pf, dCu59_log_pf_dT9); + + amrex::Real p_log_pf, dp_log_pf_dT9; + + // setting p log(partition function) to 0.0 by default, independent of T + p_log_pf = 0.0_rt; + dp_log_pf_dT9 = 0.0_rt; + + amrex::Real Ni58_log_pf, dNi58_log_pf_dT9; + + // interpolating Ni58 partition function + get_partition_function_cached(Ni58, tfactors.T9, pf_cache, Ni58_log_pf, dNi58_log_pf_dT9); + + amrex::Real net_log_pf = p_log_pf + Ni58_log_pf - Cu59_log_pf; + [[maybe_unused]] amrex::Real net_dlog_pf_dT9 = dp_log_pf_dT9 + dNi58_log_pf_dT9 - dCu59_log_pf_dT9; + + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ReacLib set derived from si13n + ln_set_rate = 58.97928371193912 + -39.67086986195644 * tfactors.T9i + -39.0526 * tfactors.T913i + 1.0436 * tfactors.T913 + + -2.10834 * tfactors.T9 + 0.239559 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + ln_set_rate += net_log_pf + log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 39.67086986195644 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -39.0526 * tfactors.T943i + (1.0/3.0) * 1.0436 * tfactors.T923i + + -2.10834 + (5.0/3.0) * 0.239559 * tfactors.T923 + 0.833333 * tfactors.T9i; + + 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] @@ -2552,7 +2843,7 @@ void rate_Ni58_to_He4_Fe54_derived(const tf_t& tfactors, amrex::Real& rate, amre template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Fe54_to_He4_Mn51_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) { +void rate_p_Fe54_to_He4_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) { // Fe54 + p --> He4 + Mn51 @@ -2594,13 +2885,13 @@ void rate_p_Fe54_to_He4_Mn51_derived(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = 65.35241368298804 + -36.52341983603332 * tfactors.T9i + -89.274 * tfactors.T913i + -0.862452 * tfactors.T913 + -0.635672 * tfactors.T9 + 0.0196464 * 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 = 36.52341983603332 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -89.274 * tfactors.T943i + (1.0/3.0) * -0.862452 * tfactors.T923i + -0.635672 + (5.0/3.0) * 0.0196464 * 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] @@ -2615,7 +2906,7 @@ void rate_p_Fe54_to_He4_Mn51_derived(const tf_t& tfactors, amrex::Real& rate, am template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Fe54_to_p_Co57_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) { +void rate_He4_Fe54_to_p_Co57_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) { // Fe54 + He4 --> p + Co57 @@ -2657,13 +2948,13 @@ void rate_He4_Fe54_to_p_Co57_derived(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = -1.404090444334669 + -20.574290677453938 * tfactors.T9i + -38.1133 * tfactors.T913i + 29.3541 * tfactors.T913 + -4.75966 * tfactors.T9 + 0.40418 * 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 = 20.574290677453938 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -38.1133 * tfactors.T943i + (1.0/3.0) * 29.3541 * tfactors.T923i + -4.75966 + (5.0/3.0) * 0.40418 * 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] @@ -2678,7 +2969,7 @@ void rate_He4_Fe54_to_p_Co57_derived(const tf_t& tfactors, amrex::Real& rate, am template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Fe56_to_n_Co56_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) { +void rate_p_Fe56_to_n_Co56_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) { // Fe56 + p --> n + Co56 @@ -2720,13 +3011,13 @@ void rate_p_Fe56_to_n_Co56_derived(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 22.653426224164285 + -62.07264908160129 * tfactors.T9i + -1.13331 * tfactors.T913 + 0.347185 * tfactors.T9 + -0.0328879 * 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 = 62.07264908160129 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -1.13331 * tfactors.T923i + 0.347185 + (5.0/3.0) * -0.0328879 * 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] @@ -2741,7 +3032,7 @@ void rate_p_Fe56_to_n_Co56_derived(const tf_t& tfactors, amrex::Real& rate, amre template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Co56_to_n_Ni56_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) { +void rate_p_Co56_to_n_Ni56_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) { // Co56 + p --> n + Ni56 @@ -2783,13 +3074,76 @@ void rate_p_Co56_to_n_Ni56_derived(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 13.374260291785419 + -33.830037058152215 * tfactors.T9i + 1.76846 * tfactors.T913 + 0.197992 * tfactors.T9 + -0.017494 * 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 = 33.830037058152215 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 1.76846 * tfactors.T923i + 0.197992 + (5.0/3.0) * -0.017494 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9_rt; + } + +} + +template +AMREX_GPU_HOST_DEVICE AMREX_INLINE +void rate_He4_Co56_to_n_Cu59_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) { + + // Co56 + He4 --> n + Cu59 + + rate = 0.0; + drate_dT = 0.0; + + // Evaluate partition function terms + + amrex::Real n_log_pf, dn_log_pf_dT9; + + // setting n log(partition function) to 0.0 by default, independent of T + n_log_pf = 0.0_rt; + dn_log_pf_dT9 = 0.0_rt; + + amrex::Real Cu59_log_pf, dCu59_log_pf_dT9; + + // interpolating Cu59 partition function + get_partition_function_cached(Cu59, tfactors.T9, pf_cache, Cu59_log_pf, dCu59_log_pf_dT9); + + amrex::Real He4_log_pf, dHe4_log_pf_dT9; + + // setting He4 log(partition function) to 0.0 by default, independent of T + He4_log_pf = 0.0_rt; + dHe4_log_pf_dT9 = 0.0_rt; + + amrex::Real Co56_log_pf, dCo56_log_pf_dT9; + + // interpolating Co56 partition function + get_partition_function_cached(Co56, tfactors.T9, pf_cache, Co56_log_pf, dCo56_log_pf_dT9); + + amrex::Real net_log_pf = n_log_pf + Cu59_log_pf - He4_log_pf - Co56_log_pf; + [[maybe_unused]] amrex::Real net_dlog_pf_dT9 = dn_log_pf_dT9 + dCu59_log_pf_dT9 - dHe4_log_pf_dT9 - dCo56_log_pf_dT9; + + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ReacLib set derived from ths8r + ln_set_rate = 8.911918754289905 + -61.8335402370445 * tfactors.T9i + -1.00882 * tfactors.T913 + + 1.88993 * tfactors.T9 + -0.202319 * tfactors.T953; + + ln_set_rate += net_log_pf + log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 61.8335402370445 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -1.00882 * tfactors.T923i + + 1.88993 + (5.0/3.0) * -0.202319 * tfactors.T923; + + 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] @@ -2804,7 +3158,7 @@ void rate_p_Co56_to_n_Ni56_derived(const tf_t& tfactors, amrex::Real& rate, amre template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Ni58_to_He4_Co55_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) { +void rate_p_Ni58_to_He4_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) { // Ni58 + p --> He4 + Co55 @@ -2846,13 +3200,13 @@ void rate_p_Ni58_to_He4_Co55_derived(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = 63.596461867482006 + -15.490230740645051 * tfactors.T9i + -94.1404 * tfactors.T913i + 3.39179 * tfactors.T913 + -1.71062 * tfactors.T9 + 0.133003 * 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 = 15.490230740645051 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -94.1404 * tfactors.T943i + (1.0/3.0) * 3.39179 * tfactors.T923i + -1.71062 + (5.0/3.0) * 0.133003 * 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] @@ -2867,7 +3221,7 @@ void rate_p_Ni58_to_He4_Co55_derived(const tf_t& tfactors, amrex::Real& rate, am 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) { +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 @@ -2909,13 +3263,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] @@ -2930,13 +3284,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] @@ -2951,13 +3305,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] @@ -2972,13 +3326,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] @@ -2993,7 +3347,7 @@ 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) { +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 @@ -3029,13 +3383,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] @@ -3050,7 +3404,7 @@ 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) { +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 @@ -3085,12 +3439,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] @@ -3105,13 +3459,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] @@ -3126,13 +3480,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] @@ -3146,12 +3500,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] @@ -3166,7 +3520,7 @@ 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) { +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 @@ -3208,13 +3562,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] @@ -3229,7 +3583,7 @@ 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) { +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 @@ -3265,13 +3619,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] @@ -3286,7 +3640,7 @@ 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) { +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 @@ -3322,13 +3676,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] @@ -3343,13 +3697,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] @@ -3364,13 +3718,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] @@ -3385,7 +3739,7 @@ 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) { +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 @@ -3427,13 +3781,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] @@ -3448,7 +3802,7 @@ 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) { +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 @@ -3484,13 +3838,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] @@ -3505,7 +3859,7 @@ 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) { +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 @@ -3541,13 +3895,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] @@ -3562,7 +3916,7 @@ 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) { +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 @@ -3598,13 +3952,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] @@ -3619,7 +3973,7 @@ 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) { +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 @@ -3655,13 +4009,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] @@ -3676,13 +4030,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] @@ -3697,13 +4051,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] @@ -3718,13 +4072,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] @@ -3739,7 +4093,7 @@ 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) { +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 @@ -3781,13 +4135,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] @@ -3802,7 +4156,7 @@ 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_Fe54_to_n_Fe53_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) { +void rate_Fe54_to_n_Fe53_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) { // Fe54 --> n + Fe53 @@ -3838,13 +4192,13 @@ void rate_Fe54_to_n_Fe53_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 42.23234536763494 + -155.25009527915816 * tfactors.T9i + -1.10421 * tfactors.T913 + 0.379905 * tfactors.T9 + -0.0581878 * 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 = 155.25009527915816 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -1.10421 * tfactors.T923i + 0.379905 + (5.0/3.0) * -0.0581878 * 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] @@ -3859,7 +4213,7 @@ void rate_Fe54_to_n_Fe53_removed(const tf_t& tfactors, amrex::Real& rate, amrex: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Fe53_to_n_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) { +void rate_Fe53_to_n_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) { // Fe53 --> n + Fe52 @@ -3895,13 +4249,13 @@ void rate_Fe53_to_n_Fe52_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 37.50789742709652 + -124.01421385132892 * tfactors.T9i + -0.344319 * tfactors.T913 + 0.178277 * tfactors.T9 + -0.0334326 * 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 = 124.01421385132892 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -0.344319 * tfactors.T923i + 0.178277 + (5.0/3.0) * -0.0334326 * 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] @@ -3916,7 +4270,7 @@ void rate_Fe53_to_n_Fe52_removed(const tf_t& tfactors, amrex::Real& rate, amrex: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Fe56_to_n_Fe55_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) { +void rate_Fe56_to_n_Fe55_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) { // Fe56 --> n + Fe55 @@ -3952,13 +4306,13 @@ void rate_Fe56_to_n_Fe55_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 46.806892234523204 + -130.0322634199283 * tfactors.T9i + 8.06062 * tfactors.T913i + -14.4809 * tfactors.T913 + 0.94252 * tfactors.T9 + -0.0776007 * tfactors.T953 + 7.97093 * 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 = 130.0322634199283 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 8.06062 * tfactors.T943i + (1.0/3.0) * -14.4809 * tfactors.T923i + 0.94252 + (5.0/3.0) * -0.0776007 * tfactors.T923 + 7.97093 * 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] @@ -3973,7 +4327,7 @@ void rate_Fe56_to_n_Fe55_removed(const tf_t& tfactors, amrex::Real& rate, amrex: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Fe55_to_n_Fe54_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) { +void rate_Fe55_to_n_Fe54_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) { // Fe55 --> n + Fe54 @@ -4009,13 +4363,13 @@ void rate_Fe55_to_n_Fe54_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 21.50487677145662 + -107.84100838776591 * tfactors.T9i + -8.66617 * tfactors.T913i + 26.4472 * tfactors.T913 + -1.9222 * tfactors.T9 + 0.0986404 * tfactors.T953 + -8.28317 * 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 = 107.84100838776591 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -8.66617 * tfactors.T943i + (1.0/3.0) * 26.4472 * tfactors.T923i + -1.9222 + (5.0/3.0) * 0.0986404 * tfactors.T923 + -8.28317 * 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] @@ -4030,7 +4384,7 @@ void rate_Fe55_to_n_Fe54_removed(const tf_t& tfactors, amrex::Real& rate, amrex: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ni58_to_n_Ni57_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) { +void rate_Ni58_to_n_Ni57_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) { // Ni58 --> n + Ni57 @@ -4066,13 +4420,13 @@ void rate_Ni58_to_n_Ni57_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 42.36077897558323 + -141.76332431826057 * tfactors.T9i + -1.90814 * tfactors.T913 + 0.493188 * tfactors.T9 + -0.0684633 * 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 = 141.76332431826057 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -1.90814 * tfactors.T923i + 0.493188 + (5.0/3.0) * -0.0684633 * 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] @@ -4087,7 +4441,7 @@ void rate_Ni58_to_n_Ni57_removed(const tf_t& tfactors, amrex::Real& rate, amrex: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ni57_to_n_Ni56_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) { +void rate_Ni57_to_n_Ni56_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) { // Ni57 --> n + Ni56 @@ -4123,13 +4477,13 @@ void rate_Ni57_to_n_Ni56_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 38.391039283996996 + -118.91983039605458 * tfactors.T9i + -1.19665 * tfactors.T913 + 0.507179 * tfactors.T9 + -0.074604 * 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 = 118.91983039605458 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -1.19665 * tfactors.T923i + 0.507179 + (5.0/3.0) * -0.074604 * 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] @@ -4159,360 +4513,794 @@ 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; - - } - 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; - - } - 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; - - } - 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; - - } - 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; - - } - rate_Fe52_to_p_Mn51_derived(tfactors, 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; - - } - rate_Fe52_to_He4_Cr48_derived(tfactors, 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; - - } - rate_Co55_to_He4_Mn51_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Co55_to_He4_Mn51_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Co55_to_He4_Mn51_derived) = drate_dT; - - } - rate_Ni56_to_p_Co55_derived(tfactors, 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; - - } - rate_Ni56_to_He4_Fe52_derived(tfactors, 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; - - } - 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; - - } - 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; - - } - 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; - - } - 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; - - } - 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; - - } - 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; - - } - 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; - - } - rate_p_Mn51_to_He4_Cr48_derived(tfactors, 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; - - } - rate_p_Co55_to_He4_Fe52_derived(tfactors, 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_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_Co55_to_p_Fe54_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Co55_to_p_Fe54_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Co55_to_p_Fe54_derived) = drate_dT; - - } - rate_Co56_to_n_Co55_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Co56_to_n_Co55_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Co56_to_n_Co55_derived) = drate_dT; - - } - rate_Co57_to_n_Co56_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Co57_to_n_Co56_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Co57_to_n_Co56_derived) = drate_dT; - - } - rate_Co57_to_p_Fe56_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Co57_to_p_Fe56_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Co57_to_p_Fe56_derived) = drate_dT; - - } - rate_Ni58_to_p_Co57_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Ni58_to_p_Co57_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Ni58_to_p_Co57_derived) = drate_dT; - - } - rate_Ni58_to_He4_Fe54_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Ni58_to_He4_Fe54_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Ni58_to_He4_Fe54_derived) = drate_dT; - - } - rate_p_Fe54_to_He4_Mn51_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_p_Fe54_to_He4_Mn51_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_Fe54_to_He4_Mn51_derived) = drate_dT; - - } - rate_He4_Fe54_to_p_Co57_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_He4_Fe54_to_p_Co57_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Fe54_to_p_Co57_derived) = drate_dT; - - } - rate_p_Fe56_to_n_Co56_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_p_Fe56_to_n_Co56_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_Fe56_to_n_Co56_derived) = drate_dT; - - } - rate_p_Co56_to_n_Ni56_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_p_Co56_to_n_Ni56_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_Co56_to_n_Ni56_derived) = drate_dT; - - } - rate_p_Ni58_to_He4_Co55_derived(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_p_Ni58_to_He4_Co55_derived) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_Ni58_to_He4_Co55_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_Fe54_to_n_Fe53_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Fe54_to_n_Fe53_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Fe54_to_n_Fe53_removed) = drate_dT; - - } - rate_Fe53_to_n_Fe52_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Fe53_to_n_Fe52_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Fe53_to_n_Fe52_removed) = drate_dT; - - } - rate_Fe56_to_n_Fe55_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Fe56_to_n_Fe55_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Fe56_to_n_Fe55_removed) = drate_dT; - - } - rate_Fe55_to_n_Fe54_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Fe55_to_n_Fe54_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Fe55_to_n_Fe54_removed) = drate_dT; - - } - rate_Ni58_to_n_Ni57_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Ni58_to_n_Ni57_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Ni58_to_n_Ni57_removed) = drate_dT; - + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Co55_to_He4_Mn51_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Co55_to_He4_Mn51_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co55_to_He4_Mn51_derived) = drate_dT; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Cu59_to_He4_Co55_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Cu59_to_He4_Co55_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cu59_to_He4_Co55_derived) = drate_dT; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Zn60_to_p_Cu59_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Zn60_to_p_Cu59_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Zn60_to_p_Cu59_derived) = drate_dT; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Zn60_to_He4_Ni56_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Zn60_to_He4_Ni56_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Zn60_to_He4_Ni56_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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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_Ni56); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ni56); + } +#endif + rate_He4_Ni56_to_p_Cu59_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_He4_Ni56_to_p_Cu59_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Ni56_to_p_Cu59_derived) = drate_dT; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Co55_to_p_Fe54_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Co55_to_p_Fe54_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co55_to_p_Fe54_derived) = drate_dT; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Co56_to_n_Co55_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Co56_to_n_Co55_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co56_to_n_Co55_derived) = drate_dT; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Co57_to_n_Co56_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Co57_to_n_Co56_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co57_to_n_Co56_derived) = drate_dT; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Co57_to_p_Fe56_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Co57_to_p_Fe56_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co57_to_p_Fe56_derived) = drate_dT; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Ni58_to_p_Co57_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Ni58_to_p_Co57_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni58_to_p_Co57_derived) = drate_dT; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Ni58_to_He4_Fe54_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Ni58_to_He4_Fe54_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni58_to_He4_Fe54_derived) = drate_dT; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Cu59_to_p_Ni58_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Cu59_to_p_Ni58_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cu59_to_p_Ni58_derived) = drate_dT; + } + } + + { + 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_Fe54); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Fe54); + } +#endif + rate_p_Fe54_to_He4_Mn51_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_p_Fe54_to_He4_Mn51_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Fe54_to_He4_Mn51_derived) = drate_dT; + } + } + + { + 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_Fe54); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Fe54); + } +#endif + rate_He4_Fe54_to_p_Co57_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_He4_Fe54_to_p_Co57_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Fe54_to_p_Co57_derived) = drate_dT; + } + } + + { + 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_Fe56); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Fe56); + } +#endif + rate_p_Fe56_to_n_Co56_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_p_Fe56_to_n_Co56_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Fe56_to_n_Co56_derived) = drate_dT; + } + } + + { + 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_Co56); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Co56); + } +#endif + rate_p_Co56_to_n_Ni56_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_p_Co56_to_n_Ni56_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Co56_to_n_Ni56_derived) = drate_dT; + } + } + + { + 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_Co56); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Co56); + } +#endif + rate_He4_Co56_to_n_Cu59_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_He4_Co56_to_n_Cu59_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Co56_to_n_Cu59_derived) = drate_dT; + } + } + + { + 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_Ni58); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Ni58); + } +#endif + rate_p_Ni58_to_He4_Co55_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_p_Ni58_to_He4_Co55_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Ni58_to_He4_Co55_derived) = drate_dT; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Fe54_to_n_Fe53_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Fe54_to_n_Fe53_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe54_to_n_Fe53_derived) = drate_dT; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Fe53_to_n_Fe52_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Fe53_to_n_Fe52_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe53_to_n_Fe52_derived) = drate_dT; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Fe56_to_n_Fe55_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Fe56_to_n_Fe55_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe56_to_n_Fe55_derived) = drate_dT; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Fe55_to_n_Fe54_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Fe55_to_n_Fe54_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe55_to_n_Fe54_derived) = drate_dT; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Ni58_to_n_Ni57_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Ni58_to_n_Ni57_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni58_to_n_Ni57_derived) = drate_dT; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_Ni57_to_n_Ni56_derived(tfactors, log_scor, dlog_scor_dT, rate, drate_dT, rate_eval, pf_cache); + rate_eval.screened_rates(k_Ni57_to_n_Ni56_derived) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni57_to_n_Ni56_derived) = drate_dT; + } } - rate_Ni57_to_n_Ni56_removed(tfactors, rate, drate_dT, rate_eval, pf_cache); - rate_eval.screened_rates(k_Ni57_to_n_Ni56_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Ni57_to_n_Ni56_removed) = drate_dT; - } } #endif diff --git a/networks/he-burn/ase-iron/partition_functions.H b/networks/he-burn/ase-iron/partition_functions.H index 23de163bb..4c4c2114c 100644 --- a/networks/he-burn/ase-iron/partition_functions.H +++ b/networks/he-burn/ase-iron/partition_functions.H @@ -120,7 +120,7 @@ namespace part_fun { inline AMREX_GPU_MANAGED 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, + 9.999994999180668e-07, 0.0001259920626667995, 0.0017764212290928272, 0.008665347199341391, 0.024785291222403763, 0.05209612203517594, 0.09017063128626053, 0.13704782771330884, 0.19024508258946665, 0.30679917070896673, 0.42717245621910793, 0.5457138884802113, 0.660894613389287, 0.773014180490088, 0.9932517730102834, 1.2119409739751128, 1.4398351280479205, 1.682688374173693, 1.9487632180377197, 2.244955980157409, @@ -217,7 +217,7 @@ namespace part_fun { 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, - 0.0030782573008273765, 0.007778667567807429, 0.01603376935914739, 0.02868269041229125, 0.06934041108806749, + 0.003078257300827377, 0.007778667567807429, 0.01603376935914739, 0.02868269041229125, 0.06934041108806749, 0.13236245968854618, 0.21875794860165648, 0.32915769331179123, 0.4643325791959468, 0.8109302162163288, 1.2669476034873244, 1.81319474994812, 2.4336133554004498, 3.086486636822455, 3.756538102587751, 4.4272389774954295, 5.093750200806762, 5.746203190540153, 6.386879319362645, 7.940939762327791, @@ -552,7 +552,7 @@ namespace part_fun { inline AMREX_GPU_MANAGED amrex::Array1D Fe56_pf_array = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3.999991999914312e-06, 2.2999735504161862e-05, 9.099585975123644e-05, - 0.00026996355655966415, 0.007115623795532719, 0.036122649876509136, 0.09416770925148646, 0.17582214798729476, + 0.00026996355655966415, 0.00711562379553272, 0.036122649876509136, 0.09416770925148646, 0.17582214798729476, 0.2723587679931664, 0.37744210592173955, 0.4880608616770881, 0.6035325999923254, 0.8511487220072201, 1.1254226572294825, 1.4290963940696066, 1.7632754575255085, 2.1292725925101696, 2.9601050959108397, 3.9080149840306073, 4.9344739331306915, 6.0014148779611505, 7.07326971745971, 8.151909872940905, @@ -577,7 +577,7 @@ namespace part_fun { 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, - 0.0008776147834635239, 0.002650484360963482, 0.006510758935580232, 0.013783568660113304, 0.04542450669313041, + 0.0008776147834635239, 0.0026504843609634825, 0.006510758935580232, 0.013783568660113304, 0.04542450669313041, 0.11337689843044624, 0.2341190990271887, 0.4197354671252422, 0.6733637730790638, 1.3506671834767394, 2.175887439948088, 3.068052935133617, 3.9982007016691985, 4.948759890378168, 5.910796644040527, 6.887552571664617, 7.874739125171811, 8.869257522797287, 9.87302834505142, 12.392552212472792, @@ -649,7 +649,7 @@ namespace part_fun { 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, - 0.0006687763192560828, 0.0021007917908672197, 0.0051805577080849445, 0.0108093677159202, 0.033929817942853414, + 0.0006687763192560828, 0.0021007917908672197, 0.005180557708084945, 0.0108093677159202, 0.033929817942853414, 0.08125919821801637, 0.16557206393583876, 0.30308828495767837, 0.5109446166860524, 1.172482137234565, 2.102913897864978, 3.1654750481410856, 4.272490747605575, 5.389071729816501, 6.498282149476434, 7.605890001053122, 8.712759974960212, 9.814656338829513, 10.918718232265187, 13.664687668229691, @@ -697,7 +697,7 @@ namespace part_fun { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 6.499788759151895e-05, 0.0010874085569544608, 0.005954238288214293, 0.018769741111677243, - 0.04333627107625303, 0.08256291389970516, 0.13844890680808367, 0.21212628348615897, 0.4130674701171434, + 0.04333627107625303, 0.08256291389970516, 0.1384489068080837, 0.21212628348615897, 0.4130674701171434, 0.6787038764017188, 0.9964869046943904, 1.355513968039992, 1.7493953139667429, 2.624668592163159, 3.6082115510464816, 4.653960350157523, 5.736572297479192, 6.834108738813838, 7.937374696163295, 9.038365107236372, 10.142504453006628, 11.247656987355347, 12.35017298950393, 15.107494239612924, @@ -713,6 +713,54 @@ namespace part_fun { constexpr amrex::Real Ni58_pf_threshold_T9 = 1.0; + // Cu59 + + // this is log(partition function) + + inline AMREX_GPU_MANAGED amrex::Array1D Cu59_pf_array = { + 0.0, 0.0, 0.0, 0.0, 0.0, + 5.99998200002249e-06, 3.7999278018272636e-05, 0.00014598934303724457, 0.00040491800963663984, 0.0008995952428359939, + 0.0017105361984473075, 0.012428445906924757, 0.03638689398559588, 0.073626784973166, 0.12292623116658526, + 0.18321282616205353, 0.25408159613801906, 0.3357819984616533, 0.4289771867440828, 0.6529614419193162, + 0.930428717890741, 1.2607722370732148, 1.6382636305011102, 2.0542709023528873, 2.9601050959108397, + 3.9318256327243257, 4.9344739331306915, 5.961005339623274, 6.993932975223189, 8.039157390473237, + 9.090430075303626, 10.142504453006628, 11.202315887874743, 12.259613412458204, 14.920767389351052, + 17.579033555073977, 20.235505486111418, 22.88543877622371, 25.527286881679668, 28.15574964486353, + 30.7794744765002, 33.38992288980583, 35.99039022215122, 38.58182766274523, 41.16549414415971, + 43.739066431033365, 46.3063440782545, 48.86711057930362, 51.417677874902765, 53.96375874805992, + 56.50619682581586, 59.0416760492395, 61.57377704101001, 64.10131892244245, 66.62414480709275, + 69.14521143829519, 71.66531682504908, 74.17741921764556, 76.6933438618572, 79.20817591494125, + 81.71864934570125, 84.23069253692425, 86.74108102323788, 89.24917100848154, 94.26902295768272, + 99.28879073534225, 104.31446390680304, 109.33991428668443, 114.37210213916643, 119.410078778867, + 124.45292370698547, 137.09667508060747, + }; + + constexpr amrex::Real Cu59_pf_threshold_T9 = 0.4; + + // Zn60 + + // this is log(partition function) + + inline AMREX_GPU_MANAGED amrex::Array1D Zn60_pf_array = { + 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 1.9999980000601777e-06, 1.1999928000476974e-05, + 4.299907552651673e-05, 0.0021107707552105327, 0.014655087692010784, 0.04650565189537119, 0.0995484583270208, + 0.1701865579572265, 0.2532334746219091, 0.3443326907187112, 0.4407942846867419, 0.647054549773612, + 0.8778621209250755, 1.1497805752425092, 1.4806165530248636, 1.881161777329219, 2.8735646395797834, + 4.032469158504013, 5.241747015059643, 6.459904454377535, 7.6638772587034705, 8.85366542803745, + 10.025705185260378, 11.188579408146856, 12.337100907936577, 13.481435445942783, 16.308716010566968, + 19.11382792451231, 21.895747974180978, 24.660956589123135, 27.411620550893172, 30.14871758853954, + 32.87804518808903, 35.593088424682215, 38.29531449749844, 40.987665789057544, 43.67007355954642, + 46.34437147384374, 49.00661213891465, 51.66117365506587, 54.30753028716274, 56.946587616778004, + 59.57953034539341, 62.209018223992516, 64.82303947544645, 67.44279706940299, 70.0521124298195, + 72.6582900853156, 75.26170168075885, 77.86171501209185, 80.45808906674586, 83.05006709659531, + 85.6467240601399, 88.23539759975046, 90.82326955447033, 93.411736539412, 98.58498084903826, + 103.75609112710721, 108.92953516377385, 114.09923515249979, 119.2755589508551, 124.45292370698547, + 129.6379123882265, 142.61871220130905, + }; + + constexpr amrex::Real Zn60_pf_threshold_T9 = 0.7; + // interpolation routine @@ -960,6 +1008,18 @@ void get_partition_function(const int inuc, } break; + case Cu59: + if (T9 > part_fun::Cu59_pf_threshold_T9) { + part_fun::interpolate_pf(T9, pf_cache.index_temp_array_1, part_fun::temp_array_1, part_fun::Cu59_pf_array, logpf, dlogpf_dT9); + } + break; + + case Zn60: + if (T9 > part_fun::Zn60_pf_threshold_T9) { + part_fun::interpolate_pf(T9, pf_cache.index_temp_array_1, part_fun::temp_array_1, part_fun::Zn60_pf_array, logpf, dlogpf_dT9); + } + break; + default: @@ -1026,7 +1086,7 @@ constexpr amrex::Real get_spin_state() { spec == S32 || spec == Ar36 || spec == Ca40 || spec == Ti44 || spec == Cr48 || spec == Fe52 || spec == Fe54 || spec == Fe56 || spec == Ni56 || - spec == Ni58 + spec == Ni58 || spec == Zn60 ) { return 1.0_rt; @@ -1039,8 +1099,9 @@ constexpr amrex::Real get_spin_state() { return 2.0_rt; } else if constexpr ( - spec == Na23 || spec == Cl35 || spec == K39 || - spec == V47 || spec == Fe55 || spec == Ni57 + spec == Na23 || spec == Cu59 || spec == Cl35 || + spec == K39 || spec == V47 || spec == Fe55 || + spec == Ni57 ) { return 4.0_rt; diff --git a/networks/he-burn/ase-iron/pynucastro-info.txt b/networks/he-burn/ase-iron/pynucastro-info.txt index e055581de..1e77fc5d4 100644 --- a/networks/he-burn/ase-iron/pynucastro-info.txt +++ b/networks/he-burn/ase-iron/pynucastro-info.txt @@ -1 +1 @@ -pynucastro version: 2.9.0-28-gbcc09d414 +pynucastro version: 2.10.0-1-g9f83d7cdd diff --git a/networks/he-burn/ase-iron/pynucastro.net b/networks/he-burn/ase-iron/pynucastro.net index 56b5f8cfb..5310557c3 100644 --- a/networks/he-burn/ase-iron/pynucastro.net +++ b/networks/he-burn/ase-iron/pynucastro.net @@ -24,6 +24,8 @@ cobalt-56 Co56 56.0 27.0 cobalt-57 Co57 57.0 27.0 nickel-56 Ni56 56.0 28.0 nickel-58 Ni58 58.0 28.0 +copper-59 Cu59 59.0 29.0 +zinc-60 Zn60 60.0 30.0 __extra_chlorine-35 Cl35 35.0 17.0 __extra_potassium-39 K39 39.0 19.0 __extra_scandium-43 Sc43 43.0 21.0 diff --git a/networks/he-burn/ase-iron/reaclib_rates.H b/networks/he-burn/ase-iron/reaclib_rates.H index f991ab47c..4f9ecede1 100644 --- a/networks/he-burn/ase-iron/reaclib_rates.H +++ b/networks/he-burn/ase-iron/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) { +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] @@ -73,7 +70,7 @@ 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) { +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] @@ -122,7 +127,7 @@ 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) { +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] @@ -188,7 +205,7 @@ 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) { +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] @@ -271,7 +304,7 @@ 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) { +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] @@ -337,7 +382,7 @@ 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) { +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] @@ -386,7 +439,7 @@ 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) { +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] @@ -452,7 +517,7 @@ 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) { +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] @@ -484,7 +553,7 @@ 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) { +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] @@ -550,7 +631,7 @@ 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_He4_Cr48_to_Fe52_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +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 @@ -565,9 +646,13 @@ void rate_He4_Cr48_to_Fe52_reaclib(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] @@ -582,7 +667,7 @@ void rate_He4_Cr48_to_Fe52_reaclib(const tf_t& tfactors, amrex::Real& rate, amre template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Mn51_to_Fe52_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +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 @@ -597,9 +682,13 @@ void rate_p_Mn51_to_Fe52_reaclib(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] @@ -614,7 +703,7 @@ void rate_p_Mn51_to_Fe52_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Mn51_to_Co55_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +void rate_He4_Mn51_to_Co55_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Mn51 + He4 --> Co55 @@ -629,9 +718,13 @@ void rate_He4_Mn51_to_Co55_reaclib(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 65.9219 + -89.274 * tfactors.T913i + -10.4373 * tfactors.T913 + 1.00492 * tfactors.T9 + -0.125548 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -89.274 * tfactors.T943i + (1.0/3.0) * -10.4373 * tfactors.T923i + 1.00492 + (5.0/3.0) * -0.125548 * 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] @@ -646,7 +739,7 @@ void rate_He4_Mn51_to_Co55_reaclib(const tf_t& tfactors, amrex::Real& rate, amre template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Fe52_to_Ni56_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +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 @@ -661,9 +754,13 @@ void rate_He4_Fe52_to_Ni56_reaclib(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] @@ -678,7 +775,7 @@ void rate_He4_Fe52_to_Ni56_reaclib(const tf_t& tfactors, amrex::Real& rate, amre template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Co55_to_Ni56_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +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 @@ -693,9 +790,121 @@ void rate_p_Co55_to_Ni56_reaclib(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] + ln_set_rate = std::max(ln_set_rate, -230.0); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (do_T_derivatives) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + +} + +template +AMREX_GPU_HOST_DEVICE AMREX_INLINE +void rate_He4_Co55_to_Cu59_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { + + // Co55 + He4 --> Cu59 + + rate = 0.0; + drate_dT = 0.0; + + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ths8r + ln_set_rate = 65.2921 + -94.1404 * tfactors.T913i + -2.62786 * tfactors.T913 + + -2.12066 * tfactors.T9 + 0.237999 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (do_T_derivatives) { + dln_set_rate_dT9 = + -(1.0/3.0) * -94.1404 * tfactors.T943i + (1.0/3.0) * -2.62786 * tfactors.T923i + + -2.12066 + (5.0/3.0) * 0.237999 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (do_T_derivatives) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + +} + +template +AMREX_GPU_HOST_DEVICE AMREX_INLINE +void rate_He4_Ni56_to_Zn60_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { + + // Ni56 + He4 --> Zn60 + + rate = 0.0; + drate_dT = 0.0; + + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ths8r + ln_set_rate = 61.0733 + -96.4898 * tfactors.T913i + 6.47209 * tfactors.T913 + + -5.2029 * tfactors.T9 + 0.533391 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (do_T_derivatives) { + dln_set_rate_dT9 = + -(1.0/3.0) * -96.4898 * tfactors.T943i + (1.0/3.0) * 6.47209 * tfactors.T923i + + -5.2029 + (5.0/3.0) * 0.533391 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (do_T_derivatives) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + +} + +template +AMREX_GPU_HOST_DEVICE AMREX_INLINE +void rate_p_Cu59_to_Zn60_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { + + // Cu59 + p --> Zn60 + + rate = 0.0; + drate_dT = 0.0; + + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ths8r + ln_set_rate = 37.226 + -39.9808 * tfactors.T913i + 1.17311 * tfactors.T913 + + -2.90486 * tfactors.T9 + 0.339644 * 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.9808 * tfactors.T943i + (1.0/3.0) * 1.17311 * tfactors.T923i + + -2.90486 + (5.0/3.0) * 0.339644 * 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] @@ -710,7 +919,7 @@ void rate_p_Co55_to_Ni56_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex: 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) { +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 @@ -725,9 +934,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] @@ -742,7 +955,7 @@ 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) { +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 @@ -757,9 +970,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] @@ -774,7 +991,7 @@ 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) { +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 @@ -789,9 +1006,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] @@ -806,7 +1027,7 @@ 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) { +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 @@ -821,9 +1042,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] @@ -838,7 +1063,7 @@ 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) { +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 @@ -853,9 +1078,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] @@ -870,7 +1099,7 @@ 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) { +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 @@ -885,9 +1114,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] @@ -902,7 +1135,7 @@ 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) { +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 @@ -917,9 +1150,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] @@ -934,7 +1171,7 @@ 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) { +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 @@ -949,9 +1186,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] @@ -966,9 +1207,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] @@ -983,9 +1228,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] @@ -1000,7 +1249,7 @@ 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) { +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 @@ -1015,9 +1264,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] @@ -1032,9 +1285,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] @@ -1049,9 +1306,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] @@ -1066,7 +1327,7 @@ 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) { +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 @@ -1081,9 +1342,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] @@ -1098,9 +1363,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] @@ -1115,9 +1384,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] @@ -1132,7 +1405,7 @@ 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_Cr48_to_p_Mn51_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +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 @@ -1147,9 +1420,13 @@ void rate_He4_Cr48_to_p_Mn51_reaclib(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] @@ -1164,7 +1441,7 @@ void rate_He4_Cr48_to_p_Mn51_reaclib(const tf_t& tfactors, amrex::Real& rate, am template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Fe52_to_p_Co55_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +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 @@ -1179,9 +1456,49 @@ void rate_He4_Fe52_to_p_Co55_reaclib(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] + ln_set_rate = std::max(ln_set_rate, -230.0); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (do_T_derivatives) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + +} + +template +AMREX_GPU_HOST_DEVICE AMREX_INLINE +void rate_p_Cu59_to_He4_Ni56_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { + + // Cu59 + p --> He4 + Ni56 + + rate = 0.0; + drate_dT = 0.0; + + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ths8r + ln_set_rate = 20.7688 + -39.9808 * tfactors.T913i + 13.6773 * tfactors.T913 + + -3.76429 * tfactors.T9 + 0.438096 * 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.9808 * tfactors.T943i + (1.0/3.0) * 13.6773 * tfactors.T923i + + -3.76429 + (5.0/3.0) * 0.438096 * 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] @@ -1196,7 +1513,7 @@ void rate_He4_Fe52_to_p_Co55_reaclib(const tf_t& tfactors, amrex::Real& rate, am 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) { +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 @@ -1211,9 +1528,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] @@ -1228,9 +1549,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] @@ -1245,9 +1570,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] @@ -1262,7 +1591,7 @@ 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) { +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 @@ -1277,9 +1606,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] @@ -1294,7 +1627,7 @@ 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) { +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 @@ -1309,9 +1642,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] @@ -1326,7 +1663,7 @@ 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) { +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 @@ -1341,9 +1678,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] @@ -1358,7 +1699,7 @@ 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_p_Fe54_to_Co55_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +void rate_p_Fe54_to_Co55_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Fe54 + p --> Co55 @@ -1373,9 +1714,13 @@ void rate_p_Fe54_to_Co55_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 36.2304 + -37.1544 * tfactors.T913i + 0.950364 * tfactors.T913 + -1.77529 * tfactors.T9 + 0.198562 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -37.1544 * tfactors.T943i + (1.0/3.0) * 0.950364 * tfactors.T923i + -1.77529 + (5.0/3.0) * 0.198562 * 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] @@ -1390,7 +1735,7 @@ void rate_p_Fe54_to_Co55_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Fe54_to_Ni58_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +void rate_He4_Fe54_to_Ni58_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Fe54 + He4 --> Ni58 @@ -1405,9 +1750,13 @@ void rate_He4_Fe54_to_Ni58_reaclib(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 60.2478 + -91.7628 * tfactors.T913i + 4.23027 * tfactors.T913 + -3.31305 * tfactors.T9 + 0.271293 * 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.7628 * tfactors.T943i + (1.0/3.0) * 4.23027 * tfactors.T923i + -3.31305 + (5.0/3.0) * 0.271293 * 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] @@ -1422,7 +1771,7 @@ void rate_He4_Fe54_to_Ni58_reaclib(const tf_t& tfactors, amrex::Real& rate, amre template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Fe56_to_Co57_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +void rate_p_Fe56_to_Co57_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Fe56 + p --> Co57 @@ -1437,9 +1786,13 @@ void rate_p_Fe56_to_Co57_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 36.0665 + -37.1625 * tfactors.T913i + 1.06776 * tfactors.T913 + -1.31689 * tfactors.T9 + 0.122089 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + -(1.0/3.0) * -37.1625 * tfactors.T943i + (1.0/3.0) * 1.06776 * tfactors.T923i + -1.31689 + (5.0/3.0) * 0.122089 * 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] @@ -1454,7 +1807,7 @@ void rate_p_Fe56_to_Co57_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_n_Co55_to_Co56_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +void rate_n_Co55_to_Co56_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Co55 + n --> Co56 @@ -1469,9 +1822,13 @@ void rate_n_Co55_to_Co56_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 17.065 + -1.86357 * tfactors.T913 + 0.616591 * tfactors.T9 + -0.0839313 * tfactors.T953; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + (1.0/3.0) * -1.86357 * tfactors.T923i + 0.616591 + (5.0/3.0) * -0.0839313 * tfactors.T923; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1486,7 +1843,7 @@ void rate_n_Co55_to_Co56_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_n_Co56_to_Co57_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +void rate_n_Co56_to_Co57_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Co56 + n --> Co57 @@ -1501,9 +1858,13 @@ void rate_n_Co56_to_Co57_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 17.3552 + -1.37855 * tfactors.T913 + 0.299896 * tfactors.T9 + -0.04382 * tfactors.T953; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + (1.0/3.0) * -1.37855 * tfactors.T923i + 0.299896 + (5.0/3.0) * -0.04382 * tfactors.T923; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1518,7 +1879,7 @@ void rate_n_Co56_to_Co57_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Co57_to_Ni58_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +void rate_p_Co57_to_Ni58_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Co57 + p --> Ni58 @@ -1533,9 +1894,13 @@ void rate_p_Co57_to_Ni58_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 36.0159 + -38.1133 * tfactors.T913i + 1.77414 * tfactors.T913 + -1.48268 * tfactors.T9 + 0.121073 * 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.1133 * tfactors.T943i + (1.0/3.0) * 1.77414 * tfactors.T923i + -1.48268 + (5.0/3.0) * 0.121073 * 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] @@ -1550,9 +1915,9 @@ void rate_p_Co57_to_Ni58_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Mn51_to_p_Fe54_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +void rate_p_Ni58_to_Cu59_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { - // Mn51 + He4 --> p + Fe54 + // Ni58 + p --> Cu59 rate = 0.0; drate_dT = 0.0; @@ -1561,13 +1926,17 @@ void rate_He4_Mn51_to_p_Fe54_reaclib(const tf_t& tfactors, amrex::Real& rate, am amrex::Real dln_set_rate_dT9{0.0}; amrex::Real set_rate{0.0}; - // ths8r - ln_set_rate = 62.2777 + -89.274 * tfactors.T913i + -0.862452 * tfactors.T913 - + -0.635672 * tfactors.T9 + 0.0196464 * tfactors.T953 + -0.666667 * tfactors.lnT9; + // si13n + ln_set_rate = 36.6662 + -39.0526 * tfactors.T913i + 1.0436 * tfactors.T913 + + -2.10834 * tfactors.T9 + 0.239559 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; if constexpr (do_T_derivatives) { - dln_set_rate_dT9 = + -(1.0/3.0) * -89.274 * tfactors.T943i + (1.0/3.0) * -0.862452 * tfactors.T923i - + -0.635672 + (5.0/3.0) * 0.0196464 * tfactors.T923 + -0.666667 * tfactors.T9i; + dln_set_rate_dT9 = + -(1.0/3.0) * -39.0526 * tfactors.T943i + (1.0/3.0) * 1.0436 * tfactors.T923i + + -2.10834 + (5.0/3.0) * 0.239559 * 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] @@ -1582,9 +1951,9 @@ void rate_He4_Mn51_to_p_Fe54_reaclib(const tf_t& tfactors, amrex::Real& rate, am template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_He4_Co55_to_p_Ni58_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +void rate_He4_Mn51_to_p_Fe54_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { - // Co55 + He4 --> p + Ni58 + // Mn51 + He4 --> p + Fe54 rate = 0.0; drate_dT = 0.0; @@ -1594,12 +1963,16 @@ void rate_He4_Co55_to_p_Ni58_reaclib(const tf_t& tfactors, amrex::Real& rate, am amrex::Real set_rate{0.0}; // ths8r - ln_set_rate = 60.2281 + -94.1404 * tfactors.T913i + 3.39179 * tfactors.T913 - + -1.71062 * tfactors.T9 + 0.133003 * tfactors.T953 + -0.666667 * tfactors.lnT9; + ln_set_rate = 62.2777 + -89.274 * tfactors.T913i + -0.862452 * tfactors.T913 + + -0.635672 * tfactors.T9 + 0.0196464 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; if constexpr (do_T_derivatives) { - dln_set_rate_dT9 = + -(1.0/3.0) * -94.1404 * tfactors.T943i + (1.0/3.0) * 3.39179 * tfactors.T923i - + -1.71062 + (5.0/3.0) * 0.133003 * tfactors.T923 + -0.666667 * tfactors.T9i; + dln_set_rate_dT9 = + -(1.0/3.0) * -89.274 * tfactors.T943i + (1.0/3.0) * -0.862452 * tfactors.T923i + + -0.635672 + (5.0/3.0) * 0.0196464 * 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] @@ -1614,9 +1987,9 @@ void rate_He4_Co55_to_p_Ni58_reaclib(const tf_t& tfactors, amrex::Real& rate, am template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_n_Co56_to_p_Fe56_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +void rate_He4_Co55_to_p_Ni58_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { - // Co56 + n --> p + Fe56 + // Co55 + He4 --> p + Ni58 rate = 0.0; drate_dT = 0.0; @@ -1626,12 +1999,52 @@ void rate_n_Co56_to_p_Fe56_reaclib(const tf_t& tfactors, amrex::Real& rate, amre amrex::Real set_rate{0.0}; // ths8r - ln_set_rate = 20.4539 + -1.13331 * tfactors.T913 - + 0.347185 * tfactors.T9 + -0.0328879 * tfactors.T953; - + ln_set_rate = 60.2281 + -94.1404 * tfactors.T913i + 3.39179 * tfactors.T913 + + -1.71062 * tfactors.T9 + 0.133003 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (do_T_derivatives) { + dln_set_rate_dT9 = + -(1.0/3.0) * -94.1404 * tfactors.T943i + (1.0/3.0) * 3.39179 * tfactors.T923i + + -1.71062 + (5.0/3.0) * 0.133003 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (do_T_derivatives) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + +} + +template +AMREX_GPU_HOST_DEVICE AMREX_INLINE +void rate_n_Co56_to_p_Fe56_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { + + // Co56 + n --> p + Fe56 + + rate = 0.0; + drate_dT = 0.0; + + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ths8r + ln_set_rate = 20.4539 + -1.13331 * tfactors.T913 + + 0.347185 * tfactors.T9 + -0.0328879 * tfactors.T953; + + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + (1.0/3.0) * -1.13331 * tfactors.T923i + 0.347185 + (5.0/3.0) * -0.0328879 * tfactors.T923; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1646,7 +2059,7 @@ void rate_n_Co56_to_p_Fe56_reaclib(const tf_t& tfactors, amrex::Real& rate, amre template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_p_Co57_to_He4_Fe54_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +void rate_p_Co57_to_He4_Fe54_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Co57 + p --> He4 + Fe54 @@ -1661,9 +2074,13 @@ void rate_p_Co57_to_He4_Fe54_reaclib(const tf_t& tfactors, amrex::Real& rate, am ln_set_rate = -2.1962 + -38.1133 * tfactors.T913i + 29.3541 * tfactors.T913 + -4.75966 * tfactors.T9 + 0.40418 * 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.1133 * tfactors.T943i + (1.0/3.0) * 29.3541 * tfactors.T923i + -4.75966 + (5.0/3.0) * 0.40418 * 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] @@ -1678,7 +2095,7 @@ void rate_p_Co57_to_He4_Fe54_reaclib(const tf_t& tfactors, amrex::Real& rate, am template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_n_Ni56_to_p_Co56_reaclib(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +void rate_n_Ni56_to_p_Co56_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Ni56 + n --> p + Co56 @@ -1693,9 +2110,49 @@ void rate_n_Ni56_to_p_Co56_reaclib(const tf_t& tfactors, amrex::Real& rate, amre ln_set_rate = 15.5693 + 1.76846 * tfactors.T913 + 0.197992 * tfactors.T9 + -0.017494 * tfactors.T953; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + (1.0/3.0) * 1.76846 * tfactors.T923i + 0.197992 + (5.0/3.0) * -0.017494 * tfactors.T923; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (do_T_derivatives) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + +} + +template +AMREX_GPU_HOST_DEVICE AMREX_INLINE +void rate_n_Cu59_to_He4_Co56_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { + + // Cu59 + n --> He4 + Co56 + + rate = 0.0; + drate_dT = 0.0; + + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ths8r + ln_set_rate = 11.0108 + -1.00882 * tfactors.T913 + + 1.88993 * tfactors.T9 + -0.202319 * tfactors.T953; + + ln_set_rate += log_scor; + + if constexpr (do_T_derivatives) { + dln_set_rate_dT9 = + (1.0/3.0) * -1.00882 * tfactors.T923i + + 1.88993 + (5.0/3.0) * -0.202319 * tfactors.T923; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -1710,7 +2167,7 @@ void rate_n_Ni56_to_p_Co56_reaclib(const tf_t& tfactors, amrex::Real& rate, amre 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) { +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 @@ -1725,9 +2182,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] @@ -1742,7 +2203,7 @@ 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) { +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 @@ -1757,9 +2218,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] @@ -1774,9 +2239,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] @@ -1791,9 +2260,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] @@ -1808,9 +2281,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] @@ -1825,7 +2302,7 @@ 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) { +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 @@ -1840,9 +2317,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] @@ -1857,9 +2338,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] @@ -1874,9 +2359,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] @@ -1891,9 +2380,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] @@ -1908,7 +2401,7 @@ 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) { +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 @@ -1923,9 +2416,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] @@ -1940,7 +2437,7 @@ 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) { +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 @@ -1955,9 +2452,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] @@ -1972,9 +2473,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] @@ -1989,9 +2494,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] @@ -2006,7 +2515,7 @@ 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) { +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 @@ -2021,9 +2530,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] @@ -2038,7 +2551,7 @@ 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) { +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 @@ -2053,9 +2566,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] @@ -2070,7 +2587,7 @@ 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) { +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 @@ -2085,9 +2602,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] @@ -2102,7 +2623,7 @@ 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) { +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 @@ -2117,9 +2638,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] @@ -2134,7 +2659,7 @@ 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) { +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 @@ -2149,9 +2674,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] @@ -2166,7 +2695,7 @@ 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) { +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 @@ -2181,9 +2710,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] @@ -2198,7 +2731,7 @@ 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) { +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 @@ -2213,9 +2746,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] @@ -2230,9 +2767,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] @@ -2247,9 +2788,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] @@ -2264,9 +2809,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] @@ -2281,7 +2830,7 @@ void rate_p_V47_to_Cr48_removed(const tf_t& tfactors, amrex::Real& rate, amrex:: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_n_Fe52_to_Fe53_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +void rate_n_Fe52_to_Fe53_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Fe52 + n --> Fe53 @@ -2296,9 +2845,13 @@ void rate_n_Fe52_to_Fe53_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 15.8885 + -0.344319 * tfactors.T913 + 0.178277 * tfactors.T9 + -0.0334326 * tfactors.T953; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + (1.0/3.0) * -0.344319 * tfactors.T923i + 0.178277 + (5.0/3.0) * -0.0334326 * tfactors.T923; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2313,7 +2866,7 @@ void rate_n_Fe52_to_Fe53_removed(const tf_t& tfactors, amrex::Real& rate, amrex: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_n_Fe53_to_Fe54_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +void rate_n_Fe53_to_Fe54_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Fe53 + n --> Fe54 @@ -2328,9 +2881,13 @@ void rate_n_Fe53_to_Fe54_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 16.4534 + -1.10421 * tfactors.T913 + 0.379905 * tfactors.T9 + -0.0581878 * tfactors.T953; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + (1.0/3.0) * -1.10421 * tfactors.T923i + 0.379905 + (5.0/3.0) * -0.0581878 * tfactors.T923; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2345,7 +2902,7 @@ void rate_n_Fe53_to_Fe54_removed(const tf_t& tfactors, amrex::Real& rate, amrex: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_n_Fe54_to_Fe55_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +void rate_n_Fe54_to_Fe55_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Fe54 + n --> Fe55 @@ -2360,9 +2917,13 @@ void rate_n_Fe54_to_Fe55_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = -0.80864 + 0.0591716 * tfactors.T9i + -8.66617 * tfactors.T913i + 26.4472 * tfactors.T913 + -1.9222 * tfactors.T9 + 0.0986404 * tfactors.T953 + -9.78317 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = -0.0591716 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -8.66617 * tfactors.T943i + (1.0/3.0) * 26.4472 * tfactors.T923i + -1.9222 + (5.0/3.0) * 0.0986404 * tfactors.T923 + -9.78317 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2377,7 +2938,7 @@ void rate_n_Fe54_to_Fe55_removed(const tf_t& tfactors, amrex::Real& rate, amrex: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_n_Fe55_to_Fe56_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +void rate_n_Fe55_to_Fe56_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Fe55 + n --> Fe56 @@ -2392,9 +2953,13 @@ void rate_n_Fe55_to_Fe56_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 21.7202 + -0.0955677 * tfactors.T9i + 8.06062 * tfactors.T913i + -14.4809 * tfactors.T913 + 0.94252 * tfactors.T9 + -0.0776007 * tfactors.T953 + 6.47093 * tfactors.lnT9; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = 0.0955677 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 8.06062 * tfactors.T943i + (1.0/3.0) * -14.4809 * tfactors.T923i + 0.94252 + (5.0/3.0) * -0.0776007 * tfactors.T923 + 6.47093 * tfactors.T9i; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2409,7 +2974,7 @@ void rate_n_Fe55_to_Fe56_removed(const tf_t& tfactors, amrex::Real& rate, amrex: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_n_Ni56_to_Ni57_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +void rate_n_Ni56_to_Ni57_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Ni56 + n --> Ni57 @@ -2424,9 +2989,13 @@ void rate_n_Ni56_to_Ni57_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 16.0765 + -1.19665 * tfactors.T913 + 0.507179 * tfactors.T9 + -0.074604 * tfactors.T953; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + (1.0/3.0) * -1.19665 * tfactors.T923i + 0.507179 + (5.0/3.0) * -0.074604 * tfactors.T923; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2441,7 +3010,7 @@ void rate_n_Ni56_to_Ni57_removed(const tf_t& tfactors, amrex::Real& rate, amrex: template AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_n_Ni57_to_Ni58_removed(const tf_t& tfactors, amrex::Real& rate, amrex::Real& drate_dT) { +void rate_n_Ni57_to_Ni58_reaclib(const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT, amrex::Real& rate, amrex::Real& drate_dT) { // Ni57 + n --> Ni58 @@ -2456,9 +3025,13 @@ void rate_n_Ni57_to_Ni58_removed(const tf_t& tfactors, amrex::Real& rate, amrex: ln_set_rate = 17.2731 + -1.90814 * tfactors.T913 + 0.493188 * tfactors.T9 + -0.0684633 * tfactors.T953; + ln_set_rate += log_scor; + if constexpr (do_T_derivatives) { dln_set_rate_dT9 = + (1.0/3.0) * -1.90814 * tfactors.T923i + 0.493188 + (5.0/3.0) * -0.0684633 * tfactors.T923; + + dln_set_rate_dT9 += dlog_scor_dT * 1.0e9_rt; } // avoid underflows by zeroing rates in [0.0, 1.e-100] @@ -2471,775 +3044,991 @@ void rate_n_Ni57_to_Ni58_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_Fe52_n_n_to_Fe54_approx(const T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y, amrex::Real& rate, amrex::Real& drate_dT) { - - amrex::Real Yn = Y(N); - amrex::Real r1_ng = rate_eval.screened_rates(k_n_Fe52_to_Fe53_removed); - amrex::Real r2_ng = rate_eval.screened_rates(k_n_Fe53_to_Fe54_removed); - amrex::Real r1_gn = rate_eval.screened_rates(k_Fe53_to_n_Fe52_removed); - amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); - rate = r1_ng * r2_ng * dd; - if constexpr (std::is_same_v) { - amrex::Real dr1dT_ng = rate_eval.dscreened_rates_dT(k_n_Fe52_to_Fe53_removed); - amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_n_Fe53_to_Fe54_removed); - amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Fe53_to_n_Fe52_removed); - drate_dT = dr1dT_ng * r2_ng * dd + r1_ng * dr2dT_ng * dd - r1_ng * r2_ng * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); - } -} - -template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Fe54_to_Fe52_n_n_approx(const T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y, amrex::Real& rate, amrex::Real& drate_dT) { - - amrex::Real Yn = Y(N); - amrex::Real r1_gn = rate_eval.screened_rates(k_Fe53_to_n_Fe52_removed); - amrex::Real r2_gn = rate_eval.screened_rates(k_Fe54_to_n_Fe53_removed); - amrex::Real r2_ng = rate_eval.screened_rates(k_n_Fe53_to_Fe54_removed); - amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); - rate = r1_gn * r2_gn * dd; - if constexpr (std::is_same_v) { - amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Fe53_to_n_Fe52_removed); - amrex::Real dr2dT_gn = rate_eval.dscreened_rates_dT(k_Fe54_to_n_Fe53_removed); - amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_n_Fe53_to_Fe54_removed); - drate_dT = dr1dT_gn * r2_gn * dd + r1_gn * dr2dT_gn * dd - r1_gn * r2_gn * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); - } -} - -template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Fe54_n_n_to_Fe56_approx(const T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y, amrex::Real& rate, amrex::Real& drate_dT) { - - amrex::Real Yn = Y(N); - amrex::Real r1_ng = rate_eval.screened_rates(k_n_Fe54_to_Fe55_removed); - amrex::Real r2_ng = rate_eval.screened_rates(k_n_Fe55_to_Fe56_removed); - amrex::Real r1_gn = rate_eval.screened_rates(k_Fe55_to_n_Fe54_removed); - amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); - rate = r1_ng * r2_ng * dd; - if constexpr (std::is_same_v) { - amrex::Real dr1dT_ng = rate_eval.dscreened_rates_dT(k_n_Fe54_to_Fe55_removed); - amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_n_Fe55_to_Fe56_removed); - amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Fe55_to_n_Fe54_removed); - drate_dT = dr1dT_ng * r2_ng * dd + r1_ng * dr2dT_ng * dd - r1_ng * r2_ng * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); - } -} - -template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Fe56_to_Fe54_n_n_approx(const T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y, amrex::Real& rate, amrex::Real& drate_dT) { - - amrex::Real Yn = Y(N); - amrex::Real r1_gn = rate_eval.screened_rates(k_Fe55_to_n_Fe54_removed); - amrex::Real r2_gn = rate_eval.screened_rates(k_Fe56_to_n_Fe55_removed); - amrex::Real r2_ng = rate_eval.screened_rates(k_n_Fe55_to_Fe56_removed); - amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); - rate = r1_gn * r2_gn * dd; - if constexpr (std::is_same_v) { - amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Fe55_to_n_Fe54_removed); - amrex::Real dr2dT_gn = rate_eval.dscreened_rates_dT(k_Fe56_to_n_Fe55_removed); - amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_n_Fe55_to_Fe56_removed); - drate_dT = dr1dT_gn * r2_gn * dd + r1_gn * dr2dT_gn * dd - r1_gn * r2_gn * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); - } -} - -template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ni56_n_n_to_Ni58_approx(const T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y, amrex::Real& rate, amrex::Real& drate_dT) { - - amrex::Real Yn = Y(N); - amrex::Real r1_ng = rate_eval.screened_rates(k_n_Ni56_to_Ni57_removed); - amrex::Real r2_ng = rate_eval.screened_rates(k_n_Ni57_to_Ni58_removed); - amrex::Real r1_gn = rate_eval.screened_rates(k_Ni57_to_n_Ni56_removed); - amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); - rate = r1_ng * r2_ng * dd; - if constexpr (std::is_same_v) { - amrex::Real dr1dT_ng = rate_eval.dscreened_rates_dT(k_n_Ni56_to_Ni57_removed); - amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_n_Ni57_to_Ni58_removed); - amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Ni57_to_n_Ni56_removed); - drate_dT = dr1dT_ng * r2_ng * dd + r1_ng * dr2dT_ng * dd - r1_ng * r2_ng * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); - } -} - -template -AMREX_GPU_HOST_DEVICE AMREX_INLINE -void rate_Ni58_to_Ni56_n_n_approx(const T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y, amrex::Real& rate, amrex::Real& drate_dT) { - - amrex::Real Yn = Y(N); - amrex::Real r1_gn = rate_eval.screened_rates(k_Ni57_to_n_Ni56_removed); - amrex::Real r2_gn = rate_eval.screened_rates(k_Ni58_to_n_Ni57_removed); - amrex::Real r2_ng = rate_eval.screened_rates(k_n_Ni57_to_Ni58_removed); - amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); - rate = r1_gn * r2_gn * dd; - if constexpr (std::is_same_v) { - amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Ni57_to_n_Ni56_removed); - amrex::Real dr2dT_gn = rate_eval.dscreened_rates_dT(k_Ni58_to_n_Ni57_removed); - amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_n_Ni57_to_Ni58_removed); - drate_dT = dr1dT_gn * r2_gn * dd + r1_gn * dr2dT_gn * dd - r1_gn * r2_gn * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); - } -} - 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; - - 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_He4_Cr48_to_Fe52_reaclib(tfactors, 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; - - } - rate_p_Mn51_to_Fe52_reaclib(tfactors, 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; - - } - rate_He4_Mn51_to_Co55_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_He4_Mn51_to_Co55_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Mn51_to_Co55_reaclib) = drate_dT; - - } - rate_He4_Fe52_to_Ni56_reaclib(tfactors, 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; - - } - rate_p_Co55_to_Ni56_reaclib(tfactors, 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_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_Cr48_to_p_Mn51_reaclib(tfactors, 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; - - } - rate_He4_Fe52_to_p_Co55_reaclib(tfactors, 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; - - } - 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_p_Fe54_to_Co55_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_p_Fe54_to_Co55_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_Fe54_to_Co55_reaclib) = drate_dT; - - } - rate_He4_Fe54_to_Ni58_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_He4_Fe54_to_Ni58_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Fe54_to_Ni58_reaclib) = drate_dT; - - } - rate_p_Fe56_to_Co57_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_p_Fe56_to_Co57_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_Fe56_to_Co57_reaclib) = drate_dT; - - } - rate_n_Co55_to_Co56_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_n_Co55_to_Co56_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_n_Co55_to_Co56_reaclib) = drate_dT; - - } - rate_n_Co56_to_Co57_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_n_Co56_to_Co57_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_n_Co56_to_Co57_reaclib) = drate_dT; - - } - rate_p_Co57_to_Ni58_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_p_Co57_to_Ni58_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_Co57_to_Ni58_reaclib) = drate_dT; - - } - rate_He4_Mn51_to_p_Fe54_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_He4_Mn51_to_p_Fe54_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Mn51_to_p_Fe54_reaclib) = drate_dT; - - } - rate_He4_Co55_to_p_Ni58_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_He4_Co55_to_p_Ni58_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_He4_Co55_to_p_Ni58_reaclib) = drate_dT; - - } - rate_n_Co56_to_p_Fe56_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_n_Co56_to_p_Fe56_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_n_Co56_to_p_Fe56_reaclib) = drate_dT; - - } - rate_p_Co57_to_He4_Fe54_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_p_Co57_to_He4_Fe54_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_p_Co57_to_He4_Fe54_reaclib) = drate_dT; - - } - rate_n_Ni56_to_p_Co56_reaclib(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_n_Ni56_to_p_Co56_reaclib) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_n_Ni56_to_p_Co56_reaclib) = 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_n_Fe52_to_Fe53_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_n_Fe52_to_Fe53_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_n_Fe52_to_Fe53_removed) = drate_dT; - - } - rate_n_Fe53_to_Fe54_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_n_Fe53_to_Fe54_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_n_Fe53_to_Fe54_removed) = drate_dT; - - } - rate_n_Fe54_to_Fe55_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_n_Fe54_to_Fe55_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_n_Fe54_to_Fe55_removed) = drate_dT; - - } - rate_n_Fe55_to_Fe56_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_n_Fe55_to_Fe56_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_n_Fe55_to_Fe56_removed) = drate_dT; - - } - rate_n_Ni56_to_Ni57_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_n_Ni56_to_Ni57_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_n_Ni56_to_Ni57_removed) = drate_dT; - - } - rate_n_Ni57_to_Ni58_removed(tfactors, rate, drate_dT); - rate_eval.screened_rates(k_n_Ni57_to_Ni58_removed) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_n_Ni57_to_Ni58_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_Fe52_n_n_to_Fe54_approx(rate_eval, rho, Y, rate, drate_dT); - rate_eval.screened_rates(k_Fe52_n_n_to_Fe54_approx) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Fe52_n_n_to_Fe54_approx) = drate_dT; - - } - rate_Fe54_to_Fe52_n_n_approx(rate_eval, rho, Y, rate, drate_dT); - rate_eval.screened_rates(k_Fe54_to_Fe52_n_n_approx) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Fe54_to_Fe52_n_n_approx) = drate_dT; - - } - rate_Fe54_n_n_to_Fe56_approx(rate_eval, rho, Y, rate, drate_dT); - rate_eval.screened_rates(k_Fe54_n_n_to_Fe56_approx) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Fe54_n_n_to_Fe56_approx) = drate_dT; - - } - rate_Fe56_to_Fe54_n_n_approx(rate_eval, rho, Y, rate, drate_dT); - rate_eval.screened_rates(k_Fe56_to_Fe54_n_n_approx) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Fe56_to_Fe54_n_n_approx) = drate_dT; - - } - rate_Ni56_n_n_to_Ni58_approx(rate_eval, rho, Y, rate, drate_dT); - rate_eval.screened_rates(k_Ni56_n_n_to_Ni58_approx) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Ni56_n_n_to_Ni58_approx) = drate_dT; - + [[maybe_unused]] amrex::Real rate; + [[maybe_unused]] amrex::Real drate_dT; + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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_Mn51); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Mn51); + } +#endif + rate_He4_Mn51_to_Co55_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_He4_Mn51_to_Co55_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Mn51_to_Co55_reaclib) = drate_dT; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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_Co55); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Co55); + } +#endif + rate_He4_Co55_to_Cu59_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_He4_Co55_to_Cu59_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Co55_to_Cu59_reaclib) = drate_dT; + } + } + + { + 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_Ni56); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ni56); + } +#endif + rate_He4_Ni56_to_Zn60_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_He4_Ni56_to_Zn60_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Ni56_to_Zn60_reaclib) = drate_dT; + } + } + + { + 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_Cu59); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Cu59); + } +#endif + rate_p_Cu59_to_Zn60_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_p_Cu59_to_Zn60_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Cu59_to_Zn60_reaclib) = drate_dT; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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_Cu59); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Cu59); + } +#endif + rate_p_Cu59_to_He4_Ni56_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_p_Cu59_to_He4_Ni56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Cu59_to_He4_Ni56_reaclib) = drate_dT; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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_Fe54); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Fe54); + } +#endif + rate_p_Fe54_to_Co55_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_p_Fe54_to_Co55_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Fe54_to_Co55_reaclib) = drate_dT; + } + } + + { + 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_Fe54); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Fe54); + } +#endif + rate_He4_Fe54_to_Ni58_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_He4_Fe54_to_Ni58_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Fe54_to_Ni58_reaclib) = drate_dT; + } + } + + { + 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_Fe56); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Fe56); + } +#endif + rate_p_Fe56_to_Co57_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_p_Fe56_to_Co57_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Fe56_to_Co57_reaclib) = drate_dT; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_n_Co55_to_Co56_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_n_Co55_to_Co56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_n_Co55_to_Co56_reaclib) = drate_dT; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_n_Co56_to_Co57_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_n_Co56_to_Co57_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_n_Co56_to_Co57_reaclib) = drate_dT; + } + } + + { + 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_Co57); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Co57); + } +#endif + rate_p_Co57_to_Ni58_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_p_Co57_to_Ni58_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Co57_to_Ni58_reaclib) = drate_dT; + } + } + + { + 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_Ni58); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Ni58); + } +#endif + rate_p_Ni58_to_Cu59_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_p_Ni58_to_Cu59_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Ni58_to_Cu59_reaclib) = drate_dT; + } + } + + { + 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_Mn51); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Mn51); + } +#endif + rate_He4_Mn51_to_p_Fe54_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_He4_Mn51_to_p_Fe54_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Mn51_to_p_Fe54_reaclib) = drate_dT; + } + } + + { + 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_Co55); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Co55); + } +#endif + rate_He4_Co55_to_p_Ni58_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_He4_Co55_to_p_Ni58_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_He4_Co55_to_p_Ni58_reaclib) = drate_dT; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_n_Co56_to_p_Fe56_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_n_Co56_to_p_Fe56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_n_Co56_to_p_Fe56_reaclib) = drate_dT; + } + } + + { + 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_Co57); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Co57); + } +#endif + rate_p_Co57_to_He4_Fe54_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_p_Co57_to_He4_Fe54_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_Co57_to_He4_Fe54_reaclib) = drate_dT; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_n_Ni56_to_p_Co56_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_n_Ni56_to_p_Co56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_n_Ni56_to_p_Co56_reaclib) = drate_dT; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_n_Cu59_to_He4_Co56_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_n_Cu59_to_He4_Co56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_n_Cu59_to_He4_Co56_reaclib) = drate_dT; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + 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; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_n_Fe52_to_Fe53_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_n_Fe52_to_Fe53_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_n_Fe52_to_Fe53_reaclib) = drate_dT; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_n_Fe53_to_Fe54_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_n_Fe53_to_Fe54_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_n_Fe53_to_Fe54_reaclib) = drate_dT; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_n_Fe54_to_Fe55_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_n_Fe54_to_Fe55_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_n_Fe54_to_Fe55_reaclib) = drate_dT; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_n_Fe55_to_Fe56_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_n_Fe55_to_Fe56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_n_Fe55_to_Fe56_reaclib) = drate_dT; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_n_Ni56_to_Ni57_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_n_Ni56_to_Ni57_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_n_Ni56_to_Ni57_reaclib) = drate_dT; + } + } + + { + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; + rate_n_Ni57_to_Ni58_reaclib(tfactors, log_scor, dlog_scor_dT, rate, drate_dT); + rate_eval.screened_rates(k_n_Ni57_to_Ni58_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_n_Ni57_to_Ni58_reaclib) = drate_dT; + } } - rate_Ni58_to_Ni56_n_n_approx(rate_eval, rho, Y, rate, drate_dT); - rate_eval.screened_rates(k_Ni58_to_Ni56_n_n_approx) = rate; - if constexpr (std::is_same_v) { - rate_eval.dscreened_rates_dT(k_Ni58_to_Ni56_n_n_approx) = drate_dT; - } } diff --git a/networks/he-burn/ase-iron/temperature_table_rates.H b/networks/he-burn/ase-iron/temperature_table_rates.H index 4fdd0d89c..849033267 100644 --- a/networks/he-burn/ase-iron/temperature_table_rates.H +++ b/networks/he-burn/ase-iron/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; + }