diff --git a/Docs/source/networks.rst b/Docs/source/networks.rst index fb486f2cf5..c5d26d528f 100644 --- a/Docs/source/networks.rst +++ b/Docs/source/networks.rst @@ -554,6 +554,30 @@ of (Graboske 1973) for weak screening and the work of (Alastuey 1978 and Itoh 1979) for strong screening. +Massive star networks +===================== + +``massive-star-medium`` +----------------------- + +This is a network that tries to better capture O and Si burning for +massive star convection leading up to core-collapse (as compared to +``aprox21``). It has 54 nuclei (+ 23 more nuclei approximated out, +mostly via the double-n capture approximation) and 322 rates +explicitly connecting the nuclei. + +.. figure:: ../../networks/massive-star-medium/massive-star-medium.png + :align: center + +The highlighted links in the figure above are the tabulated weak rates +included. + +.. note:: + + We do not model H burning here, since we assume we are in the very late + stages of evolution and are focused on the convective burning shells + near the core. + ``powerlaw`` ============ diff --git a/networks/massive-star-medium/Make.package b/networks/massive-star-medium/Make.package new file mode 100644 index 0000000000..39fe599756 --- /dev/null +++ b/networks/massive-star-medium/Make.package @@ -0,0 +1,23 @@ +PYNUCASTRO_NETWORK = TRUE +CEXE_headers += network_properties.H + +ifeq ($(USE_REACT),TRUE) + 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 += fill_rates.H + CEXE_headers += rate_type.H + CEXE_headers += reaclib_rates.H + CEXE_headers += approximate_rates.H + CEXE_headers += beta_limited_rates.H + CEXE_headers += branched_rates.H + CEXE_headers += modified_rates.H + CEXE_headers += table_rates.H + CEXE_headers += temperature_table_rates.H + CEXE_headers += tabular_weak_rates.H + CEXE_headers += derived_rates.H + USE_SCREENING = TRUE + USE_NEUTRINOS = TRUE +endif diff --git a/networks/massive-star-medium/_parameters b/networks/massive-star-medium/_parameters new file mode 100644 index 0000000000..e7a017d5aa --- /dev/null +++ b/networks/massive-star-medium/_parameters @@ -0,0 +1,2 @@ +@namespace: network + diff --git a/networks/massive-star-medium/actual_network.H b/networks/massive-star-medium/actual_network.H new file mode 100644 index 0000000000..e303968ee5 --- /dev/null +++ b/networks/massive-star-medium/actual_network.H @@ -0,0 +1,1674 @@ +#ifndef ACTUAL_NETWORK_H +#define ACTUAL_NETWORK_H + +#include +#include + +#include +#include +#include + +#include +#include +#include + +using namespace amrex::literals; + + +inline +void actual_network_init() { + + +} + +constexpr std::string_view network_name = "pynucastro-cxx"; + +namespace network +{ + + template + AMREX_GPU_HOST_DEVICE AMREX_INLINE + constexpr amrex::Real bion () { + using namespace Species; + + static_assert(spec >= 1 && spec <= NumSpec); + + // Set the binding energy of the element + + if constexpr (spec == N) { + return 0.0_rt; + } + else if constexpr (spec == H1) { + return 0.0_rt; + } + else if constexpr (spec == He4) { + return 28.295662457999697_rt; + } + else if constexpr (spec == C12) { + return 92.16173498399803_rt; + } + else if constexpr (spec == O16) { + return 127.6193154119992_rt; + } + else if constexpr (spec == Ne20) { + return 160.64482384000075_rt; + } + else if constexpr (spec == Mg23) { + return 181.7258218679999_rt; + } + else if constexpr (spec == Mg24) { + return 198.2570479679962_rt; + } + else if constexpr (spec == Al27) { + return 224.95193723199915_rt; + } + else if constexpr (spec == Si27) { + return 219.3572401960009_rt; + } + else if constexpr (spec == Si28) { + return 236.53684539599638_rt; + } + else if constexpr (spec == Si29) { + return 245.01044789599834_rt; + } + else if constexpr (spec == Si30) { + return 255.61964649599756_rt; + } + else if constexpr (spec == Si31) { + return 262.207042596001_rt; + } + else if constexpr (spec == P29) { + return 239.28581936000046_rt; + } + else if constexpr (spec == P31) { + return 262.9161999600037_rt; + } + else if constexpr (spec == P33) { + return 280.95569175999844_rt; + } + else if constexpr (spec == S32) { + return 271.78016372399725_rt; + } + else if constexpr (spec == S33) { + return 280.42180302400084_rt; + } + else if constexpr (spec == S34) { + return 291.83895282400044_rt; + } + else if constexpr (spec == S35) { + return 298.8247909240017_rt; + } + else if constexpr (spec == Cl33) { + return 274.05689768799857_rt; + } + else if constexpr (spec == Cl35) { + return 298.20976388800045_rt; + } + else if constexpr (spec == Cl37) { + return 317.10042008799786_rt; + } + else if constexpr (spec == Ar36) { + return 306.7167469519991_rt; + } + else if constexpr (spec == Ar37) { + return 315.50420305199077_rt; + } + else if constexpr (spec == Ar38) { + return 327.3426711519933_rt; + } + else if constexpr (spec == K37) { + return 308.5743760159967_rt; + } + else if constexpr (spec == K39) { + return 333.7240072160057_rt; + } + else if constexpr (spec == Ca40) { + return 342.05218528000114_rt; + } + else if constexpr (spec == Ca42) { + return 361.8957094799989_rt; + } + else if constexpr (spec == Sc41) { + return 343.1371143439974_rt; + } + else if constexpr (spec == Sc43) { + return 366.82549054399715_rt; + } + else if constexpr (spec == Sc45) { + return 387.8523267439959_rt; + } + else if constexpr (spec == Ti44) { + return 375.47496160800074_rt; + } + else if constexpr (spec == Ti46) { + return 398.19726780800556_rt; + } + else if constexpr (spec == Ti48) { + return 418.70458400799544_rt; + } + else if constexpr (spec == V47) { + return 403.3650388719979_rt; + } + else if constexpr (spec == V49) { + return 425.4628050719984_rt; + } + else if constexpr (spec == V51) { + return 445.84635127200454_rt; + } + else if constexpr (spec == Cr48) { + return 411.4679399359957_rt; + } + else if constexpr (spec == Cr50) { + return 435.0509361359945_rt; + } + else if constexpr (spec == Cr52) { + return 456.35172233599593_rt; + } + else if constexpr (spec == Cr54) { + return 474.01022853599716_rt; + } + else if constexpr (spec == Mn51) { + return 440.321747199996_rt; + } + else if constexpr (spec == Mn53) { + return 462.9114833999993_rt; + } + else if constexpr (spec == Mn55) { + return 482.07635959999607_rt; + } + else if constexpr (spec == Fe52) { + return 447.6996182639923_rt; + } + else if constexpr (spec == Fe54) { + return 471.76475446399854_rt; + } + else if constexpr (spec == Fe56) { + return 492.2599506639962_rt; + } + else if constexpr (spec == Fe58) { + return 509.9507268639936_rt; + } + else if constexpr (spec == Co55) { + return 476.82912552799826_rt; + } + else if constexpr (spec == Co56) { + return 486.91094362799777_rt; + } + else if constexpr (spec == Co57) { + return 498.28746172798856_rt; + } + else if constexpr (spec == Co59) { + return 517.3141979280044_rt; + } + else if constexpr (spec == Ni56) { + return 483.9956965919919_rt; + } + else if constexpr (spec == Ni58) { + return 506.4596327920008_rt; + } + else if constexpr (spec == Ni60) { + return 526.8465689919976_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. + return 0.0_rt; + } + + template + AMREX_GPU_HOST_DEVICE AMREX_INLINE + constexpr amrex::Real mion () { + using namespace Species; + + static_assert(spec >= 1 && spec <= NumSpec); + + // Set the mass of the element + + if constexpr (spec == N) { + return 1.674927498034172e-24_rt; + } + else if constexpr (spec == H1) { + return 1.6735328377636005e-24_rt; + } + else if constexpr (spec == He4) { + return 6.646479071584587e-24_rt; + } + else if constexpr (spec == C12) { + return 1.99264687992e-23_rt; + } + else if constexpr (spec == O16) { + return 2.6560180592333686e-23_rt; + } + else if constexpr (spec == Ne20) { + return 3.3198227947612416e-23_rt; + } + else if constexpr (spec == Mg23) { + return 3.8182640828719474e-23_rt; + } + else if constexpr (spec == Mg24) { + return 3.9828098739467446e-23_rt; + } + else if constexpr (spec == Al27) { + return 4.480389861070653e-23_rt; + } + else if constexpr (spec == Si27) { + return 4.4812477403805044e-23_rt; + } + else if constexpr (spec == Si28) { + return 4.6456779473820677e-23_rt; + } + else if constexpr (spec == Si29) { + return 4.811660140333913e-23_rt; + } + else if constexpr (spec == Si30) { + return 4.977261628701015e-23_rt; + } + else if constexpr (spec == Si31) { + return 5.143580068485421e-23_rt; + } + else if constexpr (spec == P29) { + return 4.812541182037512e-23_rt; + } + else if constexpr (spec == P31) { + return 5.14331418367544e-23_rt; + } + else if constexpr (spec == P33) { + return 5.475083851770546e-23_rt; + } + else if constexpr (spec == S32) { + return 5.309087322384128e-23_rt; + } + else if constexpr (spec == S33) { + return 5.475039560055494e-23_rt; + } + else if constexpr (spec == S34) { + return 5.64049701803872e-23_rt; + } + else if constexpr (spec == S35) { + return 5.806744429084988e-23_rt; + } + else if constexpr (spec == Cl33) { + return 5.476034741466158e-23_rt; + } + else if constexpr (spec == Cl35) { + return 5.806714601585715e-23_rt; + } + else if constexpr (spec == Cl37) { + return 6.13833253584433e-23_rt; + } + else if constexpr (spec == Ar36) { + return 5.972551377884467e-23_rt; + } + else if constexpr (spec == Ar37) { + return 6.138477621350144e-23_rt; + } + else if constexpr (spec == Ar38) { + return 6.303859972524341e-23_rt; + } + else if constexpr (spec == K37) { + return 6.139573509201139e-23_rt; + } + else if constexpr (spec == K39) { + return 6.470075679819664e-23_rt; + } + else if constexpr (spec == Ca40) { + return 6.635944331004904e-23_rt; + } + else if constexpr (spec == Ca42) { + return 6.967392401113526e-23_rt; + } + else if constexpr (spec == Sc41) { + return 6.80310420860826e-23_rt; + } + else if constexpr (spec == Sc43) { + return 7.133866871591414e-23_rt; + } + else if constexpr (spec == Sc45) { + return 7.465103997175656e-23_rt; + } + else if constexpr (spec == Ti44) { + return 7.299678247096977e-23_rt; + } + else if constexpr (spec == Ti46) { + return 7.630613127700392e-23_rt; + } + else if constexpr (spec == Ti48) { + return 7.961942866136786e-23_rt; + } + else if constexpr (spec == V47) { + return 7.797045172607207e-23_rt; + } + else if constexpr (spec == V49) { + return 8.128091387578276e-23_rt; + } + else if constexpr (spec == V51) { + return 8.459443190021272e-23_rt; + } + else if constexpr (spec == Cr48) { + return 7.962953983065421e-23_rt; + } + else if constexpr (spec == Cr50) { + return 8.293735431739904e-23_rt; + } + else if constexpr (spec == Cr52) { + return 8.624923721300802e-23_rt; + } + else if constexpr (spec == Cr54) { + return 8.956761306248089e-23_rt; + } + else if constexpr (spec == Mn51) { + return 8.460149108098279e-23_rt; + } + else if constexpr (spec == Mn53) { + return 8.79110762145079e-23_rt; + } + else if constexpr (spec == Mn55) { + return 9.122676671554189e-23_rt; + } + else if constexpr (spec == Fe52) { + return 8.626187166893794e-23_rt; + } + else if constexpr (spec == Fe54) { + return 8.95688266630639e-23_rt; + } + else if constexpr (spec == Fe56) { + return 9.288214565329033e-23_rt; + } + else if constexpr (spec == Fe58) { + return 9.620046397626297e-23_rt; + } + else if constexpr (spec == Co55) { + return 9.123333143937473e-23_rt; + } + else if constexpr (spec == Co56) { + return 9.289028646418131e-23_rt; + } + else if constexpr (spec == Co57) { + return 9.454493347659797e-23_rt; + } + else if constexpr (spec == Co59) { + return 9.786087023454982e-23_rt; + } + else if constexpr (spec == Ni56) { + return 9.289408870379396e-23_rt; + } + else if constexpr (spec == Ni58) { + return 9.620389809618879e-23_rt; + } + else if constexpr (spec == Ni60) { + return 9.951741007739486e-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. + return 0.0_rt; + } + + // Legacy (non-templated) interfaces + + AMREX_GPU_HOST_DEVICE AMREX_INLINE + amrex::Real bion (int spec) { + using namespace Species; + + amrex::Real b = 0.0_rt; + + // Set the binding energy of the element + amrex::constexpr_for<1, NumSpec+1>([&] (auto n) { + if (n == spec) { + b = bion(); + } + }); + + return b; + } + + AMREX_GPU_HOST_DEVICE AMREX_INLINE + amrex::Real mion (int spec) { + using namespace Species; + + amrex::Real m = 0.0_rt; + + amrex::constexpr_for<1, NumSpec+1>([&] (auto n) { + if (n == spec) { + m = mion(); + } + }); + + return m; + } +} + +namespace Rates +{ + + enum NetworkRates : + std::uint16_t + { + k_O16_to_He4_C12_reaclib = 1, + k_Ne20_to_He4_O16_reaclib = 2, + k_Mg24_to_n_Mg23_reaclib = 3, + k_Si27_to_He4_Mg23_reaclib = 4, + k_Si28_to_n_Si27_reaclib = 5, + k_Si28_to_p_Al27_reaclib = 6, + k_Si28_to_He4_Mg24_reaclib = 7, + k_Si29_to_n_Si28_reaclib = 8, + k_Si30_to_n_Si29_reaclib = 9, + k_Si31_to_n_Si30_reaclib = 10, + k_P29_to_p_Si28_reaclib = 11, + k_P31_to_p_Si30_reaclib = 12, + k_P31_to_He4_Al27_reaclib = 13, + k_S32_to_p_P31_reaclib = 14, + k_S32_to_He4_Si28_reaclib = 15, + k_S33_to_n_S32_reaclib = 16, + k_S33_to_He4_Si29_reaclib = 17, + k_S34_to_n_S33_reaclib = 18, + k_S34_to_p_P33_reaclib = 19, + k_S34_to_He4_Si30_reaclib = 20, + k_S35_to_n_S34_reaclib = 21, + k_S35_to_He4_Si31_reaclib = 22, + k_Cl33_to_p_S32_reaclib = 23, + k_Cl33_to_He4_P29_reaclib = 24, + k_Cl35_to_p_S34_reaclib = 25, + k_Cl35_to_He4_P31_reaclib = 26, + k_Cl37_to_He4_P33_reaclib = 27, + k_Ar36_to_p_Cl35_reaclib = 28, + k_Ar36_to_He4_S32_reaclib = 29, + k_Ar37_to_n_Ar36_reaclib = 30, + k_Ar37_to_He4_S33_reaclib = 31, + k_Ar38_to_n_Ar37_reaclib = 32, + k_Ar38_to_p_Cl37_reaclib = 33, + k_Ar38_to_He4_S34_reaclib = 34, + k_K37_to_p_Ar36_reaclib = 35, + k_K37_to_He4_Cl33_reaclib = 36, + k_K39_to_p_Ar38_reaclib = 37, + k_K39_to_He4_Cl35_reaclib = 38, + k_Ca40_to_p_K39_reaclib = 39, + k_Ca40_to_He4_Ar36_reaclib = 40, + k_Ca42_to_He4_Ar38_reaclib = 41, + k_Sc41_to_p_Ca40_reaclib = 42, + k_Sc41_to_He4_K37_reaclib = 43, + k_Sc43_to_p_Ca42_reaclib = 44, + k_Sc43_to_He4_K39_reaclib = 45, + k_Ti44_to_p_Sc43_reaclib = 46, + k_Ti44_to_He4_Ca40_reaclib = 47, + k_Ti46_to_p_Sc45_reaclib = 48, + k_Ti46_to_He4_Ca42_reaclib = 49, + k_V47_to_p_Ti46_reaclib = 50, + k_V47_to_He4_Sc43_reaclib = 51, + k_V49_to_p_Ti48_reaclib = 52, + k_V49_to_He4_Sc45_reaclib = 53, + k_Cr48_to_p_V47_reaclib = 54, + k_Cr48_to_He4_Ti44_reaclib = 55, + k_Cr50_to_p_V49_reaclib = 56, + k_Cr50_to_He4_Ti46_reaclib = 57, + k_Cr52_to_p_V51_reaclib = 58, + k_Cr52_to_He4_Ti48_reaclib = 59, + k_Mn51_to_p_Cr50_reaclib = 60, + k_Mn51_to_He4_V47_reaclib = 61, + k_Mn53_to_p_Cr52_reaclib = 62, + k_Mn53_to_He4_V49_reaclib = 63, + k_Mn55_to_p_Cr54_reaclib = 64, + k_Mn55_to_He4_V51_reaclib = 65, + k_Fe52_to_p_Mn51_reaclib = 66, + k_Fe52_to_He4_Cr48_reaclib = 67, + k_Fe54_to_p_Mn53_reaclib = 68, + k_Fe54_to_He4_Cr50_reaclib = 69, + k_Fe56_to_p_Mn55_reaclib = 70, + k_Fe56_to_He4_Cr52_reaclib = 71, + k_Fe58_to_He4_Cr54_reaclib = 72, + k_Co55_to_p_Fe54_reaclib = 73, + k_Co55_to_He4_Mn51_reaclib = 74, + k_Co56_to_n_Co55_reaclib = 75, + k_Co57_to_n_Co56_reaclib = 76, + k_Co57_to_p_Fe56_reaclib = 77, + k_Co57_to_He4_Mn53_reaclib = 78, + k_Co59_to_p_Fe58_reaclib = 79, + k_Co59_to_He4_Mn55_reaclib = 80, + k_Ni56_to_p_Co55_reaclib = 81, + k_Ni56_to_He4_Fe52_reaclib = 82, + k_Ni58_to_p_Co57_reaclib = 83, + k_Ni58_to_He4_Fe54_reaclib = 84, + k_Ni60_to_p_Co59_reaclib = 85, + k_Ni60_to_He4_Fe56_reaclib = 86, + k_Cu59_to_p_Ni58_reaclib = 87, + k_Cu59_to_He4_Co55_reaclib = 88, + k_Zn60_to_p_Cu59_reaclib = 89, + k_Zn60_to_He4_Ni56_reaclib = 90, + k_C12_to_3He4_reaclib = 91, + k_C12_He4_to_O16_reaclib = 92, + k_O16_He4_to_Ne20_reaclib = 93, + k_Mg23_n_to_Mg24_reaclib = 94, + k_Mg23_He4_to_Si27_reaclib = 95, + k_Mg24_He4_to_Si28_reaclib = 96, + k_Al27_p_to_Si28_reaclib = 97, + k_Al27_He4_to_P31_reaclib = 98, + k_Si27_n_to_Si28_reaclib = 99, + k_Si28_n_to_Si29_reaclib = 100, + k_Si28_p_to_P29_reaclib = 101, + k_Si28_He4_to_S32_reaclib = 102, + k_Si29_n_to_Si30_reaclib = 103, + k_Si29_He4_to_S33_reaclib = 104, + k_Si30_n_to_Si31_reaclib = 105, + k_Si30_p_to_P31_reaclib = 106, + k_Si30_He4_to_S34_reaclib = 107, + k_Si31_He4_to_S35_reaclib = 108, + k_P29_He4_to_Cl33_reaclib = 109, + k_P31_p_to_S32_reaclib = 110, + k_P31_He4_to_Cl35_reaclib = 111, + k_P33_p_to_S34_reaclib = 112, + k_P33_He4_to_Cl37_reaclib = 113, + k_S32_n_to_S33_reaclib = 114, + k_S32_p_to_Cl33_reaclib = 115, + k_S32_He4_to_Ar36_reaclib = 116, + k_S33_n_to_S34_reaclib = 117, + k_S33_He4_to_Ar37_reaclib = 118, + k_S34_n_to_S35_reaclib = 119, + k_S34_p_to_Cl35_reaclib = 120, + k_S34_He4_to_Ar38_reaclib = 121, + k_Cl33_He4_to_K37_reaclib = 122, + k_Cl35_p_to_Ar36_reaclib = 123, + k_Cl35_He4_to_K39_reaclib = 124, + k_Cl37_p_to_Ar38_reaclib = 125, + k_Ar36_n_to_Ar37_reaclib = 126, + k_Ar36_p_to_K37_reaclib = 127, + k_Ar36_He4_to_Ca40_reaclib = 128, + k_Ar37_n_to_Ar38_reaclib = 129, + k_Ar38_p_to_K39_reaclib = 130, + k_Ar38_He4_to_Ca42_reaclib = 131, + k_K37_He4_to_Sc41_reaclib = 132, + k_K39_p_to_Ca40_reaclib = 133, + k_K39_He4_to_Sc43_reaclib = 134, + k_Ca40_p_to_Sc41_reaclib = 135, + k_Ca40_He4_to_Ti44_reaclib = 136, + k_Ca42_p_to_Sc43_reaclib = 137, + k_Ca42_He4_to_Ti46_reaclib = 138, + k_Sc43_p_to_Ti44_reaclib = 139, + k_Sc43_He4_to_V47_reaclib = 140, + k_Sc45_p_to_Ti46_reaclib = 141, + k_Sc45_He4_to_V49_reaclib = 142, + k_Ti44_He4_to_Cr48_reaclib = 143, + k_Ti46_p_to_V47_reaclib = 144, + k_Ti46_He4_to_Cr50_reaclib = 145, + k_Ti48_p_to_V49_reaclib = 146, + k_Ti48_He4_to_Cr52_reaclib = 147, + k_V47_p_to_Cr48_reaclib = 148, + k_V47_He4_to_Mn51_reaclib = 149, + k_V49_p_to_Cr50_reaclib = 150, + k_V49_He4_to_Mn53_reaclib = 151, + k_V51_p_to_Cr52_reaclib = 152, + k_V51_He4_to_Mn55_reaclib = 153, + k_Cr48_He4_to_Fe52_reaclib = 154, + k_Cr50_p_to_Mn51_reaclib = 155, + k_Cr50_He4_to_Fe54_reaclib = 156, + k_Cr52_p_to_Mn53_reaclib = 157, + k_Cr52_He4_to_Fe56_reaclib = 158, + k_Cr54_p_to_Mn55_reaclib = 159, + k_Cr54_He4_to_Fe58_reaclib = 160, + k_Mn51_p_to_Fe52_reaclib = 161, + k_Mn51_He4_to_Co55_reaclib = 162, + k_Mn53_p_to_Fe54_reaclib = 163, + k_Mn53_He4_to_Co57_reaclib = 164, + k_Mn55_p_to_Fe56_reaclib = 165, + k_Mn55_He4_to_Co59_reaclib = 166, + k_Fe52_He4_to_Ni56_reaclib = 167, + k_Fe54_p_to_Co55_reaclib = 168, + k_Fe54_He4_to_Ni58_reaclib = 169, + k_Fe56_p_to_Co57_reaclib = 170, + k_Fe56_He4_to_Ni60_reaclib = 171, + k_Fe58_p_to_Co59_reaclib = 172, + k_Co55_n_to_Co56_reaclib = 173, + k_Co55_p_to_Ni56_reaclib = 174, + k_Co55_He4_to_Cu59_reaclib = 175, + k_Co56_n_to_Co57_reaclib = 176, + k_Co57_p_to_Ni58_reaclib = 177, + k_Co59_p_to_Ni60_reaclib = 178, + k_Ni56_He4_to_Zn60_reaclib = 179, + k_Ni58_p_to_Cu59_reaclib = 180, + k_Cu59_p_to_Zn60_reaclib = 181, + k_C12_C12_to_n_Mg23_reaclib = 182, + k_O16_C12_to_n_Si27_reaclib = 183, + k_O16_C12_to_p_Al27_reaclib = 184, + k_O16_C12_to_He4_Mg24_reaclib = 185, + k_O16_O16_to_p_P31_reaclib = 186, + k_O16_O16_to_He4_Si28_reaclib = 187, + k_Ne20_He4_to_n_Mg23_reaclib = 188, + k_Ne20_C12_to_p_P31_reaclib = 189, + k_Ne20_C12_to_He4_Si28_reaclib = 190, + k_Mg23_n_to_He4_Ne20_reaclib = 191, + k_Mg23_n_to_C12_C12_reaclib = 192, + k_Mg24_He4_to_n_Si27_reaclib = 193, + k_Mg24_He4_to_p_Al27_reaclib = 194, + k_Mg24_He4_to_C12_O16_reaclib = 195, + k_Al27_p_to_n_Si27_reaclib = 196, + k_Al27_p_to_He4_Mg24_reaclib = 197, + k_Al27_p_to_C12_O16_reaclib = 198, + k_Al27_He4_to_p_Si30_reaclib = 199, + k_Si27_n_to_p_Al27_reaclib = 200, + k_Si27_n_to_He4_Mg24_reaclib = 201, + k_Si27_n_to_C12_O16_reaclib = 202, + k_Si28_He4_to_p_P31_reaclib = 203, + k_Si28_He4_to_C12_Ne20_reaclib = 204, + k_Si28_He4_to_O16_O16_reaclib = 205, + k_Si29_p_to_n_P29_reaclib = 206, + k_Si29_He4_to_n_S32_reaclib = 207, + k_Si30_p_to_He4_Al27_reaclib = 208, + k_Si30_He4_to_n_S33_reaclib = 209, + k_Si30_He4_to_p_P33_reaclib = 210, + k_Si31_p_to_n_P31_reaclib = 211, + k_Si31_He4_to_n_S34_reaclib = 212, + k_P29_n_to_p_Si29_reaclib = 213, + k_P29_He4_to_p_S32_reaclib = 214, + k_P31_n_to_p_Si31_reaclib = 215, + k_P31_p_to_He4_Si28_reaclib = 216, + k_P31_p_to_C12_Ne20_reaclib = 217, + k_P31_p_to_O16_O16_reaclib = 218, + k_P31_He4_to_p_S34_reaclib = 219, + k_P33_p_to_n_S33_reaclib = 220, + k_P33_p_to_He4_Si30_reaclib = 221, + k_S32_n_to_He4_Si29_reaclib = 222, + k_S32_p_to_He4_P29_reaclib = 223, + k_S32_He4_to_p_Cl35_reaclib = 224, + k_S33_n_to_p_P33_reaclib = 225, + k_S33_n_to_He4_Si30_reaclib = 226, + k_S33_p_to_n_Cl33_reaclib = 227, + k_S33_He4_to_n_Ar36_reaclib = 228, + k_S34_n_to_He4_Si31_reaclib = 229, + k_S34_p_to_He4_P31_reaclib = 230, + k_S34_He4_to_n_Ar37_reaclib = 231, + k_S34_He4_to_p_Cl37_reaclib = 232, + k_S35_p_to_n_Cl35_reaclib = 233, + k_S35_He4_to_n_Ar38_reaclib = 234, + k_Cl33_n_to_p_S33_reaclib = 235, + k_Cl33_He4_to_p_Ar36_reaclib = 236, + k_Cl35_n_to_p_S35_reaclib = 237, + k_Cl35_p_to_He4_S32_reaclib = 238, + k_Cl35_He4_to_p_Ar38_reaclib = 239, + k_Cl37_p_to_n_Ar37_reaclib = 240, + k_Cl37_p_to_He4_S34_reaclib = 241, + k_Ar36_n_to_He4_S33_reaclib = 242, + k_Ar36_p_to_He4_Cl33_reaclib = 243, + k_Ar36_He4_to_p_K39_reaclib = 244, + k_Ar37_n_to_p_Cl37_reaclib = 245, + k_Ar37_n_to_He4_S34_reaclib = 246, + k_Ar37_p_to_n_K37_reaclib = 247, + k_Ar37_He4_to_n_Ca40_reaclib = 248, + k_Ar38_n_to_He4_S35_reaclib = 249, + k_Ar38_p_to_He4_Cl35_reaclib = 250, + k_K37_n_to_p_Ar37_reaclib = 251, + k_K37_He4_to_p_Ca40_reaclib = 252, + k_K39_p_to_He4_Ar36_reaclib = 253, + k_K39_He4_to_p_Ca42_reaclib = 254, + k_Ca40_n_to_He4_Ar37_reaclib = 255, + k_Ca40_p_to_He4_K37_reaclib = 256, + k_Ca40_He4_to_p_Sc43_reaclib = 257, + k_Ca42_p_to_He4_K39_reaclib = 258, + k_Ca42_He4_to_p_Sc45_reaclib = 259, + k_Sc41_He4_to_p_Ti44_reaclib = 260, + k_Sc43_p_to_He4_Ca40_reaclib = 261, + k_Sc43_He4_to_p_Ti46_reaclib = 262, + k_Sc45_p_to_He4_Ca42_reaclib = 263, + k_Sc45_He4_to_p_Ti48_reaclib = 264, + k_Ti44_p_to_He4_Sc41_reaclib = 265, + k_Ti44_He4_to_p_V47_reaclib = 266, + k_Ti46_p_to_He4_Sc43_reaclib = 267, + k_Ti46_He4_to_p_V49_reaclib = 268, + k_Ti48_p_to_He4_Sc45_reaclib = 269, + k_Ti48_He4_to_p_V51_reaclib = 270, + k_V47_p_to_He4_Ti44_reaclib = 271, + k_V47_He4_to_p_Cr50_reaclib = 272, + k_V49_p_to_He4_Ti46_reaclib = 273, + k_V49_He4_to_p_Cr52_reaclib = 274, + k_V51_p_to_He4_Ti48_reaclib = 275, + k_V51_He4_to_p_Cr54_reaclib = 276, + k_Cr48_He4_to_p_Mn51_reaclib = 277, + k_Cr50_p_to_He4_V47_reaclib = 278, + k_Cr50_He4_to_p_Mn53_reaclib = 279, + k_Cr52_p_to_He4_V49_reaclib = 280, + k_Cr52_He4_to_p_Mn55_reaclib = 281, + k_Cr54_p_to_He4_V51_reaclib = 282, + k_Mn51_p_to_He4_Cr48_reaclib = 283, + k_Mn51_He4_to_p_Fe54_reaclib = 284, + k_Mn53_p_to_He4_Cr50_reaclib = 285, + k_Mn53_He4_to_n_Co56_reaclib = 286, + k_Mn53_He4_to_p_Fe56_reaclib = 287, + k_Mn55_p_to_He4_Cr52_reaclib = 288, + k_Mn55_He4_to_p_Fe58_reaclib = 289, + k_Fe52_He4_to_p_Co55_reaclib = 290, + k_Fe54_p_to_He4_Mn51_reaclib = 291, + k_Fe54_He4_to_p_Co57_reaclib = 292, + k_Fe56_p_to_n_Co56_reaclib = 293, + k_Fe56_p_to_He4_Mn53_reaclib = 294, + k_Fe56_He4_to_p_Co59_reaclib = 295, + k_Fe58_p_to_He4_Mn55_reaclib = 296, + k_Co55_p_to_He4_Fe52_reaclib = 297, + k_Co55_He4_to_p_Ni58_reaclib = 298, + k_Co56_n_to_p_Fe56_reaclib = 299, + k_Co56_n_to_He4_Mn53_reaclib = 300, + k_Co56_p_to_n_Ni56_reaclib = 301, + k_Co56_He4_to_n_Cu59_reaclib = 302, + k_Co57_p_to_He4_Fe54_reaclib = 303, + k_Co57_He4_to_p_Ni60_reaclib = 304, + k_Co59_p_to_He4_Fe56_reaclib = 305, + k_Ni56_n_to_p_Co56_reaclib = 306, + k_Ni56_He4_to_p_Cu59_reaclib = 307, + k_Ni58_p_to_He4_Co55_reaclib = 308, + k_Ni60_p_to_He4_Co57_reaclib = 309, + k_Cu59_n_to_He4_Co56_reaclib = 310, + k_Cu59_p_to_He4_Ni56_reaclib = 311, + k_He4_He4_He4_to_C12_reaclib = 312, + k_Ni56_n_to_Ni57_reaclib = 313, + k_Ni57_to_n_Ni56_reaclib = 314, + k_Ni57_n_to_Ni58_reaclib = 315, + k_Ni58_to_n_Ni57_reaclib = 316, + k_Ni58_n_to_Ni59_reaclib = 317, + k_Ni59_to_n_Ni58_reaclib = 318, + k_Ni59_n_to_Ni60_reaclib = 319, + k_Ni60_to_n_Ni59_reaclib = 320, + k_Co57_n_to_Co58_reaclib = 321, + k_Co58_to_n_Co57_reaclib = 322, + k_Co58_n_to_Co59_reaclib = 323, + k_Co59_to_n_Co58_reaclib = 324, + k_Fe52_n_to_Fe53_reaclib = 325, + k_Fe53_to_n_Fe52_reaclib = 326, + k_Fe53_n_to_Fe54_reaclib = 327, + k_Fe54_to_n_Fe53_reaclib = 328, + k_Fe54_n_to_Fe55_reaclib = 329, + k_Fe55_to_n_Fe54_reaclib = 330, + k_Fe55_n_to_Fe56_reaclib = 331, + k_Fe56_to_n_Fe55_reaclib = 332, + k_Fe56_n_to_Fe57_reaclib = 333, + k_Fe57_to_n_Fe56_reaclib = 334, + k_Fe57_n_to_Fe58_reaclib = 335, + k_Fe58_to_n_Fe57_reaclib = 336, + k_Mn51_n_to_Mn52_reaclib = 337, + k_Mn52_to_n_Mn51_reaclib = 338, + k_Mn52_n_to_Mn53_reaclib = 339, + k_Mn53_to_n_Mn52_reaclib = 340, + k_Mn53_n_to_Mn54_reaclib = 341, + k_Mn54_to_n_Mn53_reaclib = 342, + k_Mn54_n_to_Mn55_reaclib = 343, + k_Mn55_to_n_Mn54_reaclib = 344, + k_Cr48_n_to_Cr49_reaclib = 345, + k_Cr49_to_n_Cr48_reaclib = 346, + k_Cr49_n_to_Cr50_reaclib = 347, + k_Cr50_to_n_Cr49_reaclib = 348, + k_Cr50_n_to_Cr51_reaclib = 349, + k_Cr51_to_n_Cr50_reaclib = 350, + k_Cr51_n_to_Cr52_reaclib = 351, + k_Cr52_to_n_Cr51_reaclib = 352, + k_Cr52_n_to_Cr53_reaclib = 353, + k_Cr53_to_n_Cr52_reaclib = 354, + k_Cr53_n_to_Cr54_reaclib = 355, + k_Cr54_to_n_Cr53_reaclib = 356, + k_V47_n_to_V48_reaclib = 357, + k_V48_to_n_V47_reaclib = 358, + k_V48_n_to_V49_reaclib = 359, + k_V49_to_n_V48_reaclib = 360, + k_V49_n_to_V50_reaclib = 361, + k_V50_to_n_V49_reaclib = 362, + k_V50_n_to_V51_reaclib = 363, + k_V51_to_n_V50_reaclib = 364, + k_Ti44_n_to_Ti45_reaclib = 365, + k_Ti45_to_n_Ti44_reaclib = 366, + k_Ti45_n_to_Ti46_reaclib = 367, + k_Ti46_to_n_Ti45_reaclib = 368, + k_Ti46_n_to_Ti47_reaclib = 369, + k_Ti47_to_n_Ti46_reaclib = 370, + k_Ti47_n_to_Ti48_reaclib = 371, + k_Ti48_to_n_Ti47_reaclib = 372, + k_Sc41_n_to_Sc42_reaclib = 373, + k_Sc42_to_n_Sc41_reaclib = 374, + k_Sc42_n_to_Sc43_reaclib = 375, + k_Sc43_to_n_Sc42_reaclib = 376, + k_Sc43_n_to_Sc44_reaclib = 377, + k_Sc44_to_n_Sc43_reaclib = 378, + k_Sc44_n_to_Sc45_reaclib = 379, + k_Sc45_to_n_Sc44_reaclib = 380, + k_Ca40_n_to_Ca41_reaclib = 381, + k_Ca41_to_n_Ca40_reaclib = 382, + k_Ca41_n_to_Ca42_reaclib = 383, + k_Ca42_to_n_Ca41_reaclib = 384, + k_C12_C12_to_p_Na23_reaclib = 385, + k_Na23_p_to_C12_C12_reaclib = 386, + k_Na23_p_to_He4_Ne20_reaclib = 387, + k_Na23_p_to_Mg24_reaclib = 388, + k_Mg24_to_p_Na23_reaclib = 389, + k_C12_C12_to_He4_Ne20_reaclib = 390, + k_Ne20_He4_to_C12_C12_reaclib = 391, + k_Ne20_He4_to_p_Na23_reaclib = 392, + k_Ne20_He4_to_Mg24_reaclib = 393, + k_Mg24_to_He4_Ne20_reaclib = 394, + k_Al27_to_Si27_beta_neg_weaktab = 395, + k_Si27_to_Al27_electron_capture_weaktab = 396, + k_P29_to_Si29_electron_capture_weaktab = 397, + k_Si29_to_P29_beta_neg_weaktab = 398, + k_P31_to_Si31_electron_capture_weaktab = 399, + k_Si31_to_P31_beta_neg_weaktab = 400, + k_Cl33_to_S33_electron_capture_weaktab = 401, + k_P33_to_S33_beta_neg_weaktab = 402, + k_S33_to_Cl33_beta_neg_weaktab = 403, + k_S33_to_P33_electron_capture_weaktab = 404, + k_Cl35_to_S35_electron_capture_weaktab = 405, + k_S35_to_Cl35_beta_neg_weaktab = 406, + k_Ar37_to_Cl37_electron_capture_weaktab = 407, + k_Ar37_to_K37_beta_neg_weaktab = 408, + k_Cl37_to_Ar37_beta_neg_weaktab = 409, + k_K37_to_Ar37_electron_capture_weaktab = 410, + k_Co56_to_Fe56_electron_capture_weaktab = 411, + k_Co56_to_Ni56_beta_neg_weaktab = 412, + k_Fe56_to_Co56_beta_neg_weaktab = 413, + k_Ni56_to_Co56_electron_capture_weaktab = 414, + k_n_to_p_beta_neg_weaktab = 415, + k_p_to_n_electron_capture_weaktab = 416, + k_Ni56_n_n_to_Ni58_approx = 417, + k_Ni58_to_Ni56_n_n_approx = 418, + k_Ni58_n_n_to_Ni60_approx = 419, + k_Ni60_to_Ni58_n_n_approx = 420, + k_Co57_n_n_to_Co59_approx = 421, + k_Co59_to_Co57_n_n_approx = 422, + k_Fe52_n_n_to_Fe54_approx = 423, + k_Fe54_to_Fe52_n_n_approx = 424, + k_Fe54_n_n_to_Fe56_approx = 425, + k_Fe56_to_Fe54_n_n_approx = 426, + k_Fe56_n_n_to_Fe58_approx = 427, + k_Fe58_to_Fe56_n_n_approx = 428, + k_Mn51_n_n_to_Mn53_approx = 429, + k_Mn53_to_Mn51_n_n_approx = 430, + k_Mn53_n_n_to_Mn55_approx = 431, + k_Mn55_to_Mn53_n_n_approx = 432, + k_Cr48_n_n_to_Cr50_approx = 433, + k_Cr50_to_Cr48_n_n_approx = 434, + k_Cr50_n_n_to_Cr52_approx = 435, + k_Cr52_to_Cr50_n_n_approx = 436, + k_Cr52_n_n_to_Cr54_approx = 437, + k_Cr54_to_Cr52_n_n_approx = 438, + k_V47_n_n_to_V49_approx = 439, + k_V49_to_V47_n_n_approx = 440, + k_V49_n_n_to_V51_approx = 441, + k_V51_to_V49_n_n_approx = 442, + k_Ti44_n_n_to_Ti46_approx = 443, + k_Ti46_to_Ti44_n_n_approx = 444, + k_Ti46_n_n_to_Ti48_approx = 445, + k_Ti48_to_Ti46_n_n_approx = 446, + k_Sc41_n_n_to_Sc43_approx = 447, + k_Sc43_to_Sc41_n_n_approx = 448, + k_Sc43_n_n_to_Sc45_approx = 449, + k_Sc45_to_Sc43_n_n_approx = 450, + k_Ca40_n_n_to_Ca42_approx = 451, + k_Ca42_to_Ca40_n_n_approx = 452, + k_C12_C12_to_Mg24_approx = 453, + k_Mg24_to_C12_C12_approx = 454, + k_C12_C12_to_Ne20_He4_approx = 455, + k_Ne20_He4_to_C12_C12_approx = 456, + k_Ne20_He4_to_Mg24_approx = 457, + k_Mg24_to_Ne20_He4_approx = 458, + NumRates = k_Mg24_to_Ne20_He4_approx + }; + + enum ScreenPairs : + std::uint8_t + { + k_p_P33 = 1, + k_He4_Mn53 = 2, + k_p_Si31 = 3, + k_p_Ti44 = 4, + k_He4_Ti48 = 5, + k_p_Ca42 = 6, + k_p_Sc43 = 7, + k_p_Fe56 = 8, + k_p_Ar38 = 9, + k_p_Cr54 = 10, + k_He4_Ti44 = 11, + k_He4_Co57 = 12, + k_He4_Ca42 = 13, + k_He4_Mg24 = 14, + k_C12_O16 = 15, + k_He4_Ar38 = 16, + k_p_V47 = 17, + k_He4_V51 = 18, + k_p_Sc45 = 19, + k_p_Co55 = 20, + k_C12_C12 = 21, + k_He4_Cl33 = 22, + k_p_Al27 = 23, + k_He4_Ti46 = 24, + k_He4_V47 = 25, + k_He4_Sc45 = 26, + k_He4_Ni56 = 27, + k_p_P31 = 28, + k_p_Ni58 = 29, + k_p_Si29 = 30, + k_He4_V49 = 31, + k_O16_O16 = 32, + k_He4_P31 = 33, + k_He4_Si29 = 34, + k_p_Cr52 = 35, + k_p_S34 = 36, + k_p_Ar37 = 37, + k_p_Cl37 = 38, + k_He4_Ca40 = 39, + k_He4_Ar36 = 40, + k_He4_P33 = 41, + k_He4_Cr52 = 42, + k_He4_S34 = 43, + k_He4_Si31 = 44, + k_p_Mn55 = 45, + k_He4_Sc43 = 46, + k_He4_Fe56 = 47, + k_He4_Cr54 = 48, + k_He4_Mn55 = 49, + k_He4_Ne20 = 50, + k_p_Co56 = 51, + k_p_Si28 = 52, + k_p_Fe54 = 53, + k_He4_Co55 = 54, + k_He4_Al27 = 55, + k_p_Cl35 = 56, + k_p_S33 = 57, + k_p_Si30 = 58, + k_He4_O16 = 59, + k_He4_Si30 = 60, + k_p_S35 = 61, + k_He4_Mg23 = 62, + k_He4_Ar37 = 63, + k_p_Co59 = 64, + k_He4_S35 = 65, + k_He4_P29 = 66, + k_p_Cr50 = 67, + k_p_S32 = 68, + k_p_Cu59 = 69, + k_He4_S32 = 70, + k_p_Mn53 = 71, + k_He4_Sc41 = 72, + k_He4_Co56 = 73, + k_He4_Si28 = 74, + k_He4_Fe54 = 75, + k_p_Ti48 = 76, + k_He4_Be8 = 77, + k_p_Co57 = 78, + k_p_K39 = 79, + k_He4_Cl35 = 80, + k_He4_S33 = 81, + k_p_V51 = 82, + k_He4_C12 = 83, + k_He4_K39 = 84, + k_p_Ti46 = 85, + k_p_Ni60 = 86, + k_p_Fe58 = 87, + k_He4_Cr48 = 88, + k_p_Mn51 = 89, + k_p_Na23 = 90, + k_p_V49 = 91, + k_He4_Fe52 = 92, + k_He4_K37 = 93, + k_He4_Cr50 = 94, + k_He4_Mn51 = 95, + k_He4_He4 = 96, + k_C12_Ne20 = 97, + k_p_Ca40 = 98, + k_p_Ar36 = 99, + NumScreenPairs = k_p_Ar36 + }; + + // rate names -- note: the rates are 1-based, not zero-based, so we pad + // this vector with rate_names[0] = "" so the indices line up with the + // NetworkRates enum + + static const std::vector rate_names = { + "", // 0 + "O16_to_He4_C12_reaclib", // 1, + "Ne20_to_He4_O16_reaclib", // 2, + "Mg24_to_n_Mg23_reaclib", // 3, + "Si27_to_He4_Mg23_reaclib", // 4, + "Si28_to_n_Si27_reaclib", // 5, + "Si28_to_p_Al27_reaclib", // 6, + "Si28_to_He4_Mg24_reaclib", // 7, + "Si29_to_n_Si28_reaclib", // 8, + "Si30_to_n_Si29_reaclib", // 9, + "Si31_to_n_Si30_reaclib", // 10, + "P29_to_p_Si28_reaclib", // 11, + "P31_to_p_Si30_reaclib", // 12, + "P31_to_He4_Al27_reaclib", // 13, + "S32_to_p_P31_reaclib", // 14, + "S32_to_He4_Si28_reaclib", // 15, + "S33_to_n_S32_reaclib", // 16, + "S33_to_He4_Si29_reaclib", // 17, + "S34_to_n_S33_reaclib", // 18, + "S34_to_p_P33_reaclib", // 19, + "S34_to_He4_Si30_reaclib", // 20, + "S35_to_n_S34_reaclib", // 21, + "S35_to_He4_Si31_reaclib", // 22, + "Cl33_to_p_S32_reaclib", // 23, + "Cl33_to_He4_P29_reaclib", // 24, + "Cl35_to_p_S34_reaclib", // 25, + "Cl35_to_He4_P31_reaclib", // 26, + "Cl37_to_He4_P33_reaclib", // 27, + "Ar36_to_p_Cl35_reaclib", // 28, + "Ar36_to_He4_S32_reaclib", // 29, + "Ar37_to_n_Ar36_reaclib", // 30, + "Ar37_to_He4_S33_reaclib", // 31, + "Ar38_to_n_Ar37_reaclib", // 32, + "Ar38_to_p_Cl37_reaclib", // 33, + "Ar38_to_He4_S34_reaclib", // 34, + "K37_to_p_Ar36_reaclib", // 35, + "K37_to_He4_Cl33_reaclib", // 36, + "K39_to_p_Ar38_reaclib", // 37, + "K39_to_He4_Cl35_reaclib", // 38, + "Ca40_to_p_K39_reaclib", // 39, + "Ca40_to_He4_Ar36_reaclib", // 40, + "Ca42_to_He4_Ar38_reaclib", // 41, + "Sc41_to_p_Ca40_reaclib", // 42, + "Sc41_to_He4_K37_reaclib", // 43, + "Sc43_to_p_Ca42_reaclib", // 44, + "Sc43_to_He4_K39_reaclib", // 45, + "Ti44_to_p_Sc43_reaclib", // 46, + "Ti44_to_He4_Ca40_reaclib", // 47, + "Ti46_to_p_Sc45_reaclib", // 48, + "Ti46_to_He4_Ca42_reaclib", // 49, + "V47_to_p_Ti46_reaclib", // 50, + "V47_to_He4_Sc43_reaclib", // 51, + "V49_to_p_Ti48_reaclib", // 52, + "V49_to_He4_Sc45_reaclib", // 53, + "Cr48_to_p_V47_reaclib", // 54, + "Cr48_to_He4_Ti44_reaclib", // 55, + "Cr50_to_p_V49_reaclib", // 56, + "Cr50_to_He4_Ti46_reaclib", // 57, + "Cr52_to_p_V51_reaclib", // 58, + "Cr52_to_He4_Ti48_reaclib", // 59, + "Mn51_to_p_Cr50_reaclib", // 60, + "Mn51_to_He4_V47_reaclib", // 61, + "Mn53_to_p_Cr52_reaclib", // 62, + "Mn53_to_He4_V49_reaclib", // 63, + "Mn55_to_p_Cr54_reaclib", // 64, + "Mn55_to_He4_V51_reaclib", // 65, + "Fe52_to_p_Mn51_reaclib", // 66, + "Fe52_to_He4_Cr48_reaclib", // 67, + "Fe54_to_p_Mn53_reaclib", // 68, + "Fe54_to_He4_Cr50_reaclib", // 69, + "Fe56_to_p_Mn55_reaclib", // 70, + "Fe56_to_He4_Cr52_reaclib", // 71, + "Fe58_to_He4_Cr54_reaclib", // 72, + "Co55_to_p_Fe54_reaclib", // 73, + "Co55_to_He4_Mn51_reaclib", // 74, + "Co56_to_n_Co55_reaclib", // 75, + "Co57_to_n_Co56_reaclib", // 76, + "Co57_to_p_Fe56_reaclib", // 77, + "Co57_to_He4_Mn53_reaclib", // 78, + "Co59_to_p_Fe58_reaclib", // 79, + "Co59_to_He4_Mn55_reaclib", // 80, + "Ni56_to_p_Co55_reaclib", // 81, + "Ni56_to_He4_Fe52_reaclib", // 82, + "Ni58_to_p_Co57_reaclib", // 83, + "Ni58_to_He4_Fe54_reaclib", // 84, + "Ni60_to_p_Co59_reaclib", // 85, + "Ni60_to_He4_Fe56_reaclib", // 86, + "Cu59_to_p_Ni58_reaclib", // 87, + "Cu59_to_He4_Co55_reaclib", // 88, + "Zn60_to_p_Cu59_reaclib", // 89, + "Zn60_to_He4_Ni56_reaclib", // 90, + "C12_to_3He4_reaclib", // 91, + "C12_He4_to_O16_reaclib", // 92, + "O16_He4_to_Ne20_reaclib", // 93, + "Mg23_n_to_Mg24_reaclib", // 94, + "Mg23_He4_to_Si27_reaclib", // 95, + "Mg24_He4_to_Si28_reaclib", // 96, + "Al27_p_to_Si28_reaclib", // 97, + "Al27_He4_to_P31_reaclib", // 98, + "Si27_n_to_Si28_reaclib", // 99, + "Si28_n_to_Si29_reaclib", // 100, + "Si28_p_to_P29_reaclib", // 101, + "Si28_He4_to_S32_reaclib", // 102, + "Si29_n_to_Si30_reaclib", // 103, + "Si29_He4_to_S33_reaclib", // 104, + "Si30_n_to_Si31_reaclib", // 105, + "Si30_p_to_P31_reaclib", // 106, + "Si30_He4_to_S34_reaclib", // 107, + "Si31_He4_to_S35_reaclib", // 108, + "P29_He4_to_Cl33_reaclib", // 109, + "P31_p_to_S32_reaclib", // 110, + "P31_He4_to_Cl35_reaclib", // 111, + "P33_p_to_S34_reaclib", // 112, + "P33_He4_to_Cl37_reaclib", // 113, + "S32_n_to_S33_reaclib", // 114, + "S32_p_to_Cl33_reaclib", // 115, + "S32_He4_to_Ar36_reaclib", // 116, + "S33_n_to_S34_reaclib", // 117, + "S33_He4_to_Ar37_reaclib", // 118, + "S34_n_to_S35_reaclib", // 119, + "S34_p_to_Cl35_reaclib", // 120, + "S34_He4_to_Ar38_reaclib", // 121, + "Cl33_He4_to_K37_reaclib", // 122, + "Cl35_p_to_Ar36_reaclib", // 123, + "Cl35_He4_to_K39_reaclib", // 124, + "Cl37_p_to_Ar38_reaclib", // 125, + "Ar36_n_to_Ar37_reaclib", // 126, + "Ar36_p_to_K37_reaclib", // 127, + "Ar36_He4_to_Ca40_reaclib", // 128, + "Ar37_n_to_Ar38_reaclib", // 129, + "Ar38_p_to_K39_reaclib", // 130, + "Ar38_He4_to_Ca42_reaclib", // 131, + "K37_He4_to_Sc41_reaclib", // 132, + "K39_p_to_Ca40_reaclib", // 133, + "K39_He4_to_Sc43_reaclib", // 134, + "Ca40_p_to_Sc41_reaclib", // 135, + "Ca40_He4_to_Ti44_reaclib", // 136, + "Ca42_p_to_Sc43_reaclib", // 137, + "Ca42_He4_to_Ti46_reaclib", // 138, + "Sc43_p_to_Ti44_reaclib", // 139, + "Sc43_He4_to_V47_reaclib", // 140, + "Sc45_p_to_Ti46_reaclib", // 141, + "Sc45_He4_to_V49_reaclib", // 142, + "Ti44_He4_to_Cr48_reaclib", // 143, + "Ti46_p_to_V47_reaclib", // 144, + "Ti46_He4_to_Cr50_reaclib", // 145, + "Ti48_p_to_V49_reaclib", // 146, + "Ti48_He4_to_Cr52_reaclib", // 147, + "V47_p_to_Cr48_reaclib", // 148, + "V47_He4_to_Mn51_reaclib", // 149, + "V49_p_to_Cr50_reaclib", // 150, + "V49_He4_to_Mn53_reaclib", // 151, + "V51_p_to_Cr52_reaclib", // 152, + "V51_He4_to_Mn55_reaclib", // 153, + "Cr48_He4_to_Fe52_reaclib", // 154, + "Cr50_p_to_Mn51_reaclib", // 155, + "Cr50_He4_to_Fe54_reaclib", // 156, + "Cr52_p_to_Mn53_reaclib", // 157, + "Cr52_He4_to_Fe56_reaclib", // 158, + "Cr54_p_to_Mn55_reaclib", // 159, + "Cr54_He4_to_Fe58_reaclib", // 160, + "Mn51_p_to_Fe52_reaclib", // 161, + "Mn51_He4_to_Co55_reaclib", // 162, + "Mn53_p_to_Fe54_reaclib", // 163, + "Mn53_He4_to_Co57_reaclib", // 164, + "Mn55_p_to_Fe56_reaclib", // 165, + "Mn55_He4_to_Co59_reaclib", // 166, + "Fe52_He4_to_Ni56_reaclib", // 167, + "Fe54_p_to_Co55_reaclib", // 168, + "Fe54_He4_to_Ni58_reaclib", // 169, + "Fe56_p_to_Co57_reaclib", // 170, + "Fe56_He4_to_Ni60_reaclib", // 171, + "Fe58_p_to_Co59_reaclib", // 172, + "Co55_n_to_Co56_reaclib", // 173, + "Co55_p_to_Ni56_reaclib", // 174, + "Co55_He4_to_Cu59_reaclib", // 175, + "Co56_n_to_Co57_reaclib", // 176, + "Co57_p_to_Ni58_reaclib", // 177, + "Co59_p_to_Ni60_reaclib", // 178, + "Ni56_He4_to_Zn60_reaclib", // 179, + "Ni58_p_to_Cu59_reaclib", // 180, + "Cu59_p_to_Zn60_reaclib", // 181, + "C12_C12_to_n_Mg23_reaclib", // 182, + "O16_C12_to_n_Si27_reaclib", // 183, + "O16_C12_to_p_Al27_reaclib", // 184, + "O16_C12_to_He4_Mg24_reaclib", // 185, + "O16_O16_to_p_P31_reaclib", // 186, + "O16_O16_to_He4_Si28_reaclib", // 187, + "Ne20_He4_to_n_Mg23_reaclib", // 188, + "Ne20_C12_to_p_P31_reaclib", // 189, + "Ne20_C12_to_He4_Si28_reaclib", // 190, + "Mg23_n_to_He4_Ne20_reaclib", // 191, + "Mg23_n_to_C12_C12_reaclib", // 192, + "Mg24_He4_to_n_Si27_reaclib", // 193, + "Mg24_He4_to_p_Al27_reaclib", // 194, + "Mg24_He4_to_C12_O16_reaclib", // 195, + "Al27_p_to_n_Si27_reaclib", // 196, + "Al27_p_to_He4_Mg24_reaclib", // 197, + "Al27_p_to_C12_O16_reaclib", // 198, + "Al27_He4_to_p_Si30_reaclib", // 199, + "Si27_n_to_p_Al27_reaclib", // 200, + "Si27_n_to_He4_Mg24_reaclib", // 201, + "Si27_n_to_C12_O16_reaclib", // 202, + "Si28_He4_to_p_P31_reaclib", // 203, + "Si28_He4_to_C12_Ne20_reaclib", // 204, + "Si28_He4_to_O16_O16_reaclib", // 205, + "Si29_p_to_n_P29_reaclib", // 206, + "Si29_He4_to_n_S32_reaclib", // 207, + "Si30_p_to_He4_Al27_reaclib", // 208, + "Si30_He4_to_n_S33_reaclib", // 209, + "Si30_He4_to_p_P33_reaclib", // 210, + "Si31_p_to_n_P31_reaclib", // 211, + "Si31_He4_to_n_S34_reaclib", // 212, + "P29_n_to_p_Si29_reaclib", // 213, + "P29_He4_to_p_S32_reaclib", // 214, + "P31_n_to_p_Si31_reaclib", // 215, + "P31_p_to_He4_Si28_reaclib", // 216, + "P31_p_to_C12_Ne20_reaclib", // 217, + "P31_p_to_O16_O16_reaclib", // 218, + "P31_He4_to_p_S34_reaclib", // 219, + "P33_p_to_n_S33_reaclib", // 220, + "P33_p_to_He4_Si30_reaclib", // 221, + "S32_n_to_He4_Si29_reaclib", // 222, + "S32_p_to_He4_P29_reaclib", // 223, + "S32_He4_to_p_Cl35_reaclib", // 224, + "S33_n_to_p_P33_reaclib", // 225, + "S33_n_to_He4_Si30_reaclib", // 226, + "S33_p_to_n_Cl33_reaclib", // 227, + "S33_He4_to_n_Ar36_reaclib", // 228, + "S34_n_to_He4_Si31_reaclib", // 229, + "S34_p_to_He4_P31_reaclib", // 230, + "S34_He4_to_n_Ar37_reaclib", // 231, + "S34_He4_to_p_Cl37_reaclib", // 232, + "S35_p_to_n_Cl35_reaclib", // 233, + "S35_He4_to_n_Ar38_reaclib", // 234, + "Cl33_n_to_p_S33_reaclib", // 235, + "Cl33_He4_to_p_Ar36_reaclib", // 236, + "Cl35_n_to_p_S35_reaclib", // 237, + "Cl35_p_to_He4_S32_reaclib", // 238, + "Cl35_He4_to_p_Ar38_reaclib", // 239, + "Cl37_p_to_n_Ar37_reaclib", // 240, + "Cl37_p_to_He4_S34_reaclib", // 241, + "Ar36_n_to_He4_S33_reaclib", // 242, + "Ar36_p_to_He4_Cl33_reaclib", // 243, + "Ar36_He4_to_p_K39_reaclib", // 244, + "Ar37_n_to_p_Cl37_reaclib", // 245, + "Ar37_n_to_He4_S34_reaclib", // 246, + "Ar37_p_to_n_K37_reaclib", // 247, + "Ar37_He4_to_n_Ca40_reaclib", // 248, + "Ar38_n_to_He4_S35_reaclib", // 249, + "Ar38_p_to_He4_Cl35_reaclib", // 250, + "K37_n_to_p_Ar37_reaclib", // 251, + "K37_He4_to_p_Ca40_reaclib", // 252, + "K39_p_to_He4_Ar36_reaclib", // 253, + "K39_He4_to_p_Ca42_reaclib", // 254, + "Ca40_n_to_He4_Ar37_reaclib", // 255, + "Ca40_p_to_He4_K37_reaclib", // 256, + "Ca40_He4_to_p_Sc43_reaclib", // 257, + "Ca42_p_to_He4_K39_reaclib", // 258, + "Ca42_He4_to_p_Sc45_reaclib", // 259, + "Sc41_He4_to_p_Ti44_reaclib", // 260, + "Sc43_p_to_He4_Ca40_reaclib", // 261, + "Sc43_He4_to_p_Ti46_reaclib", // 262, + "Sc45_p_to_He4_Ca42_reaclib", // 263, + "Sc45_He4_to_p_Ti48_reaclib", // 264, + "Ti44_p_to_He4_Sc41_reaclib", // 265, + "Ti44_He4_to_p_V47_reaclib", // 266, + "Ti46_p_to_He4_Sc43_reaclib", // 267, + "Ti46_He4_to_p_V49_reaclib", // 268, + "Ti48_p_to_He4_Sc45_reaclib", // 269, + "Ti48_He4_to_p_V51_reaclib", // 270, + "V47_p_to_He4_Ti44_reaclib", // 271, + "V47_He4_to_p_Cr50_reaclib", // 272, + "V49_p_to_He4_Ti46_reaclib", // 273, + "V49_He4_to_p_Cr52_reaclib", // 274, + "V51_p_to_He4_Ti48_reaclib", // 275, + "V51_He4_to_p_Cr54_reaclib", // 276, + "Cr48_He4_to_p_Mn51_reaclib", // 277, + "Cr50_p_to_He4_V47_reaclib", // 278, + "Cr50_He4_to_p_Mn53_reaclib", // 279, + "Cr52_p_to_He4_V49_reaclib", // 280, + "Cr52_He4_to_p_Mn55_reaclib", // 281, + "Cr54_p_to_He4_V51_reaclib", // 282, + "Mn51_p_to_He4_Cr48_reaclib", // 283, + "Mn51_He4_to_p_Fe54_reaclib", // 284, + "Mn53_p_to_He4_Cr50_reaclib", // 285, + "Mn53_He4_to_n_Co56_reaclib", // 286, + "Mn53_He4_to_p_Fe56_reaclib", // 287, + "Mn55_p_to_He4_Cr52_reaclib", // 288, + "Mn55_He4_to_p_Fe58_reaclib", // 289, + "Fe52_He4_to_p_Co55_reaclib", // 290, + "Fe54_p_to_He4_Mn51_reaclib", // 291, + "Fe54_He4_to_p_Co57_reaclib", // 292, + "Fe56_p_to_n_Co56_reaclib", // 293, + "Fe56_p_to_He4_Mn53_reaclib", // 294, + "Fe56_He4_to_p_Co59_reaclib", // 295, + "Fe58_p_to_He4_Mn55_reaclib", // 296, + "Co55_p_to_He4_Fe52_reaclib", // 297, + "Co55_He4_to_p_Ni58_reaclib", // 298, + "Co56_n_to_p_Fe56_reaclib", // 299, + "Co56_n_to_He4_Mn53_reaclib", // 300, + "Co56_p_to_n_Ni56_reaclib", // 301, + "Co56_He4_to_n_Cu59_reaclib", // 302, + "Co57_p_to_He4_Fe54_reaclib", // 303, + "Co57_He4_to_p_Ni60_reaclib", // 304, + "Co59_p_to_He4_Fe56_reaclib", // 305, + "Ni56_n_to_p_Co56_reaclib", // 306, + "Ni56_He4_to_p_Cu59_reaclib", // 307, + "Ni58_p_to_He4_Co55_reaclib", // 308, + "Ni60_p_to_He4_Co57_reaclib", // 309, + "Cu59_n_to_He4_Co56_reaclib", // 310, + "Cu59_p_to_He4_Ni56_reaclib", // 311, + "He4_He4_He4_to_C12_reaclib", // 312, + "Ni56_n_to_Ni57_reaclib", // 313, + "Ni57_to_n_Ni56_reaclib", // 314, + "Ni57_n_to_Ni58_reaclib", // 315, + "Ni58_to_n_Ni57_reaclib", // 316, + "Ni58_n_to_Ni59_reaclib", // 317, + "Ni59_to_n_Ni58_reaclib", // 318, + "Ni59_n_to_Ni60_reaclib", // 319, + "Ni60_to_n_Ni59_reaclib", // 320, + "Co57_n_to_Co58_reaclib", // 321, + "Co58_to_n_Co57_reaclib", // 322, + "Co58_n_to_Co59_reaclib", // 323, + "Co59_to_n_Co58_reaclib", // 324, + "Fe52_n_to_Fe53_reaclib", // 325, + "Fe53_to_n_Fe52_reaclib", // 326, + "Fe53_n_to_Fe54_reaclib", // 327, + "Fe54_to_n_Fe53_reaclib", // 328, + "Fe54_n_to_Fe55_reaclib", // 329, + "Fe55_to_n_Fe54_reaclib", // 330, + "Fe55_n_to_Fe56_reaclib", // 331, + "Fe56_to_n_Fe55_reaclib", // 332, + "Fe56_n_to_Fe57_reaclib", // 333, + "Fe57_to_n_Fe56_reaclib", // 334, + "Fe57_n_to_Fe58_reaclib", // 335, + "Fe58_to_n_Fe57_reaclib", // 336, + "Mn51_n_to_Mn52_reaclib", // 337, + "Mn52_to_n_Mn51_reaclib", // 338, + "Mn52_n_to_Mn53_reaclib", // 339, + "Mn53_to_n_Mn52_reaclib", // 340, + "Mn53_n_to_Mn54_reaclib", // 341, + "Mn54_to_n_Mn53_reaclib", // 342, + "Mn54_n_to_Mn55_reaclib", // 343, + "Mn55_to_n_Mn54_reaclib", // 344, + "Cr48_n_to_Cr49_reaclib", // 345, + "Cr49_to_n_Cr48_reaclib", // 346, + "Cr49_n_to_Cr50_reaclib", // 347, + "Cr50_to_n_Cr49_reaclib", // 348, + "Cr50_n_to_Cr51_reaclib", // 349, + "Cr51_to_n_Cr50_reaclib", // 350, + "Cr51_n_to_Cr52_reaclib", // 351, + "Cr52_to_n_Cr51_reaclib", // 352, + "Cr52_n_to_Cr53_reaclib", // 353, + "Cr53_to_n_Cr52_reaclib", // 354, + "Cr53_n_to_Cr54_reaclib", // 355, + "Cr54_to_n_Cr53_reaclib", // 356, + "V47_n_to_V48_reaclib", // 357, + "V48_to_n_V47_reaclib", // 358, + "V48_n_to_V49_reaclib", // 359, + "V49_to_n_V48_reaclib", // 360, + "V49_n_to_V50_reaclib", // 361, + "V50_to_n_V49_reaclib", // 362, + "V50_n_to_V51_reaclib", // 363, + "V51_to_n_V50_reaclib", // 364, + "Ti44_n_to_Ti45_reaclib", // 365, + "Ti45_to_n_Ti44_reaclib", // 366, + "Ti45_n_to_Ti46_reaclib", // 367, + "Ti46_to_n_Ti45_reaclib", // 368, + "Ti46_n_to_Ti47_reaclib", // 369, + "Ti47_to_n_Ti46_reaclib", // 370, + "Ti47_n_to_Ti48_reaclib", // 371, + "Ti48_to_n_Ti47_reaclib", // 372, + "Sc41_n_to_Sc42_reaclib", // 373, + "Sc42_to_n_Sc41_reaclib", // 374, + "Sc42_n_to_Sc43_reaclib", // 375, + "Sc43_to_n_Sc42_reaclib", // 376, + "Sc43_n_to_Sc44_reaclib", // 377, + "Sc44_to_n_Sc43_reaclib", // 378, + "Sc44_n_to_Sc45_reaclib", // 379, + "Sc45_to_n_Sc44_reaclib", // 380, + "Ca40_n_to_Ca41_reaclib", // 381, + "Ca41_to_n_Ca40_reaclib", // 382, + "Ca41_n_to_Ca42_reaclib", // 383, + "Ca42_to_n_Ca41_reaclib", // 384, + "C12_C12_to_p_Na23_reaclib", // 385, + "Na23_p_to_C12_C12_reaclib", // 386, + "Na23_p_to_He4_Ne20_reaclib", // 387, + "Na23_p_to_Mg24_reaclib", // 388, + "Mg24_to_p_Na23_reaclib", // 389, + "C12_C12_to_He4_Ne20_reaclib", // 390, + "Ne20_He4_to_C12_C12_reaclib", // 391, + "Ne20_He4_to_p_Na23_reaclib", // 392, + "Ne20_He4_to_Mg24_reaclib", // 393, + "Mg24_to_He4_Ne20_reaclib", // 394, + "Al27_to_Si27_beta_neg_weaktab", // 395, + "Si27_to_Al27_electron_capture_weaktab", // 396, + "P29_to_Si29_electron_capture_weaktab", // 397, + "Si29_to_P29_beta_neg_weaktab", // 398, + "P31_to_Si31_electron_capture_weaktab", // 399, + "Si31_to_P31_beta_neg_weaktab", // 400, + "Cl33_to_S33_electron_capture_weaktab", // 401, + "P33_to_S33_beta_neg_weaktab", // 402, + "S33_to_Cl33_beta_neg_weaktab", // 403, + "S33_to_P33_electron_capture_weaktab", // 404, + "Cl35_to_S35_electron_capture_weaktab", // 405, + "S35_to_Cl35_beta_neg_weaktab", // 406, + "Ar37_to_Cl37_electron_capture_weaktab", // 407, + "Ar37_to_K37_beta_neg_weaktab", // 408, + "Cl37_to_Ar37_beta_neg_weaktab", // 409, + "K37_to_Ar37_electron_capture_weaktab", // 410, + "Co56_to_Fe56_electron_capture_weaktab", // 411, + "Co56_to_Ni56_beta_neg_weaktab", // 412, + "Fe56_to_Co56_beta_neg_weaktab", // 413, + "Ni56_to_Co56_electron_capture_weaktab", // 414, + "n_to_p_beta_neg_weaktab", // 415, + "p_to_n_electron_capture_weaktab", // 416, + "Ni56_n_n_to_Ni58_approx", // 417, + "Ni58_to_Ni56_n_n_approx", // 418, + "Ni58_n_n_to_Ni60_approx", // 419, + "Ni60_to_Ni58_n_n_approx", // 420, + "Co57_n_n_to_Co59_approx", // 421, + "Co59_to_Co57_n_n_approx", // 422, + "Fe52_n_n_to_Fe54_approx", // 423, + "Fe54_to_Fe52_n_n_approx", // 424, + "Fe54_n_n_to_Fe56_approx", // 425, + "Fe56_to_Fe54_n_n_approx", // 426, + "Fe56_n_n_to_Fe58_approx", // 427, + "Fe58_to_Fe56_n_n_approx", // 428, + "Mn51_n_n_to_Mn53_approx", // 429, + "Mn53_to_Mn51_n_n_approx", // 430, + "Mn53_n_n_to_Mn55_approx", // 431, + "Mn55_to_Mn53_n_n_approx", // 432, + "Cr48_n_n_to_Cr50_approx", // 433, + "Cr50_to_Cr48_n_n_approx", // 434, + "Cr50_n_n_to_Cr52_approx", // 435, + "Cr52_to_Cr50_n_n_approx", // 436, + "Cr52_n_n_to_Cr54_approx", // 437, + "Cr54_to_Cr52_n_n_approx", // 438, + "V47_n_n_to_V49_approx", // 439, + "V49_to_V47_n_n_approx", // 440, + "V49_n_n_to_V51_approx", // 441, + "V51_to_V49_n_n_approx", // 442, + "Ti44_n_n_to_Ti46_approx", // 443, + "Ti46_to_Ti44_n_n_approx", // 444, + "Ti46_n_n_to_Ti48_approx", // 445, + "Ti48_to_Ti46_n_n_approx", // 446, + "Sc41_n_n_to_Sc43_approx", // 447, + "Sc43_to_Sc41_n_n_approx", // 448, + "Sc43_n_n_to_Sc45_approx", // 449, + "Sc45_to_Sc43_n_n_approx", // 450, + "Ca40_n_n_to_Ca42_approx", // 451, + "Ca42_to_Ca40_n_n_approx", // 452, + "C12_C12_to_Mg24_approx", // 453, + "Mg24_to_C12_C12_approx", // 454, + "C12_C12_to_Ne20_He4_approx", // 455, + "Ne20_He4_to_C12_C12_approx", // 456, + "Ne20_He4_to_Mg24_approx", // 457, + "Mg24_to_Ne20_He4_approx" // 458, + }; + + template + AMREX_GPU_DEVICE AMREX_INLINE + constexpr amrex::Real get_p_random() { + return 0.0_rt; + } + +} + +#ifdef NSE_NET +namespace NSE_INDEX +{ + // A RatePair data table, 2D array of shape (NumNSERatePairs, 10). + // Each row corresponds to a RatePair returned by _get_nse_rate_pairs(). + // Use enum names following NetworkSpecies and NetworkRates. + + // - Columns 1–3: 1-based index of reactant nuclei (forward rate) + // - Columns 4–6: 1-based index of product nuclei (forward rate) + // - Columns 7-8: 1-based index of non (n, H1, He4) nuclei. + // - Column 9: 1-based index of the forward rate + // - Column 10: 1-based index of the reverse rate + + using namespace Species; + using namespace Rates; + + constexpr int H1_index = 2; + constexpr int N_index = 1; + constexpr int He4_index = 3; + constexpr int NumNSERatePairs = 149; + + inline AMREX_GPU_MANAGED amrex::Array2D rate_pair_data { + He4, C12, -1, O16, -1, -1, C12, O16, k_C12_He4_to_O16_reaclib, k_O16_to_He4_C12_reaclib, + He4, O16, -1, Ne20, -1, -1, O16, Ne20, k_O16_He4_to_Ne20_reaclib, k_Ne20_to_He4_O16_reaclib, + N, Mg23, -1, Mg24, -1, -1, Mg23, Mg24, k_Mg23_n_to_Mg24_reaclib, k_Mg24_to_n_Mg23_reaclib, + He4, Mg23, -1, Si27, -1, -1, Mg23, Si27, k_Mg23_He4_to_Si27_reaclib, k_Si27_to_He4_Mg23_reaclib, + He4, Mg24, -1, Si28, -1, -1, Mg24, Si28, k_Mg24_He4_to_Si28_reaclib, k_Si28_to_He4_Mg24_reaclib, + H1, Al27, -1, Si28, -1, -1, Al27, Si28, k_Al27_p_to_Si28_reaclib, k_Si28_to_p_Al27_reaclib, + He4, Al27, -1, P31, -1, -1, Al27, P31, k_Al27_He4_to_P31_reaclib, k_P31_to_He4_Al27_reaclib, + N, Si27, -1, Si28, -1, -1, Si27, Si28, k_Si27_n_to_Si28_reaclib, k_Si28_to_n_Si27_reaclib, + N, Si28, -1, Si29, -1, -1, Si28, Si29, k_Si28_n_to_Si29_reaclib, k_Si29_to_n_Si28_reaclib, + H1, Si28, -1, P29, -1, -1, Si28, P29, k_Si28_p_to_P29_reaclib, k_P29_to_p_Si28_reaclib, + He4, Si28, -1, S32, -1, -1, Si28, S32, k_Si28_He4_to_S32_reaclib, k_S32_to_He4_Si28_reaclib, + N, Si29, -1, Si30, -1, -1, Si29, Si30, k_Si29_n_to_Si30_reaclib, k_Si30_to_n_Si29_reaclib, + He4, Si29, -1, S33, -1, -1, Si29, S33, k_Si29_He4_to_S33_reaclib, k_S33_to_He4_Si29_reaclib, + N, Si30, -1, Si31, -1, -1, Si30, Si31, k_Si30_n_to_Si31_reaclib, k_Si31_to_n_Si30_reaclib, + H1, Si30, -1, P31, -1, -1, Si30, P31, k_Si30_p_to_P31_reaclib, k_P31_to_p_Si30_reaclib, + He4, Si30, -1, S34, -1, -1, Si30, S34, k_Si30_He4_to_S34_reaclib, k_S34_to_He4_Si30_reaclib, + He4, Si31, -1, S35, -1, -1, Si31, S35, k_Si31_He4_to_S35_reaclib, k_S35_to_He4_Si31_reaclib, + He4, P29, -1, Cl33, -1, -1, P29, Cl33, k_P29_He4_to_Cl33_reaclib, k_Cl33_to_He4_P29_reaclib, + H1, P31, -1, S32, -1, -1, P31, S32, k_P31_p_to_S32_reaclib, k_S32_to_p_P31_reaclib, + He4, P31, -1, Cl35, -1, -1, P31, Cl35, k_P31_He4_to_Cl35_reaclib, k_Cl35_to_He4_P31_reaclib, + H1, P33, -1, S34, -1, -1, P33, S34, k_P33_p_to_S34_reaclib, k_S34_to_p_P33_reaclib, + He4, P33, -1, Cl37, -1, -1, P33, Cl37, k_P33_He4_to_Cl37_reaclib, k_Cl37_to_He4_P33_reaclib, + N, S32, -1, S33, -1, -1, S32, S33, k_S32_n_to_S33_reaclib, k_S33_to_n_S32_reaclib, + H1, S32, -1, Cl33, -1, -1, S32, Cl33, k_S32_p_to_Cl33_reaclib, k_Cl33_to_p_S32_reaclib, + He4, S32, -1, Ar36, -1, -1, S32, Ar36, k_S32_He4_to_Ar36_reaclib, k_Ar36_to_He4_S32_reaclib, + N, S33, -1, S34, -1, -1, S33, S34, k_S33_n_to_S34_reaclib, k_S34_to_n_S33_reaclib, + He4, S33, -1, Ar37, -1, -1, S33, Ar37, k_S33_He4_to_Ar37_reaclib, k_Ar37_to_He4_S33_reaclib, + N, S34, -1, S35, -1, -1, S34, S35, k_S34_n_to_S35_reaclib, k_S35_to_n_S34_reaclib, + H1, S34, -1, Cl35, -1, -1, S34, Cl35, k_S34_p_to_Cl35_reaclib, k_Cl35_to_p_S34_reaclib, + He4, S34, -1, Ar38, -1, -1, S34, Ar38, k_S34_He4_to_Ar38_reaclib, k_Ar38_to_He4_S34_reaclib, + He4, Cl33, -1, K37, -1, -1, Cl33, K37, k_Cl33_He4_to_K37_reaclib, k_K37_to_He4_Cl33_reaclib, + H1, Cl35, -1, Ar36, -1, -1, Cl35, Ar36, k_Cl35_p_to_Ar36_reaclib, k_Ar36_to_p_Cl35_reaclib, + He4, Cl35, -1, K39, -1, -1, Cl35, K39, k_Cl35_He4_to_K39_reaclib, k_K39_to_He4_Cl35_reaclib, + H1, Cl37, -1, Ar38, -1, -1, Cl37, Ar38, k_Cl37_p_to_Ar38_reaclib, k_Ar38_to_p_Cl37_reaclib, + N, Ar36, -1, Ar37, -1, -1, Ar36, Ar37, k_Ar36_n_to_Ar37_reaclib, k_Ar37_to_n_Ar36_reaclib, + H1, Ar36, -1, K37, -1, -1, Ar36, K37, k_Ar36_p_to_K37_reaclib, k_K37_to_p_Ar36_reaclib, + He4, Ar36, -1, Ca40, -1, -1, Ar36, Ca40, k_Ar36_He4_to_Ca40_reaclib, k_Ca40_to_He4_Ar36_reaclib, + N, Ar37, -1, Ar38, -1, -1, Ar37, Ar38, k_Ar37_n_to_Ar38_reaclib, k_Ar38_to_n_Ar37_reaclib, + H1, Ar38, -1, K39, -1, -1, Ar38, K39, k_Ar38_p_to_K39_reaclib, k_K39_to_p_Ar38_reaclib, + He4, Ar38, -1, Ca42, -1, -1, Ar38, Ca42, k_Ar38_He4_to_Ca42_reaclib, k_Ca42_to_He4_Ar38_reaclib, + He4, K37, -1, Sc41, -1, -1, K37, Sc41, k_K37_He4_to_Sc41_reaclib, k_Sc41_to_He4_K37_reaclib, + H1, K39, -1, Ca40, -1, -1, K39, Ca40, k_K39_p_to_Ca40_reaclib, k_Ca40_to_p_K39_reaclib, + He4, K39, -1, Sc43, -1, -1, K39, Sc43, k_K39_He4_to_Sc43_reaclib, k_Sc43_to_He4_K39_reaclib, + H1, Ca40, -1, Sc41, -1, -1, Ca40, Sc41, k_Ca40_p_to_Sc41_reaclib, k_Sc41_to_p_Ca40_reaclib, + He4, Ca40, -1, Ti44, -1, -1, Ca40, Ti44, k_Ca40_He4_to_Ti44_reaclib, k_Ti44_to_He4_Ca40_reaclib, + H1, Ca42, -1, Sc43, -1, -1, Ca42, Sc43, k_Ca42_p_to_Sc43_reaclib, k_Sc43_to_p_Ca42_reaclib, + He4, Ca42, -1, Ti46, -1, -1, Ca42, Ti46, k_Ca42_He4_to_Ti46_reaclib, k_Ti46_to_He4_Ca42_reaclib, + H1, Sc43, -1, Ti44, -1, -1, Sc43, Ti44, k_Sc43_p_to_Ti44_reaclib, k_Ti44_to_p_Sc43_reaclib, + He4, Sc43, -1, V47, -1, -1, Sc43, V47, k_Sc43_He4_to_V47_reaclib, k_V47_to_He4_Sc43_reaclib, + H1, Sc45, -1, Ti46, -1, -1, Sc45, Ti46, k_Sc45_p_to_Ti46_reaclib, k_Ti46_to_p_Sc45_reaclib, + He4, Sc45, -1, V49, -1, -1, Sc45, V49, k_Sc45_He4_to_V49_reaclib, k_V49_to_He4_Sc45_reaclib, + He4, Ti44, -1, Cr48, -1, -1, Ti44, Cr48, k_Ti44_He4_to_Cr48_reaclib, k_Cr48_to_He4_Ti44_reaclib, + H1, Ti46, -1, V47, -1, -1, Ti46, V47, k_Ti46_p_to_V47_reaclib, k_V47_to_p_Ti46_reaclib, + He4, Ti46, -1, Cr50, -1, -1, Ti46, Cr50, k_Ti46_He4_to_Cr50_reaclib, k_Cr50_to_He4_Ti46_reaclib, + H1, Ti48, -1, V49, -1, -1, Ti48, V49, k_Ti48_p_to_V49_reaclib, k_V49_to_p_Ti48_reaclib, + He4, Ti48, -1, Cr52, -1, -1, Ti48, Cr52, k_Ti48_He4_to_Cr52_reaclib, k_Cr52_to_He4_Ti48_reaclib, + H1, V47, -1, Cr48, -1, -1, V47, Cr48, k_V47_p_to_Cr48_reaclib, k_Cr48_to_p_V47_reaclib, + He4, V47, -1, Mn51, -1, -1, V47, Mn51, k_V47_He4_to_Mn51_reaclib, k_Mn51_to_He4_V47_reaclib, + H1, V49, -1, Cr50, -1, -1, V49, Cr50, k_V49_p_to_Cr50_reaclib, k_Cr50_to_p_V49_reaclib, + He4, V49, -1, Mn53, -1, -1, V49, Mn53, k_V49_He4_to_Mn53_reaclib, k_Mn53_to_He4_V49_reaclib, + H1, V51, -1, Cr52, -1, -1, V51, Cr52, k_V51_p_to_Cr52_reaclib, k_Cr52_to_p_V51_reaclib, + He4, V51, -1, Mn55, -1, -1, V51, Mn55, k_V51_He4_to_Mn55_reaclib, k_Mn55_to_He4_V51_reaclib, + He4, Cr48, -1, Fe52, -1, -1, Cr48, Fe52, k_Cr48_He4_to_Fe52_reaclib, k_Fe52_to_He4_Cr48_reaclib, + H1, Cr50, -1, Mn51, -1, -1, Cr50, Mn51, k_Cr50_p_to_Mn51_reaclib, k_Mn51_to_p_Cr50_reaclib, + He4, Cr50, -1, Fe54, -1, -1, Cr50, Fe54, k_Cr50_He4_to_Fe54_reaclib, k_Fe54_to_He4_Cr50_reaclib, + H1, Cr52, -1, Mn53, -1, -1, Cr52, Mn53, k_Cr52_p_to_Mn53_reaclib, k_Mn53_to_p_Cr52_reaclib, + He4, Cr52, -1, Fe56, -1, -1, Cr52, Fe56, k_Cr52_He4_to_Fe56_reaclib, k_Fe56_to_He4_Cr52_reaclib, + H1, Cr54, -1, Mn55, -1, -1, Cr54, Mn55, k_Cr54_p_to_Mn55_reaclib, k_Mn55_to_p_Cr54_reaclib, + He4, Cr54, -1, Fe58, -1, -1, Cr54, Fe58, k_Cr54_He4_to_Fe58_reaclib, k_Fe58_to_He4_Cr54_reaclib, + H1, Mn51, -1, Fe52, -1, -1, Mn51, Fe52, k_Mn51_p_to_Fe52_reaclib, k_Fe52_to_p_Mn51_reaclib, + He4, Mn51, -1, Co55, -1, -1, Mn51, Co55, k_Mn51_He4_to_Co55_reaclib, k_Co55_to_He4_Mn51_reaclib, + H1, Mn53, -1, Fe54, -1, -1, Mn53, Fe54, k_Mn53_p_to_Fe54_reaclib, k_Fe54_to_p_Mn53_reaclib, + He4, Mn53, -1, Co57, -1, -1, Mn53, Co57, k_Mn53_He4_to_Co57_reaclib, k_Co57_to_He4_Mn53_reaclib, + H1, Mn55, -1, Fe56, -1, -1, Mn55, Fe56, k_Mn55_p_to_Fe56_reaclib, k_Fe56_to_p_Mn55_reaclib, + He4, Mn55, -1, Co59, -1, -1, Mn55, Co59, k_Mn55_He4_to_Co59_reaclib, k_Co59_to_He4_Mn55_reaclib, + He4, Fe52, -1, Ni56, -1, -1, Fe52, Ni56, k_Fe52_He4_to_Ni56_reaclib, k_Ni56_to_He4_Fe52_reaclib, + H1, Fe54, -1, Co55, -1, -1, Fe54, Co55, k_Fe54_p_to_Co55_reaclib, k_Co55_to_p_Fe54_reaclib, + He4, Fe54, -1, Ni58, -1, -1, Fe54, Ni58, k_Fe54_He4_to_Ni58_reaclib, k_Ni58_to_He4_Fe54_reaclib, + H1, Fe56, -1, Co57, -1, -1, Fe56, Co57, k_Fe56_p_to_Co57_reaclib, k_Co57_to_p_Fe56_reaclib, + He4, Fe56, -1, Ni60, -1, -1, Fe56, Ni60, k_Fe56_He4_to_Ni60_reaclib, k_Ni60_to_He4_Fe56_reaclib, + H1, Fe58, -1, Co59, -1, -1, Fe58, Co59, k_Fe58_p_to_Co59_reaclib, k_Co59_to_p_Fe58_reaclib, + N, Co55, -1, Co56, -1, -1, Co55, Co56, k_Co55_n_to_Co56_reaclib, k_Co56_to_n_Co55_reaclib, + H1, Co55, -1, Ni56, -1, -1, Co55, Ni56, k_Co55_p_to_Ni56_reaclib, k_Ni56_to_p_Co55_reaclib, + He4, Co55, -1, Cu59, -1, -1, Co55, Cu59, k_Co55_He4_to_Cu59_reaclib, k_Cu59_to_He4_Co55_reaclib, + N, Co56, -1, Co57, -1, -1, Co56, Co57, k_Co56_n_to_Co57_reaclib, k_Co57_to_n_Co56_reaclib, + H1, Co57, -1, Ni58, -1, -1, Co57, Ni58, k_Co57_p_to_Ni58_reaclib, k_Ni58_to_p_Co57_reaclib, + H1, Co59, -1, Ni60, -1, -1, Co59, Ni60, k_Co59_p_to_Ni60_reaclib, k_Ni60_to_p_Co59_reaclib, + He4, Ni56, -1, Zn60, -1, -1, Ni56, Zn60, k_Ni56_He4_to_Zn60_reaclib, k_Zn60_to_He4_Ni56_reaclib, + H1, Ni58, -1, Cu59, -1, -1, Ni58, Cu59, k_Ni58_p_to_Cu59_reaclib, k_Cu59_to_p_Ni58_reaclib, + H1, Cu59, -1, Zn60, -1, -1, Cu59, Zn60, k_Cu59_p_to_Zn60_reaclib, k_Zn60_to_p_Cu59_reaclib, + N, Mg23, -1, He4, Ne20, -1, Mg23, Ne20, k_Mg23_n_to_He4_Ne20_reaclib, k_Ne20_He4_to_n_Mg23_reaclib, + H1, Al27, -1, He4, Mg24, -1, Al27, Mg24, k_Al27_p_to_He4_Mg24_reaclib, k_Mg24_He4_to_p_Al27_reaclib, + He4, Al27, -1, H1, Si30, -1, Al27, Si30, k_Al27_He4_to_p_Si30_reaclib, k_Si30_p_to_He4_Al27_reaclib, + N, Si27, -1, H1, Al27, -1, Si27, Al27, k_Si27_n_to_p_Al27_reaclib, k_Al27_p_to_n_Si27_reaclib, + N, Si27, -1, He4, Mg24, -1, Si27, Mg24, k_Si27_n_to_He4_Mg24_reaclib, k_Mg24_He4_to_n_Si27_reaclib, + H1, Si31, -1, N, P31, -1, Si31, P31, k_Si31_p_to_n_P31_reaclib, k_P31_n_to_p_Si31_reaclib, + He4, Si31, -1, N, S34, -1, Si31, S34, k_Si31_He4_to_n_S34_reaclib, k_S34_n_to_He4_Si31_reaclib, + N, P29, -1, H1, Si29, -1, P29, Si29, k_P29_n_to_p_Si29_reaclib, k_Si29_p_to_n_P29_reaclib, + He4, P29, -1, H1, S32, -1, P29, S32, k_P29_He4_to_p_S32_reaclib, k_S32_p_to_He4_P29_reaclib, + H1, P31, -1, He4, Si28, -1, P31, Si28, k_P31_p_to_He4_Si28_reaclib, k_Si28_He4_to_p_P31_reaclib, + He4, P31, -1, H1, S34, -1, P31, S34, k_P31_He4_to_p_S34_reaclib, k_S34_p_to_He4_P31_reaclib, + H1, P33, -1, He4, Si30, -1, P33, Si30, k_P33_p_to_He4_Si30_reaclib, k_Si30_He4_to_p_P33_reaclib, + N, S32, -1, He4, Si29, -1, S32, Si29, k_S32_n_to_He4_Si29_reaclib, k_Si29_He4_to_n_S32_reaclib, + N, S33, -1, H1, P33, -1, S33, P33, k_S33_n_to_p_P33_reaclib, k_P33_p_to_n_S33_reaclib, + N, S33, -1, He4, Si30, -1, S33, Si30, k_S33_n_to_He4_Si30_reaclib, k_Si30_He4_to_n_S33_reaclib, + He4, S35, -1, N, Ar38, -1, S35, Ar38, k_S35_He4_to_n_Ar38_reaclib, k_Ar38_n_to_He4_S35_reaclib, + N, Cl33, -1, H1, S33, -1, Cl33, S33, k_Cl33_n_to_p_S33_reaclib, k_S33_p_to_n_Cl33_reaclib, + He4, Cl33, -1, H1, Ar36, -1, Cl33, Ar36, k_Cl33_He4_to_p_Ar36_reaclib, k_Ar36_p_to_He4_Cl33_reaclib, + N, Cl35, -1, H1, S35, -1, Cl35, S35, k_Cl35_n_to_p_S35_reaclib, k_S35_p_to_n_Cl35_reaclib, + H1, Cl35, -1, He4, S32, -1, Cl35, S32, k_Cl35_p_to_He4_S32_reaclib, k_S32_He4_to_p_Cl35_reaclib, + He4, Cl35, -1, H1, Ar38, -1, Cl35, Ar38, k_Cl35_He4_to_p_Ar38_reaclib, k_Ar38_p_to_He4_Cl35_reaclib, + H1, Cl37, -1, He4, S34, -1, Cl37, S34, k_Cl37_p_to_He4_S34_reaclib, k_S34_He4_to_p_Cl37_reaclib, + N, Ar36, -1, He4, S33, -1, Ar36, S33, k_Ar36_n_to_He4_S33_reaclib, k_S33_He4_to_n_Ar36_reaclib, + N, Ar37, -1, H1, Cl37, -1, Ar37, Cl37, k_Ar37_n_to_p_Cl37_reaclib, k_Cl37_p_to_n_Ar37_reaclib, + N, Ar37, -1, He4, S34, -1, Ar37, S34, k_Ar37_n_to_He4_S34_reaclib, k_S34_He4_to_n_Ar37_reaclib, + N, K37, -1, H1, Ar37, -1, K37, Ar37, k_K37_n_to_p_Ar37_reaclib, k_Ar37_p_to_n_K37_reaclib, + He4, K37, -1, H1, Ca40, -1, K37, Ca40, k_K37_He4_to_p_Ca40_reaclib, k_Ca40_p_to_He4_K37_reaclib, + H1, K39, -1, He4, Ar36, -1, K39, Ar36, k_K39_p_to_He4_Ar36_reaclib, k_Ar36_He4_to_p_K39_reaclib, + N, Ca40, -1, He4, Ar37, -1, Ca40, Ar37, k_Ca40_n_to_He4_Ar37_reaclib, k_Ar37_He4_to_n_Ca40_reaclib, + H1, Ca42, -1, He4, K39, -1, Ca42, K39, k_Ca42_p_to_He4_K39_reaclib, k_K39_He4_to_p_Ca42_reaclib, + He4, Sc41, -1, H1, Ti44, -1, Sc41, Ti44, k_Sc41_He4_to_p_Ti44_reaclib, k_Ti44_p_to_He4_Sc41_reaclib, + H1, Sc43, -1, He4, Ca40, -1, Sc43, Ca40, k_Sc43_p_to_He4_Ca40_reaclib, k_Ca40_He4_to_p_Sc43_reaclib, + He4, Sc43, -1, H1, Ti46, -1, Sc43, Ti46, k_Sc43_He4_to_p_Ti46_reaclib, k_Ti46_p_to_He4_Sc43_reaclib, + H1, Sc45, -1, He4, Ca42, -1, Sc45, Ca42, k_Sc45_p_to_He4_Ca42_reaclib, k_Ca42_He4_to_p_Sc45_reaclib, + He4, Sc45, -1, H1, Ti48, -1, Sc45, Ti48, k_Sc45_He4_to_p_Ti48_reaclib, k_Ti48_p_to_He4_Sc45_reaclib, + H1, V47, -1, He4, Ti44, -1, V47, Ti44, k_V47_p_to_He4_Ti44_reaclib, k_Ti44_He4_to_p_V47_reaclib, + He4, V47, -1, H1, Cr50, -1, V47, Cr50, k_V47_He4_to_p_Cr50_reaclib, k_Cr50_p_to_He4_V47_reaclib, + H1, V49, -1, He4, Ti46, -1, V49, Ti46, k_V49_p_to_He4_Ti46_reaclib, k_Ti46_He4_to_p_V49_reaclib, + He4, V49, -1, H1, Cr52, -1, V49, Cr52, k_V49_He4_to_p_Cr52_reaclib, k_Cr52_p_to_He4_V49_reaclib, + H1, V51, -1, He4, Ti48, -1, V51, Ti48, k_V51_p_to_He4_Ti48_reaclib, k_Ti48_He4_to_p_V51_reaclib, + He4, Cr48, -1, H1, Mn51, -1, Cr48, Mn51, k_Cr48_He4_to_p_Mn51_reaclib, k_Mn51_p_to_He4_Cr48_reaclib, + H1, Cr54, -1, He4, V51, -1, Cr54, V51, k_Cr54_p_to_He4_V51_reaclib, k_V51_He4_to_p_Cr54_reaclib, + He4, Mn51, -1, H1, Fe54, -1, Mn51, Fe54, k_Mn51_He4_to_p_Fe54_reaclib, k_Fe54_p_to_He4_Mn51_reaclib, + H1, Mn53, -1, He4, Cr50, -1, Mn53, Cr50, k_Mn53_p_to_He4_Cr50_reaclib, k_Cr50_He4_to_p_Mn53_reaclib, + He4, Mn53, -1, H1, Fe56, -1, Mn53, Fe56, k_Mn53_He4_to_p_Fe56_reaclib, k_Fe56_p_to_He4_Mn53_reaclib, + H1, Mn55, -1, He4, Cr52, -1, Mn55, Cr52, k_Mn55_p_to_He4_Cr52_reaclib, k_Cr52_He4_to_p_Mn55_reaclib, + He4, Fe52, -1, H1, Co55, -1, Fe52, Co55, k_Fe52_He4_to_p_Co55_reaclib, k_Co55_p_to_He4_Fe52_reaclib, + H1, Fe58, -1, He4, Mn55, -1, Fe58, Mn55, k_Fe58_p_to_He4_Mn55_reaclib, k_Mn55_He4_to_p_Fe58_reaclib, + He4, Co55, -1, H1, Ni58, -1, Co55, Ni58, k_Co55_He4_to_p_Ni58_reaclib, k_Ni58_p_to_He4_Co55_reaclib, + N, Co56, -1, H1, Fe56, -1, Co56, Fe56, k_Co56_n_to_p_Fe56_reaclib, k_Fe56_p_to_n_Co56_reaclib, + N, Co56, -1, He4, Mn53, -1, Co56, Mn53, k_Co56_n_to_He4_Mn53_reaclib, k_Mn53_He4_to_n_Co56_reaclib, + H1, Co57, -1, He4, Fe54, -1, Co57, Fe54, k_Co57_p_to_He4_Fe54_reaclib, k_Fe54_He4_to_p_Co57_reaclib, + He4, Co57, -1, H1, Ni60, -1, Co57, Ni60, k_Co57_He4_to_p_Ni60_reaclib, k_Ni60_p_to_He4_Co57_reaclib, + H1, Co59, -1, He4, Fe56, -1, Co59, Fe56, k_Co59_p_to_He4_Fe56_reaclib, k_Fe56_He4_to_p_Co59_reaclib, + N, Ni56, -1, H1, Co56, -1, Ni56, Co56, k_Ni56_n_to_p_Co56_reaclib, k_Co56_p_to_n_Ni56_reaclib, + N, Cu59, -1, He4, Co56, -1, Cu59, Co56, k_Cu59_n_to_He4_Co56_reaclib, k_Co56_He4_to_n_Cu59_reaclib, + H1, Cu59, -1, He4, Ni56, -1, Cu59, Ni56, k_Cu59_p_to_He4_Ni56_reaclib, k_Ni56_He4_to_p_Cu59_reaclib, + He4, He4, He4, C12, -1, -1, C12, -1, k_He4_He4_He4_to_C12_reaclib, k_C12_to_3He4_reaclib, + Ne20, He4, -1, Mg24, -1, -1, Ne20, Mg24, k_Ne20_He4_to_Mg24_approx, k_Mg24_to_Ne20_He4_approx + }; +} +#endif + +#endif diff --git a/networks/massive-star-medium/actual_rhs.H b/networks/massive-star-medium/actual_rhs.H new file mode 100644 index 0000000000..1dd08e4d9d --- /dev/null +++ b/networks/massive-star-medium/actual_rhs.H @@ -0,0 +1,11795 @@ +#ifndef ACTUAL_RHS_H +#define ACTUAL_RHS_H + +#include +#include + +#include +#include +#include +#include +#ifdef SCREENING +#include +#endif +#include +#ifdef NEUTRINOS +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace amrex::literals; + +template +AMREX_GPU_DEVICE AMREX_INLINE +void ener_gener_rate(T const& dydt, amrex::Real& enuc) +{ + + // Computes the instantaneous energy generation rate (from the nuclei) + + // This is basically e = m c**2 + + enuc = 0.0_rt; + + amrex::constexpr_for<1, NumSpec+1>([&] (auto n) + { + enuc += dydt(n) * network::mion(); + }); + + enuc *= C::enuc_conv2; +} + + +#ifdef SCREENING +template +AMREX_GPU_DEVICE AMREX_INLINE +void evaluate_screening(const burn_t& state, + const amrex::Array1D& Y, + T& rate_eval) { + + using namespace Rates; + + // Evaluate screening terms + + using number_t = std::conditional_t; + number_t temp = state.T; + if constexpr (do_T_derivatives) { + // seed the dual number for temperature before calculating anything with it + autodiff::seed(temp); + } + + plasma_state_t pstate{}; + fill_plasma_state(pstate, temp, state.rho, Y); + + amrex::Real log_scor, dlog_scor_dT; + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 15.0_rt, 33.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_P33) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_P33) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 25.0_rt, 53.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_Mn53) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Mn53) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 14.0_rt, 31.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_Si31) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Si31) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 22.0_rt, 44.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_Ti44) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Ti44) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 22.0_rt, 48.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_Ti48) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Ti48) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 20.0_rt, 42.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_Ca42) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Ca42) = dlog_scor_dT; + } + } + + { + 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_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_p_Sc43) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Sc43) = dlog_scor_dT; + } + } + + { + 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 (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Fe56) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 18.0_rt, 38.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_Ar38) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Ar38) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 24.0_rt, 54.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_Cr54) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Cr54) = dlog_scor_dT; + } + } + + { + 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 (std::is_same_v) { + 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, 27.0_rt, 57.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_Co57) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Co57) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 20.0_rt, 42.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_Ca42) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Ca42) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 12.0_rt, 24.0_rt); + static_assert(scn_fac.z1 == 2.0_rt); + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_Mg24) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Mg24) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(6.0_rt, 12.0_rt, 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 (std::is_same_v) { + rate_eval.dlog_screen_dT(k_C12_O16) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 18.0_rt, 38.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_Ar38) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Ar38) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 23.0_rt, 47.0_rt); + static_assert(scn_fac.z1 == 1.0_rt); + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_p_V47) = log_scor; + if constexpr (std::is_same_v) { + 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, 23.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_V51) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_V51) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 21.0_rt, 45.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_Sc45) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Sc45) = 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_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_p_Co55) = log_scor; + if constexpr (std::is_same_v) { + 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_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_C12_C12) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_C12_C12) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 17.0_rt, 33.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_Cl33) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Cl33) = 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_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_p_Al27) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Al27) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 22.0_rt, 46.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_Ti46) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Ti46) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 23.0_rt, 47.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_V47) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_V47) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 21.0_rt, 45.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_Sc45) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Sc45) = dlog_scor_dT; + } + } + + { + 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 (std::is_same_v) { + 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, 15.0_rt, 31.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_P31) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_P31) = 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_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_p_Ni58) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Ni58) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 14.0_rt, 29.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_Si29) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Si29) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 23.0_rt, 49.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_V49) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_V49) = 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_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_O16_O16) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_O16_O16) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 15.0_rt, 31.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_P31) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_P31) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 14.0_rt, 29.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_Si29) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Si29) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 24.0_rt, 52.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_Cr52) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Cr52) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 16.0_rt, 34.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_S34) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_S34) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 18.0_rt, 37.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_Ar37) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Ar37) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 17.0_rt, 37.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_Cl37) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Cl37) = dlog_scor_dT; + } + } + + { + 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_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_Ca40) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Ca40) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 18.0_rt, 36.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_Ar36) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Ar36) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 15.0_rt, 33.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_P33) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_P33) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 24.0_rt, 52.0_rt); + static_assert(scn_fac.z1 == 2.0_rt); + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_Cr52) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Cr52) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 16.0_rt, 34.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_S34) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_S34) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 14.0_rt, 31.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_Si31) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Si31) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 25.0_rt, 55.0_rt); + static_assert(scn_fac.z1 == 1.0_rt); + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_p_Mn55) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Mn55) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 21.0_rt, 43.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_Sc43) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Sc43) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 26.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_Fe56) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Fe56) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 24.0_rt, 54.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_Cr54) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Cr54) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 25.0_rt, 55.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_Mn55) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Mn55) = dlog_scor_dT; + } + } + + { + 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_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_Ne20) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Ne20) = dlog_scor_dT; + } + } + + { + 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 (std::is_same_v) { + 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, 14.0_rt, 28.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_Si28) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Si28) = 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_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_p_Fe54) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Fe54) = 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_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_Co55) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Co55) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 13.0_rt, 27.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_Al27) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Al27) = dlog_scor_dT; + } + } + + { + 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_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_p_Cl35) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Cl35) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 16.0_rt, 33.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_S33) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_S33) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 14.0_rt, 30.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_Si30) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Si30) = 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_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_O16) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_O16) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 14.0_rt, 30.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_Si30) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Si30) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 16.0_rt, 35.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_S35) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_S35) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 12.0_rt, 23.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_Mg23) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Mg23) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 18.0_rt, 37.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_Ar37) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Ar37) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 27.0_rt, 59.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_Co59) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Co59) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 16.0_rt, 35.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_S35) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_S35) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 15.0_rt, 29.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_P29) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_P29) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 24.0_rt, 50.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_Cr50) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Cr50) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 16.0_rt, 32.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_S32) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_S32) = dlog_scor_dT; + } + } + + { + 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_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_p_Cu59) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Cu59) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 16.0_rt, 32.0_rt); + static_assert(scn_fac.z1 == 2.0_rt); + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_S32) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_S32) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 25.0_rt, 53.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_Mn53) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Mn53) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 21.0_rt, 41.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_Sc41) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Sc41) = dlog_scor_dT; + } + } + + { + 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_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_Co56) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Co56) = dlog_scor_dT; + } + } + + { + 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 (std::is_same_v) { + 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, 26.0_rt, 54.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_Fe54) = log_scor; + if constexpr (std::is_same_v) { + 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, 22.0_rt, 48.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_Ti48) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Ti48) = dlog_scor_dT; + } + } + + { + 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 (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Be8) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 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 (std::is_same_v) { + 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, 19.0_rt, 39.0_rt); + static_assert(scn_fac.z1 == 1.0_rt); + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_p_K39) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_K39) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 17.0_rt, 35.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_Cl35) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Cl35) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 16.0_rt, 33.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_S33) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_S33) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 23.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_V51) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_V51) = dlog_scor_dT; + } + } + + { + 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_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_C12) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_C12) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 19.0_rt, 39.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_K39) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_K39) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 22.0_rt, 46.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_Ti46) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Ti46) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 28.0_rt, 60.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_Ni60) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Ni60) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 26.0_rt, 58.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_Fe58) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Fe58) = dlog_scor_dT; + } + } + + { + 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_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_Cr48) = log_scor; + if constexpr (std::is_same_v) { + 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, 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 (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Mn51) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 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 (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Na23) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 23.0_rt, 49.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_V49) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_V49) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 26.0_rt, 52.0_rt); + static_assert(scn_fac.z1 == 2.0_rt); + actual_log_screen(pstate, scn_fac, log_scor, dlog_scor_dT); + rate_eval.log_screen(k_He4_Fe52) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Fe52) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 19.0_rt, 37.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_K37) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_K37) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(2.0_rt, 4.0_rt, 24.0_rt, 50.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_Cr50) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_Cr50) = dlog_scor_dT; + } + } + + { + 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 (std::is_same_v) { + 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, 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 (std::is_same_v) { + rate_eval.dlog_screen_dT(k_He4_He4) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(6.0_rt, 12.0_rt, 10.0_rt, 20.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_Ne20) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_C12_Ne20) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 20.0_rt, 40.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_Ca40) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Ca40) = dlog_scor_dT; + } + } + + { + constexpr auto scn_fac = scrn::calculate_screen_factor(1.0_rt, 1.0_rt, 18.0_rt, 36.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_Ar36) = log_scor; + if constexpr (std::is_same_v) { + rate_eval.dlog_screen_dT(k_p_Ar36) = dlog_scor_dT; + } + } + +} +#endif + + +template +AMREX_GPU_DEVICE AMREX_INLINE +void evaluate_rates(const burn_t& state, + const amrex::Array1D& Y, + T& rate_eval) { + + using namespace Rates; + + // here Y is consistent with state.xn + + [[maybe_unused]] const amrex::Real rhoy = state.rho * state.y_e; + + const tf_t tfactors = evaluate_tfactors(state.T); + + // Precompute screening terms + +#ifdef SCREENING + evaluate_screening(state, Y, rate_eval); +#endif + + // Fill in different rates + + rate_util::fill_rates(tfactors, state.T, state.rho, rhoy, Y, rate_eval); + + // Apply any parameters to disable rates + + +} + + +// backwards-compatible wrapper +template +AMREX_GPU_DEVICE AMREX_INLINE +void evaluate_rates(const burn_t& state, + T& rate_eval) { + + // create molar fractions + amrex::Array1D Y; + for (int n = 1; n <= NumSpec; ++n) { + Y(n) = state.xn[n-1] * aion_inv[n-1]; + } + + evaluate_rates(state, Y, rate_eval); +} + + +#ifdef NSE_NET +AMREX_GPU_DEVICE AMREX_INLINE +void get_ydot_weak(const burn_t& state, + amrex::Array1D& ydot_nuc, + amrex::Real& enuc_weak, + [[maybe_unused]] const amrex::Array1D& Y) { + /// + /// Calculate Ydots contribute only from weak reactions. + /// This is used to calculate dyedt and energy generation from + /// weak reactions for self-consistent NSE + /// + + using namespace modified_rates; + using namespace temp_tabular; + + // initialize ydot_nuc to 0 + + for (int i = 1; i <= neqs; ++i) { + ydot_nuc(i) = 0.0_rt; + } + + rate_t rate_eval; + + [[maybe_unused]] const amrex::Real rhoy = state.rho * state.y_e; + + const tf_t tfactors = evaluate_tfactors(state.T); + + // fill only the weak rates + rate_util::fill_weak_rates(tfactors, state.T, state.rho, rhoy, Y, rate_eval); + + // assemble Ydot for just the weak rate evolution + + const auto& screened_rates = rate_eval.screened_rates; + + ydot_nuc(N) = + (-screened_rates(k_n_to_p_beta_neg_weaktab)*Y(N) + screened_rates(k_p_to_n_electron_capture_weaktab)*Y(H1)); + + ydot_nuc(H1) = + (screened_rates(k_n_to_p_beta_neg_weaktab)*Y(N) + -screened_rates(k_p_to_n_electron_capture_weaktab)*Y(H1)); + + ydot_nuc(He4) = 0.0_rt; + + ydot_nuc(C12) = 0.0_rt; + + ydot_nuc(O16) = 0.0_rt; + + ydot_nuc(Ne20) = 0.0_rt; + + ydot_nuc(Mg23) = 0.0_rt; + + ydot_nuc(Mg24) = 0.0_rt; + + ydot_nuc(Al27) = + (screened_rates(k_Si27_to_Al27_electron_capture_weaktab)*Y(Si27) + -screened_rates(k_Al27_to_Si27_beta_neg_weaktab)*Y(Al27)); + + ydot_nuc(Si27) = + (-screened_rates(k_Si27_to_Al27_electron_capture_weaktab)*Y(Si27) + screened_rates(k_Al27_to_Si27_beta_neg_weaktab)*Y(Al27)); + + ydot_nuc(Si28) = 0.0_rt; + + ydot_nuc(Si29) = + (screened_rates(k_P29_to_Si29_electron_capture_weaktab)*Y(P29) + -screened_rates(k_Si29_to_P29_beta_neg_weaktab)*Y(Si29)); + + ydot_nuc(Si30) = 0.0_rt; + + ydot_nuc(Si31) = + (-screened_rates(k_Si31_to_P31_beta_neg_weaktab)*Y(Si31) + screened_rates(k_P31_to_Si31_electron_capture_weaktab)*Y(P31)); + + ydot_nuc(P29) = + (-screened_rates(k_P29_to_Si29_electron_capture_weaktab)*Y(P29) + screened_rates(k_Si29_to_P29_beta_neg_weaktab)*Y(Si29)); + + ydot_nuc(P31) = + (screened_rates(k_Si31_to_P31_beta_neg_weaktab)*Y(Si31) + -screened_rates(k_P31_to_Si31_electron_capture_weaktab)*Y(P31)); + + ydot_nuc(P33) = + (-screened_rates(k_P33_to_S33_beta_neg_weaktab)*Y(P33) + screened_rates(k_S33_to_P33_electron_capture_weaktab)*Y(S33)); + + ydot_nuc(S32) = 0.0_rt; + + ydot_nuc(S33) = + (screened_rates(k_Cl33_to_S33_electron_capture_weaktab)*Y(Cl33) + -screened_rates(k_S33_to_Cl33_beta_neg_weaktab)*Y(S33)) + + (screened_rates(k_P33_to_S33_beta_neg_weaktab)*Y(P33) + -screened_rates(k_S33_to_P33_electron_capture_weaktab)*Y(S33)); + + ydot_nuc(S34) = 0.0_rt; + + ydot_nuc(S35) = + (-screened_rates(k_S35_to_Cl35_beta_neg_weaktab)*Y(S35) + screened_rates(k_Cl35_to_S35_electron_capture_weaktab)*Y(Cl35)); + + ydot_nuc(Cl33) = + (-screened_rates(k_Cl33_to_S33_electron_capture_weaktab)*Y(Cl33) + screened_rates(k_S33_to_Cl33_beta_neg_weaktab)*Y(S33)); + + ydot_nuc(Cl35) = + (screened_rates(k_S35_to_Cl35_beta_neg_weaktab)*Y(S35) + -screened_rates(k_Cl35_to_S35_electron_capture_weaktab)*Y(Cl35)); + + ydot_nuc(Cl37) = + (screened_rates(k_Ar37_to_Cl37_electron_capture_weaktab)*Y(Ar37) + -screened_rates(k_Cl37_to_Ar37_beta_neg_weaktab)*Y(Cl37)); + + ydot_nuc(Ar36) = 0.0_rt; + + ydot_nuc(Ar37) = + (-screened_rates(k_Ar37_to_Cl37_electron_capture_weaktab)*Y(Ar37) + screened_rates(k_Cl37_to_Ar37_beta_neg_weaktab)*Y(Cl37)) + + (screened_rates(k_K37_to_Ar37_electron_capture_weaktab)*Y(K37) + -screened_rates(k_Ar37_to_K37_beta_neg_weaktab)*Y(Ar37)); + + ydot_nuc(Ar38) = 0.0_rt; + + ydot_nuc(K37) = + (-screened_rates(k_K37_to_Ar37_electron_capture_weaktab)*Y(K37) + screened_rates(k_Ar37_to_K37_beta_neg_weaktab)*Y(Ar37)); + + ydot_nuc(K39) = 0.0_rt; + + ydot_nuc(Ca40) = 0.0_rt; + + ydot_nuc(Ca42) = 0.0_rt; + + ydot_nuc(Sc41) = 0.0_rt; + + ydot_nuc(Sc43) = 0.0_rt; + + ydot_nuc(Sc45) = 0.0_rt; + + ydot_nuc(Ti44) = 0.0_rt; + + ydot_nuc(Ti46) = 0.0_rt; + + ydot_nuc(Ti48) = 0.0_rt; + + ydot_nuc(V47) = 0.0_rt; + + ydot_nuc(V49) = 0.0_rt; + + ydot_nuc(V51) = 0.0_rt; + + ydot_nuc(Cr48) = 0.0_rt; + + ydot_nuc(Cr50) = 0.0_rt; + + ydot_nuc(Cr52) = 0.0_rt; + + ydot_nuc(Cr54) = 0.0_rt; + + ydot_nuc(Mn51) = 0.0_rt; + + ydot_nuc(Mn53) = 0.0_rt; + + ydot_nuc(Mn55) = 0.0_rt; + + ydot_nuc(Fe52) = 0.0_rt; + + ydot_nuc(Fe54) = 0.0_rt; + + ydot_nuc(Fe56) = + (screened_rates(k_Co56_to_Fe56_electron_capture_weaktab)*Y(Co56) + -screened_rates(k_Fe56_to_Co56_beta_neg_weaktab)*Y(Fe56)); + + ydot_nuc(Fe58) = 0.0_rt; + + ydot_nuc(Co55) = 0.0_rt; + + ydot_nuc(Co56) = + (-screened_rates(k_Co56_to_Fe56_electron_capture_weaktab)*Y(Co56) + screened_rates(k_Fe56_to_Co56_beta_neg_weaktab)*Y(Fe56)) + + (screened_rates(k_Ni56_to_Co56_electron_capture_weaktab)*Y(Ni56) + -screened_rates(k_Co56_to_Ni56_beta_neg_weaktab)*Y(Co56)); + + ydot_nuc(Co57) = 0.0_rt; + + ydot_nuc(Co59) = 0.0_rt; + + ydot_nuc(Ni56) = + (-screened_rates(k_Ni56_to_Co56_electron_capture_weaktab)*Y(Ni56) + screened_rates(k_Co56_to_Ni56_beta_neg_weaktab)*Y(Co56)); + + ydot_nuc(Ni58) = 0.0_rt; + + ydot_nuc(Ni60) = 0.0_rt; + + ydot_nuc(Cu59) = 0.0_rt; + + ydot_nuc(Zn60) = 0.0_rt; + + + enuc_weak = rate_eval.enuc_weak; +} +#endif + + +AMREX_GPU_DEVICE AMREX_INLINE +void rhs_nuc(const burn_t& state, + amrex::Array1D& ydot_nuc, + const amrex::Array1D& Y, + const amrex::Array1D& screened_rates) { + + using namespace Rates; + + ydot_nuc(N) = + (-screened_rates(k_Mg23_n_to_Mg24_reaclib)*Y(Mg23)*Y(N)*state.rho + screened_rates(k_Mg24_to_n_Mg23_reaclib)*Y(Mg24)) + + (-screened_rates(k_Si27_n_to_Si28_reaclib)*Y(Si27)*Y(N)*state.rho + screened_rates(k_Si28_to_n_Si27_reaclib)*Y(Si28)) + + (-screened_rates(k_Si28_n_to_Si29_reaclib)*Y(Si28)*Y(N)*state.rho + screened_rates(k_Si29_to_n_Si28_reaclib)*Y(Si29)) + + (-screened_rates(k_Si29_n_to_Si30_reaclib)*Y(Si29)*Y(N)*state.rho + screened_rates(k_Si30_to_n_Si29_reaclib)*Y(Si30)) + + (-screened_rates(k_Si30_n_to_Si31_reaclib)*Y(Si30)*Y(N)*state.rho + screened_rates(k_Si31_to_n_Si30_reaclib)*Y(Si31)) + + (-screened_rates(k_S32_n_to_S33_reaclib)*Y(S32)*Y(N)*state.rho + screened_rates(k_S33_to_n_S32_reaclib)*Y(S33)) + + (-screened_rates(k_S33_n_to_S34_reaclib)*Y(S33)*Y(N)*state.rho + screened_rates(k_S34_to_n_S33_reaclib)*Y(S34)) + + (-screened_rates(k_S34_n_to_S35_reaclib)*Y(S34)*Y(N)*state.rho + screened_rates(k_S35_to_n_S34_reaclib)*Y(S35)) + + (-screened_rates(k_Ar36_n_to_Ar37_reaclib)*Y(Ar36)*Y(N)*state.rho + screened_rates(k_Ar37_to_n_Ar36_reaclib)*Y(Ar37)) + + (-screened_rates(k_Ar37_n_to_Ar38_reaclib)*Y(Ar37)*Y(N)*state.rho + screened_rates(k_Ar38_to_n_Ar37_reaclib)*Y(Ar38)) + + (-screened_rates(k_Co55_n_to_Co56_reaclib)*Y(Co55)*Y(N)*state.rho + screened_rates(k_Co56_to_n_Co55_reaclib)*Y(Co56)) + + (-screened_rates(k_Co56_n_to_Co57_reaclib)*Y(Co56)*Y(N)*state.rho + screened_rates(k_Co57_to_n_Co56_reaclib)*Y(Co57)) + + (-screened_rates(k_Mg23_n_to_He4_Ne20_reaclib)*Y(Mg23)*Y(N)*state.rho + screened_rates(k_Ne20_He4_to_n_Mg23_reaclib)*Y(He4)*Y(Ne20)*state.rho) + + (-screened_rates(k_Mg23_n_to_C12_C12_reaclib)*Y(Mg23)*Y(N)*state.rho + 0.5*screened_rates(k_C12_C12_to_n_Mg23_reaclib)*amrex::Math::powi<2>(Y(C12))*state.rho) + + (-screened_rates(k_Si27_n_to_p_Al27_reaclib)*Y(Si27)*Y(N)*state.rho + screened_rates(k_Al27_p_to_n_Si27_reaclib)*Y(Al27)*Y(H1)*state.rho) + + (-screened_rates(k_Si27_n_to_He4_Mg24_reaclib)*Y(Si27)*Y(N)*state.rho + screened_rates(k_Mg24_He4_to_n_Si27_reaclib)*Y(He4)*Y(Mg24)*state.rho) + + (-screened_rates(k_Si27_n_to_C12_O16_reaclib)*Y(Si27)*Y(N)*state.rho + screened_rates(k_O16_C12_to_n_Si27_reaclib)*Y(C12)*Y(O16)*state.rho) + + (screened_rates(k_Si31_p_to_n_P31_reaclib)*Y(Si31)*Y(H1)*state.rho + -screened_rates(k_P31_n_to_p_Si31_reaclib)*Y(P31)*Y(N)*state.rho) + + (screened_rates(k_Si31_He4_to_n_S34_reaclib)*Y(He4)*Y(Si31)*state.rho + -screened_rates(k_S34_n_to_He4_Si31_reaclib)*Y(S34)*Y(N)*state.rho) + + (-screened_rates(k_P29_n_to_p_Si29_reaclib)*Y(P29)*Y(N)*state.rho + screened_rates(k_Si29_p_to_n_P29_reaclib)*Y(Si29)*Y(H1)*state.rho) + + (-screened_rates(k_S32_n_to_He4_Si29_reaclib)*Y(S32)*Y(N)*state.rho + screened_rates(k_Si29_He4_to_n_S32_reaclib)*Y(He4)*Y(Si29)*state.rho) + + (-screened_rates(k_S33_n_to_p_P33_reaclib)*Y(S33)*Y(N)*state.rho + screened_rates(k_P33_p_to_n_S33_reaclib)*Y(P33)*Y(H1)*state.rho) + + (-screened_rates(k_S33_n_to_He4_Si30_reaclib)*Y(S33)*Y(N)*state.rho + screened_rates(k_Si30_He4_to_n_S33_reaclib)*Y(He4)*Y(Si30)*state.rho) + + (screened_rates(k_S35_He4_to_n_Ar38_reaclib)*Y(He4)*Y(S35)*state.rho + -screened_rates(k_Ar38_n_to_He4_S35_reaclib)*Y(Ar38)*Y(N)*state.rho) + + (-screened_rates(k_Cl33_n_to_p_S33_reaclib)*Y(Cl33)*Y(N)*state.rho + screened_rates(k_S33_p_to_n_Cl33_reaclib)*Y(S33)*Y(H1)*state.rho) + + (-screened_rates(k_Cl35_n_to_p_S35_reaclib)*Y(Cl35)*Y(N)*state.rho + screened_rates(k_S35_p_to_n_Cl35_reaclib)*Y(S35)*Y(H1)*state.rho) + + (-screened_rates(k_Ar36_n_to_He4_S33_reaclib)*Y(Ar36)*Y(N)*state.rho + screened_rates(k_S33_He4_to_n_Ar36_reaclib)*Y(He4)*Y(S33)*state.rho) + + (-screened_rates(k_Ar37_n_to_p_Cl37_reaclib)*Y(Ar37)*Y(N)*state.rho + screened_rates(k_Cl37_p_to_n_Ar37_reaclib)*Y(Cl37)*Y(H1)*state.rho) + + (-screened_rates(k_Ar37_n_to_He4_S34_reaclib)*Y(Ar37)*Y(N)*state.rho + screened_rates(k_S34_He4_to_n_Ar37_reaclib)*Y(He4)*Y(S34)*state.rho) + + (-screened_rates(k_K37_n_to_p_Ar37_reaclib)*Y(K37)*Y(N)*state.rho + screened_rates(k_Ar37_p_to_n_K37_reaclib)*Y(Ar37)*Y(H1)*state.rho) + + (-screened_rates(k_Ca40_n_to_He4_Ar37_reaclib)*Y(Ca40)*Y(N)*state.rho + screened_rates(k_Ar37_He4_to_n_Ca40_reaclib)*Y(Ar37)*Y(He4)*state.rho) + + (-screened_rates(k_Co56_n_to_p_Fe56_reaclib)*Y(Co56)*Y(N)*state.rho + screened_rates(k_Fe56_p_to_n_Co56_reaclib)*Y(Fe56)*Y(H1)*state.rho) + + (-screened_rates(k_Co56_n_to_He4_Mn53_reaclib)*Y(Co56)*Y(N)*state.rho + screened_rates(k_Mn53_He4_to_n_Co56_reaclib)*Y(He4)*Y(Mn53)*state.rho) + + (-screened_rates(k_Ni56_n_to_p_Co56_reaclib)*Y(Ni56)*Y(N)*state.rho + screened_rates(k_Co56_p_to_n_Ni56_reaclib)*Y(Co56)*Y(H1)*state.rho) + + (-screened_rates(k_Cu59_n_to_He4_Co56_reaclib)*Y(Cu59)*Y(N)*state.rho + screened_rates(k_Co56_He4_to_n_Cu59_reaclib)*Y(Co56)*Y(He4)*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) + 2.0*screened_rates(k_Ni58_to_Ni56_n_n_approx)*Y(Ni58)) + + (-screened_rates(k_Ni58_n_n_to_Ni60_approx)*Y(Ni58)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + 2.0*screened_rates(k_Ni60_to_Ni58_n_n_approx)*Y(Ni60)) + + (-screened_rates(k_Co57_n_n_to_Co59_approx)*Y(Co57)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + 2.0*screened_rates(k_Co59_to_Co57_n_n_approx)*Y(Co59)) + + (-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)) + + (-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)) + + (-screened_rates(k_Fe56_n_n_to_Fe58_approx)*Y(Fe56)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + 2.0*screened_rates(k_Fe58_to_Fe56_n_n_approx)*Y(Fe58)) + + (-screened_rates(k_Mn51_n_n_to_Mn53_approx)*Y(Mn51)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + 2.0*screened_rates(k_Mn53_to_Mn51_n_n_approx)*Y(Mn53)) + + (-screened_rates(k_Mn53_n_n_to_Mn55_approx)*Y(Mn53)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + 2.0*screened_rates(k_Mn55_to_Mn53_n_n_approx)*Y(Mn55)) + + (-screened_rates(k_Cr48_n_n_to_Cr50_approx)*Y(Cr48)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + 2.0*screened_rates(k_Cr50_to_Cr48_n_n_approx)*Y(Cr50)) + + (-screened_rates(k_Cr50_n_n_to_Cr52_approx)*Y(Cr50)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + 2.0*screened_rates(k_Cr52_to_Cr50_n_n_approx)*Y(Cr52)) + + (-screened_rates(k_Cr52_n_n_to_Cr54_approx)*Y(Cr52)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + 2.0*screened_rates(k_Cr54_to_Cr52_n_n_approx)*Y(Cr54)) + + (-screened_rates(k_V47_n_n_to_V49_approx)*Y(V47)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + 2.0*screened_rates(k_V49_to_V47_n_n_approx)*Y(V49)) + + (-screened_rates(k_V49_n_n_to_V51_approx)*Y(V49)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + 2.0*screened_rates(k_V51_to_V49_n_n_approx)*Y(V51)) + + (-screened_rates(k_Ti44_n_n_to_Ti46_approx)*Y(Ti44)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + 2.0*screened_rates(k_Ti46_to_Ti44_n_n_approx)*Y(Ti46)) + + (-screened_rates(k_Ti46_n_n_to_Ti48_approx)*Y(Ti46)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + 2.0*screened_rates(k_Ti48_to_Ti46_n_n_approx)*Y(Ti48)) + + (-screened_rates(k_Sc41_n_n_to_Sc43_approx)*Y(Sc41)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + 2.0*screened_rates(k_Sc43_to_Sc41_n_n_approx)*Y(Sc43)) + + (-screened_rates(k_Sc43_n_n_to_Sc45_approx)*Y(Sc43)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + 2.0*screened_rates(k_Sc45_to_Sc43_n_n_approx)*Y(Sc45)) + + (-screened_rates(k_Ca40_n_n_to_Ca42_approx)*Y(Ca40)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + 2.0*screened_rates(k_Ca42_to_Ca40_n_n_approx)*Y(Ca42)) + + (-screened_rates(k_n_to_p_beta_neg_weaktab)*Y(N) + screened_rates(k_p_to_n_electron_capture_weaktab)*Y(H1)); + + ydot_nuc(H1) = + (-screened_rates(k_Al27_p_to_Si28_reaclib)*Y(Al27)*Y(H1)*state.rho + screened_rates(k_Si28_to_p_Al27_reaclib)*Y(Si28)) + + (-screened_rates(k_Si28_p_to_P29_reaclib)*Y(Si28)*Y(H1)*state.rho + screened_rates(k_P29_to_p_Si28_reaclib)*Y(P29)) + + (-screened_rates(k_Si30_p_to_P31_reaclib)*Y(Si30)*Y(H1)*state.rho + screened_rates(k_P31_to_p_Si30_reaclib)*Y(P31)) + + (-screened_rates(k_P31_p_to_S32_reaclib)*Y(P31)*Y(H1)*state.rho + screened_rates(k_S32_to_p_P31_reaclib)*Y(S32)) + + (-screened_rates(k_P33_p_to_S34_reaclib)*Y(P33)*Y(H1)*state.rho + screened_rates(k_S34_to_p_P33_reaclib)*Y(S34)) + + (-screened_rates(k_S32_p_to_Cl33_reaclib)*Y(S32)*Y(H1)*state.rho + screened_rates(k_Cl33_to_p_S32_reaclib)*Y(Cl33)) + + (-screened_rates(k_S34_p_to_Cl35_reaclib)*Y(S34)*Y(H1)*state.rho + screened_rates(k_Cl35_to_p_S34_reaclib)*Y(Cl35)) + + (-screened_rates(k_Cl35_p_to_Ar36_reaclib)*Y(Cl35)*Y(H1)*state.rho + screened_rates(k_Ar36_to_p_Cl35_reaclib)*Y(Ar36)) + + (-screened_rates(k_Cl37_p_to_Ar38_reaclib)*Y(Cl37)*Y(H1)*state.rho + screened_rates(k_Ar38_to_p_Cl37_reaclib)*Y(Ar38)) + + (-screened_rates(k_Ar36_p_to_K37_reaclib)*Y(Ar36)*Y(H1)*state.rho + screened_rates(k_K37_to_p_Ar36_reaclib)*Y(K37)) + + (-screened_rates(k_Ar38_p_to_K39_reaclib)*Y(Ar38)*Y(H1)*state.rho + screened_rates(k_K39_to_p_Ar38_reaclib)*Y(K39)) + + (-screened_rates(k_K39_p_to_Ca40_reaclib)*Y(K39)*Y(H1)*state.rho + screened_rates(k_Ca40_to_p_K39_reaclib)*Y(Ca40)) + + (-screened_rates(k_Ca40_p_to_Sc41_reaclib)*Y(Ca40)*Y(H1)*state.rho + screened_rates(k_Sc41_to_p_Ca40_reaclib)*Y(Sc41)) + + (-screened_rates(k_Ca42_p_to_Sc43_reaclib)*Y(Ca42)*Y(H1)*state.rho + screened_rates(k_Sc43_to_p_Ca42_reaclib)*Y(Sc43)) + + (-screened_rates(k_Sc43_p_to_Ti44_reaclib)*Y(Sc43)*Y(H1)*state.rho + screened_rates(k_Ti44_to_p_Sc43_reaclib)*Y(Ti44)) + + (-screened_rates(k_Sc45_p_to_Ti46_reaclib)*Y(Sc45)*Y(H1)*state.rho + screened_rates(k_Ti46_to_p_Sc45_reaclib)*Y(Ti46)) + + (-screened_rates(k_Ti46_p_to_V47_reaclib)*Y(Ti46)*Y(H1)*state.rho + screened_rates(k_V47_to_p_Ti46_reaclib)*Y(V47)) + + (-screened_rates(k_Ti48_p_to_V49_reaclib)*Y(Ti48)*Y(H1)*state.rho + screened_rates(k_V49_to_p_Ti48_reaclib)*Y(V49)) + + (-screened_rates(k_V47_p_to_Cr48_reaclib)*Y(V47)*Y(H1)*state.rho + screened_rates(k_Cr48_to_p_V47_reaclib)*Y(Cr48)) + + (-screened_rates(k_V49_p_to_Cr50_reaclib)*Y(V49)*Y(H1)*state.rho + screened_rates(k_Cr50_to_p_V49_reaclib)*Y(Cr50)) + + (-screened_rates(k_V51_p_to_Cr52_reaclib)*Y(V51)*Y(H1)*state.rho + screened_rates(k_Cr52_to_p_V51_reaclib)*Y(Cr52)) + + (-screened_rates(k_Cr50_p_to_Mn51_reaclib)*Y(Cr50)*Y(H1)*state.rho + screened_rates(k_Mn51_to_p_Cr50_reaclib)*Y(Mn51)) + + (-screened_rates(k_Cr52_p_to_Mn53_reaclib)*Y(Cr52)*Y(H1)*state.rho + screened_rates(k_Mn53_to_p_Cr52_reaclib)*Y(Mn53)) + + (-screened_rates(k_Cr54_p_to_Mn55_reaclib)*Y(Cr54)*Y(H1)*state.rho + screened_rates(k_Mn55_to_p_Cr54_reaclib)*Y(Mn55)) + + (-screened_rates(k_Mn51_p_to_Fe52_reaclib)*Y(Mn51)*Y(H1)*state.rho + screened_rates(k_Fe52_to_p_Mn51_reaclib)*Y(Fe52)) + + (-screened_rates(k_Mn53_p_to_Fe54_reaclib)*Y(Mn53)*Y(H1)*state.rho + screened_rates(k_Fe54_to_p_Mn53_reaclib)*Y(Fe54)) + + (-screened_rates(k_Mn55_p_to_Fe56_reaclib)*Y(Mn55)*Y(H1)*state.rho + screened_rates(k_Fe56_to_p_Mn55_reaclib)*Y(Fe56)) + + (-screened_rates(k_Fe54_p_to_Co55_reaclib)*Y(Fe54)*Y(H1)*state.rho + screened_rates(k_Co55_to_p_Fe54_reaclib)*Y(Co55)) + + (-screened_rates(k_Fe56_p_to_Co57_reaclib)*Y(Fe56)*Y(H1)*state.rho + screened_rates(k_Co57_to_p_Fe56_reaclib)*Y(Co57)) + + (-screened_rates(k_Fe58_p_to_Co59_reaclib)*Y(Fe58)*Y(H1)*state.rho + screened_rates(k_Co59_to_p_Fe58_reaclib)*Y(Co59)) + + (-screened_rates(k_Co55_p_to_Ni56_reaclib)*Y(Co55)*Y(H1)*state.rho + screened_rates(k_Ni56_to_p_Co55_reaclib)*Y(Ni56)) + + (-screened_rates(k_Co57_p_to_Ni58_reaclib)*Y(Co57)*Y(H1)*state.rho + screened_rates(k_Ni58_to_p_Co57_reaclib)*Y(Ni58)) + + (-screened_rates(k_Co59_p_to_Ni60_reaclib)*Y(Co59)*Y(H1)*state.rho + screened_rates(k_Ni60_to_p_Co59_reaclib)*Y(Ni60)) + + (-screened_rates(k_Ni58_p_to_Cu59_reaclib)*Y(Ni58)*Y(H1)*state.rho + screened_rates(k_Cu59_to_p_Ni58_reaclib)*Y(Cu59)) + + (-screened_rates(k_Cu59_p_to_Zn60_reaclib)*Y(Cu59)*Y(H1)*state.rho + screened_rates(k_Zn60_to_p_Cu59_reaclib)*Y(Zn60)) + + (screened_rates(k_O16_C12_to_p_Al27_reaclib)*Y(C12)*Y(O16)*state.rho + -screened_rates(k_Al27_p_to_C12_O16_reaclib)*Y(Al27)*Y(H1)*state.rho) + + (0.5*screened_rates(k_O16_O16_to_p_P31_reaclib)*amrex::Math::powi<2>(Y(O16))*state.rho + -screened_rates(k_P31_p_to_O16_O16_reaclib)*Y(P31)*Y(H1)*state.rho) + + (screened_rates(k_Ne20_C12_to_p_P31_reaclib)*Y(C12)*Y(Ne20)*state.rho + -screened_rates(k_P31_p_to_C12_Ne20_reaclib)*Y(P31)*Y(H1)*state.rho) + + (-screened_rates(k_Al27_p_to_He4_Mg24_reaclib)*Y(Al27)*Y(H1)*state.rho + screened_rates(k_Mg24_He4_to_p_Al27_reaclib)*Y(He4)*Y(Mg24)*state.rho) + + (screened_rates(k_Al27_He4_to_p_Si30_reaclib)*Y(Al27)*Y(He4)*state.rho + -screened_rates(k_Si30_p_to_He4_Al27_reaclib)*Y(Si30)*Y(H1)*state.rho) + + (screened_rates(k_Si27_n_to_p_Al27_reaclib)*Y(Si27)*Y(N)*state.rho + -screened_rates(k_Al27_p_to_n_Si27_reaclib)*Y(Al27)*Y(H1)*state.rho) + + (-screened_rates(k_Si31_p_to_n_P31_reaclib)*Y(Si31)*Y(H1)*state.rho + screened_rates(k_P31_n_to_p_Si31_reaclib)*Y(P31)*Y(N)*state.rho) + + (screened_rates(k_P29_n_to_p_Si29_reaclib)*Y(P29)*Y(N)*state.rho + -screened_rates(k_Si29_p_to_n_P29_reaclib)*Y(Si29)*Y(H1)*state.rho) + + (screened_rates(k_P29_He4_to_p_S32_reaclib)*Y(He4)*Y(P29)*state.rho + -screened_rates(k_S32_p_to_He4_P29_reaclib)*Y(S32)*Y(H1)*state.rho) + + (-screened_rates(k_P31_p_to_He4_Si28_reaclib)*Y(P31)*Y(H1)*state.rho + screened_rates(k_Si28_He4_to_p_P31_reaclib)*Y(He4)*Y(Si28)*state.rho) + + (screened_rates(k_P31_He4_to_p_S34_reaclib)*Y(He4)*Y(P31)*state.rho + -screened_rates(k_S34_p_to_He4_P31_reaclib)*Y(S34)*Y(H1)*state.rho) + + (-screened_rates(k_P33_p_to_He4_Si30_reaclib)*Y(P33)*Y(H1)*state.rho + screened_rates(k_Si30_He4_to_p_P33_reaclib)*Y(He4)*Y(Si30)*state.rho) + + (screened_rates(k_S33_n_to_p_P33_reaclib)*Y(S33)*Y(N)*state.rho + -screened_rates(k_P33_p_to_n_S33_reaclib)*Y(P33)*Y(H1)*state.rho) + + (screened_rates(k_Cl33_n_to_p_S33_reaclib)*Y(Cl33)*Y(N)*state.rho + -screened_rates(k_S33_p_to_n_Cl33_reaclib)*Y(S33)*Y(H1)*state.rho) + + (screened_rates(k_Cl33_He4_to_p_Ar36_reaclib)*Y(Cl33)*Y(He4)*state.rho + -screened_rates(k_Ar36_p_to_He4_Cl33_reaclib)*Y(Ar36)*Y(H1)*state.rho) + + (screened_rates(k_Cl35_n_to_p_S35_reaclib)*Y(Cl35)*Y(N)*state.rho + -screened_rates(k_S35_p_to_n_Cl35_reaclib)*Y(S35)*Y(H1)*state.rho) + + (-screened_rates(k_Cl35_p_to_He4_S32_reaclib)*Y(Cl35)*Y(H1)*state.rho + screened_rates(k_S32_He4_to_p_Cl35_reaclib)*Y(He4)*Y(S32)*state.rho) + + (screened_rates(k_Cl35_He4_to_p_Ar38_reaclib)*Y(Cl35)*Y(He4)*state.rho + -screened_rates(k_Ar38_p_to_He4_Cl35_reaclib)*Y(Ar38)*Y(H1)*state.rho) + + (-screened_rates(k_Cl37_p_to_He4_S34_reaclib)*Y(Cl37)*Y(H1)*state.rho + screened_rates(k_S34_He4_to_p_Cl37_reaclib)*Y(He4)*Y(S34)*state.rho) + + (screened_rates(k_Ar37_n_to_p_Cl37_reaclib)*Y(Ar37)*Y(N)*state.rho + -screened_rates(k_Cl37_p_to_n_Ar37_reaclib)*Y(Cl37)*Y(H1)*state.rho) + + (screened_rates(k_K37_n_to_p_Ar37_reaclib)*Y(K37)*Y(N)*state.rho + -screened_rates(k_Ar37_p_to_n_K37_reaclib)*Y(Ar37)*Y(H1)*state.rho) + + (screened_rates(k_K37_He4_to_p_Ca40_reaclib)*Y(He4)*Y(K37)*state.rho + -screened_rates(k_Ca40_p_to_He4_K37_reaclib)*Y(Ca40)*Y(H1)*state.rho) + + (-screened_rates(k_K39_p_to_He4_Ar36_reaclib)*Y(K39)*Y(H1)*state.rho + screened_rates(k_Ar36_He4_to_p_K39_reaclib)*Y(Ar36)*Y(He4)*state.rho) + + (-screened_rates(k_Ca42_p_to_He4_K39_reaclib)*Y(Ca42)*Y(H1)*state.rho + screened_rates(k_K39_He4_to_p_Ca42_reaclib)*Y(He4)*Y(K39)*state.rho) + + (screened_rates(k_Sc41_He4_to_p_Ti44_reaclib)*Y(He4)*Y(Sc41)*state.rho + -screened_rates(k_Ti44_p_to_He4_Sc41_reaclib)*Y(Ti44)*Y(H1)*state.rho) + + (-screened_rates(k_Sc43_p_to_He4_Ca40_reaclib)*Y(Sc43)*Y(H1)*state.rho + screened_rates(k_Ca40_He4_to_p_Sc43_reaclib)*Y(Ca40)*Y(He4)*state.rho) + + (screened_rates(k_Sc43_He4_to_p_Ti46_reaclib)*Y(He4)*Y(Sc43)*state.rho + -screened_rates(k_Ti46_p_to_He4_Sc43_reaclib)*Y(Ti46)*Y(H1)*state.rho) + + (-screened_rates(k_Sc45_p_to_He4_Ca42_reaclib)*Y(Sc45)*Y(H1)*state.rho + screened_rates(k_Ca42_He4_to_p_Sc45_reaclib)*Y(Ca42)*Y(He4)*state.rho) + + (screened_rates(k_Sc45_He4_to_p_Ti48_reaclib)*Y(He4)*Y(Sc45)*state.rho + -screened_rates(k_Ti48_p_to_He4_Sc45_reaclib)*Y(Ti48)*Y(H1)*state.rho) + + (-screened_rates(k_V47_p_to_He4_Ti44_reaclib)*Y(V47)*Y(H1)*state.rho + screened_rates(k_Ti44_He4_to_p_V47_reaclib)*Y(He4)*Y(Ti44)*state.rho) + + (screened_rates(k_V47_He4_to_p_Cr50_reaclib)*Y(He4)*Y(V47)*state.rho + -screened_rates(k_Cr50_p_to_He4_V47_reaclib)*Y(Cr50)*Y(H1)*state.rho) + + (-screened_rates(k_V49_p_to_He4_Ti46_reaclib)*Y(V49)*Y(H1)*state.rho + screened_rates(k_Ti46_He4_to_p_V49_reaclib)*Y(He4)*Y(Ti46)*state.rho) + + (screened_rates(k_V49_He4_to_p_Cr52_reaclib)*Y(He4)*Y(V49)*state.rho + -screened_rates(k_Cr52_p_to_He4_V49_reaclib)*Y(Cr52)*Y(H1)*state.rho) + + (-screened_rates(k_V51_p_to_He4_Ti48_reaclib)*Y(V51)*Y(H1)*state.rho + screened_rates(k_Ti48_He4_to_p_V51_reaclib)*Y(He4)*Y(Ti48)*state.rho) + + (screened_rates(k_Cr48_He4_to_p_Mn51_reaclib)*Y(Cr48)*Y(He4)*state.rho + -screened_rates(k_Mn51_p_to_He4_Cr48_reaclib)*Y(Mn51)*Y(H1)*state.rho) + + (-screened_rates(k_Cr54_p_to_He4_V51_reaclib)*Y(Cr54)*Y(H1)*state.rho + screened_rates(k_V51_He4_to_p_Cr54_reaclib)*Y(He4)*Y(V51)*state.rho) + + (screened_rates(k_Mn51_He4_to_p_Fe54_reaclib)*Y(He4)*Y(Mn51)*state.rho + -screened_rates(k_Fe54_p_to_He4_Mn51_reaclib)*Y(Fe54)*Y(H1)*state.rho) + + (-screened_rates(k_Mn53_p_to_He4_Cr50_reaclib)*Y(Mn53)*Y(H1)*state.rho + screened_rates(k_Cr50_He4_to_p_Mn53_reaclib)*Y(Cr50)*Y(He4)*state.rho) + + (screened_rates(k_Mn53_He4_to_p_Fe56_reaclib)*Y(He4)*Y(Mn53)*state.rho + -screened_rates(k_Fe56_p_to_He4_Mn53_reaclib)*Y(Fe56)*Y(H1)*state.rho) + + (-screened_rates(k_Mn55_p_to_He4_Cr52_reaclib)*Y(Mn55)*Y(H1)*state.rho + screened_rates(k_Cr52_He4_to_p_Mn55_reaclib)*Y(Cr52)*Y(He4)*state.rho) + + (screened_rates(k_Fe52_He4_to_p_Co55_reaclib)*Y(Fe52)*Y(He4)*state.rho + -screened_rates(k_Co55_p_to_He4_Fe52_reaclib)*Y(Co55)*Y(H1)*state.rho) + + (-screened_rates(k_Fe58_p_to_He4_Mn55_reaclib)*Y(Fe58)*Y(H1)*state.rho + screened_rates(k_Mn55_He4_to_p_Fe58_reaclib)*Y(He4)*Y(Mn55)*state.rho) + + (screened_rates(k_Co55_He4_to_p_Ni58_reaclib)*Y(Co55)*Y(He4)*state.rho + -screened_rates(k_Ni58_p_to_He4_Co55_reaclib)*Y(Ni58)*Y(H1)*state.rho) + + (screened_rates(k_Co56_n_to_p_Fe56_reaclib)*Y(Co56)*Y(N)*state.rho + -screened_rates(k_Fe56_p_to_n_Co56_reaclib)*Y(Fe56)*Y(H1)*state.rho) + + (-screened_rates(k_Co57_p_to_He4_Fe54_reaclib)*Y(Co57)*Y(H1)*state.rho + screened_rates(k_Fe54_He4_to_p_Co57_reaclib)*Y(Fe54)*Y(He4)*state.rho) + + (screened_rates(k_Co57_He4_to_p_Ni60_reaclib)*Y(Co57)*Y(He4)*state.rho + -screened_rates(k_Ni60_p_to_He4_Co57_reaclib)*Y(Ni60)*Y(H1)*state.rho) + + (-screened_rates(k_Co59_p_to_He4_Fe56_reaclib)*Y(Co59)*Y(H1)*state.rho + screened_rates(k_Fe56_He4_to_p_Co59_reaclib)*Y(Fe56)*Y(He4)*state.rho) + + (screened_rates(k_Ni56_n_to_p_Co56_reaclib)*Y(Ni56)*Y(N)*state.rho + -screened_rates(k_Co56_p_to_n_Ni56_reaclib)*Y(Co56)*Y(H1)*state.rho) + + (-screened_rates(k_Cu59_p_to_He4_Ni56_reaclib)*Y(Cu59)*Y(H1)*state.rho + screened_rates(k_Ni56_He4_to_p_Cu59_reaclib)*Y(He4)*Y(Ni56)*state.rho) + + (screened_rates(k_n_to_p_beta_neg_weaktab)*Y(N) + -screened_rates(k_p_to_n_electron_capture_weaktab)*Y(H1)); + + ydot_nuc(He4) = + (-screened_rates(k_C12_He4_to_O16_reaclib)*Y(C12)*Y(He4)*state.rho + screened_rates(k_O16_to_He4_C12_reaclib)*Y(O16)) + + (-screened_rates(k_O16_He4_to_Ne20_reaclib)*Y(He4)*Y(O16)*state.rho + screened_rates(k_Ne20_to_He4_O16_reaclib)*Y(Ne20)) + + (-screened_rates(k_Mg23_He4_to_Si27_reaclib)*Y(He4)*Y(Mg23)*state.rho + screened_rates(k_Si27_to_He4_Mg23_reaclib)*Y(Si27)) + + (-screened_rates(k_Mg24_He4_to_Si28_reaclib)*Y(He4)*Y(Mg24)*state.rho + screened_rates(k_Si28_to_He4_Mg24_reaclib)*Y(Si28)) + + (-screened_rates(k_Al27_He4_to_P31_reaclib)*Y(Al27)*Y(He4)*state.rho + screened_rates(k_P31_to_He4_Al27_reaclib)*Y(P31)) + + (-screened_rates(k_Si28_He4_to_S32_reaclib)*Y(He4)*Y(Si28)*state.rho + screened_rates(k_S32_to_He4_Si28_reaclib)*Y(S32)) + + (-screened_rates(k_Si29_He4_to_S33_reaclib)*Y(He4)*Y(Si29)*state.rho + screened_rates(k_S33_to_He4_Si29_reaclib)*Y(S33)) + + (-screened_rates(k_Si30_He4_to_S34_reaclib)*Y(He4)*Y(Si30)*state.rho + screened_rates(k_S34_to_He4_Si30_reaclib)*Y(S34)) + + (-screened_rates(k_Si31_He4_to_S35_reaclib)*Y(He4)*Y(Si31)*state.rho + screened_rates(k_S35_to_He4_Si31_reaclib)*Y(S35)) + + (-screened_rates(k_P29_He4_to_Cl33_reaclib)*Y(He4)*Y(P29)*state.rho + screened_rates(k_Cl33_to_He4_P29_reaclib)*Y(Cl33)) + + (-screened_rates(k_P31_He4_to_Cl35_reaclib)*Y(He4)*Y(P31)*state.rho + screened_rates(k_Cl35_to_He4_P31_reaclib)*Y(Cl35)) + + (-screened_rates(k_P33_He4_to_Cl37_reaclib)*Y(He4)*Y(P33)*state.rho + screened_rates(k_Cl37_to_He4_P33_reaclib)*Y(Cl37)) + + (-screened_rates(k_S32_He4_to_Ar36_reaclib)*Y(He4)*Y(S32)*state.rho + screened_rates(k_Ar36_to_He4_S32_reaclib)*Y(Ar36)) + + (-screened_rates(k_S33_He4_to_Ar37_reaclib)*Y(He4)*Y(S33)*state.rho + screened_rates(k_Ar37_to_He4_S33_reaclib)*Y(Ar37)) + + (-screened_rates(k_S34_He4_to_Ar38_reaclib)*Y(He4)*Y(S34)*state.rho + screened_rates(k_Ar38_to_He4_S34_reaclib)*Y(Ar38)) + + (-screened_rates(k_Cl33_He4_to_K37_reaclib)*Y(Cl33)*Y(He4)*state.rho + screened_rates(k_K37_to_He4_Cl33_reaclib)*Y(K37)) + + (-screened_rates(k_Cl35_He4_to_K39_reaclib)*Y(Cl35)*Y(He4)*state.rho + screened_rates(k_K39_to_He4_Cl35_reaclib)*Y(K39)) + + (-screened_rates(k_Ar36_He4_to_Ca40_reaclib)*Y(Ar36)*Y(He4)*state.rho + screened_rates(k_Ca40_to_He4_Ar36_reaclib)*Y(Ca40)) + + (-screened_rates(k_Ar38_He4_to_Ca42_reaclib)*Y(Ar38)*Y(He4)*state.rho + screened_rates(k_Ca42_to_He4_Ar38_reaclib)*Y(Ca42)) + + (-screened_rates(k_K37_He4_to_Sc41_reaclib)*Y(He4)*Y(K37)*state.rho + screened_rates(k_Sc41_to_He4_K37_reaclib)*Y(Sc41)) + + (-screened_rates(k_K39_He4_to_Sc43_reaclib)*Y(He4)*Y(K39)*state.rho + screened_rates(k_Sc43_to_He4_K39_reaclib)*Y(Sc43)) + + (-screened_rates(k_Ca40_He4_to_Ti44_reaclib)*Y(Ca40)*Y(He4)*state.rho + screened_rates(k_Ti44_to_He4_Ca40_reaclib)*Y(Ti44)) + + (-screened_rates(k_Ca42_He4_to_Ti46_reaclib)*Y(Ca42)*Y(He4)*state.rho + screened_rates(k_Ti46_to_He4_Ca42_reaclib)*Y(Ti46)) + + (-screened_rates(k_Sc43_He4_to_V47_reaclib)*Y(He4)*Y(Sc43)*state.rho + screened_rates(k_V47_to_He4_Sc43_reaclib)*Y(V47)) + + (-screened_rates(k_Sc45_He4_to_V49_reaclib)*Y(He4)*Y(Sc45)*state.rho + screened_rates(k_V49_to_He4_Sc45_reaclib)*Y(V49)) + + (-screened_rates(k_Ti44_He4_to_Cr48_reaclib)*Y(He4)*Y(Ti44)*state.rho + screened_rates(k_Cr48_to_He4_Ti44_reaclib)*Y(Cr48)) + + (-screened_rates(k_Ti46_He4_to_Cr50_reaclib)*Y(He4)*Y(Ti46)*state.rho + screened_rates(k_Cr50_to_He4_Ti46_reaclib)*Y(Cr50)) + + (-screened_rates(k_Ti48_He4_to_Cr52_reaclib)*Y(He4)*Y(Ti48)*state.rho + screened_rates(k_Cr52_to_He4_Ti48_reaclib)*Y(Cr52)) + + (-screened_rates(k_V47_He4_to_Mn51_reaclib)*Y(He4)*Y(V47)*state.rho + screened_rates(k_Mn51_to_He4_V47_reaclib)*Y(Mn51)) + + (-screened_rates(k_V49_He4_to_Mn53_reaclib)*Y(He4)*Y(V49)*state.rho + screened_rates(k_Mn53_to_He4_V49_reaclib)*Y(Mn53)) + + (-screened_rates(k_V51_He4_to_Mn55_reaclib)*Y(He4)*Y(V51)*state.rho + screened_rates(k_Mn55_to_He4_V51_reaclib)*Y(Mn55)) + + (-screened_rates(k_Cr48_He4_to_Fe52_reaclib)*Y(Cr48)*Y(He4)*state.rho + screened_rates(k_Fe52_to_He4_Cr48_reaclib)*Y(Fe52)) + + (-screened_rates(k_Cr50_He4_to_Fe54_reaclib)*Y(Cr50)*Y(He4)*state.rho + screened_rates(k_Fe54_to_He4_Cr50_reaclib)*Y(Fe54)) + + (-screened_rates(k_Cr52_He4_to_Fe56_reaclib)*Y(Cr52)*Y(He4)*state.rho + screened_rates(k_Fe56_to_He4_Cr52_reaclib)*Y(Fe56)) + + (-screened_rates(k_Cr54_He4_to_Fe58_reaclib)*Y(Cr54)*Y(He4)*state.rho + screened_rates(k_Fe58_to_He4_Cr54_reaclib)*Y(Fe58)) + + (-screened_rates(k_Mn51_He4_to_Co55_reaclib)*Y(He4)*Y(Mn51)*state.rho + screened_rates(k_Co55_to_He4_Mn51_reaclib)*Y(Co55)) + + (-screened_rates(k_Mn53_He4_to_Co57_reaclib)*Y(He4)*Y(Mn53)*state.rho + screened_rates(k_Co57_to_He4_Mn53_reaclib)*Y(Co57)) + + (-screened_rates(k_Mn55_He4_to_Co59_reaclib)*Y(He4)*Y(Mn55)*state.rho + screened_rates(k_Co59_to_He4_Mn55_reaclib)*Y(Co59)) + + (-screened_rates(k_Fe52_He4_to_Ni56_reaclib)*Y(Fe52)*Y(He4)*state.rho + screened_rates(k_Ni56_to_He4_Fe52_reaclib)*Y(Ni56)) + + (-screened_rates(k_Fe54_He4_to_Ni58_reaclib)*Y(Fe54)*Y(He4)*state.rho + screened_rates(k_Ni58_to_He4_Fe54_reaclib)*Y(Ni58)) + + (-screened_rates(k_Fe56_He4_to_Ni60_reaclib)*Y(Fe56)*Y(He4)*state.rho + screened_rates(k_Ni60_to_He4_Fe56_reaclib)*Y(Ni60)) + + (-screened_rates(k_Co55_He4_to_Cu59_reaclib)*Y(Co55)*Y(He4)*state.rho + screened_rates(k_Cu59_to_He4_Co55_reaclib)*Y(Cu59)) + + (-screened_rates(k_Ni56_He4_to_Zn60_reaclib)*Y(He4)*Y(Ni56)*state.rho + screened_rates(k_Zn60_to_He4_Ni56_reaclib)*Y(Zn60)) + + (screened_rates(k_O16_C12_to_He4_Mg24_reaclib)*Y(C12)*Y(O16)*state.rho + -screened_rates(k_Mg24_He4_to_C12_O16_reaclib)*Y(He4)*Y(Mg24)*state.rho) + + (0.5*screened_rates(k_O16_O16_to_He4_Si28_reaclib)*amrex::Math::powi<2>(Y(O16))*state.rho + -screened_rates(k_Si28_He4_to_O16_O16_reaclib)*Y(He4)*Y(Si28)*state.rho) + + (screened_rates(k_Ne20_C12_to_He4_Si28_reaclib)*Y(C12)*Y(Ne20)*state.rho + -screened_rates(k_Si28_He4_to_C12_Ne20_reaclib)*Y(He4)*Y(Si28)*state.rho) + + (screened_rates(k_Mg23_n_to_He4_Ne20_reaclib)*Y(Mg23)*Y(N)*state.rho + -screened_rates(k_Ne20_He4_to_n_Mg23_reaclib)*Y(He4)*Y(Ne20)*state.rho) + + (screened_rates(k_Al27_p_to_He4_Mg24_reaclib)*Y(Al27)*Y(H1)*state.rho + -screened_rates(k_Mg24_He4_to_p_Al27_reaclib)*Y(He4)*Y(Mg24)*state.rho) + + (-screened_rates(k_Al27_He4_to_p_Si30_reaclib)*Y(Al27)*Y(He4)*state.rho + screened_rates(k_Si30_p_to_He4_Al27_reaclib)*Y(Si30)*Y(H1)*state.rho) + + (screened_rates(k_Si27_n_to_He4_Mg24_reaclib)*Y(Si27)*Y(N)*state.rho + -screened_rates(k_Mg24_He4_to_n_Si27_reaclib)*Y(He4)*Y(Mg24)*state.rho) + + (-screened_rates(k_Si31_He4_to_n_S34_reaclib)*Y(He4)*Y(Si31)*state.rho + screened_rates(k_S34_n_to_He4_Si31_reaclib)*Y(S34)*Y(N)*state.rho) + + (-screened_rates(k_P29_He4_to_p_S32_reaclib)*Y(He4)*Y(P29)*state.rho + screened_rates(k_S32_p_to_He4_P29_reaclib)*Y(S32)*Y(H1)*state.rho) + + (screened_rates(k_P31_p_to_He4_Si28_reaclib)*Y(P31)*Y(H1)*state.rho + -screened_rates(k_Si28_He4_to_p_P31_reaclib)*Y(He4)*Y(Si28)*state.rho) + + (-screened_rates(k_P31_He4_to_p_S34_reaclib)*Y(He4)*Y(P31)*state.rho + screened_rates(k_S34_p_to_He4_P31_reaclib)*Y(S34)*Y(H1)*state.rho) + + (screened_rates(k_P33_p_to_He4_Si30_reaclib)*Y(P33)*Y(H1)*state.rho + -screened_rates(k_Si30_He4_to_p_P33_reaclib)*Y(He4)*Y(Si30)*state.rho) + + (screened_rates(k_S32_n_to_He4_Si29_reaclib)*Y(S32)*Y(N)*state.rho + -screened_rates(k_Si29_He4_to_n_S32_reaclib)*Y(He4)*Y(Si29)*state.rho) + + (screened_rates(k_S33_n_to_He4_Si30_reaclib)*Y(S33)*Y(N)*state.rho + -screened_rates(k_Si30_He4_to_n_S33_reaclib)*Y(He4)*Y(Si30)*state.rho) + + (-screened_rates(k_S35_He4_to_n_Ar38_reaclib)*Y(He4)*Y(S35)*state.rho + screened_rates(k_Ar38_n_to_He4_S35_reaclib)*Y(Ar38)*Y(N)*state.rho) + + (-screened_rates(k_Cl33_He4_to_p_Ar36_reaclib)*Y(Cl33)*Y(He4)*state.rho + screened_rates(k_Ar36_p_to_He4_Cl33_reaclib)*Y(Ar36)*Y(H1)*state.rho) + + (screened_rates(k_Cl35_p_to_He4_S32_reaclib)*Y(Cl35)*Y(H1)*state.rho + -screened_rates(k_S32_He4_to_p_Cl35_reaclib)*Y(He4)*Y(S32)*state.rho) + + (-screened_rates(k_Cl35_He4_to_p_Ar38_reaclib)*Y(Cl35)*Y(He4)*state.rho + screened_rates(k_Ar38_p_to_He4_Cl35_reaclib)*Y(Ar38)*Y(H1)*state.rho) + + (screened_rates(k_Cl37_p_to_He4_S34_reaclib)*Y(Cl37)*Y(H1)*state.rho + -screened_rates(k_S34_He4_to_p_Cl37_reaclib)*Y(He4)*Y(S34)*state.rho) + + (screened_rates(k_Ar36_n_to_He4_S33_reaclib)*Y(Ar36)*Y(N)*state.rho + -screened_rates(k_S33_He4_to_n_Ar36_reaclib)*Y(He4)*Y(S33)*state.rho) + + (screened_rates(k_Ar37_n_to_He4_S34_reaclib)*Y(Ar37)*Y(N)*state.rho + -screened_rates(k_S34_He4_to_n_Ar37_reaclib)*Y(He4)*Y(S34)*state.rho) + + (-screened_rates(k_K37_He4_to_p_Ca40_reaclib)*Y(He4)*Y(K37)*state.rho + screened_rates(k_Ca40_p_to_He4_K37_reaclib)*Y(Ca40)*Y(H1)*state.rho) + + (screened_rates(k_K39_p_to_He4_Ar36_reaclib)*Y(K39)*Y(H1)*state.rho + -screened_rates(k_Ar36_He4_to_p_K39_reaclib)*Y(Ar36)*Y(He4)*state.rho) + + (screened_rates(k_Ca40_n_to_He4_Ar37_reaclib)*Y(Ca40)*Y(N)*state.rho + -screened_rates(k_Ar37_He4_to_n_Ca40_reaclib)*Y(Ar37)*Y(He4)*state.rho) + + (screened_rates(k_Ca42_p_to_He4_K39_reaclib)*Y(Ca42)*Y(H1)*state.rho + -screened_rates(k_K39_He4_to_p_Ca42_reaclib)*Y(He4)*Y(K39)*state.rho) + + (-screened_rates(k_Sc41_He4_to_p_Ti44_reaclib)*Y(He4)*Y(Sc41)*state.rho + screened_rates(k_Ti44_p_to_He4_Sc41_reaclib)*Y(Ti44)*Y(H1)*state.rho) + + (screened_rates(k_Sc43_p_to_He4_Ca40_reaclib)*Y(Sc43)*Y(H1)*state.rho + -screened_rates(k_Ca40_He4_to_p_Sc43_reaclib)*Y(Ca40)*Y(He4)*state.rho) + + (-screened_rates(k_Sc43_He4_to_p_Ti46_reaclib)*Y(He4)*Y(Sc43)*state.rho + screened_rates(k_Ti46_p_to_He4_Sc43_reaclib)*Y(Ti46)*Y(H1)*state.rho) + + (screened_rates(k_Sc45_p_to_He4_Ca42_reaclib)*Y(Sc45)*Y(H1)*state.rho + -screened_rates(k_Ca42_He4_to_p_Sc45_reaclib)*Y(Ca42)*Y(He4)*state.rho) + + (-screened_rates(k_Sc45_He4_to_p_Ti48_reaclib)*Y(He4)*Y(Sc45)*state.rho + screened_rates(k_Ti48_p_to_He4_Sc45_reaclib)*Y(Ti48)*Y(H1)*state.rho) + + (screened_rates(k_V47_p_to_He4_Ti44_reaclib)*Y(V47)*Y(H1)*state.rho + -screened_rates(k_Ti44_He4_to_p_V47_reaclib)*Y(He4)*Y(Ti44)*state.rho) + + (-screened_rates(k_V47_He4_to_p_Cr50_reaclib)*Y(He4)*Y(V47)*state.rho + screened_rates(k_Cr50_p_to_He4_V47_reaclib)*Y(Cr50)*Y(H1)*state.rho) + + (screened_rates(k_V49_p_to_He4_Ti46_reaclib)*Y(V49)*Y(H1)*state.rho + -screened_rates(k_Ti46_He4_to_p_V49_reaclib)*Y(He4)*Y(Ti46)*state.rho) + + (-screened_rates(k_V49_He4_to_p_Cr52_reaclib)*Y(He4)*Y(V49)*state.rho + screened_rates(k_Cr52_p_to_He4_V49_reaclib)*Y(Cr52)*Y(H1)*state.rho) + + (screened_rates(k_V51_p_to_He4_Ti48_reaclib)*Y(V51)*Y(H1)*state.rho + -screened_rates(k_Ti48_He4_to_p_V51_reaclib)*Y(He4)*Y(Ti48)*state.rho) + + (-screened_rates(k_Cr48_He4_to_p_Mn51_reaclib)*Y(Cr48)*Y(He4)*state.rho + screened_rates(k_Mn51_p_to_He4_Cr48_reaclib)*Y(Mn51)*Y(H1)*state.rho) + + (screened_rates(k_Cr54_p_to_He4_V51_reaclib)*Y(Cr54)*Y(H1)*state.rho + -screened_rates(k_V51_He4_to_p_Cr54_reaclib)*Y(He4)*Y(V51)*state.rho) + + (-screened_rates(k_Mn51_He4_to_p_Fe54_reaclib)*Y(He4)*Y(Mn51)*state.rho + screened_rates(k_Fe54_p_to_He4_Mn51_reaclib)*Y(Fe54)*Y(H1)*state.rho) + + (screened_rates(k_Mn53_p_to_He4_Cr50_reaclib)*Y(Mn53)*Y(H1)*state.rho + -screened_rates(k_Cr50_He4_to_p_Mn53_reaclib)*Y(Cr50)*Y(He4)*state.rho) + + (-screened_rates(k_Mn53_He4_to_p_Fe56_reaclib)*Y(He4)*Y(Mn53)*state.rho + screened_rates(k_Fe56_p_to_He4_Mn53_reaclib)*Y(Fe56)*Y(H1)*state.rho) + + (screened_rates(k_Mn55_p_to_He4_Cr52_reaclib)*Y(Mn55)*Y(H1)*state.rho + -screened_rates(k_Cr52_He4_to_p_Mn55_reaclib)*Y(Cr52)*Y(He4)*state.rho) + + (-screened_rates(k_Fe52_He4_to_p_Co55_reaclib)*Y(Fe52)*Y(He4)*state.rho + screened_rates(k_Co55_p_to_He4_Fe52_reaclib)*Y(Co55)*Y(H1)*state.rho) + + (screened_rates(k_Fe58_p_to_He4_Mn55_reaclib)*Y(Fe58)*Y(H1)*state.rho + -screened_rates(k_Mn55_He4_to_p_Fe58_reaclib)*Y(He4)*Y(Mn55)*state.rho) + + (-screened_rates(k_Co55_He4_to_p_Ni58_reaclib)*Y(Co55)*Y(He4)*state.rho + screened_rates(k_Ni58_p_to_He4_Co55_reaclib)*Y(Ni58)*Y(H1)*state.rho) + + (screened_rates(k_Co56_n_to_He4_Mn53_reaclib)*Y(Co56)*Y(N)*state.rho + -screened_rates(k_Mn53_He4_to_n_Co56_reaclib)*Y(He4)*Y(Mn53)*state.rho) + + (screened_rates(k_Co57_p_to_He4_Fe54_reaclib)*Y(Co57)*Y(H1)*state.rho + -screened_rates(k_Fe54_He4_to_p_Co57_reaclib)*Y(Fe54)*Y(He4)*state.rho) + + (-screened_rates(k_Co57_He4_to_p_Ni60_reaclib)*Y(Co57)*Y(He4)*state.rho + screened_rates(k_Ni60_p_to_He4_Co57_reaclib)*Y(Ni60)*Y(H1)*state.rho) + + (screened_rates(k_Co59_p_to_He4_Fe56_reaclib)*Y(Co59)*Y(H1)*state.rho + -screened_rates(k_Fe56_He4_to_p_Co59_reaclib)*Y(Fe56)*Y(He4)*state.rho) + + (screened_rates(k_Cu59_n_to_He4_Co56_reaclib)*Y(Cu59)*Y(N)*state.rho + -screened_rates(k_Co56_He4_to_n_Cu59_reaclib)*Y(Co56)*Y(He4)*state.rho) + + (screened_rates(k_Cu59_p_to_He4_Ni56_reaclib)*Y(Cu59)*Y(H1)*state.rho + -screened_rates(k_Ni56_He4_to_p_Cu59_reaclib)*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_3He4_reaclib)*Y(C12)) + + (0.5*screened_rates(k_C12_C12_to_Ne20_He4_approx)*amrex::Math::powi<2>(Y(C12))*state.rho + -screened_rates(k_Ne20_He4_to_C12_C12_approx)*Y(He4)*Y(Ne20)*state.rho) + + (-screened_rates(k_Ne20_He4_to_Mg24_approx)*Y(He4)*Y(Ne20)*state.rho + screened_rates(k_Mg24_to_Ne20_He4_approx)*Y(Mg24)); + + ydot_nuc(C12) = + (-screened_rates(k_C12_He4_to_O16_reaclib)*Y(C12)*Y(He4)*state.rho + screened_rates(k_O16_to_He4_C12_reaclib)*Y(O16)) + + (-screened_rates(k_O16_C12_to_p_Al27_reaclib)*Y(C12)*Y(O16)*state.rho + screened_rates(k_Al27_p_to_C12_O16_reaclib)*Y(Al27)*Y(H1)*state.rho) + + (-screened_rates(k_O16_C12_to_He4_Mg24_reaclib)*Y(C12)*Y(O16)*state.rho + screened_rates(k_Mg24_He4_to_C12_O16_reaclib)*Y(He4)*Y(Mg24)*state.rho) + + (-screened_rates(k_Ne20_C12_to_p_P31_reaclib)*Y(C12)*Y(Ne20)*state.rho + screened_rates(k_P31_p_to_C12_Ne20_reaclib)*Y(P31)*Y(H1)*state.rho) + + (-screened_rates(k_Ne20_C12_to_He4_Si28_reaclib)*Y(C12)*Y(Ne20)*state.rho + screened_rates(k_Si28_He4_to_C12_Ne20_reaclib)*Y(He4)*Y(Si28)*state.rho) + + (2.0*screened_rates(k_Mg23_n_to_C12_C12_reaclib)*Y(Mg23)*Y(N)*state.rho + -screened_rates(k_C12_C12_to_n_Mg23_reaclib)*amrex::Math::powi<2>(Y(C12))*state.rho) + + (screened_rates(k_Si27_n_to_C12_O16_reaclib)*Y(Si27)*Y(N)*state.rho + -screened_rates(k_O16_C12_to_n_Si27_reaclib)*Y(C12)*Y(O16)*state.rho) + + (0.16666666666666667*screened_rates(k_He4_He4_He4_to_C12_reaclib)*amrex::Math::powi<3>(Y(He4))*amrex::Math::powi<2>(state.rho) + -screened_rates(k_C12_to_3He4_reaclib)*Y(C12)) + + (-screened_rates(k_C12_C12_to_Mg24_approx)*amrex::Math::powi<2>(Y(C12))*state.rho + 2.0*screened_rates(k_Mg24_to_C12_C12_approx)*Y(Mg24)) + + (-screened_rates(k_C12_C12_to_Ne20_He4_approx)*amrex::Math::powi<2>(Y(C12))*state.rho + 2.0*screened_rates(k_Ne20_He4_to_C12_C12_approx)*Y(He4)*Y(Ne20)*state.rho); + + ydot_nuc(O16) = + (screened_rates(k_C12_He4_to_O16_reaclib)*Y(C12)*Y(He4)*state.rho + -screened_rates(k_O16_to_He4_C12_reaclib)*Y(O16)) + + (-screened_rates(k_O16_He4_to_Ne20_reaclib)*Y(He4)*Y(O16)*state.rho + screened_rates(k_Ne20_to_He4_O16_reaclib)*Y(Ne20)) + + (-screened_rates(k_O16_C12_to_p_Al27_reaclib)*Y(C12)*Y(O16)*state.rho + screened_rates(k_Al27_p_to_C12_O16_reaclib)*Y(Al27)*Y(H1)*state.rho) + + (-screened_rates(k_O16_C12_to_He4_Mg24_reaclib)*Y(C12)*Y(O16)*state.rho + screened_rates(k_Mg24_He4_to_C12_O16_reaclib)*Y(He4)*Y(Mg24)*state.rho) + + (-screened_rates(k_O16_O16_to_p_P31_reaclib)*amrex::Math::powi<2>(Y(O16))*state.rho + 2.0*screened_rates(k_P31_p_to_O16_O16_reaclib)*Y(P31)*Y(H1)*state.rho) + + (-screened_rates(k_O16_O16_to_He4_Si28_reaclib)*amrex::Math::powi<2>(Y(O16))*state.rho + 2.0*screened_rates(k_Si28_He4_to_O16_O16_reaclib)*Y(He4)*Y(Si28)*state.rho) + + (screened_rates(k_Si27_n_to_C12_O16_reaclib)*Y(Si27)*Y(N)*state.rho + -screened_rates(k_O16_C12_to_n_Si27_reaclib)*Y(C12)*Y(O16)*state.rho); + + ydot_nuc(Ne20) = + (screened_rates(k_O16_He4_to_Ne20_reaclib)*Y(He4)*Y(O16)*state.rho + -screened_rates(k_Ne20_to_He4_O16_reaclib)*Y(Ne20)) + + (-screened_rates(k_Ne20_C12_to_p_P31_reaclib)*Y(C12)*Y(Ne20)*state.rho + screened_rates(k_P31_p_to_C12_Ne20_reaclib)*Y(P31)*Y(H1)*state.rho) + + (-screened_rates(k_Ne20_C12_to_He4_Si28_reaclib)*Y(C12)*Y(Ne20)*state.rho + screened_rates(k_Si28_He4_to_C12_Ne20_reaclib)*Y(He4)*Y(Si28)*state.rho) + + (screened_rates(k_Mg23_n_to_He4_Ne20_reaclib)*Y(Mg23)*Y(N)*state.rho + -screened_rates(k_Ne20_He4_to_n_Mg23_reaclib)*Y(He4)*Y(Ne20)*state.rho) + + (0.5*screened_rates(k_C12_C12_to_Ne20_He4_approx)*amrex::Math::powi<2>(Y(C12))*state.rho + -screened_rates(k_Ne20_He4_to_C12_C12_approx)*Y(He4)*Y(Ne20)*state.rho) + + (-screened_rates(k_Ne20_He4_to_Mg24_approx)*Y(He4)*Y(Ne20)*state.rho + screened_rates(k_Mg24_to_Ne20_He4_approx)*Y(Mg24)); + + ydot_nuc(Mg23) = + (-screened_rates(k_Mg23_n_to_Mg24_reaclib)*Y(Mg23)*Y(N)*state.rho + screened_rates(k_Mg24_to_n_Mg23_reaclib)*Y(Mg24)) + + (-screened_rates(k_Mg23_He4_to_Si27_reaclib)*Y(He4)*Y(Mg23)*state.rho + screened_rates(k_Si27_to_He4_Mg23_reaclib)*Y(Si27)) + + (-screened_rates(k_Mg23_n_to_He4_Ne20_reaclib)*Y(Mg23)*Y(N)*state.rho + screened_rates(k_Ne20_He4_to_n_Mg23_reaclib)*Y(He4)*Y(Ne20)*state.rho) + + (-screened_rates(k_Mg23_n_to_C12_C12_reaclib)*Y(Mg23)*Y(N)*state.rho + 0.5*screened_rates(k_C12_C12_to_n_Mg23_reaclib)*amrex::Math::powi<2>(Y(C12))*state.rho); + + ydot_nuc(Mg24) = + (screened_rates(k_Mg23_n_to_Mg24_reaclib)*Y(Mg23)*Y(N)*state.rho + -screened_rates(k_Mg24_to_n_Mg23_reaclib)*Y(Mg24)) + + (-screened_rates(k_Mg24_He4_to_Si28_reaclib)*Y(He4)*Y(Mg24)*state.rho + screened_rates(k_Si28_to_He4_Mg24_reaclib)*Y(Si28)) + + (screened_rates(k_O16_C12_to_He4_Mg24_reaclib)*Y(C12)*Y(O16)*state.rho + -screened_rates(k_Mg24_He4_to_C12_O16_reaclib)*Y(He4)*Y(Mg24)*state.rho) + + (screened_rates(k_Al27_p_to_He4_Mg24_reaclib)*Y(Al27)*Y(H1)*state.rho + -screened_rates(k_Mg24_He4_to_p_Al27_reaclib)*Y(He4)*Y(Mg24)*state.rho) + + (screened_rates(k_Si27_n_to_He4_Mg24_reaclib)*Y(Si27)*Y(N)*state.rho + -screened_rates(k_Mg24_He4_to_n_Si27_reaclib)*Y(He4)*Y(Mg24)*state.rho) + + (0.5*screened_rates(k_C12_C12_to_Mg24_approx)*amrex::Math::powi<2>(Y(C12))*state.rho + -screened_rates(k_Mg24_to_C12_C12_approx)*Y(Mg24)) + + (screened_rates(k_Ne20_He4_to_Mg24_approx)*Y(He4)*Y(Ne20)*state.rho + -screened_rates(k_Mg24_to_Ne20_He4_approx)*Y(Mg24)); + + ydot_nuc(Al27) = + (-screened_rates(k_Al27_p_to_Si28_reaclib)*Y(Al27)*Y(H1)*state.rho + screened_rates(k_Si28_to_p_Al27_reaclib)*Y(Si28)) + + (-screened_rates(k_Al27_He4_to_P31_reaclib)*Y(Al27)*Y(He4)*state.rho + screened_rates(k_P31_to_He4_Al27_reaclib)*Y(P31)) + + (screened_rates(k_O16_C12_to_p_Al27_reaclib)*Y(C12)*Y(O16)*state.rho + -screened_rates(k_Al27_p_to_C12_O16_reaclib)*Y(Al27)*Y(H1)*state.rho) + + (-screened_rates(k_Al27_p_to_He4_Mg24_reaclib)*Y(Al27)*Y(H1)*state.rho + screened_rates(k_Mg24_He4_to_p_Al27_reaclib)*Y(He4)*Y(Mg24)*state.rho) + + (-screened_rates(k_Al27_He4_to_p_Si30_reaclib)*Y(Al27)*Y(He4)*state.rho + screened_rates(k_Si30_p_to_He4_Al27_reaclib)*Y(Si30)*Y(H1)*state.rho) + + (screened_rates(k_Si27_n_to_p_Al27_reaclib)*Y(Si27)*Y(N)*state.rho + -screened_rates(k_Al27_p_to_n_Si27_reaclib)*Y(Al27)*Y(H1)*state.rho) + + (screened_rates(k_Si27_to_Al27_electron_capture_weaktab)*Y(Si27) + -screened_rates(k_Al27_to_Si27_beta_neg_weaktab)*Y(Al27)); + + ydot_nuc(Si27) = + (screened_rates(k_Mg23_He4_to_Si27_reaclib)*Y(He4)*Y(Mg23)*state.rho + -screened_rates(k_Si27_to_He4_Mg23_reaclib)*Y(Si27)) + + (-screened_rates(k_Si27_n_to_Si28_reaclib)*Y(Si27)*Y(N)*state.rho + screened_rates(k_Si28_to_n_Si27_reaclib)*Y(Si28)) + + (-screened_rates(k_Si27_n_to_p_Al27_reaclib)*Y(Si27)*Y(N)*state.rho + screened_rates(k_Al27_p_to_n_Si27_reaclib)*Y(Al27)*Y(H1)*state.rho) + + (-screened_rates(k_Si27_n_to_He4_Mg24_reaclib)*Y(Si27)*Y(N)*state.rho + screened_rates(k_Mg24_He4_to_n_Si27_reaclib)*Y(He4)*Y(Mg24)*state.rho) + + (-screened_rates(k_Si27_n_to_C12_O16_reaclib)*Y(Si27)*Y(N)*state.rho + screened_rates(k_O16_C12_to_n_Si27_reaclib)*Y(C12)*Y(O16)*state.rho) + + (-screened_rates(k_Si27_to_Al27_electron_capture_weaktab)*Y(Si27) + screened_rates(k_Al27_to_Si27_beta_neg_weaktab)*Y(Al27)); + + ydot_nuc(Si28) = + (screened_rates(k_Mg24_He4_to_Si28_reaclib)*Y(He4)*Y(Mg24)*state.rho + -screened_rates(k_Si28_to_He4_Mg24_reaclib)*Y(Si28)) + + (screened_rates(k_Al27_p_to_Si28_reaclib)*Y(Al27)*Y(H1)*state.rho + -screened_rates(k_Si28_to_p_Al27_reaclib)*Y(Si28)) + + (screened_rates(k_Si27_n_to_Si28_reaclib)*Y(Si27)*Y(N)*state.rho + -screened_rates(k_Si28_to_n_Si27_reaclib)*Y(Si28)) + + (-screened_rates(k_Si28_n_to_Si29_reaclib)*Y(Si28)*Y(N)*state.rho + screened_rates(k_Si29_to_n_Si28_reaclib)*Y(Si29)) + + (-screened_rates(k_Si28_p_to_P29_reaclib)*Y(Si28)*Y(H1)*state.rho + screened_rates(k_P29_to_p_Si28_reaclib)*Y(P29)) + + (-screened_rates(k_Si28_He4_to_S32_reaclib)*Y(He4)*Y(Si28)*state.rho + screened_rates(k_S32_to_He4_Si28_reaclib)*Y(S32)) + + (0.5*screened_rates(k_O16_O16_to_He4_Si28_reaclib)*amrex::Math::powi<2>(Y(O16))*state.rho + -screened_rates(k_Si28_He4_to_O16_O16_reaclib)*Y(He4)*Y(Si28)*state.rho) + + (screened_rates(k_Ne20_C12_to_He4_Si28_reaclib)*Y(C12)*Y(Ne20)*state.rho + -screened_rates(k_Si28_He4_to_C12_Ne20_reaclib)*Y(He4)*Y(Si28)*state.rho) + + (screened_rates(k_P31_p_to_He4_Si28_reaclib)*Y(P31)*Y(H1)*state.rho + -screened_rates(k_Si28_He4_to_p_P31_reaclib)*Y(He4)*Y(Si28)*state.rho); + + ydot_nuc(Si29) = + (screened_rates(k_Si28_n_to_Si29_reaclib)*Y(Si28)*Y(N)*state.rho + -screened_rates(k_Si29_to_n_Si28_reaclib)*Y(Si29)) + + (-screened_rates(k_Si29_n_to_Si30_reaclib)*Y(Si29)*Y(N)*state.rho + screened_rates(k_Si30_to_n_Si29_reaclib)*Y(Si30)) + + (-screened_rates(k_Si29_He4_to_S33_reaclib)*Y(He4)*Y(Si29)*state.rho + screened_rates(k_S33_to_He4_Si29_reaclib)*Y(S33)) + + (screened_rates(k_P29_n_to_p_Si29_reaclib)*Y(P29)*Y(N)*state.rho + -screened_rates(k_Si29_p_to_n_P29_reaclib)*Y(Si29)*Y(H1)*state.rho) + + (screened_rates(k_S32_n_to_He4_Si29_reaclib)*Y(S32)*Y(N)*state.rho + -screened_rates(k_Si29_He4_to_n_S32_reaclib)*Y(He4)*Y(Si29)*state.rho) + + (screened_rates(k_P29_to_Si29_electron_capture_weaktab)*Y(P29) + -screened_rates(k_Si29_to_P29_beta_neg_weaktab)*Y(Si29)); + + ydot_nuc(Si30) = + (screened_rates(k_Si29_n_to_Si30_reaclib)*Y(Si29)*Y(N)*state.rho + -screened_rates(k_Si30_to_n_Si29_reaclib)*Y(Si30)) + + (-screened_rates(k_Si30_n_to_Si31_reaclib)*Y(Si30)*Y(N)*state.rho + screened_rates(k_Si31_to_n_Si30_reaclib)*Y(Si31)) + + (-screened_rates(k_Si30_p_to_P31_reaclib)*Y(Si30)*Y(H1)*state.rho + screened_rates(k_P31_to_p_Si30_reaclib)*Y(P31)) + + (-screened_rates(k_Si30_He4_to_S34_reaclib)*Y(He4)*Y(Si30)*state.rho + screened_rates(k_S34_to_He4_Si30_reaclib)*Y(S34)) + + (screened_rates(k_Al27_He4_to_p_Si30_reaclib)*Y(Al27)*Y(He4)*state.rho + -screened_rates(k_Si30_p_to_He4_Al27_reaclib)*Y(Si30)*Y(H1)*state.rho) + + (screened_rates(k_P33_p_to_He4_Si30_reaclib)*Y(P33)*Y(H1)*state.rho + -screened_rates(k_Si30_He4_to_p_P33_reaclib)*Y(He4)*Y(Si30)*state.rho) + + (screened_rates(k_S33_n_to_He4_Si30_reaclib)*Y(S33)*Y(N)*state.rho + -screened_rates(k_Si30_He4_to_n_S33_reaclib)*Y(He4)*Y(Si30)*state.rho); + + ydot_nuc(Si31) = + (screened_rates(k_Si30_n_to_Si31_reaclib)*Y(Si30)*Y(N)*state.rho + -screened_rates(k_Si31_to_n_Si30_reaclib)*Y(Si31)) + + (-screened_rates(k_Si31_He4_to_S35_reaclib)*Y(He4)*Y(Si31)*state.rho + screened_rates(k_S35_to_He4_Si31_reaclib)*Y(S35)) + + (-screened_rates(k_Si31_p_to_n_P31_reaclib)*Y(Si31)*Y(H1)*state.rho + screened_rates(k_P31_n_to_p_Si31_reaclib)*Y(P31)*Y(N)*state.rho) + + (-screened_rates(k_Si31_He4_to_n_S34_reaclib)*Y(He4)*Y(Si31)*state.rho + screened_rates(k_S34_n_to_He4_Si31_reaclib)*Y(S34)*Y(N)*state.rho) + + (-screened_rates(k_Si31_to_P31_beta_neg_weaktab)*Y(Si31) + screened_rates(k_P31_to_Si31_electron_capture_weaktab)*Y(P31)); + + ydot_nuc(P29) = + (screened_rates(k_Si28_p_to_P29_reaclib)*Y(Si28)*Y(H1)*state.rho + -screened_rates(k_P29_to_p_Si28_reaclib)*Y(P29)) + + (-screened_rates(k_P29_He4_to_Cl33_reaclib)*Y(He4)*Y(P29)*state.rho + screened_rates(k_Cl33_to_He4_P29_reaclib)*Y(Cl33)) + + (-screened_rates(k_P29_n_to_p_Si29_reaclib)*Y(P29)*Y(N)*state.rho + screened_rates(k_Si29_p_to_n_P29_reaclib)*Y(Si29)*Y(H1)*state.rho) + + (-screened_rates(k_P29_He4_to_p_S32_reaclib)*Y(He4)*Y(P29)*state.rho + screened_rates(k_S32_p_to_He4_P29_reaclib)*Y(S32)*Y(H1)*state.rho) + + (-screened_rates(k_P29_to_Si29_electron_capture_weaktab)*Y(P29) + screened_rates(k_Si29_to_P29_beta_neg_weaktab)*Y(Si29)); + + ydot_nuc(P31) = + (screened_rates(k_Al27_He4_to_P31_reaclib)*Y(Al27)*Y(He4)*state.rho + -screened_rates(k_P31_to_He4_Al27_reaclib)*Y(P31)) + + (screened_rates(k_Si30_p_to_P31_reaclib)*Y(Si30)*Y(H1)*state.rho + -screened_rates(k_P31_to_p_Si30_reaclib)*Y(P31)) + + (-screened_rates(k_P31_p_to_S32_reaclib)*Y(P31)*Y(H1)*state.rho + screened_rates(k_S32_to_p_P31_reaclib)*Y(S32)) + + (-screened_rates(k_P31_He4_to_Cl35_reaclib)*Y(He4)*Y(P31)*state.rho + screened_rates(k_Cl35_to_He4_P31_reaclib)*Y(Cl35)) + + (0.5*screened_rates(k_O16_O16_to_p_P31_reaclib)*amrex::Math::powi<2>(Y(O16))*state.rho + -screened_rates(k_P31_p_to_O16_O16_reaclib)*Y(P31)*Y(H1)*state.rho) + + (screened_rates(k_Ne20_C12_to_p_P31_reaclib)*Y(C12)*Y(Ne20)*state.rho + -screened_rates(k_P31_p_to_C12_Ne20_reaclib)*Y(P31)*Y(H1)*state.rho) + + (screened_rates(k_Si31_p_to_n_P31_reaclib)*Y(Si31)*Y(H1)*state.rho + -screened_rates(k_P31_n_to_p_Si31_reaclib)*Y(P31)*Y(N)*state.rho) + + (-screened_rates(k_P31_p_to_He4_Si28_reaclib)*Y(P31)*Y(H1)*state.rho + screened_rates(k_Si28_He4_to_p_P31_reaclib)*Y(He4)*Y(Si28)*state.rho) + + (-screened_rates(k_P31_He4_to_p_S34_reaclib)*Y(He4)*Y(P31)*state.rho + screened_rates(k_S34_p_to_He4_P31_reaclib)*Y(S34)*Y(H1)*state.rho) + + (screened_rates(k_Si31_to_P31_beta_neg_weaktab)*Y(Si31) + -screened_rates(k_P31_to_Si31_electron_capture_weaktab)*Y(P31)); + + ydot_nuc(P33) = + (-screened_rates(k_P33_p_to_S34_reaclib)*Y(P33)*Y(H1)*state.rho + screened_rates(k_S34_to_p_P33_reaclib)*Y(S34)) + + (-screened_rates(k_P33_He4_to_Cl37_reaclib)*Y(He4)*Y(P33)*state.rho + screened_rates(k_Cl37_to_He4_P33_reaclib)*Y(Cl37)) + + (-screened_rates(k_P33_p_to_He4_Si30_reaclib)*Y(P33)*Y(H1)*state.rho + screened_rates(k_Si30_He4_to_p_P33_reaclib)*Y(He4)*Y(Si30)*state.rho) + + (screened_rates(k_S33_n_to_p_P33_reaclib)*Y(S33)*Y(N)*state.rho + -screened_rates(k_P33_p_to_n_S33_reaclib)*Y(P33)*Y(H1)*state.rho) + + (-screened_rates(k_P33_to_S33_beta_neg_weaktab)*Y(P33) + screened_rates(k_S33_to_P33_electron_capture_weaktab)*Y(S33)); + + ydot_nuc(S32) = + (screened_rates(k_Si28_He4_to_S32_reaclib)*Y(He4)*Y(Si28)*state.rho + -screened_rates(k_S32_to_He4_Si28_reaclib)*Y(S32)) + + (screened_rates(k_P31_p_to_S32_reaclib)*Y(P31)*Y(H1)*state.rho + -screened_rates(k_S32_to_p_P31_reaclib)*Y(S32)) + + (-screened_rates(k_S32_n_to_S33_reaclib)*Y(S32)*Y(N)*state.rho + screened_rates(k_S33_to_n_S32_reaclib)*Y(S33)) + + (-screened_rates(k_S32_p_to_Cl33_reaclib)*Y(S32)*Y(H1)*state.rho + screened_rates(k_Cl33_to_p_S32_reaclib)*Y(Cl33)) + + (-screened_rates(k_S32_He4_to_Ar36_reaclib)*Y(He4)*Y(S32)*state.rho + screened_rates(k_Ar36_to_He4_S32_reaclib)*Y(Ar36)) + + (screened_rates(k_P29_He4_to_p_S32_reaclib)*Y(He4)*Y(P29)*state.rho + -screened_rates(k_S32_p_to_He4_P29_reaclib)*Y(S32)*Y(H1)*state.rho) + + (-screened_rates(k_S32_n_to_He4_Si29_reaclib)*Y(S32)*Y(N)*state.rho + screened_rates(k_Si29_He4_to_n_S32_reaclib)*Y(He4)*Y(Si29)*state.rho) + + (screened_rates(k_Cl35_p_to_He4_S32_reaclib)*Y(Cl35)*Y(H1)*state.rho + -screened_rates(k_S32_He4_to_p_Cl35_reaclib)*Y(He4)*Y(S32)*state.rho); + + ydot_nuc(S33) = + (screened_rates(k_Si29_He4_to_S33_reaclib)*Y(He4)*Y(Si29)*state.rho + -screened_rates(k_S33_to_He4_Si29_reaclib)*Y(S33)) + + (screened_rates(k_S32_n_to_S33_reaclib)*Y(S32)*Y(N)*state.rho + -screened_rates(k_S33_to_n_S32_reaclib)*Y(S33)) + + (-screened_rates(k_S33_n_to_S34_reaclib)*Y(S33)*Y(N)*state.rho + screened_rates(k_S34_to_n_S33_reaclib)*Y(S34)) + + (-screened_rates(k_S33_He4_to_Ar37_reaclib)*Y(He4)*Y(S33)*state.rho + screened_rates(k_Ar37_to_He4_S33_reaclib)*Y(Ar37)) + + (-screened_rates(k_S33_n_to_p_P33_reaclib)*Y(S33)*Y(N)*state.rho + screened_rates(k_P33_p_to_n_S33_reaclib)*Y(P33)*Y(H1)*state.rho) + + (-screened_rates(k_S33_n_to_He4_Si30_reaclib)*Y(S33)*Y(N)*state.rho + screened_rates(k_Si30_He4_to_n_S33_reaclib)*Y(He4)*Y(Si30)*state.rho) + + (screened_rates(k_Cl33_n_to_p_S33_reaclib)*Y(Cl33)*Y(N)*state.rho + -screened_rates(k_S33_p_to_n_Cl33_reaclib)*Y(S33)*Y(H1)*state.rho) + + (screened_rates(k_Ar36_n_to_He4_S33_reaclib)*Y(Ar36)*Y(N)*state.rho + -screened_rates(k_S33_He4_to_n_Ar36_reaclib)*Y(He4)*Y(S33)*state.rho) + + (screened_rates(k_Cl33_to_S33_electron_capture_weaktab)*Y(Cl33) + -screened_rates(k_S33_to_Cl33_beta_neg_weaktab)*Y(S33)) + + (screened_rates(k_P33_to_S33_beta_neg_weaktab)*Y(P33) + -screened_rates(k_S33_to_P33_electron_capture_weaktab)*Y(S33)); + + ydot_nuc(S34) = + (screened_rates(k_Si30_He4_to_S34_reaclib)*Y(He4)*Y(Si30)*state.rho + -screened_rates(k_S34_to_He4_Si30_reaclib)*Y(S34)) + + (screened_rates(k_P33_p_to_S34_reaclib)*Y(P33)*Y(H1)*state.rho + -screened_rates(k_S34_to_p_P33_reaclib)*Y(S34)) + + (screened_rates(k_S33_n_to_S34_reaclib)*Y(S33)*Y(N)*state.rho + -screened_rates(k_S34_to_n_S33_reaclib)*Y(S34)) + + (-screened_rates(k_S34_n_to_S35_reaclib)*Y(S34)*Y(N)*state.rho + screened_rates(k_S35_to_n_S34_reaclib)*Y(S35)) + + (-screened_rates(k_S34_p_to_Cl35_reaclib)*Y(S34)*Y(H1)*state.rho + screened_rates(k_Cl35_to_p_S34_reaclib)*Y(Cl35)) + + (-screened_rates(k_S34_He4_to_Ar38_reaclib)*Y(He4)*Y(S34)*state.rho + screened_rates(k_Ar38_to_He4_S34_reaclib)*Y(Ar38)) + + (screened_rates(k_Si31_He4_to_n_S34_reaclib)*Y(He4)*Y(Si31)*state.rho + -screened_rates(k_S34_n_to_He4_Si31_reaclib)*Y(S34)*Y(N)*state.rho) + + (screened_rates(k_P31_He4_to_p_S34_reaclib)*Y(He4)*Y(P31)*state.rho + -screened_rates(k_S34_p_to_He4_P31_reaclib)*Y(S34)*Y(H1)*state.rho) + + (screened_rates(k_Cl37_p_to_He4_S34_reaclib)*Y(Cl37)*Y(H1)*state.rho + -screened_rates(k_S34_He4_to_p_Cl37_reaclib)*Y(He4)*Y(S34)*state.rho) + + (screened_rates(k_Ar37_n_to_He4_S34_reaclib)*Y(Ar37)*Y(N)*state.rho + -screened_rates(k_S34_He4_to_n_Ar37_reaclib)*Y(He4)*Y(S34)*state.rho); + + ydot_nuc(S35) = + (screened_rates(k_Si31_He4_to_S35_reaclib)*Y(He4)*Y(Si31)*state.rho + -screened_rates(k_S35_to_He4_Si31_reaclib)*Y(S35)) + + (screened_rates(k_S34_n_to_S35_reaclib)*Y(S34)*Y(N)*state.rho + -screened_rates(k_S35_to_n_S34_reaclib)*Y(S35)) + + (-screened_rates(k_S35_He4_to_n_Ar38_reaclib)*Y(He4)*Y(S35)*state.rho + screened_rates(k_Ar38_n_to_He4_S35_reaclib)*Y(Ar38)*Y(N)*state.rho) + + (screened_rates(k_Cl35_n_to_p_S35_reaclib)*Y(Cl35)*Y(N)*state.rho + -screened_rates(k_S35_p_to_n_Cl35_reaclib)*Y(S35)*Y(H1)*state.rho) + + (-screened_rates(k_S35_to_Cl35_beta_neg_weaktab)*Y(S35) + screened_rates(k_Cl35_to_S35_electron_capture_weaktab)*Y(Cl35)); + + ydot_nuc(Cl33) = + (screened_rates(k_P29_He4_to_Cl33_reaclib)*Y(He4)*Y(P29)*state.rho + -screened_rates(k_Cl33_to_He4_P29_reaclib)*Y(Cl33)) + + (screened_rates(k_S32_p_to_Cl33_reaclib)*Y(S32)*Y(H1)*state.rho + -screened_rates(k_Cl33_to_p_S32_reaclib)*Y(Cl33)) + + (-screened_rates(k_Cl33_He4_to_K37_reaclib)*Y(Cl33)*Y(He4)*state.rho + screened_rates(k_K37_to_He4_Cl33_reaclib)*Y(K37)) + + (-screened_rates(k_Cl33_n_to_p_S33_reaclib)*Y(Cl33)*Y(N)*state.rho + screened_rates(k_S33_p_to_n_Cl33_reaclib)*Y(S33)*Y(H1)*state.rho) + + (-screened_rates(k_Cl33_He4_to_p_Ar36_reaclib)*Y(Cl33)*Y(He4)*state.rho + screened_rates(k_Ar36_p_to_He4_Cl33_reaclib)*Y(Ar36)*Y(H1)*state.rho) + + (-screened_rates(k_Cl33_to_S33_electron_capture_weaktab)*Y(Cl33) + screened_rates(k_S33_to_Cl33_beta_neg_weaktab)*Y(S33)); + + ydot_nuc(Cl35) = + (screened_rates(k_P31_He4_to_Cl35_reaclib)*Y(He4)*Y(P31)*state.rho + -screened_rates(k_Cl35_to_He4_P31_reaclib)*Y(Cl35)) + + (screened_rates(k_S34_p_to_Cl35_reaclib)*Y(S34)*Y(H1)*state.rho + -screened_rates(k_Cl35_to_p_S34_reaclib)*Y(Cl35)) + + (-screened_rates(k_Cl35_p_to_Ar36_reaclib)*Y(Cl35)*Y(H1)*state.rho + screened_rates(k_Ar36_to_p_Cl35_reaclib)*Y(Ar36)) + + (-screened_rates(k_Cl35_He4_to_K39_reaclib)*Y(Cl35)*Y(He4)*state.rho + screened_rates(k_K39_to_He4_Cl35_reaclib)*Y(K39)) + + (-screened_rates(k_Cl35_n_to_p_S35_reaclib)*Y(Cl35)*Y(N)*state.rho + screened_rates(k_S35_p_to_n_Cl35_reaclib)*Y(S35)*Y(H1)*state.rho) + + (-screened_rates(k_Cl35_p_to_He4_S32_reaclib)*Y(Cl35)*Y(H1)*state.rho + screened_rates(k_S32_He4_to_p_Cl35_reaclib)*Y(He4)*Y(S32)*state.rho) + + (-screened_rates(k_Cl35_He4_to_p_Ar38_reaclib)*Y(Cl35)*Y(He4)*state.rho + screened_rates(k_Ar38_p_to_He4_Cl35_reaclib)*Y(Ar38)*Y(H1)*state.rho) + + (screened_rates(k_S35_to_Cl35_beta_neg_weaktab)*Y(S35) + -screened_rates(k_Cl35_to_S35_electron_capture_weaktab)*Y(Cl35)); + + ydot_nuc(Cl37) = + (screened_rates(k_P33_He4_to_Cl37_reaclib)*Y(He4)*Y(P33)*state.rho + -screened_rates(k_Cl37_to_He4_P33_reaclib)*Y(Cl37)) + + (-screened_rates(k_Cl37_p_to_Ar38_reaclib)*Y(Cl37)*Y(H1)*state.rho + screened_rates(k_Ar38_to_p_Cl37_reaclib)*Y(Ar38)) + + (-screened_rates(k_Cl37_p_to_He4_S34_reaclib)*Y(Cl37)*Y(H1)*state.rho + screened_rates(k_S34_He4_to_p_Cl37_reaclib)*Y(He4)*Y(S34)*state.rho) + + (screened_rates(k_Ar37_n_to_p_Cl37_reaclib)*Y(Ar37)*Y(N)*state.rho + -screened_rates(k_Cl37_p_to_n_Ar37_reaclib)*Y(Cl37)*Y(H1)*state.rho) + + (screened_rates(k_Ar37_to_Cl37_electron_capture_weaktab)*Y(Ar37) + -screened_rates(k_Cl37_to_Ar37_beta_neg_weaktab)*Y(Cl37)); + + ydot_nuc(Ar36) = + (screened_rates(k_S32_He4_to_Ar36_reaclib)*Y(He4)*Y(S32)*state.rho + -screened_rates(k_Ar36_to_He4_S32_reaclib)*Y(Ar36)) + + (screened_rates(k_Cl35_p_to_Ar36_reaclib)*Y(Cl35)*Y(H1)*state.rho + -screened_rates(k_Ar36_to_p_Cl35_reaclib)*Y(Ar36)) + + (-screened_rates(k_Ar36_n_to_Ar37_reaclib)*Y(Ar36)*Y(N)*state.rho + screened_rates(k_Ar37_to_n_Ar36_reaclib)*Y(Ar37)) + + (-screened_rates(k_Ar36_p_to_K37_reaclib)*Y(Ar36)*Y(H1)*state.rho + screened_rates(k_K37_to_p_Ar36_reaclib)*Y(K37)) + + (-screened_rates(k_Ar36_He4_to_Ca40_reaclib)*Y(Ar36)*Y(He4)*state.rho + screened_rates(k_Ca40_to_He4_Ar36_reaclib)*Y(Ca40)) + + (screened_rates(k_Cl33_He4_to_p_Ar36_reaclib)*Y(Cl33)*Y(He4)*state.rho + -screened_rates(k_Ar36_p_to_He4_Cl33_reaclib)*Y(Ar36)*Y(H1)*state.rho) + + (-screened_rates(k_Ar36_n_to_He4_S33_reaclib)*Y(Ar36)*Y(N)*state.rho + screened_rates(k_S33_He4_to_n_Ar36_reaclib)*Y(He4)*Y(S33)*state.rho) + + (screened_rates(k_K39_p_to_He4_Ar36_reaclib)*Y(K39)*Y(H1)*state.rho + -screened_rates(k_Ar36_He4_to_p_K39_reaclib)*Y(Ar36)*Y(He4)*state.rho); + + ydot_nuc(Ar37) = + (screened_rates(k_S33_He4_to_Ar37_reaclib)*Y(He4)*Y(S33)*state.rho + -screened_rates(k_Ar37_to_He4_S33_reaclib)*Y(Ar37)) + + (screened_rates(k_Ar36_n_to_Ar37_reaclib)*Y(Ar36)*Y(N)*state.rho + -screened_rates(k_Ar37_to_n_Ar36_reaclib)*Y(Ar37)) + + (-screened_rates(k_Ar37_n_to_Ar38_reaclib)*Y(Ar37)*Y(N)*state.rho + screened_rates(k_Ar38_to_n_Ar37_reaclib)*Y(Ar38)) + + (-screened_rates(k_Ar37_n_to_p_Cl37_reaclib)*Y(Ar37)*Y(N)*state.rho + screened_rates(k_Cl37_p_to_n_Ar37_reaclib)*Y(Cl37)*Y(H1)*state.rho) + + (-screened_rates(k_Ar37_n_to_He4_S34_reaclib)*Y(Ar37)*Y(N)*state.rho + screened_rates(k_S34_He4_to_n_Ar37_reaclib)*Y(He4)*Y(S34)*state.rho) + + (screened_rates(k_K37_n_to_p_Ar37_reaclib)*Y(K37)*Y(N)*state.rho + -screened_rates(k_Ar37_p_to_n_K37_reaclib)*Y(Ar37)*Y(H1)*state.rho) + + (screened_rates(k_Ca40_n_to_He4_Ar37_reaclib)*Y(Ca40)*Y(N)*state.rho + -screened_rates(k_Ar37_He4_to_n_Ca40_reaclib)*Y(Ar37)*Y(He4)*state.rho) + + (-screened_rates(k_Ar37_to_Cl37_electron_capture_weaktab)*Y(Ar37) + screened_rates(k_Cl37_to_Ar37_beta_neg_weaktab)*Y(Cl37)) + + (screened_rates(k_K37_to_Ar37_electron_capture_weaktab)*Y(K37) + -screened_rates(k_Ar37_to_K37_beta_neg_weaktab)*Y(Ar37)); + + ydot_nuc(Ar38) = + (screened_rates(k_S34_He4_to_Ar38_reaclib)*Y(He4)*Y(S34)*state.rho + -screened_rates(k_Ar38_to_He4_S34_reaclib)*Y(Ar38)) + + (screened_rates(k_Cl37_p_to_Ar38_reaclib)*Y(Cl37)*Y(H1)*state.rho + -screened_rates(k_Ar38_to_p_Cl37_reaclib)*Y(Ar38)) + + (screened_rates(k_Ar37_n_to_Ar38_reaclib)*Y(Ar37)*Y(N)*state.rho + -screened_rates(k_Ar38_to_n_Ar37_reaclib)*Y(Ar38)) + + (-screened_rates(k_Ar38_p_to_K39_reaclib)*Y(Ar38)*Y(H1)*state.rho + screened_rates(k_K39_to_p_Ar38_reaclib)*Y(K39)) + + (-screened_rates(k_Ar38_He4_to_Ca42_reaclib)*Y(Ar38)*Y(He4)*state.rho + screened_rates(k_Ca42_to_He4_Ar38_reaclib)*Y(Ca42)) + + (screened_rates(k_S35_He4_to_n_Ar38_reaclib)*Y(He4)*Y(S35)*state.rho + -screened_rates(k_Ar38_n_to_He4_S35_reaclib)*Y(Ar38)*Y(N)*state.rho) + + (screened_rates(k_Cl35_He4_to_p_Ar38_reaclib)*Y(Cl35)*Y(He4)*state.rho + -screened_rates(k_Ar38_p_to_He4_Cl35_reaclib)*Y(Ar38)*Y(H1)*state.rho); + + ydot_nuc(K37) = + (screened_rates(k_Cl33_He4_to_K37_reaclib)*Y(Cl33)*Y(He4)*state.rho + -screened_rates(k_K37_to_He4_Cl33_reaclib)*Y(K37)) + + (screened_rates(k_Ar36_p_to_K37_reaclib)*Y(Ar36)*Y(H1)*state.rho + -screened_rates(k_K37_to_p_Ar36_reaclib)*Y(K37)) + + (-screened_rates(k_K37_He4_to_Sc41_reaclib)*Y(He4)*Y(K37)*state.rho + screened_rates(k_Sc41_to_He4_K37_reaclib)*Y(Sc41)) + + (-screened_rates(k_K37_n_to_p_Ar37_reaclib)*Y(K37)*Y(N)*state.rho + screened_rates(k_Ar37_p_to_n_K37_reaclib)*Y(Ar37)*Y(H1)*state.rho) + + (-screened_rates(k_K37_He4_to_p_Ca40_reaclib)*Y(He4)*Y(K37)*state.rho + screened_rates(k_Ca40_p_to_He4_K37_reaclib)*Y(Ca40)*Y(H1)*state.rho) + + (-screened_rates(k_K37_to_Ar37_electron_capture_weaktab)*Y(K37) + screened_rates(k_Ar37_to_K37_beta_neg_weaktab)*Y(Ar37)); + + ydot_nuc(K39) = + (screened_rates(k_Cl35_He4_to_K39_reaclib)*Y(Cl35)*Y(He4)*state.rho + -screened_rates(k_K39_to_He4_Cl35_reaclib)*Y(K39)) + + (screened_rates(k_Ar38_p_to_K39_reaclib)*Y(Ar38)*Y(H1)*state.rho + -screened_rates(k_K39_to_p_Ar38_reaclib)*Y(K39)) + + (-screened_rates(k_K39_p_to_Ca40_reaclib)*Y(K39)*Y(H1)*state.rho + screened_rates(k_Ca40_to_p_K39_reaclib)*Y(Ca40)) + + (-screened_rates(k_K39_He4_to_Sc43_reaclib)*Y(He4)*Y(K39)*state.rho + screened_rates(k_Sc43_to_He4_K39_reaclib)*Y(Sc43)) + + (-screened_rates(k_K39_p_to_He4_Ar36_reaclib)*Y(K39)*Y(H1)*state.rho + screened_rates(k_Ar36_He4_to_p_K39_reaclib)*Y(Ar36)*Y(He4)*state.rho) + + (screened_rates(k_Ca42_p_to_He4_K39_reaclib)*Y(Ca42)*Y(H1)*state.rho + -screened_rates(k_K39_He4_to_p_Ca42_reaclib)*Y(He4)*Y(K39)*state.rho); + + ydot_nuc(Ca40) = + (screened_rates(k_Ar36_He4_to_Ca40_reaclib)*Y(Ar36)*Y(He4)*state.rho + -screened_rates(k_Ca40_to_He4_Ar36_reaclib)*Y(Ca40)) + + (screened_rates(k_K39_p_to_Ca40_reaclib)*Y(K39)*Y(H1)*state.rho + -screened_rates(k_Ca40_to_p_K39_reaclib)*Y(Ca40)) + + (-screened_rates(k_Ca40_p_to_Sc41_reaclib)*Y(Ca40)*Y(H1)*state.rho + screened_rates(k_Sc41_to_p_Ca40_reaclib)*Y(Sc41)) + + (-screened_rates(k_Ca40_He4_to_Ti44_reaclib)*Y(Ca40)*Y(He4)*state.rho + screened_rates(k_Ti44_to_He4_Ca40_reaclib)*Y(Ti44)) + + (screened_rates(k_K37_He4_to_p_Ca40_reaclib)*Y(He4)*Y(K37)*state.rho + -screened_rates(k_Ca40_p_to_He4_K37_reaclib)*Y(Ca40)*Y(H1)*state.rho) + + (-screened_rates(k_Ca40_n_to_He4_Ar37_reaclib)*Y(Ca40)*Y(N)*state.rho + screened_rates(k_Ar37_He4_to_n_Ca40_reaclib)*Y(Ar37)*Y(He4)*state.rho) + + (screened_rates(k_Sc43_p_to_He4_Ca40_reaclib)*Y(Sc43)*Y(H1)*state.rho + -screened_rates(k_Ca40_He4_to_p_Sc43_reaclib)*Y(Ca40)*Y(He4)*state.rho) + + (-0.5*screened_rates(k_Ca40_n_n_to_Ca42_approx)*Y(Ca40)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + screened_rates(k_Ca42_to_Ca40_n_n_approx)*Y(Ca42)); + + ydot_nuc(Ca42) = + (screened_rates(k_Ar38_He4_to_Ca42_reaclib)*Y(Ar38)*Y(He4)*state.rho + -screened_rates(k_Ca42_to_He4_Ar38_reaclib)*Y(Ca42)) + + (-screened_rates(k_Ca42_p_to_Sc43_reaclib)*Y(Ca42)*Y(H1)*state.rho + screened_rates(k_Sc43_to_p_Ca42_reaclib)*Y(Sc43)) + + (-screened_rates(k_Ca42_He4_to_Ti46_reaclib)*Y(Ca42)*Y(He4)*state.rho + screened_rates(k_Ti46_to_He4_Ca42_reaclib)*Y(Ti46)) + + (-screened_rates(k_Ca42_p_to_He4_K39_reaclib)*Y(Ca42)*Y(H1)*state.rho + screened_rates(k_K39_He4_to_p_Ca42_reaclib)*Y(He4)*Y(K39)*state.rho) + + (screened_rates(k_Sc45_p_to_He4_Ca42_reaclib)*Y(Sc45)*Y(H1)*state.rho + -screened_rates(k_Ca42_He4_to_p_Sc45_reaclib)*Y(Ca42)*Y(He4)*state.rho) + + (0.5*screened_rates(k_Ca40_n_n_to_Ca42_approx)*Y(Ca40)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + -screened_rates(k_Ca42_to_Ca40_n_n_approx)*Y(Ca42)); + + ydot_nuc(Sc41) = + (screened_rates(k_K37_He4_to_Sc41_reaclib)*Y(He4)*Y(K37)*state.rho + -screened_rates(k_Sc41_to_He4_K37_reaclib)*Y(Sc41)) + + (screened_rates(k_Ca40_p_to_Sc41_reaclib)*Y(Ca40)*Y(H1)*state.rho + -screened_rates(k_Sc41_to_p_Ca40_reaclib)*Y(Sc41)) + + (-screened_rates(k_Sc41_He4_to_p_Ti44_reaclib)*Y(He4)*Y(Sc41)*state.rho + screened_rates(k_Ti44_p_to_He4_Sc41_reaclib)*Y(Ti44)*Y(H1)*state.rho) + + (-0.5*screened_rates(k_Sc41_n_n_to_Sc43_approx)*Y(Sc41)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + screened_rates(k_Sc43_to_Sc41_n_n_approx)*Y(Sc43)); + + ydot_nuc(Sc43) = + (screened_rates(k_K39_He4_to_Sc43_reaclib)*Y(He4)*Y(K39)*state.rho + -screened_rates(k_Sc43_to_He4_K39_reaclib)*Y(Sc43)) + + (screened_rates(k_Ca42_p_to_Sc43_reaclib)*Y(Ca42)*Y(H1)*state.rho + -screened_rates(k_Sc43_to_p_Ca42_reaclib)*Y(Sc43)) + + (-screened_rates(k_Sc43_p_to_Ti44_reaclib)*Y(Sc43)*Y(H1)*state.rho + screened_rates(k_Ti44_to_p_Sc43_reaclib)*Y(Ti44)) + + (-screened_rates(k_Sc43_He4_to_V47_reaclib)*Y(He4)*Y(Sc43)*state.rho + screened_rates(k_V47_to_He4_Sc43_reaclib)*Y(V47)) + + (-screened_rates(k_Sc43_p_to_He4_Ca40_reaclib)*Y(Sc43)*Y(H1)*state.rho + screened_rates(k_Ca40_He4_to_p_Sc43_reaclib)*Y(Ca40)*Y(He4)*state.rho) + + (-screened_rates(k_Sc43_He4_to_p_Ti46_reaclib)*Y(He4)*Y(Sc43)*state.rho + screened_rates(k_Ti46_p_to_He4_Sc43_reaclib)*Y(Ti46)*Y(H1)*state.rho) + + (0.5*screened_rates(k_Sc41_n_n_to_Sc43_approx)*Y(Sc41)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + -screened_rates(k_Sc43_to_Sc41_n_n_approx)*Y(Sc43)) + + (-0.5*screened_rates(k_Sc43_n_n_to_Sc45_approx)*Y(Sc43)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + screened_rates(k_Sc45_to_Sc43_n_n_approx)*Y(Sc45)); + + ydot_nuc(Sc45) = + (-screened_rates(k_Sc45_p_to_Ti46_reaclib)*Y(Sc45)*Y(H1)*state.rho + screened_rates(k_Ti46_to_p_Sc45_reaclib)*Y(Ti46)) + + (-screened_rates(k_Sc45_He4_to_V49_reaclib)*Y(He4)*Y(Sc45)*state.rho + screened_rates(k_V49_to_He4_Sc45_reaclib)*Y(V49)) + + (-screened_rates(k_Sc45_p_to_He4_Ca42_reaclib)*Y(Sc45)*Y(H1)*state.rho + screened_rates(k_Ca42_He4_to_p_Sc45_reaclib)*Y(Ca42)*Y(He4)*state.rho) + + (-screened_rates(k_Sc45_He4_to_p_Ti48_reaclib)*Y(He4)*Y(Sc45)*state.rho + screened_rates(k_Ti48_p_to_He4_Sc45_reaclib)*Y(Ti48)*Y(H1)*state.rho) + + (0.5*screened_rates(k_Sc43_n_n_to_Sc45_approx)*Y(Sc43)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + -screened_rates(k_Sc45_to_Sc43_n_n_approx)*Y(Sc45)); + + ydot_nuc(Ti44) = + (screened_rates(k_Ca40_He4_to_Ti44_reaclib)*Y(Ca40)*Y(He4)*state.rho + -screened_rates(k_Ti44_to_He4_Ca40_reaclib)*Y(Ti44)) + + (screened_rates(k_Sc43_p_to_Ti44_reaclib)*Y(Sc43)*Y(H1)*state.rho + -screened_rates(k_Ti44_to_p_Sc43_reaclib)*Y(Ti44)) + + (-screened_rates(k_Ti44_He4_to_Cr48_reaclib)*Y(He4)*Y(Ti44)*state.rho + screened_rates(k_Cr48_to_He4_Ti44_reaclib)*Y(Cr48)) + + (screened_rates(k_Sc41_He4_to_p_Ti44_reaclib)*Y(He4)*Y(Sc41)*state.rho + -screened_rates(k_Ti44_p_to_He4_Sc41_reaclib)*Y(Ti44)*Y(H1)*state.rho) + + (screened_rates(k_V47_p_to_He4_Ti44_reaclib)*Y(V47)*Y(H1)*state.rho + -screened_rates(k_Ti44_He4_to_p_V47_reaclib)*Y(He4)*Y(Ti44)*state.rho) + + (-0.5*screened_rates(k_Ti44_n_n_to_Ti46_approx)*Y(Ti44)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + screened_rates(k_Ti46_to_Ti44_n_n_approx)*Y(Ti46)); + + ydot_nuc(Ti46) = + (screened_rates(k_Ca42_He4_to_Ti46_reaclib)*Y(Ca42)*Y(He4)*state.rho + -screened_rates(k_Ti46_to_He4_Ca42_reaclib)*Y(Ti46)) + + (screened_rates(k_Sc45_p_to_Ti46_reaclib)*Y(Sc45)*Y(H1)*state.rho + -screened_rates(k_Ti46_to_p_Sc45_reaclib)*Y(Ti46)) + + (-screened_rates(k_Ti46_p_to_V47_reaclib)*Y(Ti46)*Y(H1)*state.rho + screened_rates(k_V47_to_p_Ti46_reaclib)*Y(V47)) + + (-screened_rates(k_Ti46_He4_to_Cr50_reaclib)*Y(He4)*Y(Ti46)*state.rho + screened_rates(k_Cr50_to_He4_Ti46_reaclib)*Y(Cr50)) + + (screened_rates(k_Sc43_He4_to_p_Ti46_reaclib)*Y(He4)*Y(Sc43)*state.rho + -screened_rates(k_Ti46_p_to_He4_Sc43_reaclib)*Y(Ti46)*Y(H1)*state.rho) + + (screened_rates(k_V49_p_to_He4_Ti46_reaclib)*Y(V49)*Y(H1)*state.rho + -screened_rates(k_Ti46_He4_to_p_V49_reaclib)*Y(He4)*Y(Ti46)*state.rho) + + (0.5*screened_rates(k_Ti44_n_n_to_Ti46_approx)*Y(Ti44)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + -screened_rates(k_Ti46_to_Ti44_n_n_approx)*Y(Ti46)) + + (-0.5*screened_rates(k_Ti46_n_n_to_Ti48_approx)*Y(Ti46)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + screened_rates(k_Ti48_to_Ti46_n_n_approx)*Y(Ti48)); + + ydot_nuc(Ti48) = + (-screened_rates(k_Ti48_p_to_V49_reaclib)*Y(Ti48)*Y(H1)*state.rho + screened_rates(k_V49_to_p_Ti48_reaclib)*Y(V49)) + + (-screened_rates(k_Ti48_He4_to_Cr52_reaclib)*Y(He4)*Y(Ti48)*state.rho + screened_rates(k_Cr52_to_He4_Ti48_reaclib)*Y(Cr52)) + + (screened_rates(k_Sc45_He4_to_p_Ti48_reaclib)*Y(He4)*Y(Sc45)*state.rho + -screened_rates(k_Ti48_p_to_He4_Sc45_reaclib)*Y(Ti48)*Y(H1)*state.rho) + + (screened_rates(k_V51_p_to_He4_Ti48_reaclib)*Y(V51)*Y(H1)*state.rho + -screened_rates(k_Ti48_He4_to_p_V51_reaclib)*Y(He4)*Y(Ti48)*state.rho) + + (0.5*screened_rates(k_Ti46_n_n_to_Ti48_approx)*Y(Ti46)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + -screened_rates(k_Ti48_to_Ti46_n_n_approx)*Y(Ti48)); + + ydot_nuc(V47) = + (screened_rates(k_Sc43_He4_to_V47_reaclib)*Y(He4)*Y(Sc43)*state.rho + -screened_rates(k_V47_to_He4_Sc43_reaclib)*Y(V47)) + + (screened_rates(k_Ti46_p_to_V47_reaclib)*Y(Ti46)*Y(H1)*state.rho + -screened_rates(k_V47_to_p_Ti46_reaclib)*Y(V47)) + + (-screened_rates(k_V47_p_to_Cr48_reaclib)*Y(V47)*Y(H1)*state.rho + screened_rates(k_Cr48_to_p_V47_reaclib)*Y(Cr48)) + + (-screened_rates(k_V47_He4_to_Mn51_reaclib)*Y(He4)*Y(V47)*state.rho + screened_rates(k_Mn51_to_He4_V47_reaclib)*Y(Mn51)) + + (-screened_rates(k_V47_p_to_He4_Ti44_reaclib)*Y(V47)*Y(H1)*state.rho + screened_rates(k_Ti44_He4_to_p_V47_reaclib)*Y(He4)*Y(Ti44)*state.rho) + + (-screened_rates(k_V47_He4_to_p_Cr50_reaclib)*Y(He4)*Y(V47)*state.rho + screened_rates(k_Cr50_p_to_He4_V47_reaclib)*Y(Cr50)*Y(H1)*state.rho) + + (-0.5*screened_rates(k_V47_n_n_to_V49_approx)*Y(V47)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + screened_rates(k_V49_to_V47_n_n_approx)*Y(V49)); + + ydot_nuc(V49) = + (screened_rates(k_Sc45_He4_to_V49_reaclib)*Y(He4)*Y(Sc45)*state.rho + -screened_rates(k_V49_to_He4_Sc45_reaclib)*Y(V49)) + + (screened_rates(k_Ti48_p_to_V49_reaclib)*Y(Ti48)*Y(H1)*state.rho + -screened_rates(k_V49_to_p_Ti48_reaclib)*Y(V49)) + + (-screened_rates(k_V49_p_to_Cr50_reaclib)*Y(V49)*Y(H1)*state.rho + screened_rates(k_Cr50_to_p_V49_reaclib)*Y(Cr50)) + + (-screened_rates(k_V49_He4_to_Mn53_reaclib)*Y(He4)*Y(V49)*state.rho + screened_rates(k_Mn53_to_He4_V49_reaclib)*Y(Mn53)) + + (-screened_rates(k_V49_p_to_He4_Ti46_reaclib)*Y(V49)*Y(H1)*state.rho + screened_rates(k_Ti46_He4_to_p_V49_reaclib)*Y(He4)*Y(Ti46)*state.rho) + + (-screened_rates(k_V49_He4_to_p_Cr52_reaclib)*Y(He4)*Y(V49)*state.rho + screened_rates(k_Cr52_p_to_He4_V49_reaclib)*Y(Cr52)*Y(H1)*state.rho) + + (0.5*screened_rates(k_V47_n_n_to_V49_approx)*Y(V47)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + -screened_rates(k_V49_to_V47_n_n_approx)*Y(V49)) + + (-0.5*screened_rates(k_V49_n_n_to_V51_approx)*Y(V49)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + screened_rates(k_V51_to_V49_n_n_approx)*Y(V51)); + + ydot_nuc(V51) = + (-screened_rates(k_V51_p_to_Cr52_reaclib)*Y(V51)*Y(H1)*state.rho + screened_rates(k_Cr52_to_p_V51_reaclib)*Y(Cr52)) + + (-screened_rates(k_V51_He4_to_Mn55_reaclib)*Y(He4)*Y(V51)*state.rho + screened_rates(k_Mn55_to_He4_V51_reaclib)*Y(Mn55)) + + (-screened_rates(k_V51_p_to_He4_Ti48_reaclib)*Y(V51)*Y(H1)*state.rho + screened_rates(k_Ti48_He4_to_p_V51_reaclib)*Y(He4)*Y(Ti48)*state.rho) + + (screened_rates(k_Cr54_p_to_He4_V51_reaclib)*Y(Cr54)*Y(H1)*state.rho + -screened_rates(k_V51_He4_to_p_Cr54_reaclib)*Y(He4)*Y(V51)*state.rho) + + (0.5*screened_rates(k_V49_n_n_to_V51_approx)*Y(V49)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + -screened_rates(k_V51_to_V49_n_n_approx)*Y(V51)); + + ydot_nuc(Cr48) = + (screened_rates(k_Ti44_He4_to_Cr48_reaclib)*Y(He4)*Y(Ti44)*state.rho + -screened_rates(k_Cr48_to_He4_Ti44_reaclib)*Y(Cr48)) + + (screened_rates(k_V47_p_to_Cr48_reaclib)*Y(V47)*Y(H1)*state.rho + -screened_rates(k_Cr48_to_p_V47_reaclib)*Y(Cr48)) + + (-screened_rates(k_Cr48_He4_to_Fe52_reaclib)*Y(Cr48)*Y(He4)*state.rho + screened_rates(k_Fe52_to_He4_Cr48_reaclib)*Y(Fe52)) + + (-screened_rates(k_Cr48_He4_to_p_Mn51_reaclib)*Y(Cr48)*Y(He4)*state.rho + screened_rates(k_Mn51_p_to_He4_Cr48_reaclib)*Y(Mn51)*Y(H1)*state.rho) + + (-0.5*screened_rates(k_Cr48_n_n_to_Cr50_approx)*Y(Cr48)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + screened_rates(k_Cr50_to_Cr48_n_n_approx)*Y(Cr50)); + + ydot_nuc(Cr50) = + (screened_rates(k_Ti46_He4_to_Cr50_reaclib)*Y(He4)*Y(Ti46)*state.rho + -screened_rates(k_Cr50_to_He4_Ti46_reaclib)*Y(Cr50)) + + (screened_rates(k_V49_p_to_Cr50_reaclib)*Y(V49)*Y(H1)*state.rho + -screened_rates(k_Cr50_to_p_V49_reaclib)*Y(Cr50)) + + (-screened_rates(k_Cr50_p_to_Mn51_reaclib)*Y(Cr50)*Y(H1)*state.rho + screened_rates(k_Mn51_to_p_Cr50_reaclib)*Y(Mn51)) + + (-screened_rates(k_Cr50_He4_to_Fe54_reaclib)*Y(Cr50)*Y(He4)*state.rho + screened_rates(k_Fe54_to_He4_Cr50_reaclib)*Y(Fe54)) + + (screened_rates(k_V47_He4_to_p_Cr50_reaclib)*Y(He4)*Y(V47)*state.rho + -screened_rates(k_Cr50_p_to_He4_V47_reaclib)*Y(Cr50)*Y(H1)*state.rho) + + (screened_rates(k_Mn53_p_to_He4_Cr50_reaclib)*Y(Mn53)*Y(H1)*state.rho + -screened_rates(k_Cr50_He4_to_p_Mn53_reaclib)*Y(Cr50)*Y(He4)*state.rho) + + (0.5*screened_rates(k_Cr48_n_n_to_Cr50_approx)*Y(Cr48)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + -screened_rates(k_Cr50_to_Cr48_n_n_approx)*Y(Cr50)) + + (-0.5*screened_rates(k_Cr50_n_n_to_Cr52_approx)*Y(Cr50)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + screened_rates(k_Cr52_to_Cr50_n_n_approx)*Y(Cr52)); + + ydot_nuc(Cr52) = + (screened_rates(k_Ti48_He4_to_Cr52_reaclib)*Y(He4)*Y(Ti48)*state.rho + -screened_rates(k_Cr52_to_He4_Ti48_reaclib)*Y(Cr52)) + + (screened_rates(k_V51_p_to_Cr52_reaclib)*Y(V51)*Y(H1)*state.rho + -screened_rates(k_Cr52_to_p_V51_reaclib)*Y(Cr52)) + + (-screened_rates(k_Cr52_p_to_Mn53_reaclib)*Y(Cr52)*Y(H1)*state.rho + screened_rates(k_Mn53_to_p_Cr52_reaclib)*Y(Mn53)) + + (-screened_rates(k_Cr52_He4_to_Fe56_reaclib)*Y(Cr52)*Y(He4)*state.rho + screened_rates(k_Fe56_to_He4_Cr52_reaclib)*Y(Fe56)) + + (screened_rates(k_V49_He4_to_p_Cr52_reaclib)*Y(He4)*Y(V49)*state.rho + -screened_rates(k_Cr52_p_to_He4_V49_reaclib)*Y(Cr52)*Y(H1)*state.rho) + + (screened_rates(k_Mn55_p_to_He4_Cr52_reaclib)*Y(Mn55)*Y(H1)*state.rho + -screened_rates(k_Cr52_He4_to_p_Mn55_reaclib)*Y(Cr52)*Y(He4)*state.rho) + + (0.5*screened_rates(k_Cr50_n_n_to_Cr52_approx)*Y(Cr50)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + -screened_rates(k_Cr52_to_Cr50_n_n_approx)*Y(Cr52)) + + (-0.5*screened_rates(k_Cr52_n_n_to_Cr54_approx)*Y(Cr52)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + screened_rates(k_Cr54_to_Cr52_n_n_approx)*Y(Cr54)); + + ydot_nuc(Cr54) = + (-screened_rates(k_Cr54_p_to_Mn55_reaclib)*Y(Cr54)*Y(H1)*state.rho + screened_rates(k_Mn55_to_p_Cr54_reaclib)*Y(Mn55)) + + (-screened_rates(k_Cr54_He4_to_Fe58_reaclib)*Y(Cr54)*Y(He4)*state.rho + screened_rates(k_Fe58_to_He4_Cr54_reaclib)*Y(Fe58)) + + (-screened_rates(k_Cr54_p_to_He4_V51_reaclib)*Y(Cr54)*Y(H1)*state.rho + screened_rates(k_V51_He4_to_p_Cr54_reaclib)*Y(He4)*Y(V51)*state.rho) + + (0.5*screened_rates(k_Cr52_n_n_to_Cr54_approx)*Y(Cr52)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + -screened_rates(k_Cr54_to_Cr52_n_n_approx)*Y(Cr54)); + + ydot_nuc(Mn51) = + (screened_rates(k_V47_He4_to_Mn51_reaclib)*Y(He4)*Y(V47)*state.rho + -screened_rates(k_Mn51_to_He4_V47_reaclib)*Y(Mn51)) + + (screened_rates(k_Cr50_p_to_Mn51_reaclib)*Y(Cr50)*Y(H1)*state.rho + -screened_rates(k_Mn51_to_p_Cr50_reaclib)*Y(Mn51)) + + (-screened_rates(k_Mn51_p_to_Fe52_reaclib)*Y(Mn51)*Y(H1)*state.rho + screened_rates(k_Fe52_to_p_Mn51_reaclib)*Y(Fe52)) + + (-screened_rates(k_Mn51_He4_to_Co55_reaclib)*Y(He4)*Y(Mn51)*state.rho + screened_rates(k_Co55_to_He4_Mn51_reaclib)*Y(Co55)) + + (screened_rates(k_Cr48_He4_to_p_Mn51_reaclib)*Y(Cr48)*Y(He4)*state.rho + -screened_rates(k_Mn51_p_to_He4_Cr48_reaclib)*Y(Mn51)*Y(H1)*state.rho) + + (-screened_rates(k_Mn51_He4_to_p_Fe54_reaclib)*Y(He4)*Y(Mn51)*state.rho + screened_rates(k_Fe54_p_to_He4_Mn51_reaclib)*Y(Fe54)*Y(H1)*state.rho) + + (-0.5*screened_rates(k_Mn51_n_n_to_Mn53_approx)*Y(Mn51)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + screened_rates(k_Mn53_to_Mn51_n_n_approx)*Y(Mn53)); + + ydot_nuc(Mn53) = + (screened_rates(k_V49_He4_to_Mn53_reaclib)*Y(He4)*Y(V49)*state.rho + -screened_rates(k_Mn53_to_He4_V49_reaclib)*Y(Mn53)) + + (screened_rates(k_Cr52_p_to_Mn53_reaclib)*Y(Cr52)*Y(H1)*state.rho + -screened_rates(k_Mn53_to_p_Cr52_reaclib)*Y(Mn53)) + + (-screened_rates(k_Mn53_p_to_Fe54_reaclib)*Y(Mn53)*Y(H1)*state.rho + screened_rates(k_Fe54_to_p_Mn53_reaclib)*Y(Fe54)) + + (-screened_rates(k_Mn53_He4_to_Co57_reaclib)*Y(He4)*Y(Mn53)*state.rho + screened_rates(k_Co57_to_He4_Mn53_reaclib)*Y(Co57)) + + (-screened_rates(k_Mn53_p_to_He4_Cr50_reaclib)*Y(Mn53)*Y(H1)*state.rho + screened_rates(k_Cr50_He4_to_p_Mn53_reaclib)*Y(Cr50)*Y(He4)*state.rho) + + (-screened_rates(k_Mn53_He4_to_p_Fe56_reaclib)*Y(He4)*Y(Mn53)*state.rho + screened_rates(k_Fe56_p_to_He4_Mn53_reaclib)*Y(Fe56)*Y(H1)*state.rho) + + (screened_rates(k_Co56_n_to_He4_Mn53_reaclib)*Y(Co56)*Y(N)*state.rho + -screened_rates(k_Mn53_He4_to_n_Co56_reaclib)*Y(He4)*Y(Mn53)*state.rho) + + (0.5*screened_rates(k_Mn51_n_n_to_Mn53_approx)*Y(Mn51)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + -screened_rates(k_Mn53_to_Mn51_n_n_approx)*Y(Mn53)) + + (-0.5*screened_rates(k_Mn53_n_n_to_Mn55_approx)*Y(Mn53)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + screened_rates(k_Mn55_to_Mn53_n_n_approx)*Y(Mn55)); + + ydot_nuc(Mn55) = + (screened_rates(k_V51_He4_to_Mn55_reaclib)*Y(He4)*Y(V51)*state.rho + -screened_rates(k_Mn55_to_He4_V51_reaclib)*Y(Mn55)) + + (screened_rates(k_Cr54_p_to_Mn55_reaclib)*Y(Cr54)*Y(H1)*state.rho + -screened_rates(k_Mn55_to_p_Cr54_reaclib)*Y(Mn55)) + + (-screened_rates(k_Mn55_p_to_Fe56_reaclib)*Y(Mn55)*Y(H1)*state.rho + screened_rates(k_Fe56_to_p_Mn55_reaclib)*Y(Fe56)) + + (-screened_rates(k_Mn55_He4_to_Co59_reaclib)*Y(He4)*Y(Mn55)*state.rho + screened_rates(k_Co59_to_He4_Mn55_reaclib)*Y(Co59)) + + (-screened_rates(k_Mn55_p_to_He4_Cr52_reaclib)*Y(Mn55)*Y(H1)*state.rho + screened_rates(k_Cr52_He4_to_p_Mn55_reaclib)*Y(Cr52)*Y(He4)*state.rho) + + (screened_rates(k_Fe58_p_to_He4_Mn55_reaclib)*Y(Fe58)*Y(H1)*state.rho + -screened_rates(k_Mn55_He4_to_p_Fe58_reaclib)*Y(He4)*Y(Mn55)*state.rho) + + (0.5*screened_rates(k_Mn53_n_n_to_Mn55_approx)*Y(Mn53)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + -screened_rates(k_Mn55_to_Mn53_n_n_approx)*Y(Mn55)); + + ydot_nuc(Fe52) = + (screened_rates(k_Cr48_He4_to_Fe52_reaclib)*Y(Cr48)*Y(He4)*state.rho + -screened_rates(k_Fe52_to_He4_Cr48_reaclib)*Y(Fe52)) + + (screened_rates(k_Mn51_p_to_Fe52_reaclib)*Y(Mn51)*Y(H1)*state.rho + -screened_rates(k_Fe52_to_p_Mn51_reaclib)*Y(Fe52)) + + (-screened_rates(k_Fe52_He4_to_Ni56_reaclib)*Y(Fe52)*Y(He4)*state.rho + screened_rates(k_Ni56_to_He4_Fe52_reaclib)*Y(Ni56)) + + (-screened_rates(k_Fe52_He4_to_p_Co55_reaclib)*Y(Fe52)*Y(He4)*state.rho + screened_rates(k_Co55_p_to_He4_Fe52_reaclib)*Y(Co55)*Y(H1)*state.rho) + + (-0.5*screened_rates(k_Fe52_n_n_to_Fe54_approx)*Y(Fe52)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + screened_rates(k_Fe54_to_Fe52_n_n_approx)*Y(Fe54)); + + ydot_nuc(Fe54) = + (screened_rates(k_Cr50_He4_to_Fe54_reaclib)*Y(Cr50)*Y(He4)*state.rho + -screened_rates(k_Fe54_to_He4_Cr50_reaclib)*Y(Fe54)) + + (screened_rates(k_Mn53_p_to_Fe54_reaclib)*Y(Mn53)*Y(H1)*state.rho + -screened_rates(k_Fe54_to_p_Mn53_reaclib)*Y(Fe54)) + + (-screened_rates(k_Fe54_p_to_Co55_reaclib)*Y(Fe54)*Y(H1)*state.rho + screened_rates(k_Co55_to_p_Fe54_reaclib)*Y(Co55)) + + (-screened_rates(k_Fe54_He4_to_Ni58_reaclib)*Y(Fe54)*Y(He4)*state.rho + screened_rates(k_Ni58_to_He4_Fe54_reaclib)*Y(Ni58)) + + (screened_rates(k_Mn51_He4_to_p_Fe54_reaclib)*Y(He4)*Y(Mn51)*state.rho + -screened_rates(k_Fe54_p_to_He4_Mn51_reaclib)*Y(Fe54)*Y(H1)*state.rho) + + (screened_rates(k_Co57_p_to_He4_Fe54_reaclib)*Y(Co57)*Y(H1)*state.rho + -screened_rates(k_Fe54_He4_to_p_Co57_reaclib)*Y(Fe54)*Y(He4)*state.rho) + + (0.5*screened_rates(k_Fe52_n_n_to_Fe54_approx)*Y(Fe52)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + -screened_rates(k_Fe54_to_Fe52_n_n_approx)*Y(Fe54)) + + (-0.5*screened_rates(k_Fe54_n_n_to_Fe56_approx)*Y(Fe54)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + screened_rates(k_Fe56_to_Fe54_n_n_approx)*Y(Fe56)); + + ydot_nuc(Fe56) = + (screened_rates(k_Cr52_He4_to_Fe56_reaclib)*Y(Cr52)*Y(He4)*state.rho + -screened_rates(k_Fe56_to_He4_Cr52_reaclib)*Y(Fe56)) + + (screened_rates(k_Mn55_p_to_Fe56_reaclib)*Y(Mn55)*Y(H1)*state.rho + -screened_rates(k_Fe56_to_p_Mn55_reaclib)*Y(Fe56)) + + (-screened_rates(k_Fe56_p_to_Co57_reaclib)*Y(Fe56)*Y(H1)*state.rho + screened_rates(k_Co57_to_p_Fe56_reaclib)*Y(Co57)) + + (-screened_rates(k_Fe56_He4_to_Ni60_reaclib)*Y(Fe56)*Y(He4)*state.rho + screened_rates(k_Ni60_to_He4_Fe56_reaclib)*Y(Ni60)) + + (screened_rates(k_Mn53_He4_to_p_Fe56_reaclib)*Y(He4)*Y(Mn53)*state.rho + -screened_rates(k_Fe56_p_to_He4_Mn53_reaclib)*Y(Fe56)*Y(H1)*state.rho) + + (screened_rates(k_Co56_n_to_p_Fe56_reaclib)*Y(Co56)*Y(N)*state.rho + -screened_rates(k_Fe56_p_to_n_Co56_reaclib)*Y(Fe56)*Y(H1)*state.rho) + + (screened_rates(k_Co59_p_to_He4_Fe56_reaclib)*Y(Co59)*Y(H1)*state.rho + -screened_rates(k_Fe56_He4_to_p_Co59_reaclib)*Y(Fe56)*Y(He4)*state.rho) + + (0.5*screened_rates(k_Fe54_n_n_to_Fe56_approx)*Y(Fe54)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + -screened_rates(k_Fe56_to_Fe54_n_n_approx)*Y(Fe56)) + + (-0.5*screened_rates(k_Fe56_n_n_to_Fe58_approx)*Y(Fe56)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + screened_rates(k_Fe58_to_Fe56_n_n_approx)*Y(Fe58)) + + (screened_rates(k_Co56_to_Fe56_electron_capture_weaktab)*Y(Co56) + -screened_rates(k_Fe56_to_Co56_beta_neg_weaktab)*Y(Fe56)); + + ydot_nuc(Fe58) = + (screened_rates(k_Cr54_He4_to_Fe58_reaclib)*Y(Cr54)*Y(He4)*state.rho + -screened_rates(k_Fe58_to_He4_Cr54_reaclib)*Y(Fe58)) + + (-screened_rates(k_Fe58_p_to_Co59_reaclib)*Y(Fe58)*Y(H1)*state.rho + screened_rates(k_Co59_to_p_Fe58_reaclib)*Y(Co59)) + + (-screened_rates(k_Fe58_p_to_He4_Mn55_reaclib)*Y(Fe58)*Y(H1)*state.rho + screened_rates(k_Mn55_He4_to_p_Fe58_reaclib)*Y(He4)*Y(Mn55)*state.rho) + + (0.5*screened_rates(k_Fe56_n_n_to_Fe58_approx)*Y(Fe56)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + -screened_rates(k_Fe58_to_Fe56_n_n_approx)*Y(Fe58)); + + ydot_nuc(Co55) = + (screened_rates(k_Mn51_He4_to_Co55_reaclib)*Y(He4)*Y(Mn51)*state.rho + -screened_rates(k_Co55_to_He4_Mn51_reaclib)*Y(Co55)) + + (screened_rates(k_Fe54_p_to_Co55_reaclib)*Y(Fe54)*Y(H1)*state.rho + -screened_rates(k_Co55_to_p_Fe54_reaclib)*Y(Co55)) + + (-screened_rates(k_Co55_n_to_Co56_reaclib)*Y(Co55)*Y(N)*state.rho + screened_rates(k_Co56_to_n_Co55_reaclib)*Y(Co56)) + + (-screened_rates(k_Co55_p_to_Ni56_reaclib)*Y(Co55)*Y(H1)*state.rho + screened_rates(k_Ni56_to_p_Co55_reaclib)*Y(Ni56)) + + (-screened_rates(k_Co55_He4_to_Cu59_reaclib)*Y(Co55)*Y(He4)*state.rho + screened_rates(k_Cu59_to_He4_Co55_reaclib)*Y(Cu59)) + + (screened_rates(k_Fe52_He4_to_p_Co55_reaclib)*Y(Fe52)*Y(He4)*state.rho + -screened_rates(k_Co55_p_to_He4_Fe52_reaclib)*Y(Co55)*Y(H1)*state.rho) + + (-screened_rates(k_Co55_He4_to_p_Ni58_reaclib)*Y(Co55)*Y(He4)*state.rho + screened_rates(k_Ni58_p_to_He4_Co55_reaclib)*Y(Ni58)*Y(H1)*state.rho); + + ydot_nuc(Co56) = + (screened_rates(k_Co55_n_to_Co56_reaclib)*Y(Co55)*Y(N)*state.rho + -screened_rates(k_Co56_to_n_Co55_reaclib)*Y(Co56)) + + (-screened_rates(k_Co56_n_to_Co57_reaclib)*Y(Co56)*Y(N)*state.rho + screened_rates(k_Co57_to_n_Co56_reaclib)*Y(Co57)) + + (-screened_rates(k_Co56_n_to_p_Fe56_reaclib)*Y(Co56)*Y(N)*state.rho + screened_rates(k_Fe56_p_to_n_Co56_reaclib)*Y(Fe56)*Y(H1)*state.rho) + + (-screened_rates(k_Co56_n_to_He4_Mn53_reaclib)*Y(Co56)*Y(N)*state.rho + screened_rates(k_Mn53_He4_to_n_Co56_reaclib)*Y(He4)*Y(Mn53)*state.rho) + + (screened_rates(k_Ni56_n_to_p_Co56_reaclib)*Y(Ni56)*Y(N)*state.rho + -screened_rates(k_Co56_p_to_n_Ni56_reaclib)*Y(Co56)*Y(H1)*state.rho) + + (screened_rates(k_Cu59_n_to_He4_Co56_reaclib)*Y(Cu59)*Y(N)*state.rho + -screened_rates(k_Co56_He4_to_n_Cu59_reaclib)*Y(Co56)*Y(He4)*state.rho) + + (-screened_rates(k_Co56_to_Fe56_electron_capture_weaktab)*Y(Co56) + screened_rates(k_Fe56_to_Co56_beta_neg_weaktab)*Y(Fe56)) + + (screened_rates(k_Ni56_to_Co56_electron_capture_weaktab)*Y(Ni56) + -screened_rates(k_Co56_to_Ni56_beta_neg_weaktab)*Y(Co56)); + + ydot_nuc(Co57) = + (screened_rates(k_Mn53_He4_to_Co57_reaclib)*Y(He4)*Y(Mn53)*state.rho + -screened_rates(k_Co57_to_He4_Mn53_reaclib)*Y(Co57)) + + (screened_rates(k_Fe56_p_to_Co57_reaclib)*Y(Fe56)*Y(H1)*state.rho + -screened_rates(k_Co57_to_p_Fe56_reaclib)*Y(Co57)) + + (screened_rates(k_Co56_n_to_Co57_reaclib)*Y(Co56)*Y(N)*state.rho + -screened_rates(k_Co57_to_n_Co56_reaclib)*Y(Co57)) + + (-screened_rates(k_Co57_p_to_Ni58_reaclib)*Y(Co57)*Y(H1)*state.rho + screened_rates(k_Ni58_to_p_Co57_reaclib)*Y(Ni58)) + + (-screened_rates(k_Co57_p_to_He4_Fe54_reaclib)*Y(Co57)*Y(H1)*state.rho + screened_rates(k_Fe54_He4_to_p_Co57_reaclib)*Y(Fe54)*Y(He4)*state.rho) + + (-screened_rates(k_Co57_He4_to_p_Ni60_reaclib)*Y(Co57)*Y(He4)*state.rho + screened_rates(k_Ni60_p_to_He4_Co57_reaclib)*Y(Ni60)*Y(H1)*state.rho) + + (-0.5*screened_rates(k_Co57_n_n_to_Co59_approx)*Y(Co57)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + screened_rates(k_Co59_to_Co57_n_n_approx)*Y(Co59)); + + ydot_nuc(Co59) = + (screened_rates(k_Mn55_He4_to_Co59_reaclib)*Y(He4)*Y(Mn55)*state.rho + -screened_rates(k_Co59_to_He4_Mn55_reaclib)*Y(Co59)) + + (screened_rates(k_Fe58_p_to_Co59_reaclib)*Y(Fe58)*Y(H1)*state.rho + -screened_rates(k_Co59_to_p_Fe58_reaclib)*Y(Co59)) + + (-screened_rates(k_Co59_p_to_Ni60_reaclib)*Y(Co59)*Y(H1)*state.rho + screened_rates(k_Ni60_to_p_Co59_reaclib)*Y(Ni60)) + + (-screened_rates(k_Co59_p_to_He4_Fe56_reaclib)*Y(Co59)*Y(H1)*state.rho + screened_rates(k_Fe56_He4_to_p_Co59_reaclib)*Y(Fe56)*Y(He4)*state.rho) + + (0.5*screened_rates(k_Co57_n_n_to_Co59_approx)*Y(Co57)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + -screened_rates(k_Co59_to_Co57_n_n_approx)*Y(Co59)); + + ydot_nuc(Ni56) = + (screened_rates(k_Fe52_He4_to_Ni56_reaclib)*Y(Fe52)*Y(He4)*state.rho + -screened_rates(k_Ni56_to_He4_Fe52_reaclib)*Y(Ni56)) + + (screened_rates(k_Co55_p_to_Ni56_reaclib)*Y(Co55)*Y(H1)*state.rho + -screened_rates(k_Ni56_to_p_Co55_reaclib)*Y(Ni56)) + + (-screened_rates(k_Ni56_He4_to_Zn60_reaclib)*Y(He4)*Y(Ni56)*state.rho + screened_rates(k_Zn60_to_He4_Ni56_reaclib)*Y(Zn60)) + + (-screened_rates(k_Ni56_n_to_p_Co56_reaclib)*Y(Ni56)*Y(N)*state.rho + screened_rates(k_Co56_p_to_n_Ni56_reaclib)*Y(Co56)*Y(H1)*state.rho) + + (screened_rates(k_Cu59_p_to_He4_Ni56_reaclib)*Y(Cu59)*Y(H1)*state.rho + -screened_rates(k_Ni56_He4_to_p_Cu59_reaclib)*Y(He4)*Y(Ni56)*state.rho) + + (-0.5*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_electron_capture_weaktab)*Y(Ni56) + screened_rates(k_Co56_to_Ni56_beta_neg_weaktab)*Y(Co56)); + + ydot_nuc(Ni58) = + (screened_rates(k_Fe54_He4_to_Ni58_reaclib)*Y(Fe54)*Y(He4)*state.rho + -screened_rates(k_Ni58_to_He4_Fe54_reaclib)*Y(Ni58)) + + (screened_rates(k_Co57_p_to_Ni58_reaclib)*Y(Co57)*Y(H1)*state.rho + -screened_rates(k_Ni58_to_p_Co57_reaclib)*Y(Ni58)) + + (-screened_rates(k_Ni58_p_to_Cu59_reaclib)*Y(Ni58)*Y(H1)*state.rho + screened_rates(k_Cu59_to_p_Ni58_reaclib)*Y(Cu59)) + + (screened_rates(k_Co55_He4_to_p_Ni58_reaclib)*Y(Co55)*Y(He4)*state.rho + -screened_rates(k_Ni58_p_to_He4_Co55_reaclib)*Y(Ni58)*Y(H1)*state.rho) + + (0.5*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)) + + (-0.5*screened_rates(k_Ni58_n_n_to_Ni60_approx)*Y(Ni58)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + screened_rates(k_Ni60_to_Ni58_n_n_approx)*Y(Ni60)); + + ydot_nuc(Ni60) = + (screened_rates(k_Fe56_He4_to_Ni60_reaclib)*Y(Fe56)*Y(He4)*state.rho + -screened_rates(k_Ni60_to_He4_Fe56_reaclib)*Y(Ni60)) + + (screened_rates(k_Co59_p_to_Ni60_reaclib)*Y(Co59)*Y(H1)*state.rho + -screened_rates(k_Ni60_to_p_Co59_reaclib)*Y(Ni60)) + + (screened_rates(k_Co57_He4_to_p_Ni60_reaclib)*Y(Co57)*Y(He4)*state.rho + -screened_rates(k_Ni60_p_to_He4_Co57_reaclib)*Y(Ni60)*Y(H1)*state.rho) + + (0.5*screened_rates(k_Ni58_n_n_to_Ni60_approx)*Y(Ni58)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + -screened_rates(k_Ni60_to_Ni58_n_n_approx)*Y(Ni60)); + + ydot_nuc(Cu59) = + (screened_rates(k_Co55_He4_to_Cu59_reaclib)*Y(Co55)*Y(He4)*state.rho + -screened_rates(k_Cu59_to_He4_Co55_reaclib)*Y(Cu59)) + + (screened_rates(k_Ni58_p_to_Cu59_reaclib)*Y(Ni58)*Y(H1)*state.rho + -screened_rates(k_Cu59_to_p_Ni58_reaclib)*Y(Cu59)) + + (-screened_rates(k_Cu59_p_to_Zn60_reaclib)*Y(Cu59)*Y(H1)*state.rho + screened_rates(k_Zn60_to_p_Cu59_reaclib)*Y(Zn60)) + + (-screened_rates(k_Cu59_n_to_He4_Co56_reaclib)*Y(Cu59)*Y(N)*state.rho + screened_rates(k_Co56_He4_to_n_Cu59_reaclib)*Y(Co56)*Y(He4)*state.rho) + + (-screened_rates(k_Cu59_p_to_He4_Ni56_reaclib)*Y(Cu59)*Y(H1)*state.rho + screened_rates(k_Ni56_He4_to_p_Cu59_reaclib)*Y(He4)*Y(Ni56)*state.rho); + + ydot_nuc(Zn60) = + (screened_rates(k_Ni56_He4_to_Zn60_reaclib)*Y(He4)*Y(Ni56)*state.rho + -screened_rates(k_Zn60_to_He4_Ni56_reaclib)*Y(Zn60)) + + (screened_rates(k_Cu59_p_to_Zn60_reaclib)*Y(Cu59)*Y(H1)*state.rho + -screened_rates(k_Zn60_to_p_Cu59_reaclib)*Y(Zn60)); + +} + + +AMREX_GPU_DEVICE AMREX_INLINE +void actual_rhs (const burn_t& state, amrex::Array1D& ydot) +{ + + // Set molar abundances + amrex::Array1D Y; + for (int i = 1; i <= NumSpec; ++i) { + Y(i) = state.xn[i-1] * aion_inv[i-1]; + } + + // build the rates + + rate_t rate_eval; + + constexpr int do_T_derivatives = 0; + + evaluate_rates(state, Y, rate_eval); + + rhs_nuc(state, ydot, Y, rate_eval.screened_rates); + + // ion binding energy contributions + + amrex::Real enuc; + ener_gener_rate(ydot, enuc); + + // include any weak rate neutrino losses + enuc += rate_eval.enuc_weak; + + // Get the thermal neutrino losses + + amrex::Real sneut{}; +#ifdef NEUTRINOS + constexpr int do_derivatives{0}; + amrex::Real dsneutdt{}, dsneutdd{}, dsnuda{}, dsnudz{}; + + neutrino_cooling(state.T, state.rho, state.abar, state.zbar, + sneut, dsneutdt, dsneutdd, dsnuda, dsnudz); +#endif + + // Append the energy equation (this is erg/g/s) + + ydot(net_ienuc) = enuc - sneut; + +} + + +template +AMREX_GPU_DEVICE AMREX_INLINE +void jac_nuc(const burn_t& state, + MatrixType& jac, + const amrex::Array1D& Y, + const rate_derivs_t& rate_eval) +{ + + using namespace Rates; + + const auto& screened_rates = rate_eval.screened_rates; + + amrex::Real scratch; + + // n row + + scratch = -screened_rates(k_Ar36_n_to_Ar37_reaclib)*Y(Ar36)*state.rho + - screened_rates(k_Ar36_n_to_He4_S33_reaclib)*Y(Ar36)*state.rho + - screened_rates(k_Ar37_n_to_Ar38_reaclib)*Y(Ar37)*state.rho + - screened_rates(k_Ar37_n_to_He4_S34_reaclib)*Y(Ar37)*state.rho + - screened_rates(k_Ar37_n_to_p_Cl37_reaclib)*Y(Ar37)*state.rho + - screened_rates(k_Ar38_n_to_He4_S35_reaclib)*Y(Ar38)*state.rho + - 2.0*screened_rates(k_Ca40_n_n_to_Ca42_approx)*Y(Ca40)*Y(N)*amrex::Math::powi<2>(state.rho) + - screened_rates(k_Ca40_n_to_He4_Ar37_reaclib)*Y(Ca40)*state.rho + - screened_rates(k_Cl33_n_to_p_S33_reaclib)*Y(Cl33)*state.rho + - screened_rates(k_Cl35_n_to_p_S35_reaclib)*Y(Cl35)*state.rho + - screened_rates(k_Co55_n_to_Co56_reaclib)*Y(Co55)*state.rho + - screened_rates(k_Co56_n_to_Co57_reaclib)*Y(Co56)*state.rho + - screened_rates(k_Co56_n_to_He4_Mn53_reaclib)*Y(Co56)*state.rho + - screened_rates(k_Co56_n_to_p_Fe56_reaclib)*Y(Co56)*state.rho + - 2.0*screened_rates(k_Co57_n_n_to_Co59_approx)*Y(Co57)*Y(N)*amrex::Math::powi<2>(state.rho) + - 2.0*screened_rates(k_Cr48_n_n_to_Cr50_approx)*Y(Cr48)*Y(N)*amrex::Math::powi<2>(state.rho) + - 2.0*screened_rates(k_Cr50_n_n_to_Cr52_approx)*Y(Cr50)*Y(N)*amrex::Math::powi<2>(state.rho) + - 2.0*screened_rates(k_Cr52_n_n_to_Cr54_approx)*Y(Cr52)*Y(N)*amrex::Math::powi<2>(state.rho) + - screened_rates(k_Cu59_n_to_He4_Co56_reaclib)*Y(Cu59)*state.rho + - 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) + - 2.0*screened_rates(k_Fe56_n_n_to_Fe58_approx)*Y(Fe56)*Y(N)*amrex::Math::powi<2>(state.rho) + - screened_rates(k_K37_n_to_p_Ar37_reaclib)*Y(K37)*state.rho + - screened_rates(k_Mg23_n_to_C12_C12_reaclib)*Y(Mg23)*state.rho + - screened_rates(k_Mg23_n_to_He4_Ne20_reaclib)*Y(Mg23)*state.rho + - screened_rates(k_Mg23_n_to_Mg24_reaclib)*Y(Mg23)*state.rho + - 2.0*screened_rates(k_Mn51_n_n_to_Mn53_approx)*Y(Mn51)*Y(N)*amrex::Math::powi<2>(state.rho) + - 2.0*screened_rates(k_Mn53_n_n_to_Mn55_approx)*Y(Mn53)*Y(N)*amrex::Math::powi<2>(state.rho) + - 2.0*screened_rates(k_Ni56_n_n_to_Ni58_approx)*Y(Ni56)*Y(N)*amrex::Math::powi<2>(state.rho) + - screened_rates(k_Ni56_n_to_p_Co56_reaclib)*Y(Ni56)*state.rho + - 2.0*screened_rates(k_Ni58_n_n_to_Ni60_approx)*Y(Ni58)*Y(N)*amrex::Math::powi<2>(state.rho) + - screened_rates(k_P29_n_to_p_Si29_reaclib)*Y(P29)*state.rho + - screened_rates(k_P31_n_to_p_Si31_reaclib)*Y(P31)*state.rho + - screened_rates(k_S32_n_to_He4_Si29_reaclib)*Y(S32)*state.rho + - screened_rates(k_S32_n_to_S33_reaclib)*Y(S32)*state.rho + - screened_rates(k_S33_n_to_He4_Si30_reaclib)*Y(S33)*state.rho + - screened_rates(k_S33_n_to_S34_reaclib)*Y(S33)*state.rho + - screened_rates(k_S33_n_to_p_P33_reaclib)*Y(S33)*state.rho + - screened_rates(k_S34_n_to_He4_Si31_reaclib)*Y(S34)*state.rho + - screened_rates(k_S34_n_to_S35_reaclib)*Y(S34)*state.rho + - 2.0*screened_rates(k_Sc41_n_n_to_Sc43_approx)*Y(Sc41)*Y(N)*amrex::Math::powi<2>(state.rho) + - 2.0*screened_rates(k_Sc43_n_n_to_Sc45_approx)*Y(Sc43)*Y(N)*amrex::Math::powi<2>(state.rho) + - screened_rates(k_Si27_n_to_C12_O16_reaclib)*Y(Si27)*state.rho + - screened_rates(k_Si27_n_to_He4_Mg24_reaclib)*Y(Si27)*state.rho + - screened_rates(k_Si27_n_to_Si28_reaclib)*Y(Si27)*state.rho + - screened_rates(k_Si27_n_to_p_Al27_reaclib)*Y(Si27)*state.rho + - screened_rates(k_Si28_n_to_Si29_reaclib)*Y(Si28)*state.rho + - screened_rates(k_Si29_n_to_Si30_reaclib)*Y(Si29)*state.rho + - screened_rates(k_Si30_n_to_Si31_reaclib)*Y(Si30)*state.rho + - 2.0*screened_rates(k_Ti44_n_n_to_Ti46_approx)*Y(Ti44)*Y(N)*amrex::Math::powi<2>(state.rho) + - 2.0*screened_rates(k_Ti46_n_n_to_Ti48_approx)*Y(Ti46)*Y(N)*amrex::Math::powi<2>(state.rho) + - 2.0*screened_rates(k_V47_n_n_to_V49_approx)*Y(V47)*Y(N)*amrex::Math::powi<2>(state.rho) + - 2.0*screened_rates(k_V49_n_n_to_V51_approx)*Y(V49)*Y(N)*amrex::Math::powi<2>(state.rho) + - screened_rates(k_n_to_p_beta_neg_weaktab) + - Y(Ca40)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Ca40_n_n_to_Ca42_approx_dYN + + 2.0*Y(Ca42)*rate_eval.drate_Ca42_to_Ca40_n_n_approx_dYN + - Y(Co57)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Co57_n_n_to_Co59_approx_dYN + + 2.0*Y(Co59)*rate_eval.drate_Co59_to_Co57_n_n_approx_dYN + - Y(Cr48)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Cr48_n_n_to_Cr50_approx_dYN + - Y(Cr50)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Cr50_n_n_to_Cr52_approx_dYN + + 2.0*Y(Cr50)*rate_eval.drate_Cr50_to_Cr48_n_n_approx_dYN + - Y(Cr52)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Cr52_n_n_to_Cr54_approx_dYN + + 2.0*Y(Cr52)*rate_eval.drate_Cr52_to_Cr50_n_n_approx_dYN + + 2.0*Y(Cr54)*rate_eval.drate_Cr54_to_Cr52_n_n_approx_dYN + - Y(Fe52)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Fe52_n_n_to_Fe54_approx_dYN + - Y(Fe54)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Fe54_n_n_to_Fe56_approx_dYN + + 2.0*Y(Fe54)*rate_eval.drate_Fe54_to_Fe52_n_n_approx_dYN + - Y(Fe56)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Fe56_n_n_to_Fe58_approx_dYN + + 2.0*Y(Fe56)*rate_eval.drate_Fe56_to_Fe54_n_n_approx_dYN + + 2.0*Y(Fe58)*rate_eval.drate_Fe58_to_Fe56_n_n_approx_dYN + - Y(Mn51)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Mn51_n_n_to_Mn53_approx_dYN + - Y(Mn53)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Mn53_n_n_to_Mn55_approx_dYN + + 2.0*Y(Mn53)*rate_eval.drate_Mn53_to_Mn51_n_n_approx_dYN + + 2.0*Y(Mn55)*rate_eval.drate_Mn55_to_Mn53_n_n_approx_dYN + - Y(Ni56)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Ni56_n_n_to_Ni58_approx_dYN + - Y(Ni58)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Ni58_n_n_to_Ni60_approx_dYN + + 2.0*Y(Ni58)*rate_eval.drate_Ni58_to_Ni56_n_n_approx_dYN + + 2.0*Y(Ni60)*rate_eval.drate_Ni60_to_Ni58_n_n_approx_dYN + - Y(Sc41)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Sc41_n_n_to_Sc43_approx_dYN + - Y(Sc43)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Sc43_n_n_to_Sc45_approx_dYN + + 2.0*Y(Sc43)*rate_eval.drate_Sc43_to_Sc41_n_n_approx_dYN + + 2.0*Y(Sc45)*rate_eval.drate_Sc45_to_Sc43_n_n_approx_dYN + - Y(Ti44)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Ti44_n_n_to_Ti46_approx_dYN + - Y(Ti46)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Ti46_n_n_to_Ti48_approx_dYN + + 2.0*Y(Ti46)*rate_eval.drate_Ti46_to_Ti44_n_n_approx_dYN + + 2.0*Y(Ti48)*rate_eval.drate_Ti48_to_Ti46_n_n_approx_dYN + - Y(V47)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_V47_n_n_to_V49_approx_dYN + - Y(V49)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_V49_n_n_to_V51_approx_dYN + + 2.0*Y(V49)*rate_eval.drate_V49_to_V47_n_n_approx_dYN + + 2.0*Y(V51)*rate_eval.drate_V51_to_V49_n_n_approx_dYN; + jac.set(N, N, scratch); + + scratch = screened_rates(k_Al27_p_to_n_Si27_reaclib)*Y(Al27)*state.rho + + screened_rates(k_Ar37_p_to_n_K37_reaclib)*Y(Ar37)*state.rho + + screened_rates(k_Cl37_p_to_n_Ar37_reaclib)*Y(Cl37)*state.rho + + screened_rates(k_Co56_p_to_n_Ni56_reaclib)*Y(Co56)*state.rho + + screened_rates(k_Fe56_p_to_n_Co56_reaclib)*Y(Fe56)*state.rho + + screened_rates(k_P33_p_to_n_S33_reaclib)*Y(P33)*state.rho + + screened_rates(k_S33_p_to_n_Cl33_reaclib)*Y(S33)*state.rho + + screened_rates(k_S35_p_to_n_Cl35_reaclib)*Y(S35)*state.rho + + screened_rates(k_Si29_p_to_n_P29_reaclib)*Y(Si29)*state.rho + + screened_rates(k_Si31_p_to_n_P31_reaclib)*Y(Si31)*state.rho + + screened_rates(k_p_to_n_electron_capture_weaktab); + jac.set(N, H1, scratch); + + scratch = screened_rates(k_Ar37_He4_to_n_Ca40_reaclib)*Y(Ar37)*state.rho + + screened_rates(k_Co56_He4_to_n_Cu59_reaclib)*Y(Co56)*state.rho + + screened_rates(k_Mg24_He4_to_n_Si27_reaclib)*Y(Mg24)*state.rho + + screened_rates(k_Mn53_He4_to_n_Co56_reaclib)*Y(Mn53)*state.rho + + screened_rates(k_Ne20_He4_to_n_Mg23_reaclib)*Y(Ne20)*state.rho + + screened_rates(k_S33_He4_to_n_Ar36_reaclib)*Y(S33)*state.rho + + screened_rates(k_S34_He4_to_n_Ar37_reaclib)*Y(S34)*state.rho + + screened_rates(k_S35_He4_to_n_Ar38_reaclib)*Y(S35)*state.rho + + screened_rates(k_Si29_He4_to_n_S32_reaclib)*Y(Si29)*state.rho + + screened_rates(k_Si30_He4_to_n_S33_reaclib)*Y(Si30)*state.rho + + screened_rates(k_Si31_He4_to_n_S34_reaclib)*Y(Si31)*state.rho; + jac.set(N, He4, scratch); + + scratch = 1.0*screened_rates(k_C12_C12_to_n_Mg23_reaclib)*Y(C12)*state.rho + + screened_rates(k_O16_C12_to_n_Si27_reaclib)*Y(O16)*state.rho; + jac.set(N, C12, scratch); + + scratch = screened_rates(k_O16_C12_to_n_Si27_reaclib)*Y(C12)*state.rho; + jac.set(N, O16, scratch); + + scratch = screened_rates(k_Ne20_He4_to_n_Mg23_reaclib)*Y(He4)*state.rho; + jac.set(N, Ne20, scratch); + + scratch = -screened_rates(k_Mg23_n_to_C12_C12_reaclib)*Y(N)*state.rho + - screened_rates(k_Mg23_n_to_He4_Ne20_reaclib)*Y(N)*state.rho + - screened_rates(k_Mg23_n_to_Mg24_reaclib)*Y(N)*state.rho; + jac.set(N, Mg23, scratch); + + scratch = screened_rates(k_Mg24_He4_to_n_Si27_reaclib)*Y(He4)*state.rho + + screened_rates(k_Mg24_to_n_Mg23_reaclib); + jac.set(N, Mg24, scratch); + + scratch = screened_rates(k_Al27_p_to_n_Si27_reaclib)*Y(H1)*state.rho; + jac.set(N, Al27, scratch); + + scratch = -screened_rates(k_Si27_n_to_C12_O16_reaclib)*Y(N)*state.rho + - screened_rates(k_Si27_n_to_He4_Mg24_reaclib)*Y(N)*state.rho + - screened_rates(k_Si27_n_to_Si28_reaclib)*Y(N)*state.rho + - screened_rates(k_Si27_n_to_p_Al27_reaclib)*Y(N)*state.rho; + jac.set(N, Si27, scratch); + + scratch = -screened_rates(k_Si28_n_to_Si29_reaclib)*Y(N)*state.rho + + screened_rates(k_Si28_to_n_Si27_reaclib); + jac.set(N, Si28, scratch); + + scratch = screened_rates(k_Si29_He4_to_n_S32_reaclib)*Y(He4)*state.rho + - screened_rates(k_Si29_n_to_Si30_reaclib)*Y(N)*state.rho + + screened_rates(k_Si29_p_to_n_P29_reaclib)*Y(H1)*state.rho + + screened_rates(k_Si29_to_n_Si28_reaclib); + jac.set(N, Si29, scratch); + + scratch = screened_rates(k_Si30_He4_to_n_S33_reaclib)*Y(He4)*state.rho + - screened_rates(k_Si30_n_to_Si31_reaclib)*Y(N)*state.rho + + screened_rates(k_Si30_to_n_Si29_reaclib); + jac.set(N, Si30, scratch); + + scratch = screened_rates(k_Si31_He4_to_n_S34_reaclib)*Y(He4)*state.rho + + screened_rates(k_Si31_p_to_n_P31_reaclib)*Y(H1)*state.rho + + screened_rates(k_Si31_to_n_Si30_reaclib); + jac.set(N, Si31, scratch); + + scratch = -screened_rates(k_P29_n_to_p_Si29_reaclib)*Y(N)*state.rho; + jac.set(N, P29, scratch); + + scratch = -screened_rates(k_P31_n_to_p_Si31_reaclib)*Y(N)*state.rho; + jac.set(N, P31, scratch); + + scratch = screened_rates(k_P33_p_to_n_S33_reaclib)*Y(H1)*state.rho; + jac.set(N, P33, scratch); + + scratch = -screened_rates(k_S32_n_to_He4_Si29_reaclib)*Y(N)*state.rho + - screened_rates(k_S32_n_to_S33_reaclib)*Y(N)*state.rho; + jac.set(N, S32, scratch); + + scratch = screened_rates(k_S33_He4_to_n_Ar36_reaclib)*Y(He4)*state.rho + - screened_rates(k_S33_n_to_He4_Si30_reaclib)*Y(N)*state.rho + - screened_rates(k_S33_n_to_S34_reaclib)*Y(N)*state.rho + - screened_rates(k_S33_n_to_p_P33_reaclib)*Y(N)*state.rho + + screened_rates(k_S33_p_to_n_Cl33_reaclib)*Y(H1)*state.rho + + screened_rates(k_S33_to_n_S32_reaclib); + jac.set(N, S33, scratch); + + scratch = screened_rates(k_S34_He4_to_n_Ar37_reaclib)*Y(He4)*state.rho + - screened_rates(k_S34_n_to_He4_Si31_reaclib)*Y(N)*state.rho + - screened_rates(k_S34_n_to_S35_reaclib)*Y(N)*state.rho + + screened_rates(k_S34_to_n_S33_reaclib); + jac.set(N, S34, scratch); + + scratch = screened_rates(k_S35_He4_to_n_Ar38_reaclib)*Y(He4)*state.rho + + screened_rates(k_S35_p_to_n_Cl35_reaclib)*Y(H1)*state.rho + + screened_rates(k_S35_to_n_S34_reaclib); + jac.set(N, S35, scratch); + + scratch = -screened_rates(k_Cl33_n_to_p_S33_reaclib)*Y(N)*state.rho; + jac.set(N, Cl33, scratch); + + scratch = -screened_rates(k_Cl35_n_to_p_S35_reaclib)*Y(N)*state.rho; + jac.set(N, Cl35, scratch); + + scratch = screened_rates(k_Cl37_p_to_n_Ar37_reaclib)*Y(H1)*state.rho; + jac.set(N, Cl37, scratch); + + scratch = -screened_rates(k_Ar36_n_to_Ar37_reaclib)*Y(N)*state.rho + - screened_rates(k_Ar36_n_to_He4_S33_reaclib)*Y(N)*state.rho; + jac.set(N, Ar36, scratch); + + scratch = screened_rates(k_Ar37_He4_to_n_Ca40_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ar37_n_to_Ar38_reaclib)*Y(N)*state.rho + - screened_rates(k_Ar37_n_to_He4_S34_reaclib)*Y(N)*state.rho + - screened_rates(k_Ar37_n_to_p_Cl37_reaclib)*Y(N)*state.rho + + screened_rates(k_Ar37_p_to_n_K37_reaclib)*Y(H1)*state.rho + + screened_rates(k_Ar37_to_n_Ar36_reaclib); + jac.set(N, Ar37, scratch); + + scratch = -screened_rates(k_Ar38_n_to_He4_S35_reaclib)*Y(N)*state.rho + + screened_rates(k_Ar38_to_n_Ar37_reaclib); + jac.set(N, Ar38, scratch); + + scratch = -screened_rates(k_K37_n_to_p_Ar37_reaclib)*Y(N)*state.rho; + jac.set(N, K37, scratch); + + jac.set(N, K39, 0.0); + + scratch = -screened_rates(k_Ca40_n_n_to_Ca42_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + - screened_rates(k_Ca40_n_to_He4_Ar37_reaclib)*Y(N)*state.rho; + jac.set(N, Ca40, scratch); + + scratch = 2.0*screened_rates(k_Ca42_to_Ca40_n_n_approx); + jac.set(N, Ca42, scratch); + + scratch = -screened_rates(k_Sc41_n_n_to_Sc43_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); + jac.set(N, Sc41, scratch); + + scratch = -screened_rates(k_Sc43_n_n_to_Sc45_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + + 2.0*screened_rates(k_Sc43_to_Sc41_n_n_approx); + jac.set(N, Sc43, scratch); + + scratch = 2.0*screened_rates(k_Sc45_to_Sc43_n_n_approx); + jac.set(N, Sc45, scratch); + + scratch = -screened_rates(k_Ti44_n_n_to_Ti46_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); + jac.set(N, Ti44, scratch); + + scratch = -screened_rates(k_Ti46_n_n_to_Ti48_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + + 2.0*screened_rates(k_Ti46_to_Ti44_n_n_approx); + jac.set(N, Ti46, scratch); + + scratch = 2.0*screened_rates(k_Ti48_to_Ti46_n_n_approx); + jac.set(N, Ti48, scratch); + + scratch = -screened_rates(k_V47_n_n_to_V49_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); + jac.set(N, V47, scratch); + + scratch = -screened_rates(k_V49_n_n_to_V51_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + + 2.0*screened_rates(k_V49_to_V47_n_n_approx); + jac.set(N, V49, scratch); + + scratch = 2.0*screened_rates(k_V51_to_V49_n_n_approx); + jac.set(N, V51, scratch); + + scratch = -screened_rates(k_Cr48_n_n_to_Cr50_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); + jac.set(N, Cr48, scratch); + + scratch = -screened_rates(k_Cr50_n_n_to_Cr52_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + + 2.0*screened_rates(k_Cr50_to_Cr48_n_n_approx); + jac.set(N, Cr50, scratch); + + scratch = -screened_rates(k_Cr52_n_n_to_Cr54_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + + 2.0*screened_rates(k_Cr52_to_Cr50_n_n_approx); + jac.set(N, Cr52, scratch); + + scratch = 2.0*screened_rates(k_Cr54_to_Cr52_n_n_approx); + jac.set(N, Cr54, scratch); + + scratch = -screened_rates(k_Mn51_n_n_to_Mn53_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); + jac.set(N, Mn51, scratch); + + scratch = screened_rates(k_Mn53_He4_to_n_Co56_reaclib)*Y(He4)*state.rho + - screened_rates(k_Mn53_n_n_to_Mn55_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + + 2.0*screened_rates(k_Mn53_to_Mn51_n_n_approx); + jac.set(N, Mn53, scratch); + + scratch = 2.0*screened_rates(k_Mn55_to_Mn53_n_n_approx); + jac.set(N, Mn55, scratch); + + scratch = -screened_rates(k_Fe52_n_n_to_Fe54_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); + jac.set(N, Fe52, scratch); + + scratch = -screened_rates(k_Fe54_n_n_to_Fe56_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + + 2.0*screened_rates(k_Fe54_to_Fe52_n_n_approx); + jac.set(N, Fe54, scratch); + + scratch = -screened_rates(k_Fe56_n_n_to_Fe58_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + + screened_rates(k_Fe56_p_to_n_Co56_reaclib)*Y(H1)*state.rho + + 2.0*screened_rates(k_Fe56_to_Fe54_n_n_approx); + jac.set(N, Fe56, scratch); + + scratch = 2.0*screened_rates(k_Fe58_to_Fe56_n_n_approx); + jac.set(N, Fe58, scratch); + + scratch = -screened_rates(k_Co55_n_to_Co56_reaclib)*Y(N)*state.rho; + jac.set(N, Co55, scratch); + + scratch = screened_rates(k_Co56_He4_to_n_Cu59_reaclib)*Y(He4)*state.rho + - screened_rates(k_Co56_n_to_Co57_reaclib)*Y(N)*state.rho + - screened_rates(k_Co56_n_to_He4_Mn53_reaclib)*Y(N)*state.rho + - screened_rates(k_Co56_n_to_p_Fe56_reaclib)*Y(N)*state.rho + + screened_rates(k_Co56_p_to_n_Ni56_reaclib)*Y(H1)*state.rho + + screened_rates(k_Co56_to_n_Co55_reaclib); + jac.set(N, Co56, scratch); + + scratch = -screened_rates(k_Co57_n_n_to_Co59_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + + screened_rates(k_Co57_to_n_Co56_reaclib); + jac.set(N, Co57, scratch); + + scratch = 2.0*screened_rates(k_Co59_to_Co57_n_n_approx); + jac.set(N, Co59, scratch); + + 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_n_to_p_Co56_reaclib)*Y(N)*state.rho; + jac.set(N, Ni56, scratch); + + scratch = -screened_rates(k_Ni58_n_n_to_Ni60_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + + 2.0*screened_rates(k_Ni58_to_Ni56_n_n_approx); + jac.set(N, Ni58, scratch); + + scratch = 2.0*screened_rates(k_Ni60_to_Ni58_n_n_approx); + jac.set(N, Ni60, scratch); + + scratch = -screened_rates(k_Cu59_n_to_He4_Co56_reaclib)*Y(N)*state.rho; + jac.set(N, Cu59, scratch); + + jac.set(N, Zn60, 0.0); + + + // p row + + scratch = screened_rates(k_Ar37_n_to_p_Cl37_reaclib)*Y(Ar37)*state.rho + + screened_rates(k_Cl33_n_to_p_S33_reaclib)*Y(Cl33)*state.rho + + screened_rates(k_Cl35_n_to_p_S35_reaclib)*Y(Cl35)*state.rho + + screened_rates(k_Co56_n_to_p_Fe56_reaclib)*Y(Co56)*state.rho + + screened_rates(k_K37_n_to_p_Ar37_reaclib)*Y(K37)*state.rho + + screened_rates(k_Ni56_n_to_p_Co56_reaclib)*Y(Ni56)*state.rho + + screened_rates(k_P29_n_to_p_Si29_reaclib)*Y(P29)*state.rho + + screened_rates(k_P31_n_to_p_Si31_reaclib)*Y(P31)*state.rho + + screened_rates(k_S33_n_to_p_P33_reaclib)*Y(S33)*state.rho + + screened_rates(k_Si27_n_to_p_Al27_reaclib)*Y(Si27)*state.rho + + screened_rates(k_n_to_p_beta_neg_weaktab); + jac.set(H1, N, scratch); + + scratch = -screened_rates(k_Al27_p_to_C12_O16_reaclib)*Y(Al27)*state.rho + - screened_rates(k_Al27_p_to_He4_Mg24_reaclib)*Y(Al27)*state.rho + - screened_rates(k_Al27_p_to_Si28_reaclib)*Y(Al27)*state.rho + - screened_rates(k_Al27_p_to_n_Si27_reaclib)*Y(Al27)*state.rho + - screened_rates(k_Ar36_p_to_He4_Cl33_reaclib)*Y(Ar36)*state.rho + - screened_rates(k_Ar36_p_to_K37_reaclib)*Y(Ar36)*state.rho + - screened_rates(k_Ar37_p_to_n_K37_reaclib)*Y(Ar37)*state.rho + - screened_rates(k_Ar38_p_to_He4_Cl35_reaclib)*Y(Ar38)*state.rho + - screened_rates(k_Ar38_p_to_K39_reaclib)*Y(Ar38)*state.rho + - screened_rates(k_Ca40_p_to_He4_K37_reaclib)*Y(Ca40)*state.rho + - screened_rates(k_Ca40_p_to_Sc41_reaclib)*Y(Ca40)*state.rho + - screened_rates(k_Ca42_p_to_He4_K39_reaclib)*Y(Ca42)*state.rho + - screened_rates(k_Ca42_p_to_Sc43_reaclib)*Y(Ca42)*state.rho + - screened_rates(k_Cl35_p_to_Ar36_reaclib)*Y(Cl35)*state.rho + - screened_rates(k_Cl35_p_to_He4_S32_reaclib)*Y(Cl35)*state.rho + - screened_rates(k_Cl37_p_to_Ar38_reaclib)*Y(Cl37)*state.rho + - screened_rates(k_Cl37_p_to_He4_S34_reaclib)*Y(Cl37)*state.rho + - screened_rates(k_Cl37_p_to_n_Ar37_reaclib)*Y(Cl37)*state.rho + - screened_rates(k_Co55_p_to_He4_Fe52_reaclib)*Y(Co55)*state.rho + - screened_rates(k_Co55_p_to_Ni56_reaclib)*Y(Co55)*state.rho + - screened_rates(k_Co56_p_to_n_Ni56_reaclib)*Y(Co56)*state.rho + - screened_rates(k_Co57_p_to_He4_Fe54_reaclib)*Y(Co57)*state.rho + - screened_rates(k_Co57_p_to_Ni58_reaclib)*Y(Co57)*state.rho + - screened_rates(k_Co59_p_to_He4_Fe56_reaclib)*Y(Co59)*state.rho + - screened_rates(k_Co59_p_to_Ni60_reaclib)*Y(Co59)*state.rho + - screened_rates(k_Cr50_p_to_He4_V47_reaclib)*Y(Cr50)*state.rho + - screened_rates(k_Cr50_p_to_Mn51_reaclib)*Y(Cr50)*state.rho + - screened_rates(k_Cr52_p_to_He4_V49_reaclib)*Y(Cr52)*state.rho + - screened_rates(k_Cr52_p_to_Mn53_reaclib)*Y(Cr52)*state.rho + - screened_rates(k_Cr54_p_to_He4_V51_reaclib)*Y(Cr54)*state.rho + - screened_rates(k_Cr54_p_to_Mn55_reaclib)*Y(Cr54)*state.rho + - screened_rates(k_Cu59_p_to_He4_Ni56_reaclib)*Y(Cu59)*state.rho + - screened_rates(k_Cu59_p_to_Zn60_reaclib)*Y(Cu59)*state.rho + - screened_rates(k_Fe54_p_to_Co55_reaclib)*Y(Fe54)*state.rho + - screened_rates(k_Fe54_p_to_He4_Mn51_reaclib)*Y(Fe54)*state.rho + - screened_rates(k_Fe56_p_to_Co57_reaclib)*Y(Fe56)*state.rho + - screened_rates(k_Fe56_p_to_He4_Mn53_reaclib)*Y(Fe56)*state.rho + - screened_rates(k_Fe56_p_to_n_Co56_reaclib)*Y(Fe56)*state.rho + - screened_rates(k_Fe58_p_to_Co59_reaclib)*Y(Fe58)*state.rho + - screened_rates(k_Fe58_p_to_He4_Mn55_reaclib)*Y(Fe58)*state.rho + - screened_rates(k_K39_p_to_Ca40_reaclib)*Y(K39)*state.rho + - screened_rates(k_K39_p_to_He4_Ar36_reaclib)*Y(K39)*state.rho + - screened_rates(k_Mn51_p_to_Fe52_reaclib)*Y(Mn51)*state.rho + - screened_rates(k_Mn51_p_to_He4_Cr48_reaclib)*Y(Mn51)*state.rho + - screened_rates(k_Mn53_p_to_Fe54_reaclib)*Y(Mn53)*state.rho + - screened_rates(k_Mn53_p_to_He4_Cr50_reaclib)*Y(Mn53)*state.rho + - screened_rates(k_Mn55_p_to_Fe56_reaclib)*Y(Mn55)*state.rho + - screened_rates(k_Mn55_p_to_He4_Cr52_reaclib)*Y(Mn55)*state.rho + - screened_rates(k_Ni58_p_to_Cu59_reaclib)*Y(Ni58)*state.rho + - screened_rates(k_Ni58_p_to_He4_Co55_reaclib)*Y(Ni58)*state.rho + - screened_rates(k_Ni60_p_to_He4_Co57_reaclib)*Y(Ni60)*state.rho + - screened_rates(k_P31_p_to_C12_Ne20_reaclib)*Y(P31)*state.rho + - screened_rates(k_P31_p_to_He4_Si28_reaclib)*Y(P31)*state.rho + - screened_rates(k_P31_p_to_O16_O16_reaclib)*Y(P31)*state.rho + - screened_rates(k_P31_p_to_S32_reaclib)*Y(P31)*state.rho + - screened_rates(k_P33_p_to_He4_Si30_reaclib)*Y(P33)*state.rho + - screened_rates(k_P33_p_to_S34_reaclib)*Y(P33)*state.rho + - screened_rates(k_P33_p_to_n_S33_reaclib)*Y(P33)*state.rho + - screened_rates(k_S32_p_to_Cl33_reaclib)*Y(S32)*state.rho + - screened_rates(k_S32_p_to_He4_P29_reaclib)*Y(S32)*state.rho + - screened_rates(k_S33_p_to_n_Cl33_reaclib)*Y(S33)*state.rho + - screened_rates(k_S34_p_to_Cl35_reaclib)*Y(S34)*state.rho + - screened_rates(k_S34_p_to_He4_P31_reaclib)*Y(S34)*state.rho + - screened_rates(k_S35_p_to_n_Cl35_reaclib)*Y(S35)*state.rho + - screened_rates(k_Sc43_p_to_He4_Ca40_reaclib)*Y(Sc43)*state.rho + - screened_rates(k_Sc43_p_to_Ti44_reaclib)*Y(Sc43)*state.rho + - screened_rates(k_Sc45_p_to_He4_Ca42_reaclib)*Y(Sc45)*state.rho + - screened_rates(k_Sc45_p_to_Ti46_reaclib)*Y(Sc45)*state.rho + - screened_rates(k_Si28_p_to_P29_reaclib)*Y(Si28)*state.rho + - screened_rates(k_Si29_p_to_n_P29_reaclib)*Y(Si29)*state.rho + - screened_rates(k_Si30_p_to_He4_Al27_reaclib)*Y(Si30)*state.rho + - screened_rates(k_Si30_p_to_P31_reaclib)*Y(Si30)*state.rho + - screened_rates(k_Si31_p_to_n_P31_reaclib)*Y(Si31)*state.rho + - screened_rates(k_Ti44_p_to_He4_Sc41_reaclib)*Y(Ti44)*state.rho + - screened_rates(k_Ti46_p_to_He4_Sc43_reaclib)*Y(Ti46)*state.rho + - screened_rates(k_Ti46_p_to_V47_reaclib)*Y(Ti46)*state.rho + - screened_rates(k_Ti48_p_to_He4_Sc45_reaclib)*Y(Ti48)*state.rho + - screened_rates(k_Ti48_p_to_V49_reaclib)*Y(Ti48)*state.rho + - screened_rates(k_V47_p_to_Cr48_reaclib)*Y(V47)*state.rho + - screened_rates(k_V47_p_to_He4_Ti44_reaclib)*Y(V47)*state.rho + - screened_rates(k_V49_p_to_Cr50_reaclib)*Y(V49)*state.rho + - screened_rates(k_V49_p_to_He4_Ti46_reaclib)*Y(V49)*state.rho + - screened_rates(k_V51_p_to_Cr52_reaclib)*Y(V51)*state.rho + - screened_rates(k_V51_p_to_He4_Ti48_reaclib)*Y(V51)*state.rho + - screened_rates(k_p_to_n_electron_capture_weaktab); + jac.set(H1, H1, scratch); + + scratch = screened_rates(k_Al27_He4_to_p_Si30_reaclib)*Y(Al27)*state.rho + + screened_rates(k_Ar36_He4_to_p_K39_reaclib)*Y(Ar36)*state.rho + + screened_rates(k_Ca40_He4_to_p_Sc43_reaclib)*Y(Ca40)*state.rho + + screened_rates(k_Ca42_He4_to_p_Sc45_reaclib)*Y(Ca42)*state.rho + + screened_rates(k_Cl33_He4_to_p_Ar36_reaclib)*Y(Cl33)*state.rho + + screened_rates(k_Cl35_He4_to_p_Ar38_reaclib)*Y(Cl35)*state.rho + + screened_rates(k_Co55_He4_to_p_Ni58_reaclib)*Y(Co55)*state.rho + + screened_rates(k_Co57_He4_to_p_Ni60_reaclib)*Y(Co57)*state.rho + + screened_rates(k_Cr48_He4_to_p_Mn51_reaclib)*Y(Cr48)*state.rho + + screened_rates(k_Cr50_He4_to_p_Mn53_reaclib)*Y(Cr50)*state.rho + + screened_rates(k_Cr52_He4_to_p_Mn55_reaclib)*Y(Cr52)*state.rho + + screened_rates(k_Fe52_He4_to_p_Co55_reaclib)*Y(Fe52)*state.rho + + screened_rates(k_Fe54_He4_to_p_Co57_reaclib)*Y(Fe54)*state.rho + + screened_rates(k_Fe56_He4_to_p_Co59_reaclib)*Y(Fe56)*state.rho + + screened_rates(k_K37_He4_to_p_Ca40_reaclib)*Y(K37)*state.rho + + screened_rates(k_K39_He4_to_p_Ca42_reaclib)*Y(K39)*state.rho + + screened_rates(k_Mg24_He4_to_p_Al27_reaclib)*Y(Mg24)*state.rho + + screened_rates(k_Mn51_He4_to_p_Fe54_reaclib)*Y(Mn51)*state.rho + + screened_rates(k_Mn53_He4_to_p_Fe56_reaclib)*Y(Mn53)*state.rho + + screened_rates(k_Mn55_He4_to_p_Fe58_reaclib)*Y(Mn55)*state.rho + + screened_rates(k_Ni56_He4_to_p_Cu59_reaclib)*Y(Ni56)*state.rho + + screened_rates(k_P29_He4_to_p_S32_reaclib)*Y(P29)*state.rho + + screened_rates(k_P31_He4_to_p_S34_reaclib)*Y(P31)*state.rho + + screened_rates(k_S32_He4_to_p_Cl35_reaclib)*Y(S32)*state.rho + + screened_rates(k_S34_He4_to_p_Cl37_reaclib)*Y(S34)*state.rho + + screened_rates(k_Sc41_He4_to_p_Ti44_reaclib)*Y(Sc41)*state.rho + + screened_rates(k_Sc43_He4_to_p_Ti46_reaclib)*Y(Sc43)*state.rho + + screened_rates(k_Sc45_He4_to_p_Ti48_reaclib)*Y(Sc45)*state.rho + + screened_rates(k_Si28_He4_to_p_P31_reaclib)*Y(Si28)*state.rho + + screened_rates(k_Si30_He4_to_p_P33_reaclib)*Y(Si30)*state.rho + + screened_rates(k_Ti44_He4_to_p_V47_reaclib)*Y(Ti44)*state.rho + + screened_rates(k_Ti46_He4_to_p_V49_reaclib)*Y(Ti46)*state.rho + + screened_rates(k_Ti48_He4_to_p_V51_reaclib)*Y(Ti48)*state.rho + + screened_rates(k_V47_He4_to_p_Cr50_reaclib)*Y(V47)*state.rho + + screened_rates(k_V49_He4_to_p_Cr52_reaclib)*Y(V49)*state.rho + + screened_rates(k_V51_He4_to_p_Cr54_reaclib)*Y(V51)*state.rho; + jac.set(H1, He4, scratch); + + scratch = screened_rates(k_Ne20_C12_to_p_P31_reaclib)*Y(Ne20)*state.rho + + screened_rates(k_O16_C12_to_p_Al27_reaclib)*Y(O16)*state.rho; + jac.set(H1, C12, scratch); + + scratch = screened_rates(k_O16_C12_to_p_Al27_reaclib)*Y(C12)*state.rho + + 1.0*screened_rates(k_O16_O16_to_p_P31_reaclib)*Y(O16)*state.rho; + jac.set(H1, O16, scratch); + + scratch = screened_rates(k_Ne20_C12_to_p_P31_reaclib)*Y(C12)*state.rho; + jac.set(H1, Ne20, scratch); + + jac.set(H1, Mg23, 0.0); + + scratch = screened_rates(k_Mg24_He4_to_p_Al27_reaclib)*Y(He4)*state.rho; + jac.set(H1, Mg24, scratch); + + scratch = screened_rates(k_Al27_He4_to_p_Si30_reaclib)*Y(He4)*state.rho + - screened_rates(k_Al27_p_to_C12_O16_reaclib)*Y(H1)*state.rho + - screened_rates(k_Al27_p_to_He4_Mg24_reaclib)*Y(H1)*state.rho + - screened_rates(k_Al27_p_to_Si28_reaclib)*Y(H1)*state.rho + - screened_rates(k_Al27_p_to_n_Si27_reaclib)*Y(H1)*state.rho; + jac.set(H1, Al27, scratch); + + scratch = screened_rates(k_Si27_n_to_p_Al27_reaclib)*Y(N)*state.rho; + jac.set(H1, Si27, scratch); + + scratch = screened_rates(k_Si28_He4_to_p_P31_reaclib)*Y(He4)*state.rho + - screened_rates(k_Si28_p_to_P29_reaclib)*Y(H1)*state.rho + + screened_rates(k_Si28_to_p_Al27_reaclib); + jac.set(H1, Si28, scratch); + + scratch = -screened_rates(k_Si29_p_to_n_P29_reaclib)*Y(H1)*state.rho; + jac.set(H1, Si29, scratch); + + scratch = screened_rates(k_Si30_He4_to_p_P33_reaclib)*Y(He4)*state.rho + - screened_rates(k_Si30_p_to_He4_Al27_reaclib)*Y(H1)*state.rho + - screened_rates(k_Si30_p_to_P31_reaclib)*Y(H1)*state.rho; + jac.set(H1, Si30, scratch); + + scratch = -screened_rates(k_Si31_p_to_n_P31_reaclib)*Y(H1)*state.rho; + jac.set(H1, Si31, scratch); + + scratch = screened_rates(k_P29_He4_to_p_S32_reaclib)*Y(He4)*state.rho + + screened_rates(k_P29_n_to_p_Si29_reaclib)*Y(N)*state.rho + + screened_rates(k_P29_to_p_Si28_reaclib); + jac.set(H1, P29, scratch); + + scratch = screened_rates(k_P31_He4_to_p_S34_reaclib)*Y(He4)*state.rho + + screened_rates(k_P31_n_to_p_Si31_reaclib)*Y(N)*state.rho + - screened_rates(k_P31_p_to_C12_Ne20_reaclib)*Y(H1)*state.rho + - screened_rates(k_P31_p_to_He4_Si28_reaclib)*Y(H1)*state.rho + - screened_rates(k_P31_p_to_O16_O16_reaclib)*Y(H1)*state.rho + - screened_rates(k_P31_p_to_S32_reaclib)*Y(H1)*state.rho + + screened_rates(k_P31_to_p_Si30_reaclib); + jac.set(H1, P31, scratch); + + scratch = -screened_rates(k_P33_p_to_He4_Si30_reaclib)*Y(H1)*state.rho + - screened_rates(k_P33_p_to_S34_reaclib)*Y(H1)*state.rho + - screened_rates(k_P33_p_to_n_S33_reaclib)*Y(H1)*state.rho; + jac.set(H1, P33, scratch); + + scratch = screened_rates(k_S32_He4_to_p_Cl35_reaclib)*Y(He4)*state.rho + - screened_rates(k_S32_p_to_Cl33_reaclib)*Y(H1)*state.rho + - screened_rates(k_S32_p_to_He4_P29_reaclib)*Y(H1)*state.rho + + screened_rates(k_S32_to_p_P31_reaclib); + jac.set(H1, S32, scratch); + + scratch = screened_rates(k_S33_n_to_p_P33_reaclib)*Y(N)*state.rho + - screened_rates(k_S33_p_to_n_Cl33_reaclib)*Y(H1)*state.rho; + jac.set(H1, S33, scratch); + + scratch = screened_rates(k_S34_He4_to_p_Cl37_reaclib)*Y(He4)*state.rho + - screened_rates(k_S34_p_to_Cl35_reaclib)*Y(H1)*state.rho + - screened_rates(k_S34_p_to_He4_P31_reaclib)*Y(H1)*state.rho + + screened_rates(k_S34_to_p_P33_reaclib); + jac.set(H1, S34, scratch); + + scratch = -screened_rates(k_S35_p_to_n_Cl35_reaclib)*Y(H1)*state.rho; + jac.set(H1, S35, scratch); + + scratch = screened_rates(k_Cl33_He4_to_p_Ar36_reaclib)*Y(He4)*state.rho + + screened_rates(k_Cl33_n_to_p_S33_reaclib)*Y(N)*state.rho + + screened_rates(k_Cl33_to_p_S32_reaclib); + jac.set(H1, Cl33, scratch); + + scratch = screened_rates(k_Cl35_He4_to_p_Ar38_reaclib)*Y(He4)*state.rho + + screened_rates(k_Cl35_n_to_p_S35_reaclib)*Y(N)*state.rho + - screened_rates(k_Cl35_p_to_Ar36_reaclib)*Y(H1)*state.rho + - screened_rates(k_Cl35_p_to_He4_S32_reaclib)*Y(H1)*state.rho + + screened_rates(k_Cl35_to_p_S34_reaclib); + jac.set(H1, Cl35, scratch); + + scratch = -screened_rates(k_Cl37_p_to_Ar38_reaclib)*Y(H1)*state.rho + - screened_rates(k_Cl37_p_to_He4_S34_reaclib)*Y(H1)*state.rho + - screened_rates(k_Cl37_p_to_n_Ar37_reaclib)*Y(H1)*state.rho; + jac.set(H1, Cl37, scratch); + + scratch = screened_rates(k_Ar36_He4_to_p_K39_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ar36_p_to_He4_Cl33_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ar36_p_to_K37_reaclib)*Y(H1)*state.rho + + screened_rates(k_Ar36_to_p_Cl35_reaclib); + jac.set(H1, Ar36, scratch); + + scratch = screened_rates(k_Ar37_n_to_p_Cl37_reaclib)*Y(N)*state.rho + - screened_rates(k_Ar37_p_to_n_K37_reaclib)*Y(H1)*state.rho; + jac.set(H1, Ar37, scratch); + + scratch = -screened_rates(k_Ar38_p_to_He4_Cl35_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ar38_p_to_K39_reaclib)*Y(H1)*state.rho + + screened_rates(k_Ar38_to_p_Cl37_reaclib); + jac.set(H1, Ar38, scratch); + + scratch = screened_rates(k_K37_He4_to_p_Ca40_reaclib)*Y(He4)*state.rho + + screened_rates(k_K37_n_to_p_Ar37_reaclib)*Y(N)*state.rho + + screened_rates(k_K37_to_p_Ar36_reaclib); + jac.set(H1, K37, scratch); + + scratch = screened_rates(k_K39_He4_to_p_Ca42_reaclib)*Y(He4)*state.rho + - screened_rates(k_K39_p_to_Ca40_reaclib)*Y(H1)*state.rho + - screened_rates(k_K39_p_to_He4_Ar36_reaclib)*Y(H1)*state.rho + + screened_rates(k_K39_to_p_Ar38_reaclib); + jac.set(H1, K39, scratch); + + scratch = screened_rates(k_Ca40_He4_to_p_Sc43_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ca40_p_to_He4_K37_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ca40_p_to_Sc41_reaclib)*Y(H1)*state.rho + + screened_rates(k_Ca40_to_p_K39_reaclib); + jac.set(H1, Ca40, scratch); + + scratch = screened_rates(k_Ca42_He4_to_p_Sc45_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ca42_p_to_He4_K39_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ca42_p_to_Sc43_reaclib)*Y(H1)*state.rho; + jac.set(H1, Ca42, scratch); + + scratch = screened_rates(k_Sc41_He4_to_p_Ti44_reaclib)*Y(He4)*state.rho + + screened_rates(k_Sc41_to_p_Ca40_reaclib); + jac.set(H1, Sc41, scratch); + + scratch = screened_rates(k_Sc43_He4_to_p_Ti46_reaclib)*Y(He4)*state.rho + - screened_rates(k_Sc43_p_to_He4_Ca40_reaclib)*Y(H1)*state.rho + - screened_rates(k_Sc43_p_to_Ti44_reaclib)*Y(H1)*state.rho + + screened_rates(k_Sc43_to_p_Ca42_reaclib); + jac.set(H1, Sc43, scratch); + + scratch = screened_rates(k_Sc45_He4_to_p_Ti48_reaclib)*Y(He4)*state.rho + - screened_rates(k_Sc45_p_to_He4_Ca42_reaclib)*Y(H1)*state.rho + - screened_rates(k_Sc45_p_to_Ti46_reaclib)*Y(H1)*state.rho; + jac.set(H1, Sc45, scratch); + + scratch = screened_rates(k_Ti44_He4_to_p_V47_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ti44_p_to_He4_Sc41_reaclib)*Y(H1)*state.rho + + screened_rates(k_Ti44_to_p_Sc43_reaclib); + jac.set(H1, Ti44, scratch); + + scratch = screened_rates(k_Ti46_He4_to_p_V49_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ti46_p_to_He4_Sc43_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ti46_p_to_V47_reaclib)*Y(H1)*state.rho + + screened_rates(k_Ti46_to_p_Sc45_reaclib); + jac.set(H1, Ti46, scratch); + + scratch = screened_rates(k_Ti48_He4_to_p_V51_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ti48_p_to_He4_Sc45_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ti48_p_to_V49_reaclib)*Y(H1)*state.rho; + jac.set(H1, Ti48, scratch); + + scratch = screened_rates(k_V47_He4_to_p_Cr50_reaclib)*Y(He4)*state.rho + - screened_rates(k_V47_p_to_Cr48_reaclib)*Y(H1)*state.rho + - screened_rates(k_V47_p_to_He4_Ti44_reaclib)*Y(H1)*state.rho + + screened_rates(k_V47_to_p_Ti46_reaclib); + jac.set(H1, V47, scratch); + + scratch = screened_rates(k_V49_He4_to_p_Cr52_reaclib)*Y(He4)*state.rho + - screened_rates(k_V49_p_to_Cr50_reaclib)*Y(H1)*state.rho + - screened_rates(k_V49_p_to_He4_Ti46_reaclib)*Y(H1)*state.rho + + screened_rates(k_V49_to_p_Ti48_reaclib); + jac.set(H1, V49, scratch); + + scratch = screened_rates(k_V51_He4_to_p_Cr54_reaclib)*Y(He4)*state.rho + - screened_rates(k_V51_p_to_Cr52_reaclib)*Y(H1)*state.rho + - screened_rates(k_V51_p_to_He4_Ti48_reaclib)*Y(H1)*state.rho; + jac.set(H1, V51, scratch); + + scratch = screened_rates(k_Cr48_He4_to_p_Mn51_reaclib)*Y(He4)*state.rho + + screened_rates(k_Cr48_to_p_V47_reaclib); + jac.set(H1, Cr48, scratch); + + scratch = screened_rates(k_Cr50_He4_to_p_Mn53_reaclib)*Y(He4)*state.rho + - screened_rates(k_Cr50_p_to_He4_V47_reaclib)*Y(H1)*state.rho + - screened_rates(k_Cr50_p_to_Mn51_reaclib)*Y(H1)*state.rho + + screened_rates(k_Cr50_to_p_V49_reaclib); + jac.set(H1, Cr50, scratch); + + scratch = screened_rates(k_Cr52_He4_to_p_Mn55_reaclib)*Y(He4)*state.rho + - screened_rates(k_Cr52_p_to_He4_V49_reaclib)*Y(H1)*state.rho + - screened_rates(k_Cr52_p_to_Mn53_reaclib)*Y(H1)*state.rho + + screened_rates(k_Cr52_to_p_V51_reaclib); + jac.set(H1, Cr52, scratch); + + scratch = -screened_rates(k_Cr54_p_to_He4_V51_reaclib)*Y(H1)*state.rho + - screened_rates(k_Cr54_p_to_Mn55_reaclib)*Y(H1)*state.rho; + jac.set(H1, Cr54, scratch); + + scratch = screened_rates(k_Mn51_He4_to_p_Fe54_reaclib)*Y(He4)*state.rho + - screened_rates(k_Mn51_p_to_Fe52_reaclib)*Y(H1)*state.rho + - screened_rates(k_Mn51_p_to_He4_Cr48_reaclib)*Y(H1)*state.rho + + screened_rates(k_Mn51_to_p_Cr50_reaclib); + jac.set(H1, Mn51, scratch); + + scratch = screened_rates(k_Mn53_He4_to_p_Fe56_reaclib)*Y(He4)*state.rho + - screened_rates(k_Mn53_p_to_Fe54_reaclib)*Y(H1)*state.rho + - screened_rates(k_Mn53_p_to_He4_Cr50_reaclib)*Y(H1)*state.rho + + screened_rates(k_Mn53_to_p_Cr52_reaclib); + jac.set(H1, Mn53, scratch); + + scratch = screened_rates(k_Mn55_He4_to_p_Fe58_reaclib)*Y(He4)*state.rho + - screened_rates(k_Mn55_p_to_Fe56_reaclib)*Y(H1)*state.rho + - screened_rates(k_Mn55_p_to_He4_Cr52_reaclib)*Y(H1)*state.rho + + screened_rates(k_Mn55_to_p_Cr54_reaclib); + jac.set(H1, Mn55, scratch); + + scratch = screened_rates(k_Fe52_He4_to_p_Co55_reaclib)*Y(He4)*state.rho + + screened_rates(k_Fe52_to_p_Mn51_reaclib); + jac.set(H1, Fe52, scratch); + + scratch = screened_rates(k_Fe54_He4_to_p_Co57_reaclib)*Y(He4)*state.rho + - screened_rates(k_Fe54_p_to_Co55_reaclib)*Y(H1)*state.rho + - screened_rates(k_Fe54_p_to_He4_Mn51_reaclib)*Y(H1)*state.rho + + screened_rates(k_Fe54_to_p_Mn53_reaclib); + jac.set(H1, Fe54, scratch); + + scratch = screened_rates(k_Fe56_He4_to_p_Co59_reaclib)*Y(He4)*state.rho + - screened_rates(k_Fe56_p_to_Co57_reaclib)*Y(H1)*state.rho + - screened_rates(k_Fe56_p_to_He4_Mn53_reaclib)*Y(H1)*state.rho + - screened_rates(k_Fe56_p_to_n_Co56_reaclib)*Y(H1)*state.rho + + screened_rates(k_Fe56_to_p_Mn55_reaclib); + jac.set(H1, Fe56, scratch); + + scratch = -screened_rates(k_Fe58_p_to_Co59_reaclib)*Y(H1)*state.rho + - screened_rates(k_Fe58_p_to_He4_Mn55_reaclib)*Y(H1)*state.rho; + jac.set(H1, Fe58, scratch); + + scratch = screened_rates(k_Co55_He4_to_p_Ni58_reaclib)*Y(He4)*state.rho + - screened_rates(k_Co55_p_to_He4_Fe52_reaclib)*Y(H1)*state.rho + - screened_rates(k_Co55_p_to_Ni56_reaclib)*Y(H1)*state.rho + + screened_rates(k_Co55_to_p_Fe54_reaclib); + jac.set(H1, Co55, scratch); + + scratch = screened_rates(k_Co56_n_to_p_Fe56_reaclib)*Y(N)*state.rho + - screened_rates(k_Co56_p_to_n_Ni56_reaclib)*Y(H1)*state.rho; + jac.set(H1, Co56, scratch); + + scratch = screened_rates(k_Co57_He4_to_p_Ni60_reaclib)*Y(He4)*state.rho + - screened_rates(k_Co57_p_to_He4_Fe54_reaclib)*Y(H1)*state.rho + - screened_rates(k_Co57_p_to_Ni58_reaclib)*Y(H1)*state.rho + + screened_rates(k_Co57_to_p_Fe56_reaclib); + jac.set(H1, Co57, scratch); + + scratch = -screened_rates(k_Co59_p_to_He4_Fe56_reaclib)*Y(H1)*state.rho + - screened_rates(k_Co59_p_to_Ni60_reaclib)*Y(H1)*state.rho + + screened_rates(k_Co59_to_p_Fe58_reaclib); + jac.set(H1, Co59, scratch); + + scratch = screened_rates(k_Ni56_He4_to_p_Cu59_reaclib)*Y(He4)*state.rho + + screened_rates(k_Ni56_n_to_p_Co56_reaclib)*Y(N)*state.rho + + screened_rates(k_Ni56_to_p_Co55_reaclib); + jac.set(H1, Ni56, scratch); + + scratch = -screened_rates(k_Ni58_p_to_Cu59_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ni58_p_to_He4_Co55_reaclib)*Y(H1)*state.rho + + screened_rates(k_Ni58_to_p_Co57_reaclib); + jac.set(H1, Ni58, scratch); + + scratch = -screened_rates(k_Ni60_p_to_He4_Co57_reaclib)*Y(H1)*state.rho + + screened_rates(k_Ni60_to_p_Co59_reaclib); + jac.set(H1, Ni60, scratch); + + scratch = -screened_rates(k_Cu59_p_to_He4_Ni56_reaclib)*Y(H1)*state.rho + - screened_rates(k_Cu59_p_to_Zn60_reaclib)*Y(H1)*state.rho + + screened_rates(k_Cu59_to_p_Ni58_reaclib); + jac.set(H1, Cu59, scratch); + + scratch = screened_rates(k_Zn60_to_p_Cu59_reaclib); + jac.set(H1, Zn60, scratch); + + + // He4 row + + scratch = screened_rates(k_Ar36_n_to_He4_S33_reaclib)*Y(Ar36)*state.rho + + screened_rates(k_Ar37_n_to_He4_S34_reaclib)*Y(Ar37)*state.rho + + screened_rates(k_Ar38_n_to_He4_S35_reaclib)*Y(Ar38)*state.rho + + screened_rates(k_Ca40_n_to_He4_Ar37_reaclib)*Y(Ca40)*state.rho + + screened_rates(k_Co56_n_to_He4_Mn53_reaclib)*Y(Co56)*state.rho + + screened_rates(k_Cu59_n_to_He4_Co56_reaclib)*Y(Cu59)*state.rho + + screened_rates(k_Mg23_n_to_He4_Ne20_reaclib)*Y(Mg23)*state.rho + + screened_rates(k_S32_n_to_He4_Si29_reaclib)*Y(S32)*state.rho + + screened_rates(k_S33_n_to_He4_Si30_reaclib)*Y(S33)*state.rho + + screened_rates(k_S34_n_to_He4_Si31_reaclib)*Y(S34)*state.rho + + screened_rates(k_Si27_n_to_He4_Mg24_reaclib)*Y(Si27)*state.rho; + jac.set(He4, N, scratch); + + scratch = screened_rates(k_Al27_p_to_He4_Mg24_reaclib)*Y(Al27)*state.rho + + screened_rates(k_Ar36_p_to_He4_Cl33_reaclib)*Y(Ar36)*state.rho + + screened_rates(k_Ar38_p_to_He4_Cl35_reaclib)*Y(Ar38)*state.rho + + screened_rates(k_Ca40_p_to_He4_K37_reaclib)*Y(Ca40)*state.rho + + screened_rates(k_Ca42_p_to_He4_K39_reaclib)*Y(Ca42)*state.rho + + screened_rates(k_Cl35_p_to_He4_S32_reaclib)*Y(Cl35)*state.rho + + screened_rates(k_Cl37_p_to_He4_S34_reaclib)*Y(Cl37)*state.rho + + screened_rates(k_Co55_p_to_He4_Fe52_reaclib)*Y(Co55)*state.rho + + screened_rates(k_Co57_p_to_He4_Fe54_reaclib)*Y(Co57)*state.rho + + screened_rates(k_Co59_p_to_He4_Fe56_reaclib)*Y(Co59)*state.rho + + screened_rates(k_Cr50_p_to_He4_V47_reaclib)*Y(Cr50)*state.rho + + screened_rates(k_Cr52_p_to_He4_V49_reaclib)*Y(Cr52)*state.rho + + screened_rates(k_Cr54_p_to_He4_V51_reaclib)*Y(Cr54)*state.rho + + screened_rates(k_Cu59_p_to_He4_Ni56_reaclib)*Y(Cu59)*state.rho + + screened_rates(k_Fe54_p_to_He4_Mn51_reaclib)*Y(Fe54)*state.rho + + screened_rates(k_Fe56_p_to_He4_Mn53_reaclib)*Y(Fe56)*state.rho + + screened_rates(k_Fe58_p_to_He4_Mn55_reaclib)*Y(Fe58)*state.rho + + screened_rates(k_K39_p_to_He4_Ar36_reaclib)*Y(K39)*state.rho + + screened_rates(k_Mn51_p_to_He4_Cr48_reaclib)*Y(Mn51)*state.rho + + screened_rates(k_Mn53_p_to_He4_Cr50_reaclib)*Y(Mn53)*state.rho + + screened_rates(k_Mn55_p_to_He4_Cr52_reaclib)*Y(Mn55)*state.rho + + screened_rates(k_Ni58_p_to_He4_Co55_reaclib)*Y(Ni58)*state.rho + + screened_rates(k_Ni60_p_to_He4_Co57_reaclib)*Y(Ni60)*state.rho + + screened_rates(k_P31_p_to_He4_Si28_reaclib)*Y(P31)*state.rho + + screened_rates(k_P33_p_to_He4_Si30_reaclib)*Y(P33)*state.rho + + screened_rates(k_S32_p_to_He4_P29_reaclib)*Y(S32)*state.rho + + screened_rates(k_S34_p_to_He4_P31_reaclib)*Y(S34)*state.rho + + screened_rates(k_Sc43_p_to_He4_Ca40_reaclib)*Y(Sc43)*state.rho + + screened_rates(k_Sc45_p_to_He4_Ca42_reaclib)*Y(Sc45)*state.rho + + screened_rates(k_Si30_p_to_He4_Al27_reaclib)*Y(Si30)*state.rho + + screened_rates(k_Ti44_p_to_He4_Sc41_reaclib)*Y(Ti44)*state.rho + + screened_rates(k_Ti46_p_to_He4_Sc43_reaclib)*Y(Ti46)*state.rho + + screened_rates(k_Ti48_p_to_He4_Sc45_reaclib)*Y(Ti48)*state.rho + + screened_rates(k_V47_p_to_He4_Ti44_reaclib)*Y(V47)*state.rho + + screened_rates(k_V49_p_to_He4_Ti46_reaclib)*Y(V49)*state.rho + + screened_rates(k_V51_p_to_He4_Ti48_reaclib)*Y(V51)*state.rho; + jac.set(He4, H1, scratch); + + scratch = -screened_rates(k_Al27_He4_to_P31_reaclib)*Y(Al27)*state.rho + - screened_rates(k_Al27_He4_to_p_Si30_reaclib)*Y(Al27)*state.rho + - screened_rates(k_Ar36_He4_to_Ca40_reaclib)*Y(Ar36)*state.rho + - screened_rates(k_Ar36_He4_to_p_K39_reaclib)*Y(Ar36)*state.rho + - screened_rates(k_Ar37_He4_to_n_Ca40_reaclib)*Y(Ar37)*state.rho + - screened_rates(k_Ar38_He4_to_Ca42_reaclib)*Y(Ar38)*state.rho + - screened_rates(k_C12_He4_to_O16_reaclib)*Y(C12)*state.rho + - screened_rates(k_Ca40_He4_to_Ti44_reaclib)*Y(Ca40)*state.rho + - screened_rates(k_Ca40_He4_to_p_Sc43_reaclib)*Y(Ca40)*state.rho + - screened_rates(k_Ca42_He4_to_Ti46_reaclib)*Y(Ca42)*state.rho + - screened_rates(k_Ca42_He4_to_p_Sc45_reaclib)*Y(Ca42)*state.rho + - screened_rates(k_Cl33_He4_to_K37_reaclib)*Y(Cl33)*state.rho + - screened_rates(k_Cl33_He4_to_p_Ar36_reaclib)*Y(Cl33)*state.rho + - screened_rates(k_Cl35_He4_to_K39_reaclib)*Y(Cl35)*state.rho + - screened_rates(k_Cl35_He4_to_p_Ar38_reaclib)*Y(Cl35)*state.rho + - screened_rates(k_Co55_He4_to_Cu59_reaclib)*Y(Co55)*state.rho + - screened_rates(k_Co55_He4_to_p_Ni58_reaclib)*Y(Co55)*state.rho + - screened_rates(k_Co56_He4_to_n_Cu59_reaclib)*Y(Co56)*state.rho + - screened_rates(k_Co57_He4_to_p_Ni60_reaclib)*Y(Co57)*state.rho + - screened_rates(k_Cr48_He4_to_Fe52_reaclib)*Y(Cr48)*state.rho + - screened_rates(k_Cr48_He4_to_p_Mn51_reaclib)*Y(Cr48)*state.rho + - screened_rates(k_Cr50_He4_to_Fe54_reaclib)*Y(Cr50)*state.rho + - screened_rates(k_Cr50_He4_to_p_Mn53_reaclib)*Y(Cr50)*state.rho + - screened_rates(k_Cr52_He4_to_Fe56_reaclib)*Y(Cr52)*state.rho + - screened_rates(k_Cr52_He4_to_p_Mn55_reaclib)*Y(Cr52)*state.rho + - screened_rates(k_Cr54_He4_to_Fe58_reaclib)*Y(Cr54)*state.rho + - screened_rates(k_Fe52_He4_to_Ni56_reaclib)*Y(Fe52)*state.rho + - screened_rates(k_Fe52_He4_to_p_Co55_reaclib)*Y(Fe52)*state.rho + - screened_rates(k_Fe54_He4_to_Ni58_reaclib)*Y(Fe54)*state.rho + - screened_rates(k_Fe54_He4_to_p_Co57_reaclib)*Y(Fe54)*state.rho + - screened_rates(k_Fe56_He4_to_Ni60_reaclib)*Y(Fe56)*state.rho + - screened_rates(k_Fe56_He4_to_p_Co59_reaclib)*Y(Fe56)*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_K37_He4_to_Sc41_reaclib)*Y(K37)*state.rho + - screened_rates(k_K37_He4_to_p_Ca40_reaclib)*Y(K37)*state.rho + - screened_rates(k_K39_He4_to_Sc43_reaclib)*Y(K39)*state.rho + - screened_rates(k_K39_He4_to_p_Ca42_reaclib)*Y(K39)*state.rho + - screened_rates(k_Mg23_He4_to_Si27_reaclib)*Y(Mg23)*state.rho + - screened_rates(k_Mg24_He4_to_C12_O16_reaclib)*Y(Mg24)*state.rho + - screened_rates(k_Mg24_He4_to_Si28_reaclib)*Y(Mg24)*state.rho + - screened_rates(k_Mg24_He4_to_n_Si27_reaclib)*Y(Mg24)*state.rho + - screened_rates(k_Mg24_He4_to_p_Al27_reaclib)*Y(Mg24)*state.rho + - screened_rates(k_Mn51_He4_to_Co55_reaclib)*Y(Mn51)*state.rho + - screened_rates(k_Mn51_He4_to_p_Fe54_reaclib)*Y(Mn51)*state.rho + - screened_rates(k_Mn53_He4_to_Co57_reaclib)*Y(Mn53)*state.rho + - screened_rates(k_Mn53_He4_to_n_Co56_reaclib)*Y(Mn53)*state.rho + - screened_rates(k_Mn53_He4_to_p_Fe56_reaclib)*Y(Mn53)*state.rho + - screened_rates(k_Mn55_He4_to_Co59_reaclib)*Y(Mn55)*state.rho + - screened_rates(k_Mn55_He4_to_p_Fe58_reaclib)*Y(Mn55)*state.rho + - screened_rates(k_Ne20_He4_to_C12_C12_approx)*Y(Ne20)*state.rho + - screened_rates(k_Ne20_He4_to_Mg24_approx)*Y(Ne20)*state.rho + - screened_rates(k_Ne20_He4_to_n_Mg23_reaclib)*Y(Ne20)*state.rho + - screened_rates(k_Ni56_He4_to_Zn60_reaclib)*Y(Ni56)*state.rho + - screened_rates(k_Ni56_He4_to_p_Cu59_reaclib)*Y(Ni56)*state.rho + - screened_rates(k_O16_He4_to_Ne20_reaclib)*Y(O16)*state.rho + - screened_rates(k_P29_He4_to_Cl33_reaclib)*Y(P29)*state.rho + - screened_rates(k_P29_He4_to_p_S32_reaclib)*Y(P29)*state.rho + - screened_rates(k_P31_He4_to_Cl35_reaclib)*Y(P31)*state.rho + - screened_rates(k_P31_He4_to_p_S34_reaclib)*Y(P31)*state.rho + - screened_rates(k_P33_He4_to_Cl37_reaclib)*Y(P33)*state.rho + - screened_rates(k_S32_He4_to_Ar36_reaclib)*Y(S32)*state.rho + - screened_rates(k_S32_He4_to_p_Cl35_reaclib)*Y(S32)*state.rho + - screened_rates(k_S33_He4_to_Ar37_reaclib)*Y(S33)*state.rho + - screened_rates(k_S33_He4_to_n_Ar36_reaclib)*Y(S33)*state.rho + - screened_rates(k_S34_He4_to_Ar38_reaclib)*Y(S34)*state.rho + - screened_rates(k_S34_He4_to_n_Ar37_reaclib)*Y(S34)*state.rho + - screened_rates(k_S34_He4_to_p_Cl37_reaclib)*Y(S34)*state.rho + - screened_rates(k_S35_He4_to_n_Ar38_reaclib)*Y(S35)*state.rho + - screened_rates(k_Sc41_He4_to_p_Ti44_reaclib)*Y(Sc41)*state.rho + - screened_rates(k_Sc43_He4_to_V47_reaclib)*Y(Sc43)*state.rho + - screened_rates(k_Sc43_He4_to_p_Ti46_reaclib)*Y(Sc43)*state.rho + - screened_rates(k_Sc45_He4_to_V49_reaclib)*Y(Sc45)*state.rho + - screened_rates(k_Sc45_He4_to_p_Ti48_reaclib)*Y(Sc45)*state.rho + - screened_rates(k_Si28_He4_to_C12_Ne20_reaclib)*Y(Si28)*state.rho + - screened_rates(k_Si28_He4_to_O16_O16_reaclib)*Y(Si28)*state.rho + - screened_rates(k_Si28_He4_to_S32_reaclib)*Y(Si28)*state.rho + - screened_rates(k_Si28_He4_to_p_P31_reaclib)*Y(Si28)*state.rho + - screened_rates(k_Si29_He4_to_S33_reaclib)*Y(Si29)*state.rho + - screened_rates(k_Si29_He4_to_n_S32_reaclib)*Y(Si29)*state.rho + - screened_rates(k_Si30_He4_to_S34_reaclib)*Y(Si30)*state.rho + - screened_rates(k_Si30_He4_to_n_S33_reaclib)*Y(Si30)*state.rho + - screened_rates(k_Si30_He4_to_p_P33_reaclib)*Y(Si30)*state.rho + - screened_rates(k_Si31_He4_to_S35_reaclib)*Y(Si31)*state.rho + - screened_rates(k_Si31_He4_to_n_S34_reaclib)*Y(Si31)*state.rho + - screened_rates(k_Ti44_He4_to_Cr48_reaclib)*Y(Ti44)*state.rho + - screened_rates(k_Ti44_He4_to_p_V47_reaclib)*Y(Ti44)*state.rho + - screened_rates(k_Ti46_He4_to_Cr50_reaclib)*Y(Ti46)*state.rho + - screened_rates(k_Ti46_He4_to_p_V49_reaclib)*Y(Ti46)*state.rho + - screened_rates(k_Ti48_He4_to_Cr52_reaclib)*Y(Ti48)*state.rho + - screened_rates(k_Ti48_He4_to_p_V51_reaclib)*Y(Ti48)*state.rho + - screened_rates(k_V47_He4_to_Mn51_reaclib)*Y(V47)*state.rho + - screened_rates(k_V47_He4_to_p_Cr50_reaclib)*Y(V47)*state.rho + - screened_rates(k_V49_He4_to_Mn53_reaclib)*Y(V49)*state.rho + - screened_rates(k_V49_He4_to_p_Cr52_reaclib)*Y(V49)*state.rho + - screened_rates(k_V51_He4_to_Mn55_reaclib)*Y(V51)*state.rho + - screened_rates(k_V51_He4_to_p_Cr54_reaclib)*Y(V51)*state.rho; + jac.set(He4, He4, scratch); + + scratch = 1.0*screened_rates(k_C12_C12_to_Ne20_He4_approx)*Y(C12)*state.rho + - screened_rates(k_C12_He4_to_O16_reaclib)*Y(He4)*state.rho + + 3.0*screened_rates(k_C12_to_3He4_reaclib) + + screened_rates(k_Ne20_C12_to_He4_Si28_reaclib)*Y(Ne20)*state.rho + + screened_rates(k_O16_C12_to_He4_Mg24_reaclib)*Y(O16)*state.rho; + jac.set(He4, C12, scratch); + + scratch = screened_rates(k_O16_C12_to_He4_Mg24_reaclib)*Y(C12)*state.rho + - screened_rates(k_O16_He4_to_Ne20_reaclib)*Y(He4)*state.rho + + 1.0*screened_rates(k_O16_O16_to_He4_Si28_reaclib)*Y(O16)*state.rho + + screened_rates(k_O16_to_He4_C12_reaclib); + jac.set(He4, O16, scratch); + + scratch = screened_rates(k_Ne20_C12_to_He4_Si28_reaclib)*Y(C12)*state.rho + - screened_rates(k_Ne20_He4_to_C12_C12_approx)*Y(He4)*state.rho + - screened_rates(k_Ne20_He4_to_Mg24_approx)*Y(He4)*state.rho + - screened_rates(k_Ne20_He4_to_n_Mg23_reaclib)*Y(He4)*state.rho + + screened_rates(k_Ne20_to_He4_O16_reaclib); + jac.set(He4, Ne20, scratch); + + scratch = -screened_rates(k_Mg23_He4_to_Si27_reaclib)*Y(He4)*state.rho + + screened_rates(k_Mg23_n_to_He4_Ne20_reaclib)*Y(N)*state.rho; + jac.set(He4, Mg23, scratch); + + scratch = -screened_rates(k_Mg24_He4_to_C12_O16_reaclib)*Y(He4)*state.rho + - screened_rates(k_Mg24_He4_to_Si28_reaclib)*Y(He4)*state.rho + - screened_rates(k_Mg24_He4_to_n_Si27_reaclib)*Y(He4)*state.rho + - screened_rates(k_Mg24_He4_to_p_Al27_reaclib)*Y(He4)*state.rho + + screened_rates(k_Mg24_to_Ne20_He4_approx); + jac.set(He4, Mg24, scratch); + + scratch = -screened_rates(k_Al27_He4_to_P31_reaclib)*Y(He4)*state.rho + - screened_rates(k_Al27_He4_to_p_Si30_reaclib)*Y(He4)*state.rho + + screened_rates(k_Al27_p_to_He4_Mg24_reaclib)*Y(H1)*state.rho; + jac.set(He4, Al27, scratch); + + scratch = screened_rates(k_Si27_n_to_He4_Mg24_reaclib)*Y(N)*state.rho + + screened_rates(k_Si27_to_He4_Mg23_reaclib); + jac.set(He4, Si27, scratch); + + scratch = -screened_rates(k_Si28_He4_to_C12_Ne20_reaclib)*Y(He4)*state.rho + - screened_rates(k_Si28_He4_to_O16_O16_reaclib)*Y(He4)*state.rho + - screened_rates(k_Si28_He4_to_S32_reaclib)*Y(He4)*state.rho + - screened_rates(k_Si28_He4_to_p_P31_reaclib)*Y(He4)*state.rho + + screened_rates(k_Si28_to_He4_Mg24_reaclib); + jac.set(He4, Si28, scratch); + + scratch = -screened_rates(k_Si29_He4_to_S33_reaclib)*Y(He4)*state.rho + - screened_rates(k_Si29_He4_to_n_S32_reaclib)*Y(He4)*state.rho; + jac.set(He4, Si29, scratch); + + scratch = -screened_rates(k_Si30_He4_to_S34_reaclib)*Y(He4)*state.rho + - screened_rates(k_Si30_He4_to_n_S33_reaclib)*Y(He4)*state.rho + - screened_rates(k_Si30_He4_to_p_P33_reaclib)*Y(He4)*state.rho + + screened_rates(k_Si30_p_to_He4_Al27_reaclib)*Y(H1)*state.rho; + jac.set(He4, Si30, scratch); + + scratch = -screened_rates(k_Si31_He4_to_S35_reaclib)*Y(He4)*state.rho + - screened_rates(k_Si31_He4_to_n_S34_reaclib)*Y(He4)*state.rho; + jac.set(He4, Si31, scratch); + + scratch = -screened_rates(k_P29_He4_to_Cl33_reaclib)*Y(He4)*state.rho + - screened_rates(k_P29_He4_to_p_S32_reaclib)*Y(He4)*state.rho; + jac.set(He4, P29, scratch); + + scratch = -screened_rates(k_P31_He4_to_Cl35_reaclib)*Y(He4)*state.rho + - screened_rates(k_P31_He4_to_p_S34_reaclib)*Y(He4)*state.rho + + screened_rates(k_P31_p_to_He4_Si28_reaclib)*Y(H1)*state.rho + + screened_rates(k_P31_to_He4_Al27_reaclib); + jac.set(He4, P31, scratch); + + scratch = -screened_rates(k_P33_He4_to_Cl37_reaclib)*Y(He4)*state.rho + + screened_rates(k_P33_p_to_He4_Si30_reaclib)*Y(H1)*state.rho; + jac.set(He4, P33, scratch); + + scratch = -screened_rates(k_S32_He4_to_Ar36_reaclib)*Y(He4)*state.rho + - screened_rates(k_S32_He4_to_p_Cl35_reaclib)*Y(He4)*state.rho + + screened_rates(k_S32_n_to_He4_Si29_reaclib)*Y(N)*state.rho + + screened_rates(k_S32_p_to_He4_P29_reaclib)*Y(H1)*state.rho + + screened_rates(k_S32_to_He4_Si28_reaclib); + jac.set(He4, S32, scratch); + + scratch = -screened_rates(k_S33_He4_to_Ar37_reaclib)*Y(He4)*state.rho + - screened_rates(k_S33_He4_to_n_Ar36_reaclib)*Y(He4)*state.rho + + screened_rates(k_S33_n_to_He4_Si30_reaclib)*Y(N)*state.rho + + screened_rates(k_S33_to_He4_Si29_reaclib); + jac.set(He4, S33, scratch); + + scratch = -screened_rates(k_S34_He4_to_Ar38_reaclib)*Y(He4)*state.rho + - screened_rates(k_S34_He4_to_n_Ar37_reaclib)*Y(He4)*state.rho + - screened_rates(k_S34_He4_to_p_Cl37_reaclib)*Y(He4)*state.rho + + screened_rates(k_S34_n_to_He4_Si31_reaclib)*Y(N)*state.rho + + screened_rates(k_S34_p_to_He4_P31_reaclib)*Y(H1)*state.rho + + screened_rates(k_S34_to_He4_Si30_reaclib); + jac.set(He4, S34, scratch); + + scratch = -screened_rates(k_S35_He4_to_n_Ar38_reaclib)*Y(He4)*state.rho + + screened_rates(k_S35_to_He4_Si31_reaclib); + jac.set(He4, S35, scratch); + + scratch = -screened_rates(k_Cl33_He4_to_K37_reaclib)*Y(He4)*state.rho + - screened_rates(k_Cl33_He4_to_p_Ar36_reaclib)*Y(He4)*state.rho + + screened_rates(k_Cl33_to_He4_P29_reaclib); + jac.set(He4, Cl33, scratch); + + scratch = -screened_rates(k_Cl35_He4_to_K39_reaclib)*Y(He4)*state.rho + - screened_rates(k_Cl35_He4_to_p_Ar38_reaclib)*Y(He4)*state.rho + + screened_rates(k_Cl35_p_to_He4_S32_reaclib)*Y(H1)*state.rho + + screened_rates(k_Cl35_to_He4_P31_reaclib); + jac.set(He4, Cl35, scratch); + + scratch = screened_rates(k_Cl37_p_to_He4_S34_reaclib)*Y(H1)*state.rho + + screened_rates(k_Cl37_to_He4_P33_reaclib); + jac.set(He4, Cl37, scratch); + + scratch = -screened_rates(k_Ar36_He4_to_Ca40_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ar36_He4_to_p_K39_reaclib)*Y(He4)*state.rho + + screened_rates(k_Ar36_n_to_He4_S33_reaclib)*Y(N)*state.rho + + screened_rates(k_Ar36_p_to_He4_Cl33_reaclib)*Y(H1)*state.rho + + screened_rates(k_Ar36_to_He4_S32_reaclib); + jac.set(He4, Ar36, scratch); + + scratch = -screened_rates(k_Ar37_He4_to_n_Ca40_reaclib)*Y(He4)*state.rho + + screened_rates(k_Ar37_n_to_He4_S34_reaclib)*Y(N)*state.rho + + screened_rates(k_Ar37_to_He4_S33_reaclib); + jac.set(He4, Ar37, scratch); + + scratch = -screened_rates(k_Ar38_He4_to_Ca42_reaclib)*Y(He4)*state.rho + + screened_rates(k_Ar38_n_to_He4_S35_reaclib)*Y(N)*state.rho + + screened_rates(k_Ar38_p_to_He4_Cl35_reaclib)*Y(H1)*state.rho + + screened_rates(k_Ar38_to_He4_S34_reaclib); + jac.set(He4, Ar38, scratch); + + scratch = -screened_rates(k_K37_He4_to_Sc41_reaclib)*Y(He4)*state.rho + - screened_rates(k_K37_He4_to_p_Ca40_reaclib)*Y(He4)*state.rho + + screened_rates(k_K37_to_He4_Cl33_reaclib); + jac.set(He4, K37, scratch); + + scratch = -screened_rates(k_K39_He4_to_Sc43_reaclib)*Y(He4)*state.rho + - screened_rates(k_K39_He4_to_p_Ca42_reaclib)*Y(He4)*state.rho + + screened_rates(k_K39_p_to_He4_Ar36_reaclib)*Y(H1)*state.rho + + screened_rates(k_K39_to_He4_Cl35_reaclib); + jac.set(He4, K39, scratch); + + scratch = -screened_rates(k_Ca40_He4_to_Ti44_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ca40_He4_to_p_Sc43_reaclib)*Y(He4)*state.rho + + screened_rates(k_Ca40_n_to_He4_Ar37_reaclib)*Y(N)*state.rho + + screened_rates(k_Ca40_p_to_He4_K37_reaclib)*Y(H1)*state.rho + + screened_rates(k_Ca40_to_He4_Ar36_reaclib); + jac.set(He4, Ca40, scratch); + + scratch = -screened_rates(k_Ca42_He4_to_Ti46_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ca42_He4_to_p_Sc45_reaclib)*Y(He4)*state.rho + + screened_rates(k_Ca42_p_to_He4_K39_reaclib)*Y(H1)*state.rho + + screened_rates(k_Ca42_to_He4_Ar38_reaclib); + jac.set(He4, Ca42, scratch); + + scratch = -screened_rates(k_Sc41_He4_to_p_Ti44_reaclib)*Y(He4)*state.rho + + screened_rates(k_Sc41_to_He4_K37_reaclib); + jac.set(He4, Sc41, scratch); + + scratch = -screened_rates(k_Sc43_He4_to_V47_reaclib)*Y(He4)*state.rho + - screened_rates(k_Sc43_He4_to_p_Ti46_reaclib)*Y(He4)*state.rho + + screened_rates(k_Sc43_p_to_He4_Ca40_reaclib)*Y(H1)*state.rho + + screened_rates(k_Sc43_to_He4_K39_reaclib); + jac.set(He4, Sc43, scratch); + + scratch = -screened_rates(k_Sc45_He4_to_V49_reaclib)*Y(He4)*state.rho + - screened_rates(k_Sc45_He4_to_p_Ti48_reaclib)*Y(He4)*state.rho + + screened_rates(k_Sc45_p_to_He4_Ca42_reaclib)*Y(H1)*state.rho; + jac.set(He4, Sc45, scratch); + + scratch = -screened_rates(k_Ti44_He4_to_Cr48_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ti44_He4_to_p_V47_reaclib)*Y(He4)*state.rho + + screened_rates(k_Ti44_p_to_He4_Sc41_reaclib)*Y(H1)*state.rho + + screened_rates(k_Ti44_to_He4_Ca40_reaclib); + jac.set(He4, Ti44, scratch); + + scratch = -screened_rates(k_Ti46_He4_to_Cr50_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ti46_He4_to_p_V49_reaclib)*Y(He4)*state.rho + + screened_rates(k_Ti46_p_to_He4_Sc43_reaclib)*Y(H1)*state.rho + + screened_rates(k_Ti46_to_He4_Ca42_reaclib); + jac.set(He4, Ti46, scratch); + + scratch = -screened_rates(k_Ti48_He4_to_Cr52_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ti48_He4_to_p_V51_reaclib)*Y(He4)*state.rho + + screened_rates(k_Ti48_p_to_He4_Sc45_reaclib)*Y(H1)*state.rho; + jac.set(He4, Ti48, scratch); + + scratch = -screened_rates(k_V47_He4_to_Mn51_reaclib)*Y(He4)*state.rho + - screened_rates(k_V47_He4_to_p_Cr50_reaclib)*Y(He4)*state.rho + + screened_rates(k_V47_p_to_He4_Ti44_reaclib)*Y(H1)*state.rho + + screened_rates(k_V47_to_He4_Sc43_reaclib); + jac.set(He4, V47, scratch); + + scratch = -screened_rates(k_V49_He4_to_Mn53_reaclib)*Y(He4)*state.rho + - screened_rates(k_V49_He4_to_p_Cr52_reaclib)*Y(He4)*state.rho + + screened_rates(k_V49_p_to_He4_Ti46_reaclib)*Y(H1)*state.rho + + screened_rates(k_V49_to_He4_Sc45_reaclib); + jac.set(He4, V49, scratch); + + scratch = -screened_rates(k_V51_He4_to_Mn55_reaclib)*Y(He4)*state.rho + - screened_rates(k_V51_He4_to_p_Cr54_reaclib)*Y(He4)*state.rho + + screened_rates(k_V51_p_to_He4_Ti48_reaclib)*Y(H1)*state.rho; + jac.set(He4, V51, scratch); + + scratch = -screened_rates(k_Cr48_He4_to_Fe52_reaclib)*Y(He4)*state.rho + - screened_rates(k_Cr48_He4_to_p_Mn51_reaclib)*Y(He4)*state.rho + + screened_rates(k_Cr48_to_He4_Ti44_reaclib); + jac.set(He4, Cr48, scratch); + + scratch = -screened_rates(k_Cr50_He4_to_Fe54_reaclib)*Y(He4)*state.rho + - screened_rates(k_Cr50_He4_to_p_Mn53_reaclib)*Y(He4)*state.rho + + screened_rates(k_Cr50_p_to_He4_V47_reaclib)*Y(H1)*state.rho + + screened_rates(k_Cr50_to_He4_Ti46_reaclib); + jac.set(He4, Cr50, scratch); + + scratch = -screened_rates(k_Cr52_He4_to_Fe56_reaclib)*Y(He4)*state.rho + - screened_rates(k_Cr52_He4_to_p_Mn55_reaclib)*Y(He4)*state.rho + + screened_rates(k_Cr52_p_to_He4_V49_reaclib)*Y(H1)*state.rho + + screened_rates(k_Cr52_to_He4_Ti48_reaclib); + jac.set(He4, Cr52, scratch); + + scratch = -screened_rates(k_Cr54_He4_to_Fe58_reaclib)*Y(He4)*state.rho + + screened_rates(k_Cr54_p_to_He4_V51_reaclib)*Y(H1)*state.rho; + jac.set(He4, Cr54, scratch); + + scratch = -screened_rates(k_Mn51_He4_to_Co55_reaclib)*Y(He4)*state.rho + - screened_rates(k_Mn51_He4_to_p_Fe54_reaclib)*Y(He4)*state.rho + + screened_rates(k_Mn51_p_to_He4_Cr48_reaclib)*Y(H1)*state.rho + + screened_rates(k_Mn51_to_He4_V47_reaclib); + jac.set(He4, Mn51, scratch); + + scratch = -screened_rates(k_Mn53_He4_to_Co57_reaclib)*Y(He4)*state.rho + - screened_rates(k_Mn53_He4_to_n_Co56_reaclib)*Y(He4)*state.rho + - screened_rates(k_Mn53_He4_to_p_Fe56_reaclib)*Y(He4)*state.rho + + screened_rates(k_Mn53_p_to_He4_Cr50_reaclib)*Y(H1)*state.rho + + screened_rates(k_Mn53_to_He4_V49_reaclib); + jac.set(He4, Mn53, scratch); + + scratch = -screened_rates(k_Mn55_He4_to_Co59_reaclib)*Y(He4)*state.rho + - screened_rates(k_Mn55_He4_to_p_Fe58_reaclib)*Y(He4)*state.rho + + screened_rates(k_Mn55_p_to_He4_Cr52_reaclib)*Y(H1)*state.rho + + screened_rates(k_Mn55_to_He4_V51_reaclib); + jac.set(He4, Mn55, scratch); + + scratch = -screened_rates(k_Fe52_He4_to_Ni56_reaclib)*Y(He4)*state.rho + - screened_rates(k_Fe52_He4_to_p_Co55_reaclib)*Y(He4)*state.rho + + screened_rates(k_Fe52_to_He4_Cr48_reaclib); + jac.set(He4, Fe52, scratch); + + scratch = -screened_rates(k_Fe54_He4_to_Ni58_reaclib)*Y(He4)*state.rho + - screened_rates(k_Fe54_He4_to_p_Co57_reaclib)*Y(He4)*state.rho + + screened_rates(k_Fe54_p_to_He4_Mn51_reaclib)*Y(H1)*state.rho + + screened_rates(k_Fe54_to_He4_Cr50_reaclib); + jac.set(He4, Fe54, scratch); + + scratch = -screened_rates(k_Fe56_He4_to_Ni60_reaclib)*Y(He4)*state.rho + - screened_rates(k_Fe56_He4_to_p_Co59_reaclib)*Y(He4)*state.rho + + screened_rates(k_Fe56_p_to_He4_Mn53_reaclib)*Y(H1)*state.rho + + screened_rates(k_Fe56_to_He4_Cr52_reaclib); + jac.set(He4, Fe56, scratch); + + scratch = screened_rates(k_Fe58_p_to_He4_Mn55_reaclib)*Y(H1)*state.rho + + screened_rates(k_Fe58_to_He4_Cr54_reaclib); + jac.set(He4, Fe58, scratch); + + scratch = -screened_rates(k_Co55_He4_to_Cu59_reaclib)*Y(He4)*state.rho + - screened_rates(k_Co55_He4_to_p_Ni58_reaclib)*Y(He4)*state.rho + + screened_rates(k_Co55_p_to_He4_Fe52_reaclib)*Y(H1)*state.rho + + screened_rates(k_Co55_to_He4_Mn51_reaclib); + jac.set(He4, Co55, scratch); + + scratch = -screened_rates(k_Co56_He4_to_n_Cu59_reaclib)*Y(He4)*state.rho + + screened_rates(k_Co56_n_to_He4_Mn53_reaclib)*Y(N)*state.rho; + jac.set(He4, Co56, scratch); + + scratch = -screened_rates(k_Co57_He4_to_p_Ni60_reaclib)*Y(He4)*state.rho + + screened_rates(k_Co57_p_to_He4_Fe54_reaclib)*Y(H1)*state.rho + + screened_rates(k_Co57_to_He4_Mn53_reaclib); + jac.set(He4, Co57, scratch); + + scratch = screened_rates(k_Co59_p_to_He4_Fe56_reaclib)*Y(H1)*state.rho + + screened_rates(k_Co59_to_He4_Mn55_reaclib); + jac.set(He4, Co59, scratch); + + scratch = -screened_rates(k_Ni56_He4_to_Zn60_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ni56_He4_to_p_Cu59_reaclib)*Y(He4)*state.rho + + screened_rates(k_Ni56_to_He4_Fe52_reaclib); + jac.set(He4, Ni56, scratch); + + scratch = screened_rates(k_Ni58_p_to_He4_Co55_reaclib)*Y(H1)*state.rho + + screened_rates(k_Ni58_to_He4_Fe54_reaclib); + jac.set(He4, Ni58, scratch); + + scratch = screened_rates(k_Ni60_p_to_He4_Co57_reaclib)*Y(H1)*state.rho + + screened_rates(k_Ni60_to_He4_Fe56_reaclib); + jac.set(He4, Ni60, scratch); + + scratch = screened_rates(k_Cu59_n_to_He4_Co56_reaclib)*Y(N)*state.rho + + screened_rates(k_Cu59_p_to_He4_Ni56_reaclib)*Y(H1)*state.rho + + screened_rates(k_Cu59_to_He4_Co55_reaclib); + jac.set(He4, Cu59, scratch); + + scratch = screened_rates(k_Zn60_to_He4_Ni56_reaclib); + jac.set(He4, Zn60, scratch); + + + // C12 row + + scratch = 2.0*screened_rates(k_Mg23_n_to_C12_C12_reaclib)*Y(Mg23)*state.rho + + screened_rates(k_Si27_n_to_C12_O16_reaclib)*Y(Si27)*state.rho; + jac.set(C12, N, scratch); + + scratch = screened_rates(k_Al27_p_to_C12_O16_reaclib)*Y(Al27)*state.rho + + screened_rates(k_P31_p_to_C12_Ne20_reaclib)*Y(P31)*state.rho; + jac.set(C12, H1, scratch); + + scratch = -screened_rates(k_C12_He4_to_O16_reaclib)*Y(C12)*state.rho + + 0.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_Mg24_He4_to_C12_O16_reaclib)*Y(Mg24)*state.rho + + 2.0*screened_rates(k_Ne20_He4_to_C12_C12_approx)*Y(Ne20)*state.rho + + screened_rates(k_Si28_He4_to_C12_Ne20_reaclib)*Y(Si28)*state.rho; + jac.set(C12, He4, scratch); + + scratch = -2.0*screened_rates(k_C12_C12_to_Mg24_approx)*Y(C12)*state.rho + - 2.0*screened_rates(k_C12_C12_to_Ne20_He4_approx)*Y(C12)*state.rho + - 2.0*screened_rates(k_C12_C12_to_n_Mg23_reaclib)*Y(C12)*state.rho + - screened_rates(k_C12_He4_to_O16_reaclib)*Y(He4)*state.rho + - screened_rates(k_C12_to_3He4_reaclib) + - screened_rates(k_Ne20_C12_to_He4_Si28_reaclib)*Y(Ne20)*state.rho + - screened_rates(k_Ne20_C12_to_p_P31_reaclib)*Y(Ne20)*state.rho + - screened_rates(k_O16_C12_to_He4_Mg24_reaclib)*Y(O16)*state.rho + - screened_rates(k_O16_C12_to_n_Si27_reaclib)*Y(O16)*state.rho + - screened_rates(k_O16_C12_to_p_Al27_reaclib)*Y(O16)*state.rho; + jac.set(C12, C12, scratch); + + scratch = -screened_rates(k_O16_C12_to_He4_Mg24_reaclib)*Y(C12)*state.rho + - screened_rates(k_O16_C12_to_n_Si27_reaclib)*Y(C12)*state.rho + - screened_rates(k_O16_C12_to_p_Al27_reaclib)*Y(C12)*state.rho + + screened_rates(k_O16_to_He4_C12_reaclib); + jac.set(C12, O16, scratch); + + scratch = -screened_rates(k_Ne20_C12_to_He4_Si28_reaclib)*Y(C12)*state.rho + - screened_rates(k_Ne20_C12_to_p_P31_reaclib)*Y(C12)*state.rho + + 2.0*screened_rates(k_Ne20_He4_to_C12_C12_approx)*Y(He4)*state.rho; + jac.set(C12, Ne20, scratch); + + scratch = 2.0*screened_rates(k_Mg23_n_to_C12_C12_reaclib)*Y(N)*state.rho; + jac.set(C12, Mg23, scratch); + + scratch = screened_rates(k_Mg24_He4_to_C12_O16_reaclib)*Y(He4)*state.rho + + 2.0*screened_rates(k_Mg24_to_C12_C12_approx); + jac.set(C12, Mg24, scratch); + + scratch = screened_rates(k_Al27_p_to_C12_O16_reaclib)*Y(H1)*state.rho; + jac.set(C12, Al27, scratch); + + scratch = screened_rates(k_Si27_n_to_C12_O16_reaclib)*Y(N)*state.rho; + jac.set(C12, Si27, scratch); + + scratch = screened_rates(k_Si28_He4_to_C12_Ne20_reaclib)*Y(He4)*state.rho; + jac.set(C12, Si28, scratch); + + jac.set(C12, Si29, 0.0); + + jac.set(C12, Si30, 0.0); + + jac.set(C12, Si31, 0.0); + + jac.set(C12, P29, 0.0); + + scratch = screened_rates(k_P31_p_to_C12_Ne20_reaclib)*Y(H1)*state.rho; + jac.set(C12, P31, scratch); + + jac.set(C12, P33, 0.0); + + jac.set(C12, S32, 0.0); + + jac.set(C12, S33, 0.0); + + jac.set(C12, S34, 0.0); + + jac.set(C12, S35, 0.0); + + jac.set(C12, Cl33, 0.0); + + jac.set(C12, Cl35, 0.0); + + jac.set(C12, Cl37, 0.0); + + jac.set(C12, Ar36, 0.0); + + jac.set(C12, Ar37, 0.0); + + jac.set(C12, Ar38, 0.0); + + jac.set(C12, K37, 0.0); + + jac.set(C12, K39, 0.0); + + jac.set(C12, Ca40, 0.0); + + jac.set(C12, Ca42, 0.0); + + jac.set(C12, Sc41, 0.0); + + jac.set(C12, Sc43, 0.0); + + jac.set(C12, Sc45, 0.0); + + jac.set(C12, Ti44, 0.0); + + jac.set(C12, Ti46, 0.0); + + jac.set(C12, Ti48, 0.0); + + jac.set(C12, V47, 0.0); + + jac.set(C12, V49, 0.0); + + jac.set(C12, V51, 0.0); + + jac.set(C12, Cr48, 0.0); + + jac.set(C12, Cr50, 0.0); + + jac.set(C12, Cr52, 0.0); + + jac.set(C12, Cr54, 0.0); + + jac.set(C12, Mn51, 0.0); + + jac.set(C12, Mn53, 0.0); + + jac.set(C12, Mn55, 0.0); + + jac.set(C12, Fe52, 0.0); + + jac.set(C12, Fe54, 0.0); + + jac.set(C12, Fe56, 0.0); + + jac.set(C12, Fe58, 0.0); + + jac.set(C12, Co55, 0.0); + + jac.set(C12, Co56, 0.0); + + jac.set(C12, Co57, 0.0); + + jac.set(C12, Co59, 0.0); + + jac.set(C12, Ni56, 0.0); + + jac.set(C12, Ni58, 0.0); + + jac.set(C12, Ni60, 0.0); + + jac.set(C12, Cu59, 0.0); + + jac.set(C12, Zn60, 0.0); + + + // O16 row + + scratch = screened_rates(k_Si27_n_to_C12_O16_reaclib)*Y(Si27)*state.rho; + jac.set(O16, N, scratch); + + scratch = screened_rates(k_Al27_p_to_C12_O16_reaclib)*Y(Al27)*state.rho + + 2.0*screened_rates(k_P31_p_to_O16_O16_reaclib)*Y(P31)*state.rho; + jac.set(O16, H1, scratch); + + scratch = screened_rates(k_C12_He4_to_O16_reaclib)*Y(C12)*state.rho + + screened_rates(k_Mg24_He4_to_C12_O16_reaclib)*Y(Mg24)*state.rho + - screened_rates(k_O16_He4_to_Ne20_reaclib)*Y(O16)*state.rho + + 2.0*screened_rates(k_Si28_He4_to_O16_O16_reaclib)*Y(Si28)*state.rho; + jac.set(O16, He4, scratch); + + scratch = screened_rates(k_C12_He4_to_O16_reaclib)*Y(He4)*state.rho + - screened_rates(k_O16_C12_to_He4_Mg24_reaclib)*Y(O16)*state.rho + - screened_rates(k_O16_C12_to_n_Si27_reaclib)*Y(O16)*state.rho + - screened_rates(k_O16_C12_to_p_Al27_reaclib)*Y(O16)*state.rho; + jac.set(O16, C12, scratch); + + scratch = -screened_rates(k_O16_C12_to_He4_Mg24_reaclib)*Y(C12)*state.rho + - screened_rates(k_O16_C12_to_n_Si27_reaclib)*Y(C12)*state.rho + - screened_rates(k_O16_C12_to_p_Al27_reaclib)*Y(C12)*state.rho + - screened_rates(k_O16_He4_to_Ne20_reaclib)*Y(He4)*state.rho + - 2.0*screened_rates(k_O16_O16_to_He4_Si28_reaclib)*Y(O16)*state.rho + - 2.0*screened_rates(k_O16_O16_to_p_P31_reaclib)*Y(O16)*state.rho + - screened_rates(k_O16_to_He4_C12_reaclib); + jac.set(O16, O16, scratch); + + scratch = screened_rates(k_Ne20_to_He4_O16_reaclib); + jac.set(O16, Ne20, scratch); + + jac.set(O16, Mg23, 0.0); + + scratch = screened_rates(k_Mg24_He4_to_C12_O16_reaclib)*Y(He4)*state.rho; + jac.set(O16, Mg24, scratch); + + scratch = screened_rates(k_Al27_p_to_C12_O16_reaclib)*Y(H1)*state.rho; + jac.set(O16, Al27, scratch); + + scratch = screened_rates(k_Si27_n_to_C12_O16_reaclib)*Y(N)*state.rho; + jac.set(O16, Si27, scratch); + + scratch = 2.0*screened_rates(k_Si28_He4_to_O16_O16_reaclib)*Y(He4)*state.rho; + jac.set(O16, Si28, scratch); + + jac.set(O16, Si29, 0.0); + + jac.set(O16, Si30, 0.0); + + jac.set(O16, Si31, 0.0); + + jac.set(O16, P29, 0.0); + + scratch = 2.0*screened_rates(k_P31_p_to_O16_O16_reaclib)*Y(H1)*state.rho; + jac.set(O16, P31, scratch); + + jac.set(O16, P33, 0.0); + + jac.set(O16, S32, 0.0); + + jac.set(O16, S33, 0.0); + + jac.set(O16, S34, 0.0); + + jac.set(O16, S35, 0.0); + + jac.set(O16, Cl33, 0.0); + + jac.set(O16, Cl35, 0.0); + + jac.set(O16, Cl37, 0.0); + + jac.set(O16, Ar36, 0.0); + + jac.set(O16, Ar37, 0.0); + + jac.set(O16, Ar38, 0.0); + + jac.set(O16, K37, 0.0); + + jac.set(O16, K39, 0.0); + + jac.set(O16, Ca40, 0.0); + + jac.set(O16, Ca42, 0.0); + + jac.set(O16, Sc41, 0.0); + + jac.set(O16, Sc43, 0.0); + + jac.set(O16, Sc45, 0.0); + + jac.set(O16, Ti44, 0.0); + + jac.set(O16, Ti46, 0.0); + + jac.set(O16, Ti48, 0.0); + + jac.set(O16, V47, 0.0); + + jac.set(O16, V49, 0.0); + + jac.set(O16, V51, 0.0); + + jac.set(O16, Cr48, 0.0); + + jac.set(O16, Cr50, 0.0); + + jac.set(O16, Cr52, 0.0); + + jac.set(O16, Cr54, 0.0); + + jac.set(O16, Mn51, 0.0); + + jac.set(O16, Mn53, 0.0); + + jac.set(O16, Mn55, 0.0); + + jac.set(O16, Fe52, 0.0); + + jac.set(O16, Fe54, 0.0); + + jac.set(O16, Fe56, 0.0); + + jac.set(O16, Fe58, 0.0); + + jac.set(O16, Co55, 0.0); + + jac.set(O16, Co56, 0.0); + + jac.set(O16, Co57, 0.0); + + jac.set(O16, Co59, 0.0); + + jac.set(O16, Ni56, 0.0); + + jac.set(O16, Ni58, 0.0); + + jac.set(O16, Ni60, 0.0); + + jac.set(O16, Cu59, 0.0); + + jac.set(O16, Zn60, 0.0); + + + // Ne20 row + + scratch = screened_rates(k_Mg23_n_to_He4_Ne20_reaclib)*Y(Mg23)*state.rho; + jac.set(Ne20, N, scratch); + + scratch = screened_rates(k_P31_p_to_C12_Ne20_reaclib)*Y(P31)*state.rho; + jac.set(Ne20, H1, scratch); + + scratch = -screened_rates(k_Ne20_He4_to_C12_C12_approx)*Y(Ne20)*state.rho + - screened_rates(k_Ne20_He4_to_Mg24_approx)*Y(Ne20)*state.rho + - screened_rates(k_Ne20_He4_to_n_Mg23_reaclib)*Y(Ne20)*state.rho + + screened_rates(k_O16_He4_to_Ne20_reaclib)*Y(O16)*state.rho + + screened_rates(k_Si28_He4_to_C12_Ne20_reaclib)*Y(Si28)*state.rho; + jac.set(Ne20, He4, scratch); + + scratch = 1.0*screened_rates(k_C12_C12_to_Ne20_He4_approx)*Y(C12)*state.rho + - screened_rates(k_Ne20_C12_to_He4_Si28_reaclib)*Y(Ne20)*state.rho + - screened_rates(k_Ne20_C12_to_p_P31_reaclib)*Y(Ne20)*state.rho; + jac.set(Ne20, C12, scratch); + + scratch = screened_rates(k_O16_He4_to_Ne20_reaclib)*Y(He4)*state.rho; + jac.set(Ne20, O16, scratch); + + scratch = -screened_rates(k_Ne20_C12_to_He4_Si28_reaclib)*Y(C12)*state.rho + - screened_rates(k_Ne20_C12_to_p_P31_reaclib)*Y(C12)*state.rho + - screened_rates(k_Ne20_He4_to_C12_C12_approx)*Y(He4)*state.rho + - screened_rates(k_Ne20_He4_to_Mg24_approx)*Y(He4)*state.rho + - screened_rates(k_Ne20_He4_to_n_Mg23_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ne20_to_He4_O16_reaclib); + jac.set(Ne20, Ne20, scratch); + + scratch = screened_rates(k_Mg23_n_to_He4_Ne20_reaclib)*Y(N)*state.rho; + jac.set(Ne20, Mg23, scratch); + + scratch = screened_rates(k_Mg24_to_Ne20_He4_approx); + jac.set(Ne20, Mg24, scratch); + + jac.set(Ne20, Al27, 0.0); + + jac.set(Ne20, Si27, 0.0); + + scratch = screened_rates(k_Si28_He4_to_C12_Ne20_reaclib)*Y(He4)*state.rho; + jac.set(Ne20, Si28, scratch); + + jac.set(Ne20, Si29, 0.0); + + jac.set(Ne20, Si30, 0.0); + + jac.set(Ne20, Si31, 0.0); + + jac.set(Ne20, P29, 0.0); + + scratch = screened_rates(k_P31_p_to_C12_Ne20_reaclib)*Y(H1)*state.rho; + jac.set(Ne20, P31, scratch); + + jac.set(Ne20, P33, 0.0); + + jac.set(Ne20, S32, 0.0); + + jac.set(Ne20, S33, 0.0); + + jac.set(Ne20, S34, 0.0); + + jac.set(Ne20, S35, 0.0); + + jac.set(Ne20, Cl33, 0.0); + + jac.set(Ne20, Cl35, 0.0); + + jac.set(Ne20, Cl37, 0.0); + + jac.set(Ne20, Ar36, 0.0); + + jac.set(Ne20, Ar37, 0.0); + + jac.set(Ne20, Ar38, 0.0); + + jac.set(Ne20, K37, 0.0); + + jac.set(Ne20, K39, 0.0); + + jac.set(Ne20, Ca40, 0.0); + + jac.set(Ne20, Ca42, 0.0); + + jac.set(Ne20, Sc41, 0.0); + + jac.set(Ne20, Sc43, 0.0); + + jac.set(Ne20, Sc45, 0.0); + + jac.set(Ne20, Ti44, 0.0); + + jac.set(Ne20, Ti46, 0.0); + + jac.set(Ne20, Ti48, 0.0); + + jac.set(Ne20, V47, 0.0); + + jac.set(Ne20, V49, 0.0); + + jac.set(Ne20, V51, 0.0); + + jac.set(Ne20, Cr48, 0.0); + + jac.set(Ne20, Cr50, 0.0); + + jac.set(Ne20, Cr52, 0.0); + + jac.set(Ne20, Cr54, 0.0); + + jac.set(Ne20, Mn51, 0.0); + + jac.set(Ne20, Mn53, 0.0); + + jac.set(Ne20, Mn55, 0.0); + + jac.set(Ne20, Fe52, 0.0); + + jac.set(Ne20, Fe54, 0.0); + + jac.set(Ne20, Fe56, 0.0); + + jac.set(Ne20, Fe58, 0.0); + + jac.set(Ne20, Co55, 0.0); + + jac.set(Ne20, Co56, 0.0); + + jac.set(Ne20, Co57, 0.0); + + jac.set(Ne20, Co59, 0.0); + + jac.set(Ne20, Ni56, 0.0); + + jac.set(Ne20, Ni58, 0.0); + + jac.set(Ne20, Ni60, 0.0); + + jac.set(Ne20, Cu59, 0.0); + + jac.set(Ne20, Zn60, 0.0); + + + // Mg23 row + + scratch = -screened_rates(k_Mg23_n_to_C12_C12_reaclib)*Y(Mg23)*state.rho + - screened_rates(k_Mg23_n_to_He4_Ne20_reaclib)*Y(Mg23)*state.rho + - screened_rates(k_Mg23_n_to_Mg24_reaclib)*Y(Mg23)*state.rho; + jac.set(Mg23, N, scratch); + + jac.set(Mg23, H1, 0.0); + + scratch = -screened_rates(k_Mg23_He4_to_Si27_reaclib)*Y(Mg23)*state.rho + + screened_rates(k_Ne20_He4_to_n_Mg23_reaclib)*Y(Ne20)*state.rho; + jac.set(Mg23, He4, scratch); + + scratch = 1.0*screened_rates(k_C12_C12_to_n_Mg23_reaclib)*Y(C12)*state.rho; + jac.set(Mg23, C12, scratch); + + jac.set(Mg23, O16, 0.0); + + scratch = screened_rates(k_Ne20_He4_to_n_Mg23_reaclib)*Y(He4)*state.rho; + jac.set(Mg23, Ne20, scratch); + + scratch = -screened_rates(k_Mg23_He4_to_Si27_reaclib)*Y(He4)*state.rho + - screened_rates(k_Mg23_n_to_C12_C12_reaclib)*Y(N)*state.rho + - screened_rates(k_Mg23_n_to_He4_Ne20_reaclib)*Y(N)*state.rho + - screened_rates(k_Mg23_n_to_Mg24_reaclib)*Y(N)*state.rho; + jac.set(Mg23, Mg23, scratch); + + scratch = screened_rates(k_Mg24_to_n_Mg23_reaclib); + jac.set(Mg23, Mg24, scratch); + + jac.set(Mg23, Al27, 0.0); + + scratch = screened_rates(k_Si27_to_He4_Mg23_reaclib); + jac.set(Mg23, Si27, scratch); + + jac.set(Mg23, Si28, 0.0); + + jac.set(Mg23, Si29, 0.0); + + jac.set(Mg23, Si30, 0.0); + + jac.set(Mg23, Si31, 0.0); + + jac.set(Mg23, P29, 0.0); + + jac.set(Mg23, P31, 0.0); + + jac.set(Mg23, P33, 0.0); + + jac.set(Mg23, S32, 0.0); + + jac.set(Mg23, S33, 0.0); + + jac.set(Mg23, S34, 0.0); + + jac.set(Mg23, S35, 0.0); + + jac.set(Mg23, Cl33, 0.0); + + jac.set(Mg23, Cl35, 0.0); + + jac.set(Mg23, Cl37, 0.0); + + jac.set(Mg23, Ar36, 0.0); + + jac.set(Mg23, Ar37, 0.0); + + jac.set(Mg23, Ar38, 0.0); + + jac.set(Mg23, K37, 0.0); + + jac.set(Mg23, K39, 0.0); + + jac.set(Mg23, Ca40, 0.0); + + jac.set(Mg23, Ca42, 0.0); + + jac.set(Mg23, Sc41, 0.0); + + jac.set(Mg23, Sc43, 0.0); + + jac.set(Mg23, Sc45, 0.0); + + jac.set(Mg23, Ti44, 0.0); + + jac.set(Mg23, Ti46, 0.0); + + jac.set(Mg23, Ti48, 0.0); + + jac.set(Mg23, V47, 0.0); + + jac.set(Mg23, V49, 0.0); + + jac.set(Mg23, V51, 0.0); + + jac.set(Mg23, Cr48, 0.0); + + jac.set(Mg23, Cr50, 0.0); + + jac.set(Mg23, Cr52, 0.0); + + jac.set(Mg23, Cr54, 0.0); + + jac.set(Mg23, Mn51, 0.0); + + jac.set(Mg23, Mn53, 0.0); + + jac.set(Mg23, Mn55, 0.0); + + jac.set(Mg23, Fe52, 0.0); + + jac.set(Mg23, Fe54, 0.0); + + jac.set(Mg23, Fe56, 0.0); + + jac.set(Mg23, Fe58, 0.0); + + jac.set(Mg23, Co55, 0.0); + + jac.set(Mg23, Co56, 0.0); + + jac.set(Mg23, Co57, 0.0); + + jac.set(Mg23, Co59, 0.0); + + jac.set(Mg23, Ni56, 0.0); + + jac.set(Mg23, Ni58, 0.0); + + jac.set(Mg23, Ni60, 0.0); + + jac.set(Mg23, Cu59, 0.0); + + jac.set(Mg23, Zn60, 0.0); + + + // Mg24 row + + scratch = screened_rates(k_Mg23_n_to_Mg24_reaclib)*Y(Mg23)*state.rho + + screened_rates(k_Si27_n_to_He4_Mg24_reaclib)*Y(Si27)*state.rho; + jac.set(Mg24, N, scratch); + + scratch = screened_rates(k_Al27_p_to_He4_Mg24_reaclib)*Y(Al27)*state.rho; + jac.set(Mg24, H1, scratch); + + scratch = -screened_rates(k_Mg24_He4_to_C12_O16_reaclib)*Y(Mg24)*state.rho + - screened_rates(k_Mg24_He4_to_Si28_reaclib)*Y(Mg24)*state.rho + - screened_rates(k_Mg24_He4_to_n_Si27_reaclib)*Y(Mg24)*state.rho + - screened_rates(k_Mg24_He4_to_p_Al27_reaclib)*Y(Mg24)*state.rho + + screened_rates(k_Ne20_He4_to_Mg24_approx)*Y(Ne20)*state.rho; + jac.set(Mg24, He4, scratch); + + scratch = 1.0*screened_rates(k_C12_C12_to_Mg24_approx)*Y(C12)*state.rho + + screened_rates(k_O16_C12_to_He4_Mg24_reaclib)*Y(O16)*state.rho; + jac.set(Mg24, C12, scratch); + + scratch = screened_rates(k_O16_C12_to_He4_Mg24_reaclib)*Y(C12)*state.rho; + jac.set(Mg24, O16, scratch); + + scratch = screened_rates(k_Ne20_He4_to_Mg24_approx)*Y(He4)*state.rho; + jac.set(Mg24, Ne20, scratch); + + scratch = screened_rates(k_Mg23_n_to_Mg24_reaclib)*Y(N)*state.rho; + jac.set(Mg24, Mg23, scratch); + + scratch = -screened_rates(k_Mg24_He4_to_C12_O16_reaclib)*Y(He4)*state.rho + - screened_rates(k_Mg24_He4_to_Si28_reaclib)*Y(He4)*state.rho + - screened_rates(k_Mg24_He4_to_n_Si27_reaclib)*Y(He4)*state.rho + - screened_rates(k_Mg24_He4_to_p_Al27_reaclib)*Y(He4)*state.rho + - screened_rates(k_Mg24_to_C12_C12_approx) + - screened_rates(k_Mg24_to_Ne20_He4_approx) + - screened_rates(k_Mg24_to_n_Mg23_reaclib); + jac.set(Mg24, Mg24, scratch); + + scratch = screened_rates(k_Al27_p_to_He4_Mg24_reaclib)*Y(H1)*state.rho; + jac.set(Mg24, Al27, scratch); + + scratch = screened_rates(k_Si27_n_to_He4_Mg24_reaclib)*Y(N)*state.rho; + jac.set(Mg24, Si27, scratch); + + scratch = screened_rates(k_Si28_to_He4_Mg24_reaclib); + jac.set(Mg24, Si28, scratch); + + jac.set(Mg24, Si29, 0.0); + + jac.set(Mg24, Si30, 0.0); + + jac.set(Mg24, Si31, 0.0); + + jac.set(Mg24, P29, 0.0); + + jac.set(Mg24, P31, 0.0); + + jac.set(Mg24, P33, 0.0); + + jac.set(Mg24, S32, 0.0); + + jac.set(Mg24, S33, 0.0); + + jac.set(Mg24, S34, 0.0); + + jac.set(Mg24, S35, 0.0); + + jac.set(Mg24, Cl33, 0.0); + + jac.set(Mg24, Cl35, 0.0); + + jac.set(Mg24, Cl37, 0.0); + + jac.set(Mg24, Ar36, 0.0); + + jac.set(Mg24, Ar37, 0.0); + + jac.set(Mg24, Ar38, 0.0); + + jac.set(Mg24, K37, 0.0); + + jac.set(Mg24, K39, 0.0); + + jac.set(Mg24, Ca40, 0.0); + + jac.set(Mg24, Ca42, 0.0); + + jac.set(Mg24, Sc41, 0.0); + + jac.set(Mg24, Sc43, 0.0); + + jac.set(Mg24, Sc45, 0.0); + + jac.set(Mg24, Ti44, 0.0); + + jac.set(Mg24, Ti46, 0.0); + + jac.set(Mg24, Ti48, 0.0); + + jac.set(Mg24, V47, 0.0); + + jac.set(Mg24, V49, 0.0); + + jac.set(Mg24, V51, 0.0); + + jac.set(Mg24, Cr48, 0.0); + + jac.set(Mg24, Cr50, 0.0); + + jac.set(Mg24, Cr52, 0.0); + + jac.set(Mg24, Cr54, 0.0); + + jac.set(Mg24, Mn51, 0.0); + + jac.set(Mg24, Mn53, 0.0); + + jac.set(Mg24, Mn55, 0.0); + + jac.set(Mg24, Fe52, 0.0); + + jac.set(Mg24, Fe54, 0.0); + + jac.set(Mg24, Fe56, 0.0); + + jac.set(Mg24, Fe58, 0.0); + + jac.set(Mg24, Co55, 0.0); + + jac.set(Mg24, Co56, 0.0); + + jac.set(Mg24, Co57, 0.0); + + jac.set(Mg24, Co59, 0.0); + + jac.set(Mg24, Ni56, 0.0); + + jac.set(Mg24, Ni58, 0.0); + + jac.set(Mg24, Ni60, 0.0); + + jac.set(Mg24, Cu59, 0.0); + + jac.set(Mg24, Zn60, 0.0); + + + // Al27 row + + scratch = screened_rates(k_Si27_n_to_p_Al27_reaclib)*Y(Si27)*state.rho; + jac.set(Al27, N, scratch); + + scratch = -screened_rates(k_Al27_p_to_C12_O16_reaclib)*Y(Al27)*state.rho + - screened_rates(k_Al27_p_to_He4_Mg24_reaclib)*Y(Al27)*state.rho + - screened_rates(k_Al27_p_to_Si28_reaclib)*Y(Al27)*state.rho + - screened_rates(k_Al27_p_to_n_Si27_reaclib)*Y(Al27)*state.rho + + screened_rates(k_Si30_p_to_He4_Al27_reaclib)*Y(Si30)*state.rho; + jac.set(Al27, H1, scratch); + + scratch = -screened_rates(k_Al27_He4_to_P31_reaclib)*Y(Al27)*state.rho + - screened_rates(k_Al27_He4_to_p_Si30_reaclib)*Y(Al27)*state.rho + + screened_rates(k_Mg24_He4_to_p_Al27_reaclib)*Y(Mg24)*state.rho; + jac.set(Al27, He4, scratch); + + scratch = screened_rates(k_O16_C12_to_p_Al27_reaclib)*Y(O16)*state.rho; + jac.set(Al27, C12, scratch); + + scratch = screened_rates(k_O16_C12_to_p_Al27_reaclib)*Y(C12)*state.rho; + jac.set(Al27, O16, scratch); + + jac.set(Al27, Ne20, 0.0); + + jac.set(Al27, Mg23, 0.0); + + scratch = screened_rates(k_Mg24_He4_to_p_Al27_reaclib)*Y(He4)*state.rho; + jac.set(Al27, Mg24, scratch); + + scratch = -screened_rates(k_Al27_He4_to_P31_reaclib)*Y(He4)*state.rho + - screened_rates(k_Al27_He4_to_p_Si30_reaclib)*Y(He4)*state.rho + - screened_rates(k_Al27_p_to_C12_O16_reaclib)*Y(H1)*state.rho + - screened_rates(k_Al27_p_to_He4_Mg24_reaclib)*Y(H1)*state.rho + - screened_rates(k_Al27_p_to_Si28_reaclib)*Y(H1)*state.rho + - screened_rates(k_Al27_p_to_n_Si27_reaclib)*Y(H1)*state.rho + - screened_rates(k_Al27_to_Si27_beta_neg_weaktab); + jac.set(Al27, Al27, scratch); + + scratch = screened_rates(k_Si27_n_to_p_Al27_reaclib)*Y(N)*state.rho + + screened_rates(k_Si27_to_Al27_electron_capture_weaktab); + jac.set(Al27, Si27, scratch); + + scratch = screened_rates(k_Si28_to_p_Al27_reaclib); + jac.set(Al27, Si28, scratch); + + jac.set(Al27, Si29, 0.0); + + scratch = screened_rates(k_Si30_p_to_He4_Al27_reaclib)*Y(H1)*state.rho; + jac.set(Al27, Si30, scratch); + + jac.set(Al27, Si31, 0.0); + + jac.set(Al27, P29, 0.0); + + scratch = screened_rates(k_P31_to_He4_Al27_reaclib); + jac.set(Al27, P31, scratch); + + jac.set(Al27, P33, 0.0); + + jac.set(Al27, S32, 0.0); + + jac.set(Al27, S33, 0.0); + + jac.set(Al27, S34, 0.0); + + jac.set(Al27, S35, 0.0); + + jac.set(Al27, Cl33, 0.0); + + jac.set(Al27, Cl35, 0.0); + + jac.set(Al27, Cl37, 0.0); + + jac.set(Al27, Ar36, 0.0); + + jac.set(Al27, Ar37, 0.0); + + jac.set(Al27, Ar38, 0.0); + + jac.set(Al27, K37, 0.0); + + jac.set(Al27, K39, 0.0); + + jac.set(Al27, Ca40, 0.0); + + jac.set(Al27, Ca42, 0.0); + + jac.set(Al27, Sc41, 0.0); + + jac.set(Al27, Sc43, 0.0); + + jac.set(Al27, Sc45, 0.0); + + jac.set(Al27, Ti44, 0.0); + + jac.set(Al27, Ti46, 0.0); + + jac.set(Al27, Ti48, 0.0); + + jac.set(Al27, V47, 0.0); + + jac.set(Al27, V49, 0.0); + + jac.set(Al27, V51, 0.0); + + jac.set(Al27, Cr48, 0.0); + + jac.set(Al27, Cr50, 0.0); + + jac.set(Al27, Cr52, 0.0); + + jac.set(Al27, Cr54, 0.0); + + jac.set(Al27, Mn51, 0.0); + + jac.set(Al27, Mn53, 0.0); + + jac.set(Al27, Mn55, 0.0); + + jac.set(Al27, Fe52, 0.0); + + jac.set(Al27, Fe54, 0.0); + + jac.set(Al27, Fe56, 0.0); + + jac.set(Al27, Fe58, 0.0); + + jac.set(Al27, Co55, 0.0); + + jac.set(Al27, Co56, 0.0); + + jac.set(Al27, Co57, 0.0); + + jac.set(Al27, Co59, 0.0); + + jac.set(Al27, Ni56, 0.0); + + jac.set(Al27, Ni58, 0.0); + + jac.set(Al27, Ni60, 0.0); + + jac.set(Al27, Cu59, 0.0); + + jac.set(Al27, Zn60, 0.0); + + + // Si27 row + + scratch = -screened_rates(k_Si27_n_to_C12_O16_reaclib)*Y(Si27)*state.rho + - screened_rates(k_Si27_n_to_He4_Mg24_reaclib)*Y(Si27)*state.rho + - screened_rates(k_Si27_n_to_Si28_reaclib)*Y(Si27)*state.rho + - screened_rates(k_Si27_n_to_p_Al27_reaclib)*Y(Si27)*state.rho; + jac.set(Si27, N, scratch); + + scratch = screened_rates(k_Al27_p_to_n_Si27_reaclib)*Y(Al27)*state.rho; + jac.set(Si27, H1, scratch); + + scratch = screened_rates(k_Mg23_He4_to_Si27_reaclib)*Y(Mg23)*state.rho + + screened_rates(k_Mg24_He4_to_n_Si27_reaclib)*Y(Mg24)*state.rho; + jac.set(Si27, He4, scratch); + + scratch = screened_rates(k_O16_C12_to_n_Si27_reaclib)*Y(O16)*state.rho; + jac.set(Si27, C12, scratch); + + scratch = screened_rates(k_O16_C12_to_n_Si27_reaclib)*Y(C12)*state.rho; + jac.set(Si27, O16, scratch); + + jac.set(Si27, Ne20, 0.0); + + scratch = screened_rates(k_Mg23_He4_to_Si27_reaclib)*Y(He4)*state.rho; + jac.set(Si27, Mg23, scratch); + + scratch = screened_rates(k_Mg24_He4_to_n_Si27_reaclib)*Y(He4)*state.rho; + jac.set(Si27, Mg24, scratch); + + scratch = screened_rates(k_Al27_p_to_n_Si27_reaclib)*Y(H1)*state.rho + + screened_rates(k_Al27_to_Si27_beta_neg_weaktab); + jac.set(Si27, Al27, scratch); + + scratch = -screened_rates(k_Si27_n_to_C12_O16_reaclib)*Y(N)*state.rho + - screened_rates(k_Si27_n_to_He4_Mg24_reaclib)*Y(N)*state.rho + - screened_rates(k_Si27_n_to_Si28_reaclib)*Y(N)*state.rho + - screened_rates(k_Si27_n_to_p_Al27_reaclib)*Y(N)*state.rho + - screened_rates(k_Si27_to_Al27_electron_capture_weaktab) + - screened_rates(k_Si27_to_He4_Mg23_reaclib); + jac.set(Si27, Si27, scratch); + + scratch = screened_rates(k_Si28_to_n_Si27_reaclib); + jac.set(Si27, Si28, scratch); + + jac.set(Si27, Si29, 0.0); + + jac.set(Si27, Si30, 0.0); + + jac.set(Si27, Si31, 0.0); + + jac.set(Si27, P29, 0.0); + + jac.set(Si27, P31, 0.0); + + jac.set(Si27, P33, 0.0); + + jac.set(Si27, S32, 0.0); + + jac.set(Si27, S33, 0.0); + + jac.set(Si27, S34, 0.0); + + jac.set(Si27, S35, 0.0); + + jac.set(Si27, Cl33, 0.0); + + jac.set(Si27, Cl35, 0.0); + + jac.set(Si27, Cl37, 0.0); + + jac.set(Si27, Ar36, 0.0); + + jac.set(Si27, Ar37, 0.0); + + jac.set(Si27, Ar38, 0.0); + + jac.set(Si27, K37, 0.0); + + jac.set(Si27, K39, 0.0); + + jac.set(Si27, Ca40, 0.0); + + jac.set(Si27, Ca42, 0.0); + + jac.set(Si27, Sc41, 0.0); + + jac.set(Si27, Sc43, 0.0); + + jac.set(Si27, Sc45, 0.0); + + jac.set(Si27, Ti44, 0.0); + + jac.set(Si27, Ti46, 0.0); + + jac.set(Si27, Ti48, 0.0); + + jac.set(Si27, V47, 0.0); + + jac.set(Si27, V49, 0.0); + + jac.set(Si27, V51, 0.0); + + jac.set(Si27, Cr48, 0.0); + + jac.set(Si27, Cr50, 0.0); + + jac.set(Si27, Cr52, 0.0); + + jac.set(Si27, Cr54, 0.0); + + jac.set(Si27, Mn51, 0.0); + + jac.set(Si27, Mn53, 0.0); + + jac.set(Si27, Mn55, 0.0); + + jac.set(Si27, Fe52, 0.0); + + jac.set(Si27, Fe54, 0.0); + + jac.set(Si27, Fe56, 0.0); + + jac.set(Si27, Fe58, 0.0); + + jac.set(Si27, Co55, 0.0); + + jac.set(Si27, Co56, 0.0); + + jac.set(Si27, Co57, 0.0); + + jac.set(Si27, Co59, 0.0); + + jac.set(Si27, Ni56, 0.0); + + jac.set(Si27, Ni58, 0.0); + + jac.set(Si27, Ni60, 0.0); + + jac.set(Si27, Cu59, 0.0); + + jac.set(Si27, Zn60, 0.0); + + + // Si28 row + + scratch = screened_rates(k_Si27_n_to_Si28_reaclib)*Y(Si27)*state.rho + - screened_rates(k_Si28_n_to_Si29_reaclib)*Y(Si28)*state.rho; + jac.set(Si28, N, scratch); + + scratch = screened_rates(k_Al27_p_to_Si28_reaclib)*Y(Al27)*state.rho + + screened_rates(k_P31_p_to_He4_Si28_reaclib)*Y(P31)*state.rho + - screened_rates(k_Si28_p_to_P29_reaclib)*Y(Si28)*state.rho; + jac.set(Si28, H1, scratch); + + scratch = screened_rates(k_Mg24_He4_to_Si28_reaclib)*Y(Mg24)*state.rho + - screened_rates(k_Si28_He4_to_C12_Ne20_reaclib)*Y(Si28)*state.rho + - screened_rates(k_Si28_He4_to_O16_O16_reaclib)*Y(Si28)*state.rho + - screened_rates(k_Si28_He4_to_S32_reaclib)*Y(Si28)*state.rho + - screened_rates(k_Si28_He4_to_p_P31_reaclib)*Y(Si28)*state.rho; + jac.set(Si28, He4, scratch); + + scratch = screened_rates(k_Ne20_C12_to_He4_Si28_reaclib)*Y(Ne20)*state.rho; + jac.set(Si28, C12, scratch); + + scratch = 1.0*screened_rates(k_O16_O16_to_He4_Si28_reaclib)*Y(O16)*state.rho; + jac.set(Si28, O16, scratch); + + scratch = screened_rates(k_Ne20_C12_to_He4_Si28_reaclib)*Y(C12)*state.rho; + jac.set(Si28, Ne20, scratch); + + jac.set(Si28, Mg23, 0.0); + + scratch = screened_rates(k_Mg24_He4_to_Si28_reaclib)*Y(He4)*state.rho; + jac.set(Si28, Mg24, scratch); + + scratch = screened_rates(k_Al27_p_to_Si28_reaclib)*Y(H1)*state.rho; + jac.set(Si28, Al27, scratch); + + scratch = screened_rates(k_Si27_n_to_Si28_reaclib)*Y(N)*state.rho; + jac.set(Si28, Si27, scratch); + + scratch = -screened_rates(k_Si28_He4_to_C12_Ne20_reaclib)*Y(He4)*state.rho + - screened_rates(k_Si28_He4_to_O16_O16_reaclib)*Y(He4)*state.rho + - screened_rates(k_Si28_He4_to_S32_reaclib)*Y(He4)*state.rho + - screened_rates(k_Si28_He4_to_p_P31_reaclib)*Y(He4)*state.rho + - screened_rates(k_Si28_n_to_Si29_reaclib)*Y(N)*state.rho + - screened_rates(k_Si28_p_to_P29_reaclib)*Y(H1)*state.rho + - screened_rates(k_Si28_to_He4_Mg24_reaclib) + - screened_rates(k_Si28_to_n_Si27_reaclib) + - screened_rates(k_Si28_to_p_Al27_reaclib); + jac.set(Si28, Si28, scratch); + + scratch = screened_rates(k_Si29_to_n_Si28_reaclib); + jac.set(Si28, Si29, scratch); + + jac.set(Si28, Si30, 0.0); + + jac.set(Si28, Si31, 0.0); + + scratch = screened_rates(k_P29_to_p_Si28_reaclib); + jac.set(Si28, P29, scratch); + + scratch = screened_rates(k_P31_p_to_He4_Si28_reaclib)*Y(H1)*state.rho; + jac.set(Si28, P31, scratch); + + jac.set(Si28, P33, 0.0); + + scratch = screened_rates(k_S32_to_He4_Si28_reaclib); + jac.set(Si28, S32, scratch); + + jac.set(Si28, S33, 0.0); + + jac.set(Si28, S34, 0.0); + + jac.set(Si28, S35, 0.0); + + jac.set(Si28, Cl33, 0.0); + + jac.set(Si28, Cl35, 0.0); + + jac.set(Si28, Cl37, 0.0); + + jac.set(Si28, Ar36, 0.0); + + jac.set(Si28, Ar37, 0.0); + + jac.set(Si28, Ar38, 0.0); + + jac.set(Si28, K37, 0.0); + + jac.set(Si28, K39, 0.0); + + jac.set(Si28, Ca40, 0.0); + + jac.set(Si28, Ca42, 0.0); + + jac.set(Si28, Sc41, 0.0); + + jac.set(Si28, Sc43, 0.0); + + jac.set(Si28, Sc45, 0.0); + + jac.set(Si28, Ti44, 0.0); + + jac.set(Si28, Ti46, 0.0); + + jac.set(Si28, Ti48, 0.0); + + jac.set(Si28, V47, 0.0); + + jac.set(Si28, V49, 0.0); + + jac.set(Si28, V51, 0.0); + + jac.set(Si28, Cr48, 0.0); + + jac.set(Si28, Cr50, 0.0); + + jac.set(Si28, Cr52, 0.0); + + jac.set(Si28, Cr54, 0.0); + + jac.set(Si28, Mn51, 0.0); + + jac.set(Si28, Mn53, 0.0); + + jac.set(Si28, Mn55, 0.0); + + jac.set(Si28, Fe52, 0.0); + + jac.set(Si28, Fe54, 0.0); + + jac.set(Si28, Fe56, 0.0); + + jac.set(Si28, Fe58, 0.0); + + jac.set(Si28, Co55, 0.0); + + jac.set(Si28, Co56, 0.0); + + jac.set(Si28, Co57, 0.0); + + jac.set(Si28, Co59, 0.0); + + jac.set(Si28, Ni56, 0.0); + + jac.set(Si28, Ni58, 0.0); + + jac.set(Si28, Ni60, 0.0); + + jac.set(Si28, Cu59, 0.0); + + jac.set(Si28, Zn60, 0.0); + + + // Si29 row + + scratch = screened_rates(k_P29_n_to_p_Si29_reaclib)*Y(P29)*state.rho + + screened_rates(k_S32_n_to_He4_Si29_reaclib)*Y(S32)*state.rho + + screened_rates(k_Si28_n_to_Si29_reaclib)*Y(Si28)*state.rho + - screened_rates(k_Si29_n_to_Si30_reaclib)*Y(Si29)*state.rho; + jac.set(Si29, N, scratch); + + scratch = -screened_rates(k_Si29_p_to_n_P29_reaclib)*Y(Si29)*state.rho; + jac.set(Si29, H1, scratch); + + scratch = -screened_rates(k_Si29_He4_to_S33_reaclib)*Y(Si29)*state.rho + - screened_rates(k_Si29_He4_to_n_S32_reaclib)*Y(Si29)*state.rho; + jac.set(Si29, He4, scratch); + + jac.set(Si29, C12, 0.0); + + jac.set(Si29, O16, 0.0); + + jac.set(Si29, Ne20, 0.0); + + jac.set(Si29, Mg23, 0.0); + + jac.set(Si29, Mg24, 0.0); + + jac.set(Si29, Al27, 0.0); + + jac.set(Si29, Si27, 0.0); + + scratch = screened_rates(k_Si28_n_to_Si29_reaclib)*Y(N)*state.rho; + jac.set(Si29, Si28, scratch); + + scratch = -screened_rates(k_Si29_He4_to_S33_reaclib)*Y(He4)*state.rho + - screened_rates(k_Si29_He4_to_n_S32_reaclib)*Y(He4)*state.rho + - screened_rates(k_Si29_n_to_Si30_reaclib)*Y(N)*state.rho + - screened_rates(k_Si29_p_to_n_P29_reaclib)*Y(H1)*state.rho + - screened_rates(k_Si29_to_P29_beta_neg_weaktab) + - screened_rates(k_Si29_to_n_Si28_reaclib); + jac.set(Si29, Si29, scratch); + + scratch = screened_rates(k_Si30_to_n_Si29_reaclib); + jac.set(Si29, Si30, scratch); + + jac.set(Si29, Si31, 0.0); + + scratch = screened_rates(k_P29_n_to_p_Si29_reaclib)*Y(N)*state.rho + + screened_rates(k_P29_to_Si29_electron_capture_weaktab); + jac.set(Si29, P29, scratch); + + jac.set(Si29, P31, 0.0); + + jac.set(Si29, P33, 0.0); + + scratch = screened_rates(k_S32_n_to_He4_Si29_reaclib)*Y(N)*state.rho; + jac.set(Si29, S32, scratch); + + scratch = screened_rates(k_S33_to_He4_Si29_reaclib); + jac.set(Si29, S33, scratch); + + jac.set(Si29, S34, 0.0); + + jac.set(Si29, S35, 0.0); + + jac.set(Si29, Cl33, 0.0); + + jac.set(Si29, Cl35, 0.0); + + jac.set(Si29, Cl37, 0.0); + + jac.set(Si29, Ar36, 0.0); + + jac.set(Si29, Ar37, 0.0); + + jac.set(Si29, Ar38, 0.0); + + jac.set(Si29, K37, 0.0); + + jac.set(Si29, K39, 0.0); + + jac.set(Si29, Ca40, 0.0); + + jac.set(Si29, Ca42, 0.0); + + jac.set(Si29, Sc41, 0.0); + + jac.set(Si29, Sc43, 0.0); + + jac.set(Si29, Sc45, 0.0); + + jac.set(Si29, Ti44, 0.0); + + jac.set(Si29, Ti46, 0.0); + + jac.set(Si29, Ti48, 0.0); + + jac.set(Si29, V47, 0.0); + + jac.set(Si29, V49, 0.0); + + jac.set(Si29, V51, 0.0); + + jac.set(Si29, Cr48, 0.0); + + jac.set(Si29, Cr50, 0.0); + + jac.set(Si29, Cr52, 0.0); + + jac.set(Si29, Cr54, 0.0); + + jac.set(Si29, Mn51, 0.0); + + jac.set(Si29, Mn53, 0.0); + + jac.set(Si29, Mn55, 0.0); + + jac.set(Si29, Fe52, 0.0); + + jac.set(Si29, Fe54, 0.0); + + jac.set(Si29, Fe56, 0.0); + + jac.set(Si29, Fe58, 0.0); + + jac.set(Si29, Co55, 0.0); + + jac.set(Si29, Co56, 0.0); + + jac.set(Si29, Co57, 0.0); + + jac.set(Si29, Co59, 0.0); + + jac.set(Si29, Ni56, 0.0); + + jac.set(Si29, Ni58, 0.0); + + jac.set(Si29, Ni60, 0.0); + + jac.set(Si29, Cu59, 0.0); + + jac.set(Si29, Zn60, 0.0); + + + // Si30 row + + scratch = screened_rates(k_S33_n_to_He4_Si30_reaclib)*Y(S33)*state.rho + + screened_rates(k_Si29_n_to_Si30_reaclib)*Y(Si29)*state.rho + - screened_rates(k_Si30_n_to_Si31_reaclib)*Y(Si30)*state.rho; + jac.set(Si30, N, scratch); + + scratch = screened_rates(k_P33_p_to_He4_Si30_reaclib)*Y(P33)*state.rho + - screened_rates(k_Si30_p_to_He4_Al27_reaclib)*Y(Si30)*state.rho + - screened_rates(k_Si30_p_to_P31_reaclib)*Y(Si30)*state.rho; + jac.set(Si30, H1, scratch); + + scratch = screened_rates(k_Al27_He4_to_p_Si30_reaclib)*Y(Al27)*state.rho + - screened_rates(k_Si30_He4_to_S34_reaclib)*Y(Si30)*state.rho + - screened_rates(k_Si30_He4_to_n_S33_reaclib)*Y(Si30)*state.rho + - screened_rates(k_Si30_He4_to_p_P33_reaclib)*Y(Si30)*state.rho; + jac.set(Si30, He4, scratch); + + jac.set(Si30, C12, 0.0); + + jac.set(Si30, O16, 0.0); + + jac.set(Si30, Ne20, 0.0); + + jac.set(Si30, Mg23, 0.0); + + jac.set(Si30, Mg24, 0.0); + + scratch = screened_rates(k_Al27_He4_to_p_Si30_reaclib)*Y(He4)*state.rho; + jac.set(Si30, Al27, scratch); + + jac.set(Si30, Si27, 0.0); + + jac.set(Si30, Si28, 0.0); + + scratch = screened_rates(k_Si29_n_to_Si30_reaclib)*Y(N)*state.rho; + jac.set(Si30, Si29, scratch); + + scratch = -screened_rates(k_Si30_He4_to_S34_reaclib)*Y(He4)*state.rho + - screened_rates(k_Si30_He4_to_n_S33_reaclib)*Y(He4)*state.rho + - screened_rates(k_Si30_He4_to_p_P33_reaclib)*Y(He4)*state.rho + - screened_rates(k_Si30_n_to_Si31_reaclib)*Y(N)*state.rho + - screened_rates(k_Si30_p_to_He4_Al27_reaclib)*Y(H1)*state.rho + - screened_rates(k_Si30_p_to_P31_reaclib)*Y(H1)*state.rho + - screened_rates(k_Si30_to_n_Si29_reaclib); + jac.set(Si30, Si30, scratch); + + scratch = screened_rates(k_Si31_to_n_Si30_reaclib); + jac.set(Si30, Si31, scratch); + + jac.set(Si30, P29, 0.0); + + scratch = screened_rates(k_P31_to_p_Si30_reaclib); + jac.set(Si30, P31, scratch); + + scratch = screened_rates(k_P33_p_to_He4_Si30_reaclib)*Y(H1)*state.rho; + jac.set(Si30, P33, scratch); + + jac.set(Si30, S32, 0.0); + + scratch = screened_rates(k_S33_n_to_He4_Si30_reaclib)*Y(N)*state.rho; + jac.set(Si30, S33, scratch); + + scratch = screened_rates(k_S34_to_He4_Si30_reaclib); + jac.set(Si30, S34, scratch); + + jac.set(Si30, S35, 0.0); + + jac.set(Si30, Cl33, 0.0); + + jac.set(Si30, Cl35, 0.0); + + jac.set(Si30, Cl37, 0.0); + + jac.set(Si30, Ar36, 0.0); + + jac.set(Si30, Ar37, 0.0); + + jac.set(Si30, Ar38, 0.0); + + jac.set(Si30, K37, 0.0); + + jac.set(Si30, K39, 0.0); + + jac.set(Si30, Ca40, 0.0); + + jac.set(Si30, Ca42, 0.0); + + jac.set(Si30, Sc41, 0.0); + + jac.set(Si30, Sc43, 0.0); + + jac.set(Si30, Sc45, 0.0); + + jac.set(Si30, Ti44, 0.0); + + jac.set(Si30, Ti46, 0.0); + + jac.set(Si30, Ti48, 0.0); + + jac.set(Si30, V47, 0.0); + + jac.set(Si30, V49, 0.0); + + jac.set(Si30, V51, 0.0); + + jac.set(Si30, Cr48, 0.0); + + jac.set(Si30, Cr50, 0.0); + + jac.set(Si30, Cr52, 0.0); + + jac.set(Si30, Cr54, 0.0); + + jac.set(Si30, Mn51, 0.0); + + jac.set(Si30, Mn53, 0.0); + + jac.set(Si30, Mn55, 0.0); + + jac.set(Si30, Fe52, 0.0); + + jac.set(Si30, Fe54, 0.0); + + jac.set(Si30, Fe56, 0.0); + + jac.set(Si30, Fe58, 0.0); + + jac.set(Si30, Co55, 0.0); + + jac.set(Si30, Co56, 0.0); + + jac.set(Si30, Co57, 0.0); + + jac.set(Si30, Co59, 0.0); + + jac.set(Si30, Ni56, 0.0); + + jac.set(Si30, Ni58, 0.0); + + jac.set(Si30, Ni60, 0.0); + + jac.set(Si30, Cu59, 0.0); + + jac.set(Si30, Zn60, 0.0); + + + // Si31 row + + scratch = screened_rates(k_P31_n_to_p_Si31_reaclib)*Y(P31)*state.rho + + screened_rates(k_S34_n_to_He4_Si31_reaclib)*Y(S34)*state.rho + + screened_rates(k_Si30_n_to_Si31_reaclib)*Y(Si30)*state.rho; + jac.set(Si31, N, scratch); + + scratch = -screened_rates(k_Si31_p_to_n_P31_reaclib)*Y(Si31)*state.rho; + jac.set(Si31, H1, scratch); + + scratch = -screened_rates(k_Si31_He4_to_S35_reaclib)*Y(Si31)*state.rho + - screened_rates(k_Si31_He4_to_n_S34_reaclib)*Y(Si31)*state.rho; + jac.set(Si31, He4, scratch); + + jac.set(Si31, C12, 0.0); + + jac.set(Si31, O16, 0.0); + + jac.set(Si31, Ne20, 0.0); + + jac.set(Si31, Mg23, 0.0); + + jac.set(Si31, Mg24, 0.0); + + jac.set(Si31, Al27, 0.0); + + jac.set(Si31, Si27, 0.0); + + jac.set(Si31, Si28, 0.0); + + jac.set(Si31, Si29, 0.0); + + scratch = screened_rates(k_Si30_n_to_Si31_reaclib)*Y(N)*state.rho; + jac.set(Si31, Si30, scratch); + + scratch = -screened_rates(k_Si31_He4_to_S35_reaclib)*Y(He4)*state.rho + - screened_rates(k_Si31_He4_to_n_S34_reaclib)*Y(He4)*state.rho + - screened_rates(k_Si31_p_to_n_P31_reaclib)*Y(H1)*state.rho + - screened_rates(k_Si31_to_P31_beta_neg_weaktab) + - screened_rates(k_Si31_to_n_Si30_reaclib); + jac.set(Si31, Si31, scratch); + + jac.set(Si31, P29, 0.0); + + scratch = screened_rates(k_P31_n_to_p_Si31_reaclib)*Y(N)*state.rho + + screened_rates(k_P31_to_Si31_electron_capture_weaktab); + jac.set(Si31, P31, scratch); + + jac.set(Si31, P33, 0.0); + + jac.set(Si31, S32, 0.0); + + jac.set(Si31, S33, 0.0); + + scratch = screened_rates(k_S34_n_to_He4_Si31_reaclib)*Y(N)*state.rho; + jac.set(Si31, S34, scratch); + + scratch = screened_rates(k_S35_to_He4_Si31_reaclib); + jac.set(Si31, S35, scratch); + + jac.set(Si31, Cl33, 0.0); + + jac.set(Si31, Cl35, 0.0); + + jac.set(Si31, Cl37, 0.0); + + jac.set(Si31, Ar36, 0.0); + + jac.set(Si31, Ar37, 0.0); + + jac.set(Si31, Ar38, 0.0); + + jac.set(Si31, K37, 0.0); + + jac.set(Si31, K39, 0.0); + + jac.set(Si31, Ca40, 0.0); + + jac.set(Si31, Ca42, 0.0); + + jac.set(Si31, Sc41, 0.0); + + jac.set(Si31, Sc43, 0.0); + + jac.set(Si31, Sc45, 0.0); + + jac.set(Si31, Ti44, 0.0); + + jac.set(Si31, Ti46, 0.0); + + jac.set(Si31, Ti48, 0.0); + + jac.set(Si31, V47, 0.0); + + jac.set(Si31, V49, 0.0); + + jac.set(Si31, V51, 0.0); + + jac.set(Si31, Cr48, 0.0); + + jac.set(Si31, Cr50, 0.0); + + jac.set(Si31, Cr52, 0.0); + + jac.set(Si31, Cr54, 0.0); + + jac.set(Si31, Mn51, 0.0); + + jac.set(Si31, Mn53, 0.0); + + jac.set(Si31, Mn55, 0.0); + + jac.set(Si31, Fe52, 0.0); + + jac.set(Si31, Fe54, 0.0); + + jac.set(Si31, Fe56, 0.0); + + jac.set(Si31, Fe58, 0.0); + + jac.set(Si31, Co55, 0.0); + + jac.set(Si31, Co56, 0.0); + + jac.set(Si31, Co57, 0.0); + + jac.set(Si31, Co59, 0.0); + + jac.set(Si31, Ni56, 0.0); + + jac.set(Si31, Ni58, 0.0); + + jac.set(Si31, Ni60, 0.0); + + jac.set(Si31, Cu59, 0.0); + + jac.set(Si31, Zn60, 0.0); + + + // P29 row + + scratch = -screened_rates(k_P29_n_to_p_Si29_reaclib)*Y(P29)*state.rho; + jac.set(P29, N, scratch); + + scratch = screened_rates(k_S32_p_to_He4_P29_reaclib)*Y(S32)*state.rho + + screened_rates(k_Si28_p_to_P29_reaclib)*Y(Si28)*state.rho + + screened_rates(k_Si29_p_to_n_P29_reaclib)*Y(Si29)*state.rho; + jac.set(P29, H1, scratch); + + scratch = -screened_rates(k_P29_He4_to_Cl33_reaclib)*Y(P29)*state.rho + - screened_rates(k_P29_He4_to_p_S32_reaclib)*Y(P29)*state.rho; + jac.set(P29, He4, scratch); + + jac.set(P29, C12, 0.0); + + jac.set(P29, O16, 0.0); + + jac.set(P29, Ne20, 0.0); + + jac.set(P29, Mg23, 0.0); + + jac.set(P29, Mg24, 0.0); + + jac.set(P29, Al27, 0.0); + + jac.set(P29, Si27, 0.0); + + scratch = screened_rates(k_Si28_p_to_P29_reaclib)*Y(H1)*state.rho; + jac.set(P29, Si28, scratch); + + scratch = screened_rates(k_Si29_p_to_n_P29_reaclib)*Y(H1)*state.rho + + screened_rates(k_Si29_to_P29_beta_neg_weaktab); + jac.set(P29, Si29, scratch); + + jac.set(P29, Si30, 0.0); + + jac.set(P29, Si31, 0.0); + + scratch = -screened_rates(k_P29_He4_to_Cl33_reaclib)*Y(He4)*state.rho + - screened_rates(k_P29_He4_to_p_S32_reaclib)*Y(He4)*state.rho + - screened_rates(k_P29_n_to_p_Si29_reaclib)*Y(N)*state.rho + - screened_rates(k_P29_to_Si29_electron_capture_weaktab) + - screened_rates(k_P29_to_p_Si28_reaclib); + jac.set(P29, P29, scratch); + + jac.set(P29, P31, 0.0); + + jac.set(P29, P33, 0.0); + + scratch = screened_rates(k_S32_p_to_He4_P29_reaclib)*Y(H1)*state.rho; + jac.set(P29, S32, scratch); + + jac.set(P29, S33, 0.0); + + jac.set(P29, S34, 0.0); + + jac.set(P29, S35, 0.0); + + scratch = screened_rates(k_Cl33_to_He4_P29_reaclib); + jac.set(P29, Cl33, scratch); + + jac.set(P29, Cl35, 0.0); + + jac.set(P29, Cl37, 0.0); + + jac.set(P29, Ar36, 0.0); + + jac.set(P29, Ar37, 0.0); + + jac.set(P29, Ar38, 0.0); + + jac.set(P29, K37, 0.0); + + jac.set(P29, K39, 0.0); + + jac.set(P29, Ca40, 0.0); + + jac.set(P29, Ca42, 0.0); + + jac.set(P29, Sc41, 0.0); + + jac.set(P29, Sc43, 0.0); + + jac.set(P29, Sc45, 0.0); + + jac.set(P29, Ti44, 0.0); + + jac.set(P29, Ti46, 0.0); + + jac.set(P29, Ti48, 0.0); + + jac.set(P29, V47, 0.0); + + jac.set(P29, V49, 0.0); + + jac.set(P29, V51, 0.0); + + jac.set(P29, Cr48, 0.0); + + jac.set(P29, Cr50, 0.0); + + jac.set(P29, Cr52, 0.0); + + jac.set(P29, Cr54, 0.0); + + jac.set(P29, Mn51, 0.0); + + jac.set(P29, Mn53, 0.0); + + jac.set(P29, Mn55, 0.0); + + jac.set(P29, Fe52, 0.0); + + jac.set(P29, Fe54, 0.0); + + jac.set(P29, Fe56, 0.0); + + jac.set(P29, Fe58, 0.0); + + jac.set(P29, Co55, 0.0); + + jac.set(P29, Co56, 0.0); + + jac.set(P29, Co57, 0.0); + + jac.set(P29, Co59, 0.0); + + jac.set(P29, Ni56, 0.0); + + jac.set(P29, Ni58, 0.0); + + jac.set(P29, Ni60, 0.0); + + jac.set(P29, Cu59, 0.0); + + jac.set(P29, Zn60, 0.0); + + + // P31 row + + scratch = -screened_rates(k_P31_n_to_p_Si31_reaclib)*Y(P31)*state.rho; + jac.set(P31, N, scratch); + + scratch = -screened_rates(k_P31_p_to_C12_Ne20_reaclib)*Y(P31)*state.rho + - screened_rates(k_P31_p_to_He4_Si28_reaclib)*Y(P31)*state.rho + - screened_rates(k_P31_p_to_O16_O16_reaclib)*Y(P31)*state.rho + - screened_rates(k_P31_p_to_S32_reaclib)*Y(P31)*state.rho + + screened_rates(k_S34_p_to_He4_P31_reaclib)*Y(S34)*state.rho + + screened_rates(k_Si30_p_to_P31_reaclib)*Y(Si30)*state.rho + + screened_rates(k_Si31_p_to_n_P31_reaclib)*Y(Si31)*state.rho; + jac.set(P31, H1, scratch); + + scratch = screened_rates(k_Al27_He4_to_P31_reaclib)*Y(Al27)*state.rho + - screened_rates(k_P31_He4_to_Cl35_reaclib)*Y(P31)*state.rho + - screened_rates(k_P31_He4_to_p_S34_reaclib)*Y(P31)*state.rho + + screened_rates(k_Si28_He4_to_p_P31_reaclib)*Y(Si28)*state.rho; + jac.set(P31, He4, scratch); + + scratch = screened_rates(k_Ne20_C12_to_p_P31_reaclib)*Y(Ne20)*state.rho; + jac.set(P31, C12, scratch); + + scratch = 1.0*screened_rates(k_O16_O16_to_p_P31_reaclib)*Y(O16)*state.rho; + jac.set(P31, O16, scratch); + + scratch = screened_rates(k_Ne20_C12_to_p_P31_reaclib)*Y(C12)*state.rho; + jac.set(P31, Ne20, scratch); + + jac.set(P31, Mg23, 0.0); + + jac.set(P31, Mg24, 0.0); + + scratch = screened_rates(k_Al27_He4_to_P31_reaclib)*Y(He4)*state.rho; + jac.set(P31, Al27, scratch); + + jac.set(P31, Si27, 0.0); + + scratch = screened_rates(k_Si28_He4_to_p_P31_reaclib)*Y(He4)*state.rho; + jac.set(P31, Si28, scratch); + + jac.set(P31, Si29, 0.0); + + scratch = screened_rates(k_Si30_p_to_P31_reaclib)*Y(H1)*state.rho; + jac.set(P31, Si30, scratch); + + scratch = screened_rates(k_Si31_p_to_n_P31_reaclib)*Y(H1)*state.rho + + screened_rates(k_Si31_to_P31_beta_neg_weaktab); + jac.set(P31, Si31, scratch); + + jac.set(P31, P29, 0.0); + + scratch = -screened_rates(k_P31_He4_to_Cl35_reaclib)*Y(He4)*state.rho + - screened_rates(k_P31_He4_to_p_S34_reaclib)*Y(He4)*state.rho + - screened_rates(k_P31_n_to_p_Si31_reaclib)*Y(N)*state.rho + - screened_rates(k_P31_p_to_C12_Ne20_reaclib)*Y(H1)*state.rho + - screened_rates(k_P31_p_to_He4_Si28_reaclib)*Y(H1)*state.rho + - screened_rates(k_P31_p_to_O16_O16_reaclib)*Y(H1)*state.rho + - screened_rates(k_P31_p_to_S32_reaclib)*Y(H1)*state.rho + - screened_rates(k_P31_to_He4_Al27_reaclib) + - screened_rates(k_P31_to_Si31_electron_capture_weaktab) + - screened_rates(k_P31_to_p_Si30_reaclib); + jac.set(P31, P31, scratch); + + jac.set(P31, P33, 0.0); + + scratch = screened_rates(k_S32_to_p_P31_reaclib); + jac.set(P31, S32, scratch); + + jac.set(P31, S33, 0.0); + + scratch = screened_rates(k_S34_p_to_He4_P31_reaclib)*Y(H1)*state.rho; + jac.set(P31, S34, scratch); + + jac.set(P31, S35, 0.0); + + jac.set(P31, Cl33, 0.0); + + scratch = screened_rates(k_Cl35_to_He4_P31_reaclib); + jac.set(P31, Cl35, scratch); + + jac.set(P31, Cl37, 0.0); + + jac.set(P31, Ar36, 0.0); + + jac.set(P31, Ar37, 0.0); + + jac.set(P31, Ar38, 0.0); + + jac.set(P31, K37, 0.0); + + jac.set(P31, K39, 0.0); + + jac.set(P31, Ca40, 0.0); + + jac.set(P31, Ca42, 0.0); + + jac.set(P31, Sc41, 0.0); + + jac.set(P31, Sc43, 0.0); + + jac.set(P31, Sc45, 0.0); + + jac.set(P31, Ti44, 0.0); + + jac.set(P31, Ti46, 0.0); + + jac.set(P31, Ti48, 0.0); + + jac.set(P31, V47, 0.0); + + jac.set(P31, V49, 0.0); + + jac.set(P31, V51, 0.0); + + jac.set(P31, Cr48, 0.0); + + jac.set(P31, Cr50, 0.0); + + jac.set(P31, Cr52, 0.0); + + jac.set(P31, Cr54, 0.0); + + jac.set(P31, Mn51, 0.0); + + jac.set(P31, Mn53, 0.0); + + jac.set(P31, Mn55, 0.0); + + jac.set(P31, Fe52, 0.0); + + jac.set(P31, Fe54, 0.0); + + jac.set(P31, Fe56, 0.0); + + jac.set(P31, Fe58, 0.0); + + jac.set(P31, Co55, 0.0); + + jac.set(P31, Co56, 0.0); + + jac.set(P31, Co57, 0.0); + + jac.set(P31, Co59, 0.0); + + jac.set(P31, Ni56, 0.0); + + jac.set(P31, Ni58, 0.0); + + jac.set(P31, Ni60, 0.0); + + jac.set(P31, Cu59, 0.0); + + jac.set(P31, Zn60, 0.0); + + + // P33 row + + scratch = screened_rates(k_S33_n_to_p_P33_reaclib)*Y(S33)*state.rho; + jac.set(P33, N, scratch); + + scratch = -screened_rates(k_P33_p_to_He4_Si30_reaclib)*Y(P33)*state.rho + - screened_rates(k_P33_p_to_S34_reaclib)*Y(P33)*state.rho + - screened_rates(k_P33_p_to_n_S33_reaclib)*Y(P33)*state.rho; + jac.set(P33, H1, scratch); + + scratch = -screened_rates(k_P33_He4_to_Cl37_reaclib)*Y(P33)*state.rho + + screened_rates(k_Si30_He4_to_p_P33_reaclib)*Y(Si30)*state.rho; + jac.set(P33, He4, scratch); + + jac.set(P33, C12, 0.0); + + jac.set(P33, O16, 0.0); + + jac.set(P33, Ne20, 0.0); + + jac.set(P33, Mg23, 0.0); + + jac.set(P33, Mg24, 0.0); + + jac.set(P33, Al27, 0.0); + + jac.set(P33, Si27, 0.0); + + jac.set(P33, Si28, 0.0); + + jac.set(P33, Si29, 0.0); + + scratch = screened_rates(k_Si30_He4_to_p_P33_reaclib)*Y(He4)*state.rho; + jac.set(P33, Si30, scratch); + + jac.set(P33, Si31, 0.0); + + jac.set(P33, P29, 0.0); + + jac.set(P33, P31, 0.0); + + scratch = -screened_rates(k_P33_He4_to_Cl37_reaclib)*Y(He4)*state.rho + - screened_rates(k_P33_p_to_He4_Si30_reaclib)*Y(H1)*state.rho + - screened_rates(k_P33_p_to_S34_reaclib)*Y(H1)*state.rho + - screened_rates(k_P33_p_to_n_S33_reaclib)*Y(H1)*state.rho + - screened_rates(k_P33_to_S33_beta_neg_weaktab); + jac.set(P33, P33, scratch); + + jac.set(P33, S32, 0.0); + + scratch = screened_rates(k_S33_n_to_p_P33_reaclib)*Y(N)*state.rho + + screened_rates(k_S33_to_P33_electron_capture_weaktab); + jac.set(P33, S33, scratch); + + scratch = screened_rates(k_S34_to_p_P33_reaclib); + jac.set(P33, S34, scratch); + + jac.set(P33, S35, 0.0); + + jac.set(P33, Cl33, 0.0); + + jac.set(P33, Cl35, 0.0); + + scratch = screened_rates(k_Cl37_to_He4_P33_reaclib); + jac.set(P33, Cl37, scratch); + + jac.set(P33, Ar36, 0.0); + + jac.set(P33, Ar37, 0.0); + + jac.set(P33, Ar38, 0.0); + + jac.set(P33, K37, 0.0); + + jac.set(P33, K39, 0.0); + + jac.set(P33, Ca40, 0.0); + + jac.set(P33, Ca42, 0.0); + + jac.set(P33, Sc41, 0.0); + + jac.set(P33, Sc43, 0.0); + + jac.set(P33, Sc45, 0.0); + + jac.set(P33, Ti44, 0.0); + + jac.set(P33, Ti46, 0.0); + + jac.set(P33, Ti48, 0.0); + + jac.set(P33, V47, 0.0); + + jac.set(P33, V49, 0.0); + + jac.set(P33, V51, 0.0); + + jac.set(P33, Cr48, 0.0); + + jac.set(P33, Cr50, 0.0); + + jac.set(P33, Cr52, 0.0); + + jac.set(P33, Cr54, 0.0); + + jac.set(P33, Mn51, 0.0); + + jac.set(P33, Mn53, 0.0); + + jac.set(P33, Mn55, 0.0); + + jac.set(P33, Fe52, 0.0); + + jac.set(P33, Fe54, 0.0); + + jac.set(P33, Fe56, 0.0); + + jac.set(P33, Fe58, 0.0); + + jac.set(P33, Co55, 0.0); + + jac.set(P33, Co56, 0.0); + + jac.set(P33, Co57, 0.0); + + jac.set(P33, Co59, 0.0); + + jac.set(P33, Ni56, 0.0); + + jac.set(P33, Ni58, 0.0); + + jac.set(P33, Ni60, 0.0); + + jac.set(P33, Cu59, 0.0); + + jac.set(P33, Zn60, 0.0); + + + // S32 row + + scratch = -screened_rates(k_S32_n_to_He4_Si29_reaclib)*Y(S32)*state.rho + - screened_rates(k_S32_n_to_S33_reaclib)*Y(S32)*state.rho; + jac.set(S32, N, scratch); + + scratch = screened_rates(k_Cl35_p_to_He4_S32_reaclib)*Y(Cl35)*state.rho + + screened_rates(k_P31_p_to_S32_reaclib)*Y(P31)*state.rho + - screened_rates(k_S32_p_to_Cl33_reaclib)*Y(S32)*state.rho + - screened_rates(k_S32_p_to_He4_P29_reaclib)*Y(S32)*state.rho; + jac.set(S32, H1, scratch); + + scratch = screened_rates(k_P29_He4_to_p_S32_reaclib)*Y(P29)*state.rho + - screened_rates(k_S32_He4_to_Ar36_reaclib)*Y(S32)*state.rho + - screened_rates(k_S32_He4_to_p_Cl35_reaclib)*Y(S32)*state.rho + + screened_rates(k_Si28_He4_to_S32_reaclib)*Y(Si28)*state.rho + + screened_rates(k_Si29_He4_to_n_S32_reaclib)*Y(Si29)*state.rho; + jac.set(S32, He4, scratch); + + jac.set(S32, C12, 0.0); + + jac.set(S32, O16, 0.0); + + jac.set(S32, Ne20, 0.0); + + jac.set(S32, Mg23, 0.0); + + jac.set(S32, Mg24, 0.0); + + jac.set(S32, Al27, 0.0); + + jac.set(S32, Si27, 0.0); + + scratch = screened_rates(k_Si28_He4_to_S32_reaclib)*Y(He4)*state.rho; + jac.set(S32, Si28, scratch); + + scratch = screened_rates(k_Si29_He4_to_n_S32_reaclib)*Y(He4)*state.rho; + jac.set(S32, Si29, scratch); + + jac.set(S32, Si30, 0.0); + + jac.set(S32, Si31, 0.0); + + scratch = screened_rates(k_P29_He4_to_p_S32_reaclib)*Y(He4)*state.rho; + jac.set(S32, P29, scratch); + + scratch = screened_rates(k_P31_p_to_S32_reaclib)*Y(H1)*state.rho; + jac.set(S32, P31, scratch); + + jac.set(S32, P33, 0.0); + + scratch = -screened_rates(k_S32_He4_to_Ar36_reaclib)*Y(He4)*state.rho + - screened_rates(k_S32_He4_to_p_Cl35_reaclib)*Y(He4)*state.rho + - screened_rates(k_S32_n_to_He4_Si29_reaclib)*Y(N)*state.rho + - screened_rates(k_S32_n_to_S33_reaclib)*Y(N)*state.rho + - screened_rates(k_S32_p_to_Cl33_reaclib)*Y(H1)*state.rho + - screened_rates(k_S32_p_to_He4_P29_reaclib)*Y(H1)*state.rho + - screened_rates(k_S32_to_He4_Si28_reaclib) + - screened_rates(k_S32_to_p_P31_reaclib); + jac.set(S32, S32, scratch); + + scratch = screened_rates(k_S33_to_n_S32_reaclib); + jac.set(S32, S33, scratch); + + jac.set(S32, S34, 0.0); + + jac.set(S32, S35, 0.0); + + scratch = screened_rates(k_Cl33_to_p_S32_reaclib); + jac.set(S32, Cl33, scratch); + + scratch = screened_rates(k_Cl35_p_to_He4_S32_reaclib)*Y(H1)*state.rho; + jac.set(S32, Cl35, scratch); + + jac.set(S32, Cl37, 0.0); + + scratch = screened_rates(k_Ar36_to_He4_S32_reaclib); + jac.set(S32, Ar36, scratch); + + jac.set(S32, Ar37, 0.0); + + jac.set(S32, Ar38, 0.0); + + jac.set(S32, K37, 0.0); + + jac.set(S32, K39, 0.0); + + jac.set(S32, Ca40, 0.0); + + jac.set(S32, Ca42, 0.0); + + jac.set(S32, Sc41, 0.0); + + jac.set(S32, Sc43, 0.0); + + jac.set(S32, Sc45, 0.0); + + jac.set(S32, Ti44, 0.0); + + jac.set(S32, Ti46, 0.0); + + jac.set(S32, Ti48, 0.0); + + jac.set(S32, V47, 0.0); + + jac.set(S32, V49, 0.0); + + jac.set(S32, V51, 0.0); + + jac.set(S32, Cr48, 0.0); + + jac.set(S32, Cr50, 0.0); + + jac.set(S32, Cr52, 0.0); + + jac.set(S32, Cr54, 0.0); + + jac.set(S32, Mn51, 0.0); + + jac.set(S32, Mn53, 0.0); + + jac.set(S32, Mn55, 0.0); + + jac.set(S32, Fe52, 0.0); + + jac.set(S32, Fe54, 0.0); + + jac.set(S32, Fe56, 0.0); + + jac.set(S32, Fe58, 0.0); + + jac.set(S32, Co55, 0.0); + + jac.set(S32, Co56, 0.0); + + jac.set(S32, Co57, 0.0); + + jac.set(S32, Co59, 0.0); + + jac.set(S32, Ni56, 0.0); + + jac.set(S32, Ni58, 0.0); + + jac.set(S32, Ni60, 0.0); + + jac.set(S32, Cu59, 0.0); + + jac.set(S32, Zn60, 0.0); + + + // S33 row + + scratch = screened_rates(k_Ar36_n_to_He4_S33_reaclib)*Y(Ar36)*state.rho + + screened_rates(k_Cl33_n_to_p_S33_reaclib)*Y(Cl33)*state.rho + + screened_rates(k_S32_n_to_S33_reaclib)*Y(S32)*state.rho + - screened_rates(k_S33_n_to_He4_Si30_reaclib)*Y(S33)*state.rho + - screened_rates(k_S33_n_to_S34_reaclib)*Y(S33)*state.rho + - screened_rates(k_S33_n_to_p_P33_reaclib)*Y(S33)*state.rho; + jac.set(S33, N, scratch); + + scratch = screened_rates(k_P33_p_to_n_S33_reaclib)*Y(P33)*state.rho + - screened_rates(k_S33_p_to_n_Cl33_reaclib)*Y(S33)*state.rho; + jac.set(S33, H1, scratch); + + scratch = -screened_rates(k_S33_He4_to_Ar37_reaclib)*Y(S33)*state.rho + - screened_rates(k_S33_He4_to_n_Ar36_reaclib)*Y(S33)*state.rho + + screened_rates(k_Si29_He4_to_S33_reaclib)*Y(Si29)*state.rho + + screened_rates(k_Si30_He4_to_n_S33_reaclib)*Y(Si30)*state.rho; + jac.set(S33, He4, scratch); + + jac.set(S33, C12, 0.0); + + jac.set(S33, O16, 0.0); + + jac.set(S33, Ne20, 0.0); + + jac.set(S33, Mg23, 0.0); + + jac.set(S33, Mg24, 0.0); + + jac.set(S33, Al27, 0.0); + + jac.set(S33, Si27, 0.0); + + jac.set(S33, Si28, 0.0); + + scratch = screened_rates(k_Si29_He4_to_S33_reaclib)*Y(He4)*state.rho; + jac.set(S33, Si29, scratch); + + scratch = screened_rates(k_Si30_He4_to_n_S33_reaclib)*Y(He4)*state.rho; + jac.set(S33, Si30, scratch); + + jac.set(S33, Si31, 0.0); + + jac.set(S33, P29, 0.0); + + jac.set(S33, P31, 0.0); + + scratch = screened_rates(k_P33_p_to_n_S33_reaclib)*Y(H1)*state.rho + + screened_rates(k_P33_to_S33_beta_neg_weaktab); + jac.set(S33, P33, scratch); + + scratch = screened_rates(k_S32_n_to_S33_reaclib)*Y(N)*state.rho; + jac.set(S33, S32, scratch); + + scratch = -screened_rates(k_S33_He4_to_Ar37_reaclib)*Y(He4)*state.rho + - screened_rates(k_S33_He4_to_n_Ar36_reaclib)*Y(He4)*state.rho + - screened_rates(k_S33_n_to_He4_Si30_reaclib)*Y(N)*state.rho + - screened_rates(k_S33_n_to_S34_reaclib)*Y(N)*state.rho + - screened_rates(k_S33_n_to_p_P33_reaclib)*Y(N)*state.rho + - screened_rates(k_S33_p_to_n_Cl33_reaclib)*Y(H1)*state.rho + - screened_rates(k_S33_to_Cl33_beta_neg_weaktab) + - screened_rates(k_S33_to_He4_Si29_reaclib) + - screened_rates(k_S33_to_P33_electron_capture_weaktab) + - screened_rates(k_S33_to_n_S32_reaclib); + jac.set(S33, S33, scratch); + + scratch = screened_rates(k_S34_to_n_S33_reaclib); + jac.set(S33, S34, scratch); + + jac.set(S33, S35, 0.0); + + scratch = screened_rates(k_Cl33_n_to_p_S33_reaclib)*Y(N)*state.rho + + screened_rates(k_Cl33_to_S33_electron_capture_weaktab); + jac.set(S33, Cl33, scratch); + + jac.set(S33, Cl35, 0.0); + + jac.set(S33, Cl37, 0.0); + + scratch = screened_rates(k_Ar36_n_to_He4_S33_reaclib)*Y(N)*state.rho; + jac.set(S33, Ar36, scratch); + + scratch = screened_rates(k_Ar37_to_He4_S33_reaclib); + jac.set(S33, Ar37, scratch); + + jac.set(S33, Ar38, 0.0); + + jac.set(S33, K37, 0.0); + + jac.set(S33, K39, 0.0); + + jac.set(S33, Ca40, 0.0); + + jac.set(S33, Ca42, 0.0); + + jac.set(S33, Sc41, 0.0); + + jac.set(S33, Sc43, 0.0); + + jac.set(S33, Sc45, 0.0); + + jac.set(S33, Ti44, 0.0); + + jac.set(S33, Ti46, 0.0); + + jac.set(S33, Ti48, 0.0); + + jac.set(S33, V47, 0.0); + + jac.set(S33, V49, 0.0); + + jac.set(S33, V51, 0.0); + + jac.set(S33, Cr48, 0.0); + + jac.set(S33, Cr50, 0.0); + + jac.set(S33, Cr52, 0.0); + + jac.set(S33, Cr54, 0.0); + + jac.set(S33, Mn51, 0.0); + + jac.set(S33, Mn53, 0.0); + + jac.set(S33, Mn55, 0.0); + + jac.set(S33, Fe52, 0.0); + + jac.set(S33, Fe54, 0.0); + + jac.set(S33, Fe56, 0.0); + + jac.set(S33, Fe58, 0.0); + + jac.set(S33, Co55, 0.0); + + jac.set(S33, Co56, 0.0); + + jac.set(S33, Co57, 0.0); + + jac.set(S33, Co59, 0.0); + + jac.set(S33, Ni56, 0.0); + + jac.set(S33, Ni58, 0.0); + + jac.set(S33, Ni60, 0.0); + + jac.set(S33, Cu59, 0.0); + + jac.set(S33, Zn60, 0.0); + + + // S34 row + + scratch = screened_rates(k_Ar37_n_to_He4_S34_reaclib)*Y(Ar37)*state.rho + + screened_rates(k_S33_n_to_S34_reaclib)*Y(S33)*state.rho + - screened_rates(k_S34_n_to_He4_Si31_reaclib)*Y(S34)*state.rho + - screened_rates(k_S34_n_to_S35_reaclib)*Y(S34)*state.rho; + jac.set(S34, N, scratch); + + scratch = screened_rates(k_Cl37_p_to_He4_S34_reaclib)*Y(Cl37)*state.rho + + screened_rates(k_P33_p_to_S34_reaclib)*Y(P33)*state.rho + - screened_rates(k_S34_p_to_Cl35_reaclib)*Y(S34)*state.rho + - screened_rates(k_S34_p_to_He4_P31_reaclib)*Y(S34)*state.rho; + jac.set(S34, H1, scratch); + + scratch = screened_rates(k_P31_He4_to_p_S34_reaclib)*Y(P31)*state.rho + - screened_rates(k_S34_He4_to_Ar38_reaclib)*Y(S34)*state.rho + - screened_rates(k_S34_He4_to_n_Ar37_reaclib)*Y(S34)*state.rho + - screened_rates(k_S34_He4_to_p_Cl37_reaclib)*Y(S34)*state.rho + + screened_rates(k_Si30_He4_to_S34_reaclib)*Y(Si30)*state.rho + + screened_rates(k_Si31_He4_to_n_S34_reaclib)*Y(Si31)*state.rho; + jac.set(S34, He4, scratch); + + jac.set(S34, C12, 0.0); + + jac.set(S34, O16, 0.0); + + jac.set(S34, Ne20, 0.0); + + jac.set(S34, Mg23, 0.0); + + jac.set(S34, Mg24, 0.0); + + jac.set(S34, Al27, 0.0); + + jac.set(S34, Si27, 0.0); + + jac.set(S34, Si28, 0.0); + + jac.set(S34, Si29, 0.0); + + scratch = screened_rates(k_Si30_He4_to_S34_reaclib)*Y(He4)*state.rho; + jac.set(S34, Si30, scratch); + + scratch = screened_rates(k_Si31_He4_to_n_S34_reaclib)*Y(He4)*state.rho; + jac.set(S34, Si31, scratch); + + jac.set(S34, P29, 0.0); + + scratch = screened_rates(k_P31_He4_to_p_S34_reaclib)*Y(He4)*state.rho; + jac.set(S34, P31, scratch); + + scratch = screened_rates(k_P33_p_to_S34_reaclib)*Y(H1)*state.rho; + jac.set(S34, P33, scratch); + + jac.set(S34, S32, 0.0); + + scratch = screened_rates(k_S33_n_to_S34_reaclib)*Y(N)*state.rho; + jac.set(S34, S33, scratch); + + scratch = -screened_rates(k_S34_He4_to_Ar38_reaclib)*Y(He4)*state.rho + - screened_rates(k_S34_He4_to_n_Ar37_reaclib)*Y(He4)*state.rho + - screened_rates(k_S34_He4_to_p_Cl37_reaclib)*Y(He4)*state.rho + - screened_rates(k_S34_n_to_He4_Si31_reaclib)*Y(N)*state.rho + - screened_rates(k_S34_n_to_S35_reaclib)*Y(N)*state.rho + - screened_rates(k_S34_p_to_Cl35_reaclib)*Y(H1)*state.rho + - screened_rates(k_S34_p_to_He4_P31_reaclib)*Y(H1)*state.rho + - screened_rates(k_S34_to_He4_Si30_reaclib) + - screened_rates(k_S34_to_n_S33_reaclib) + - screened_rates(k_S34_to_p_P33_reaclib); + jac.set(S34, S34, scratch); + + scratch = screened_rates(k_S35_to_n_S34_reaclib); + jac.set(S34, S35, scratch); + + jac.set(S34, Cl33, 0.0); + + scratch = screened_rates(k_Cl35_to_p_S34_reaclib); + jac.set(S34, Cl35, scratch); + + scratch = screened_rates(k_Cl37_p_to_He4_S34_reaclib)*Y(H1)*state.rho; + jac.set(S34, Cl37, scratch); + + jac.set(S34, Ar36, 0.0); + + scratch = screened_rates(k_Ar37_n_to_He4_S34_reaclib)*Y(N)*state.rho; + jac.set(S34, Ar37, scratch); + + scratch = screened_rates(k_Ar38_to_He4_S34_reaclib); + jac.set(S34, Ar38, scratch); + + jac.set(S34, K37, 0.0); + + jac.set(S34, K39, 0.0); + + jac.set(S34, Ca40, 0.0); + + jac.set(S34, Ca42, 0.0); + + jac.set(S34, Sc41, 0.0); + + jac.set(S34, Sc43, 0.0); + + jac.set(S34, Sc45, 0.0); + + jac.set(S34, Ti44, 0.0); + + jac.set(S34, Ti46, 0.0); + + jac.set(S34, Ti48, 0.0); + + jac.set(S34, V47, 0.0); + + jac.set(S34, V49, 0.0); + + jac.set(S34, V51, 0.0); + + jac.set(S34, Cr48, 0.0); + + jac.set(S34, Cr50, 0.0); + + jac.set(S34, Cr52, 0.0); + + jac.set(S34, Cr54, 0.0); + + jac.set(S34, Mn51, 0.0); + + jac.set(S34, Mn53, 0.0); + + jac.set(S34, Mn55, 0.0); + + jac.set(S34, Fe52, 0.0); + + jac.set(S34, Fe54, 0.0); + + jac.set(S34, Fe56, 0.0); + + jac.set(S34, Fe58, 0.0); + + jac.set(S34, Co55, 0.0); + + jac.set(S34, Co56, 0.0); + + jac.set(S34, Co57, 0.0); + + jac.set(S34, Co59, 0.0); + + jac.set(S34, Ni56, 0.0); + + jac.set(S34, Ni58, 0.0); + + jac.set(S34, Ni60, 0.0); + + jac.set(S34, Cu59, 0.0); + + jac.set(S34, Zn60, 0.0); + + + // S35 row + + scratch = screened_rates(k_Ar38_n_to_He4_S35_reaclib)*Y(Ar38)*state.rho + + screened_rates(k_Cl35_n_to_p_S35_reaclib)*Y(Cl35)*state.rho + + screened_rates(k_S34_n_to_S35_reaclib)*Y(S34)*state.rho; + jac.set(S35, N, scratch); + + scratch = -screened_rates(k_S35_p_to_n_Cl35_reaclib)*Y(S35)*state.rho; + jac.set(S35, H1, scratch); + + scratch = -screened_rates(k_S35_He4_to_n_Ar38_reaclib)*Y(S35)*state.rho + + screened_rates(k_Si31_He4_to_S35_reaclib)*Y(Si31)*state.rho; + jac.set(S35, He4, scratch); + + jac.set(S35, C12, 0.0); + + jac.set(S35, O16, 0.0); + + jac.set(S35, Ne20, 0.0); + + jac.set(S35, Mg23, 0.0); + + jac.set(S35, Mg24, 0.0); + + jac.set(S35, Al27, 0.0); + + jac.set(S35, Si27, 0.0); + + jac.set(S35, Si28, 0.0); + + jac.set(S35, Si29, 0.0); + + jac.set(S35, Si30, 0.0); + + scratch = screened_rates(k_Si31_He4_to_S35_reaclib)*Y(He4)*state.rho; + jac.set(S35, Si31, scratch); + + jac.set(S35, P29, 0.0); + + jac.set(S35, P31, 0.0); + + jac.set(S35, P33, 0.0); + + jac.set(S35, S32, 0.0); + + jac.set(S35, S33, 0.0); + + scratch = screened_rates(k_S34_n_to_S35_reaclib)*Y(N)*state.rho; + jac.set(S35, S34, scratch); + + scratch = -screened_rates(k_S35_He4_to_n_Ar38_reaclib)*Y(He4)*state.rho + - screened_rates(k_S35_p_to_n_Cl35_reaclib)*Y(H1)*state.rho + - screened_rates(k_S35_to_Cl35_beta_neg_weaktab) + - screened_rates(k_S35_to_He4_Si31_reaclib) + - screened_rates(k_S35_to_n_S34_reaclib); + jac.set(S35, S35, scratch); + + jac.set(S35, Cl33, 0.0); + + scratch = screened_rates(k_Cl35_n_to_p_S35_reaclib)*Y(N)*state.rho + + screened_rates(k_Cl35_to_S35_electron_capture_weaktab); + jac.set(S35, Cl35, scratch); + + jac.set(S35, Cl37, 0.0); + + jac.set(S35, Ar36, 0.0); + + jac.set(S35, Ar37, 0.0); + + scratch = screened_rates(k_Ar38_n_to_He4_S35_reaclib)*Y(N)*state.rho; + jac.set(S35, Ar38, scratch); + + jac.set(S35, K37, 0.0); + + jac.set(S35, K39, 0.0); + + jac.set(S35, Ca40, 0.0); + + jac.set(S35, Ca42, 0.0); + + jac.set(S35, Sc41, 0.0); + + jac.set(S35, Sc43, 0.0); + + jac.set(S35, Sc45, 0.0); + + jac.set(S35, Ti44, 0.0); + + jac.set(S35, Ti46, 0.0); + + jac.set(S35, Ti48, 0.0); + + jac.set(S35, V47, 0.0); + + jac.set(S35, V49, 0.0); + + jac.set(S35, V51, 0.0); + + jac.set(S35, Cr48, 0.0); + + jac.set(S35, Cr50, 0.0); + + jac.set(S35, Cr52, 0.0); + + jac.set(S35, Cr54, 0.0); + + jac.set(S35, Mn51, 0.0); + + jac.set(S35, Mn53, 0.0); + + jac.set(S35, Mn55, 0.0); + + jac.set(S35, Fe52, 0.0); + + jac.set(S35, Fe54, 0.0); + + jac.set(S35, Fe56, 0.0); + + jac.set(S35, Fe58, 0.0); + + jac.set(S35, Co55, 0.0); + + jac.set(S35, Co56, 0.0); + + jac.set(S35, Co57, 0.0); + + jac.set(S35, Co59, 0.0); + + jac.set(S35, Ni56, 0.0); + + jac.set(S35, Ni58, 0.0); + + jac.set(S35, Ni60, 0.0); + + jac.set(S35, Cu59, 0.0); + + jac.set(S35, Zn60, 0.0); + + + // Cl33 row + + scratch = -screened_rates(k_Cl33_n_to_p_S33_reaclib)*Y(Cl33)*state.rho; + jac.set(Cl33, N, scratch); + + scratch = screened_rates(k_Ar36_p_to_He4_Cl33_reaclib)*Y(Ar36)*state.rho + + screened_rates(k_S32_p_to_Cl33_reaclib)*Y(S32)*state.rho + + screened_rates(k_S33_p_to_n_Cl33_reaclib)*Y(S33)*state.rho; + jac.set(Cl33, H1, scratch); + + scratch = -screened_rates(k_Cl33_He4_to_K37_reaclib)*Y(Cl33)*state.rho + - screened_rates(k_Cl33_He4_to_p_Ar36_reaclib)*Y(Cl33)*state.rho + + screened_rates(k_P29_He4_to_Cl33_reaclib)*Y(P29)*state.rho; + jac.set(Cl33, He4, scratch); + + jac.set(Cl33, C12, 0.0); + + jac.set(Cl33, O16, 0.0); + + jac.set(Cl33, Ne20, 0.0); + + jac.set(Cl33, Mg23, 0.0); + + jac.set(Cl33, Mg24, 0.0); + + jac.set(Cl33, Al27, 0.0); + + jac.set(Cl33, Si27, 0.0); + + jac.set(Cl33, Si28, 0.0); + + jac.set(Cl33, Si29, 0.0); + + jac.set(Cl33, Si30, 0.0); + + jac.set(Cl33, Si31, 0.0); + + scratch = screened_rates(k_P29_He4_to_Cl33_reaclib)*Y(He4)*state.rho; + jac.set(Cl33, P29, scratch); + + jac.set(Cl33, P31, 0.0); + + jac.set(Cl33, P33, 0.0); + + scratch = screened_rates(k_S32_p_to_Cl33_reaclib)*Y(H1)*state.rho; + jac.set(Cl33, S32, scratch); + + scratch = screened_rates(k_S33_p_to_n_Cl33_reaclib)*Y(H1)*state.rho + + screened_rates(k_S33_to_Cl33_beta_neg_weaktab); + jac.set(Cl33, S33, scratch); + + jac.set(Cl33, S34, 0.0); + + jac.set(Cl33, S35, 0.0); + + scratch = -screened_rates(k_Cl33_He4_to_K37_reaclib)*Y(He4)*state.rho + - screened_rates(k_Cl33_He4_to_p_Ar36_reaclib)*Y(He4)*state.rho + - screened_rates(k_Cl33_n_to_p_S33_reaclib)*Y(N)*state.rho + - screened_rates(k_Cl33_to_He4_P29_reaclib) + - screened_rates(k_Cl33_to_S33_electron_capture_weaktab) + - screened_rates(k_Cl33_to_p_S32_reaclib); + jac.set(Cl33, Cl33, scratch); + + jac.set(Cl33, Cl35, 0.0); + + jac.set(Cl33, Cl37, 0.0); + + scratch = screened_rates(k_Ar36_p_to_He4_Cl33_reaclib)*Y(H1)*state.rho; + jac.set(Cl33, Ar36, scratch); + + jac.set(Cl33, Ar37, 0.0); + + jac.set(Cl33, Ar38, 0.0); + + scratch = screened_rates(k_K37_to_He4_Cl33_reaclib); + jac.set(Cl33, K37, scratch); + + jac.set(Cl33, K39, 0.0); + + jac.set(Cl33, Ca40, 0.0); + + jac.set(Cl33, Ca42, 0.0); + + jac.set(Cl33, Sc41, 0.0); + + jac.set(Cl33, Sc43, 0.0); + + jac.set(Cl33, Sc45, 0.0); + + jac.set(Cl33, Ti44, 0.0); + + jac.set(Cl33, Ti46, 0.0); + + jac.set(Cl33, Ti48, 0.0); + + jac.set(Cl33, V47, 0.0); + + jac.set(Cl33, V49, 0.0); + + jac.set(Cl33, V51, 0.0); + + jac.set(Cl33, Cr48, 0.0); + + jac.set(Cl33, Cr50, 0.0); + + jac.set(Cl33, Cr52, 0.0); + + jac.set(Cl33, Cr54, 0.0); + + jac.set(Cl33, Mn51, 0.0); + + jac.set(Cl33, Mn53, 0.0); + + jac.set(Cl33, Mn55, 0.0); + + jac.set(Cl33, Fe52, 0.0); + + jac.set(Cl33, Fe54, 0.0); + + jac.set(Cl33, Fe56, 0.0); + + jac.set(Cl33, Fe58, 0.0); + + jac.set(Cl33, Co55, 0.0); + + jac.set(Cl33, Co56, 0.0); + + jac.set(Cl33, Co57, 0.0); + + jac.set(Cl33, Co59, 0.0); + + jac.set(Cl33, Ni56, 0.0); + + jac.set(Cl33, Ni58, 0.0); + + jac.set(Cl33, Ni60, 0.0); + + jac.set(Cl33, Cu59, 0.0); + + jac.set(Cl33, Zn60, 0.0); + + + // Cl35 row + + scratch = -screened_rates(k_Cl35_n_to_p_S35_reaclib)*Y(Cl35)*state.rho; + jac.set(Cl35, N, scratch); + + scratch = screened_rates(k_Ar38_p_to_He4_Cl35_reaclib)*Y(Ar38)*state.rho + - screened_rates(k_Cl35_p_to_Ar36_reaclib)*Y(Cl35)*state.rho + - screened_rates(k_Cl35_p_to_He4_S32_reaclib)*Y(Cl35)*state.rho + + screened_rates(k_S34_p_to_Cl35_reaclib)*Y(S34)*state.rho + + screened_rates(k_S35_p_to_n_Cl35_reaclib)*Y(S35)*state.rho; + jac.set(Cl35, H1, scratch); + + scratch = -screened_rates(k_Cl35_He4_to_K39_reaclib)*Y(Cl35)*state.rho + - screened_rates(k_Cl35_He4_to_p_Ar38_reaclib)*Y(Cl35)*state.rho + + screened_rates(k_P31_He4_to_Cl35_reaclib)*Y(P31)*state.rho + + screened_rates(k_S32_He4_to_p_Cl35_reaclib)*Y(S32)*state.rho; + jac.set(Cl35, He4, scratch); + + jac.set(Cl35, C12, 0.0); + + jac.set(Cl35, O16, 0.0); + + jac.set(Cl35, Ne20, 0.0); + + jac.set(Cl35, Mg23, 0.0); + + jac.set(Cl35, Mg24, 0.0); + + jac.set(Cl35, Al27, 0.0); + + jac.set(Cl35, Si27, 0.0); + + jac.set(Cl35, Si28, 0.0); + + jac.set(Cl35, Si29, 0.0); + + jac.set(Cl35, Si30, 0.0); + + jac.set(Cl35, Si31, 0.0); + + jac.set(Cl35, P29, 0.0); + + scratch = screened_rates(k_P31_He4_to_Cl35_reaclib)*Y(He4)*state.rho; + jac.set(Cl35, P31, scratch); + + jac.set(Cl35, P33, 0.0); + + scratch = screened_rates(k_S32_He4_to_p_Cl35_reaclib)*Y(He4)*state.rho; + jac.set(Cl35, S32, scratch); + + jac.set(Cl35, S33, 0.0); + + scratch = screened_rates(k_S34_p_to_Cl35_reaclib)*Y(H1)*state.rho; + jac.set(Cl35, S34, scratch); + + scratch = screened_rates(k_S35_p_to_n_Cl35_reaclib)*Y(H1)*state.rho + + screened_rates(k_S35_to_Cl35_beta_neg_weaktab); + jac.set(Cl35, S35, scratch); + + jac.set(Cl35, Cl33, 0.0); + + scratch = -screened_rates(k_Cl35_He4_to_K39_reaclib)*Y(He4)*state.rho + - screened_rates(k_Cl35_He4_to_p_Ar38_reaclib)*Y(He4)*state.rho + - screened_rates(k_Cl35_n_to_p_S35_reaclib)*Y(N)*state.rho + - screened_rates(k_Cl35_p_to_Ar36_reaclib)*Y(H1)*state.rho + - screened_rates(k_Cl35_p_to_He4_S32_reaclib)*Y(H1)*state.rho + - screened_rates(k_Cl35_to_He4_P31_reaclib) + - screened_rates(k_Cl35_to_S35_electron_capture_weaktab) + - screened_rates(k_Cl35_to_p_S34_reaclib); + jac.set(Cl35, Cl35, scratch); + + jac.set(Cl35, Cl37, 0.0); + + scratch = screened_rates(k_Ar36_to_p_Cl35_reaclib); + jac.set(Cl35, Ar36, scratch); + + jac.set(Cl35, Ar37, 0.0); + + scratch = screened_rates(k_Ar38_p_to_He4_Cl35_reaclib)*Y(H1)*state.rho; + jac.set(Cl35, Ar38, scratch); + + jac.set(Cl35, K37, 0.0); + + scratch = screened_rates(k_K39_to_He4_Cl35_reaclib); + jac.set(Cl35, K39, scratch); + + jac.set(Cl35, Ca40, 0.0); + + jac.set(Cl35, Ca42, 0.0); + + jac.set(Cl35, Sc41, 0.0); + + jac.set(Cl35, Sc43, 0.0); + + jac.set(Cl35, Sc45, 0.0); + + jac.set(Cl35, Ti44, 0.0); + + jac.set(Cl35, Ti46, 0.0); + + jac.set(Cl35, Ti48, 0.0); + + jac.set(Cl35, V47, 0.0); + + jac.set(Cl35, V49, 0.0); + + jac.set(Cl35, V51, 0.0); + + jac.set(Cl35, Cr48, 0.0); + + jac.set(Cl35, Cr50, 0.0); + + jac.set(Cl35, Cr52, 0.0); + + jac.set(Cl35, Cr54, 0.0); + + jac.set(Cl35, Mn51, 0.0); + + jac.set(Cl35, Mn53, 0.0); + + jac.set(Cl35, Mn55, 0.0); + + jac.set(Cl35, Fe52, 0.0); + + jac.set(Cl35, Fe54, 0.0); + + jac.set(Cl35, Fe56, 0.0); + + jac.set(Cl35, Fe58, 0.0); + + jac.set(Cl35, Co55, 0.0); + + jac.set(Cl35, Co56, 0.0); + + jac.set(Cl35, Co57, 0.0); + + jac.set(Cl35, Co59, 0.0); + + jac.set(Cl35, Ni56, 0.0); + + jac.set(Cl35, Ni58, 0.0); + + jac.set(Cl35, Ni60, 0.0); + + jac.set(Cl35, Cu59, 0.0); + + jac.set(Cl35, Zn60, 0.0); + + + // Cl37 row + + scratch = screened_rates(k_Ar37_n_to_p_Cl37_reaclib)*Y(Ar37)*state.rho; + jac.set(Cl37, N, scratch); + + scratch = -screened_rates(k_Cl37_p_to_Ar38_reaclib)*Y(Cl37)*state.rho + - screened_rates(k_Cl37_p_to_He4_S34_reaclib)*Y(Cl37)*state.rho + - screened_rates(k_Cl37_p_to_n_Ar37_reaclib)*Y(Cl37)*state.rho; + jac.set(Cl37, H1, scratch); + + scratch = screened_rates(k_P33_He4_to_Cl37_reaclib)*Y(P33)*state.rho + + screened_rates(k_S34_He4_to_p_Cl37_reaclib)*Y(S34)*state.rho; + jac.set(Cl37, He4, scratch); + + jac.set(Cl37, C12, 0.0); + + jac.set(Cl37, O16, 0.0); + + jac.set(Cl37, Ne20, 0.0); + + jac.set(Cl37, Mg23, 0.0); + + jac.set(Cl37, Mg24, 0.0); + + jac.set(Cl37, Al27, 0.0); + + jac.set(Cl37, Si27, 0.0); + + jac.set(Cl37, Si28, 0.0); + + jac.set(Cl37, Si29, 0.0); + + jac.set(Cl37, Si30, 0.0); + + jac.set(Cl37, Si31, 0.0); + + jac.set(Cl37, P29, 0.0); + + jac.set(Cl37, P31, 0.0); + + scratch = screened_rates(k_P33_He4_to_Cl37_reaclib)*Y(He4)*state.rho; + jac.set(Cl37, P33, scratch); + + jac.set(Cl37, S32, 0.0); + + jac.set(Cl37, S33, 0.0); + + scratch = screened_rates(k_S34_He4_to_p_Cl37_reaclib)*Y(He4)*state.rho; + jac.set(Cl37, S34, scratch); + + jac.set(Cl37, S35, 0.0); + + jac.set(Cl37, Cl33, 0.0); + + jac.set(Cl37, Cl35, 0.0); + + scratch = -screened_rates(k_Cl37_p_to_Ar38_reaclib)*Y(H1)*state.rho + - screened_rates(k_Cl37_p_to_He4_S34_reaclib)*Y(H1)*state.rho + - screened_rates(k_Cl37_p_to_n_Ar37_reaclib)*Y(H1)*state.rho + - screened_rates(k_Cl37_to_Ar37_beta_neg_weaktab) + - screened_rates(k_Cl37_to_He4_P33_reaclib); + jac.set(Cl37, Cl37, scratch); + + jac.set(Cl37, Ar36, 0.0); + + scratch = screened_rates(k_Ar37_n_to_p_Cl37_reaclib)*Y(N)*state.rho + + screened_rates(k_Ar37_to_Cl37_electron_capture_weaktab); + jac.set(Cl37, Ar37, scratch); + + scratch = screened_rates(k_Ar38_to_p_Cl37_reaclib); + jac.set(Cl37, Ar38, scratch); + + jac.set(Cl37, K37, 0.0); + + jac.set(Cl37, K39, 0.0); + + jac.set(Cl37, Ca40, 0.0); + + jac.set(Cl37, Ca42, 0.0); + + jac.set(Cl37, Sc41, 0.0); + + jac.set(Cl37, Sc43, 0.0); + + jac.set(Cl37, Sc45, 0.0); + + jac.set(Cl37, Ti44, 0.0); + + jac.set(Cl37, Ti46, 0.0); + + jac.set(Cl37, Ti48, 0.0); + + jac.set(Cl37, V47, 0.0); + + jac.set(Cl37, V49, 0.0); + + jac.set(Cl37, V51, 0.0); + + jac.set(Cl37, Cr48, 0.0); + + jac.set(Cl37, Cr50, 0.0); + + jac.set(Cl37, Cr52, 0.0); + + jac.set(Cl37, Cr54, 0.0); + + jac.set(Cl37, Mn51, 0.0); + + jac.set(Cl37, Mn53, 0.0); + + jac.set(Cl37, Mn55, 0.0); + + jac.set(Cl37, Fe52, 0.0); + + jac.set(Cl37, Fe54, 0.0); + + jac.set(Cl37, Fe56, 0.0); + + jac.set(Cl37, Fe58, 0.0); + + jac.set(Cl37, Co55, 0.0); + + jac.set(Cl37, Co56, 0.0); + + jac.set(Cl37, Co57, 0.0); + + jac.set(Cl37, Co59, 0.0); + + jac.set(Cl37, Ni56, 0.0); + + jac.set(Cl37, Ni58, 0.0); + + jac.set(Cl37, Ni60, 0.0); + + jac.set(Cl37, Cu59, 0.0); + + jac.set(Cl37, Zn60, 0.0); + + + // Ar36 row + + scratch = -screened_rates(k_Ar36_n_to_Ar37_reaclib)*Y(Ar36)*state.rho + - screened_rates(k_Ar36_n_to_He4_S33_reaclib)*Y(Ar36)*state.rho; + jac.set(Ar36, N, scratch); + + scratch = -screened_rates(k_Ar36_p_to_He4_Cl33_reaclib)*Y(Ar36)*state.rho + - screened_rates(k_Ar36_p_to_K37_reaclib)*Y(Ar36)*state.rho + + screened_rates(k_Cl35_p_to_Ar36_reaclib)*Y(Cl35)*state.rho + + screened_rates(k_K39_p_to_He4_Ar36_reaclib)*Y(K39)*state.rho; + jac.set(Ar36, H1, scratch); + + scratch = -screened_rates(k_Ar36_He4_to_Ca40_reaclib)*Y(Ar36)*state.rho + - screened_rates(k_Ar36_He4_to_p_K39_reaclib)*Y(Ar36)*state.rho + + screened_rates(k_Cl33_He4_to_p_Ar36_reaclib)*Y(Cl33)*state.rho + + screened_rates(k_S32_He4_to_Ar36_reaclib)*Y(S32)*state.rho + + screened_rates(k_S33_He4_to_n_Ar36_reaclib)*Y(S33)*state.rho; + jac.set(Ar36, He4, scratch); + + jac.set(Ar36, C12, 0.0); + + jac.set(Ar36, O16, 0.0); + + jac.set(Ar36, Ne20, 0.0); + + jac.set(Ar36, Mg23, 0.0); + + jac.set(Ar36, Mg24, 0.0); + + jac.set(Ar36, Al27, 0.0); + + jac.set(Ar36, Si27, 0.0); + + jac.set(Ar36, Si28, 0.0); + + jac.set(Ar36, Si29, 0.0); + + jac.set(Ar36, Si30, 0.0); + + jac.set(Ar36, Si31, 0.0); + + jac.set(Ar36, P29, 0.0); + + jac.set(Ar36, P31, 0.0); + + jac.set(Ar36, P33, 0.0); + + scratch = screened_rates(k_S32_He4_to_Ar36_reaclib)*Y(He4)*state.rho; + jac.set(Ar36, S32, scratch); + + scratch = screened_rates(k_S33_He4_to_n_Ar36_reaclib)*Y(He4)*state.rho; + jac.set(Ar36, S33, scratch); + + jac.set(Ar36, S34, 0.0); + + jac.set(Ar36, S35, 0.0); + + scratch = screened_rates(k_Cl33_He4_to_p_Ar36_reaclib)*Y(He4)*state.rho; + jac.set(Ar36, Cl33, scratch); + + scratch = screened_rates(k_Cl35_p_to_Ar36_reaclib)*Y(H1)*state.rho; + jac.set(Ar36, Cl35, scratch); + + jac.set(Ar36, Cl37, 0.0); + + scratch = -screened_rates(k_Ar36_He4_to_Ca40_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ar36_He4_to_p_K39_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ar36_n_to_Ar37_reaclib)*Y(N)*state.rho + - screened_rates(k_Ar36_n_to_He4_S33_reaclib)*Y(N)*state.rho + - screened_rates(k_Ar36_p_to_He4_Cl33_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ar36_p_to_K37_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ar36_to_He4_S32_reaclib) + - screened_rates(k_Ar36_to_p_Cl35_reaclib); + jac.set(Ar36, Ar36, scratch); + + scratch = screened_rates(k_Ar37_to_n_Ar36_reaclib); + jac.set(Ar36, Ar37, scratch); + + jac.set(Ar36, Ar38, 0.0); + + scratch = screened_rates(k_K37_to_p_Ar36_reaclib); + jac.set(Ar36, K37, scratch); + + scratch = screened_rates(k_K39_p_to_He4_Ar36_reaclib)*Y(H1)*state.rho; + jac.set(Ar36, K39, scratch); + + scratch = screened_rates(k_Ca40_to_He4_Ar36_reaclib); + jac.set(Ar36, Ca40, scratch); + + jac.set(Ar36, Ca42, 0.0); + + jac.set(Ar36, Sc41, 0.0); + + jac.set(Ar36, Sc43, 0.0); + + jac.set(Ar36, Sc45, 0.0); + + jac.set(Ar36, Ti44, 0.0); + + jac.set(Ar36, Ti46, 0.0); + + jac.set(Ar36, Ti48, 0.0); + + jac.set(Ar36, V47, 0.0); + + jac.set(Ar36, V49, 0.0); + + jac.set(Ar36, V51, 0.0); + + jac.set(Ar36, Cr48, 0.0); + + jac.set(Ar36, Cr50, 0.0); + + jac.set(Ar36, Cr52, 0.0); + + jac.set(Ar36, Cr54, 0.0); + + jac.set(Ar36, Mn51, 0.0); + + jac.set(Ar36, Mn53, 0.0); + + jac.set(Ar36, Mn55, 0.0); + + jac.set(Ar36, Fe52, 0.0); + + jac.set(Ar36, Fe54, 0.0); + + jac.set(Ar36, Fe56, 0.0); + + jac.set(Ar36, Fe58, 0.0); + + jac.set(Ar36, Co55, 0.0); + + jac.set(Ar36, Co56, 0.0); + + jac.set(Ar36, Co57, 0.0); + + jac.set(Ar36, Co59, 0.0); + + jac.set(Ar36, Ni56, 0.0); + + jac.set(Ar36, Ni58, 0.0); + + jac.set(Ar36, Ni60, 0.0); + + jac.set(Ar36, Cu59, 0.0); + + jac.set(Ar36, Zn60, 0.0); + + + // Ar37 row + + scratch = screened_rates(k_Ar36_n_to_Ar37_reaclib)*Y(Ar36)*state.rho + - screened_rates(k_Ar37_n_to_Ar38_reaclib)*Y(Ar37)*state.rho + - screened_rates(k_Ar37_n_to_He4_S34_reaclib)*Y(Ar37)*state.rho + - screened_rates(k_Ar37_n_to_p_Cl37_reaclib)*Y(Ar37)*state.rho + + screened_rates(k_Ca40_n_to_He4_Ar37_reaclib)*Y(Ca40)*state.rho + + screened_rates(k_K37_n_to_p_Ar37_reaclib)*Y(K37)*state.rho; + jac.set(Ar37, N, scratch); + + scratch = -screened_rates(k_Ar37_p_to_n_K37_reaclib)*Y(Ar37)*state.rho + + screened_rates(k_Cl37_p_to_n_Ar37_reaclib)*Y(Cl37)*state.rho; + jac.set(Ar37, H1, scratch); + + scratch = -screened_rates(k_Ar37_He4_to_n_Ca40_reaclib)*Y(Ar37)*state.rho + + screened_rates(k_S33_He4_to_Ar37_reaclib)*Y(S33)*state.rho + + screened_rates(k_S34_He4_to_n_Ar37_reaclib)*Y(S34)*state.rho; + jac.set(Ar37, He4, scratch); + + jac.set(Ar37, C12, 0.0); + + jac.set(Ar37, O16, 0.0); + + jac.set(Ar37, Ne20, 0.0); + + jac.set(Ar37, Mg23, 0.0); + + jac.set(Ar37, Mg24, 0.0); + + jac.set(Ar37, Al27, 0.0); + + jac.set(Ar37, Si27, 0.0); + + jac.set(Ar37, Si28, 0.0); + + jac.set(Ar37, Si29, 0.0); + + jac.set(Ar37, Si30, 0.0); + + jac.set(Ar37, Si31, 0.0); + + jac.set(Ar37, P29, 0.0); + + jac.set(Ar37, P31, 0.0); + + jac.set(Ar37, P33, 0.0); + + jac.set(Ar37, S32, 0.0); + + scratch = screened_rates(k_S33_He4_to_Ar37_reaclib)*Y(He4)*state.rho; + jac.set(Ar37, S33, scratch); + + scratch = screened_rates(k_S34_He4_to_n_Ar37_reaclib)*Y(He4)*state.rho; + jac.set(Ar37, S34, scratch); + + jac.set(Ar37, S35, 0.0); + + jac.set(Ar37, Cl33, 0.0); + + jac.set(Ar37, Cl35, 0.0); + + scratch = screened_rates(k_Cl37_p_to_n_Ar37_reaclib)*Y(H1)*state.rho + + screened_rates(k_Cl37_to_Ar37_beta_neg_weaktab); + jac.set(Ar37, Cl37, scratch); + + scratch = screened_rates(k_Ar36_n_to_Ar37_reaclib)*Y(N)*state.rho; + jac.set(Ar37, Ar36, scratch); + + scratch = -screened_rates(k_Ar37_He4_to_n_Ca40_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ar37_n_to_Ar38_reaclib)*Y(N)*state.rho + - screened_rates(k_Ar37_n_to_He4_S34_reaclib)*Y(N)*state.rho + - screened_rates(k_Ar37_n_to_p_Cl37_reaclib)*Y(N)*state.rho + - screened_rates(k_Ar37_p_to_n_K37_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ar37_to_Cl37_electron_capture_weaktab) + - screened_rates(k_Ar37_to_He4_S33_reaclib) + - screened_rates(k_Ar37_to_K37_beta_neg_weaktab) + - screened_rates(k_Ar37_to_n_Ar36_reaclib); + jac.set(Ar37, Ar37, scratch); + + scratch = screened_rates(k_Ar38_to_n_Ar37_reaclib); + jac.set(Ar37, Ar38, scratch); + + scratch = screened_rates(k_K37_n_to_p_Ar37_reaclib)*Y(N)*state.rho + + screened_rates(k_K37_to_Ar37_electron_capture_weaktab); + jac.set(Ar37, K37, scratch); + + jac.set(Ar37, K39, 0.0); + + scratch = screened_rates(k_Ca40_n_to_He4_Ar37_reaclib)*Y(N)*state.rho; + jac.set(Ar37, Ca40, scratch); + + jac.set(Ar37, Ca42, 0.0); + + jac.set(Ar37, Sc41, 0.0); + + jac.set(Ar37, Sc43, 0.0); + + jac.set(Ar37, Sc45, 0.0); + + jac.set(Ar37, Ti44, 0.0); + + jac.set(Ar37, Ti46, 0.0); + + jac.set(Ar37, Ti48, 0.0); + + jac.set(Ar37, V47, 0.0); + + jac.set(Ar37, V49, 0.0); + + jac.set(Ar37, V51, 0.0); + + jac.set(Ar37, Cr48, 0.0); + + jac.set(Ar37, Cr50, 0.0); + + jac.set(Ar37, Cr52, 0.0); + + jac.set(Ar37, Cr54, 0.0); + + jac.set(Ar37, Mn51, 0.0); + + jac.set(Ar37, Mn53, 0.0); + + jac.set(Ar37, Mn55, 0.0); + + jac.set(Ar37, Fe52, 0.0); + + jac.set(Ar37, Fe54, 0.0); + + jac.set(Ar37, Fe56, 0.0); + + jac.set(Ar37, Fe58, 0.0); + + jac.set(Ar37, Co55, 0.0); + + jac.set(Ar37, Co56, 0.0); + + jac.set(Ar37, Co57, 0.0); + + jac.set(Ar37, Co59, 0.0); + + jac.set(Ar37, Ni56, 0.0); + + jac.set(Ar37, Ni58, 0.0); + + jac.set(Ar37, Ni60, 0.0); + + jac.set(Ar37, Cu59, 0.0); + + jac.set(Ar37, Zn60, 0.0); + + + // Ar38 row + + scratch = screened_rates(k_Ar37_n_to_Ar38_reaclib)*Y(Ar37)*state.rho + - screened_rates(k_Ar38_n_to_He4_S35_reaclib)*Y(Ar38)*state.rho; + jac.set(Ar38, N, scratch); + + scratch = -screened_rates(k_Ar38_p_to_He4_Cl35_reaclib)*Y(Ar38)*state.rho + - screened_rates(k_Ar38_p_to_K39_reaclib)*Y(Ar38)*state.rho + + screened_rates(k_Cl37_p_to_Ar38_reaclib)*Y(Cl37)*state.rho; + jac.set(Ar38, H1, scratch); + + scratch = -screened_rates(k_Ar38_He4_to_Ca42_reaclib)*Y(Ar38)*state.rho + + screened_rates(k_Cl35_He4_to_p_Ar38_reaclib)*Y(Cl35)*state.rho + + screened_rates(k_S34_He4_to_Ar38_reaclib)*Y(S34)*state.rho + + screened_rates(k_S35_He4_to_n_Ar38_reaclib)*Y(S35)*state.rho; + jac.set(Ar38, He4, scratch); + + jac.set(Ar38, C12, 0.0); + + jac.set(Ar38, O16, 0.0); + + jac.set(Ar38, Ne20, 0.0); + + jac.set(Ar38, Mg23, 0.0); + + jac.set(Ar38, Mg24, 0.0); + + jac.set(Ar38, Al27, 0.0); + + jac.set(Ar38, Si27, 0.0); + + jac.set(Ar38, Si28, 0.0); + + jac.set(Ar38, Si29, 0.0); + + jac.set(Ar38, Si30, 0.0); + + jac.set(Ar38, Si31, 0.0); + + jac.set(Ar38, P29, 0.0); + + jac.set(Ar38, P31, 0.0); + + jac.set(Ar38, P33, 0.0); + + jac.set(Ar38, S32, 0.0); + + jac.set(Ar38, S33, 0.0); + + scratch = screened_rates(k_S34_He4_to_Ar38_reaclib)*Y(He4)*state.rho; + jac.set(Ar38, S34, scratch); + + scratch = screened_rates(k_S35_He4_to_n_Ar38_reaclib)*Y(He4)*state.rho; + jac.set(Ar38, S35, scratch); + + jac.set(Ar38, Cl33, 0.0); + + scratch = screened_rates(k_Cl35_He4_to_p_Ar38_reaclib)*Y(He4)*state.rho; + jac.set(Ar38, Cl35, scratch); + + scratch = screened_rates(k_Cl37_p_to_Ar38_reaclib)*Y(H1)*state.rho; + jac.set(Ar38, Cl37, scratch); + + jac.set(Ar38, Ar36, 0.0); + + scratch = screened_rates(k_Ar37_n_to_Ar38_reaclib)*Y(N)*state.rho; + jac.set(Ar38, Ar37, scratch); + + scratch = -screened_rates(k_Ar38_He4_to_Ca42_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ar38_n_to_He4_S35_reaclib)*Y(N)*state.rho + - screened_rates(k_Ar38_p_to_He4_Cl35_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ar38_p_to_K39_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ar38_to_He4_S34_reaclib) + - screened_rates(k_Ar38_to_n_Ar37_reaclib) + - screened_rates(k_Ar38_to_p_Cl37_reaclib); + jac.set(Ar38, Ar38, scratch); + + jac.set(Ar38, K37, 0.0); + + scratch = screened_rates(k_K39_to_p_Ar38_reaclib); + jac.set(Ar38, K39, scratch); + + jac.set(Ar38, Ca40, 0.0); + + scratch = screened_rates(k_Ca42_to_He4_Ar38_reaclib); + jac.set(Ar38, Ca42, scratch); + + jac.set(Ar38, Sc41, 0.0); + + jac.set(Ar38, Sc43, 0.0); + + jac.set(Ar38, Sc45, 0.0); + + jac.set(Ar38, Ti44, 0.0); + + jac.set(Ar38, Ti46, 0.0); + + jac.set(Ar38, Ti48, 0.0); + + jac.set(Ar38, V47, 0.0); + + jac.set(Ar38, V49, 0.0); + + jac.set(Ar38, V51, 0.0); + + jac.set(Ar38, Cr48, 0.0); + + jac.set(Ar38, Cr50, 0.0); + + jac.set(Ar38, Cr52, 0.0); + + jac.set(Ar38, Cr54, 0.0); + + jac.set(Ar38, Mn51, 0.0); + + jac.set(Ar38, Mn53, 0.0); + + jac.set(Ar38, Mn55, 0.0); + + jac.set(Ar38, Fe52, 0.0); + + jac.set(Ar38, Fe54, 0.0); + + jac.set(Ar38, Fe56, 0.0); + + jac.set(Ar38, Fe58, 0.0); + + jac.set(Ar38, Co55, 0.0); + + jac.set(Ar38, Co56, 0.0); + + jac.set(Ar38, Co57, 0.0); + + jac.set(Ar38, Co59, 0.0); + + jac.set(Ar38, Ni56, 0.0); + + jac.set(Ar38, Ni58, 0.0); + + jac.set(Ar38, Ni60, 0.0); + + jac.set(Ar38, Cu59, 0.0); + + jac.set(Ar38, Zn60, 0.0); + + + // K37 row + + scratch = -screened_rates(k_K37_n_to_p_Ar37_reaclib)*Y(K37)*state.rho; + jac.set(K37, N, scratch); + + scratch = screened_rates(k_Ar36_p_to_K37_reaclib)*Y(Ar36)*state.rho + + screened_rates(k_Ar37_p_to_n_K37_reaclib)*Y(Ar37)*state.rho + + screened_rates(k_Ca40_p_to_He4_K37_reaclib)*Y(Ca40)*state.rho; + jac.set(K37, H1, scratch); + + scratch = screened_rates(k_Cl33_He4_to_K37_reaclib)*Y(Cl33)*state.rho + - screened_rates(k_K37_He4_to_Sc41_reaclib)*Y(K37)*state.rho + - screened_rates(k_K37_He4_to_p_Ca40_reaclib)*Y(K37)*state.rho; + jac.set(K37, He4, scratch); + + jac.set(K37, C12, 0.0); + + jac.set(K37, O16, 0.0); + + jac.set(K37, Ne20, 0.0); + + jac.set(K37, Mg23, 0.0); + + jac.set(K37, Mg24, 0.0); + + jac.set(K37, Al27, 0.0); + + jac.set(K37, Si27, 0.0); + + jac.set(K37, Si28, 0.0); + + jac.set(K37, Si29, 0.0); + + jac.set(K37, Si30, 0.0); + + jac.set(K37, Si31, 0.0); + + jac.set(K37, P29, 0.0); + + jac.set(K37, P31, 0.0); + + jac.set(K37, P33, 0.0); + + jac.set(K37, S32, 0.0); + + jac.set(K37, S33, 0.0); + + jac.set(K37, S34, 0.0); + + jac.set(K37, S35, 0.0); + + scratch = screened_rates(k_Cl33_He4_to_K37_reaclib)*Y(He4)*state.rho; + jac.set(K37, Cl33, scratch); + + jac.set(K37, Cl35, 0.0); + + jac.set(K37, Cl37, 0.0); + + scratch = screened_rates(k_Ar36_p_to_K37_reaclib)*Y(H1)*state.rho; + jac.set(K37, Ar36, scratch); + + scratch = screened_rates(k_Ar37_p_to_n_K37_reaclib)*Y(H1)*state.rho + + screened_rates(k_Ar37_to_K37_beta_neg_weaktab); + jac.set(K37, Ar37, scratch); + + jac.set(K37, Ar38, 0.0); + + scratch = -screened_rates(k_K37_He4_to_Sc41_reaclib)*Y(He4)*state.rho + - screened_rates(k_K37_He4_to_p_Ca40_reaclib)*Y(He4)*state.rho + - screened_rates(k_K37_n_to_p_Ar37_reaclib)*Y(N)*state.rho + - screened_rates(k_K37_to_Ar37_electron_capture_weaktab) + - screened_rates(k_K37_to_He4_Cl33_reaclib) + - screened_rates(k_K37_to_p_Ar36_reaclib); + jac.set(K37, K37, scratch); + + jac.set(K37, K39, 0.0); + + scratch = screened_rates(k_Ca40_p_to_He4_K37_reaclib)*Y(H1)*state.rho; + jac.set(K37, Ca40, scratch); + + jac.set(K37, Ca42, 0.0); + + scratch = screened_rates(k_Sc41_to_He4_K37_reaclib); + jac.set(K37, Sc41, scratch); + + jac.set(K37, Sc43, 0.0); + + jac.set(K37, Sc45, 0.0); + + jac.set(K37, Ti44, 0.0); + + jac.set(K37, Ti46, 0.0); + + jac.set(K37, Ti48, 0.0); + + jac.set(K37, V47, 0.0); + + jac.set(K37, V49, 0.0); + + jac.set(K37, V51, 0.0); + + jac.set(K37, Cr48, 0.0); + + jac.set(K37, Cr50, 0.0); + + jac.set(K37, Cr52, 0.0); + + jac.set(K37, Cr54, 0.0); + + jac.set(K37, Mn51, 0.0); + + jac.set(K37, Mn53, 0.0); + + jac.set(K37, Mn55, 0.0); + + jac.set(K37, Fe52, 0.0); + + jac.set(K37, Fe54, 0.0); + + jac.set(K37, Fe56, 0.0); + + jac.set(K37, Fe58, 0.0); + + jac.set(K37, Co55, 0.0); + + jac.set(K37, Co56, 0.0); + + jac.set(K37, Co57, 0.0); + + jac.set(K37, Co59, 0.0); + + jac.set(K37, Ni56, 0.0); + + jac.set(K37, Ni58, 0.0); + + jac.set(K37, Ni60, 0.0); + + jac.set(K37, Cu59, 0.0); + + jac.set(K37, Zn60, 0.0); + + + // K39 row + + jac.set(K39, N, 0.0); + + scratch = screened_rates(k_Ar38_p_to_K39_reaclib)*Y(Ar38)*state.rho + + screened_rates(k_Ca42_p_to_He4_K39_reaclib)*Y(Ca42)*state.rho + - screened_rates(k_K39_p_to_Ca40_reaclib)*Y(K39)*state.rho + - screened_rates(k_K39_p_to_He4_Ar36_reaclib)*Y(K39)*state.rho; + jac.set(K39, H1, scratch); + + scratch = screened_rates(k_Ar36_He4_to_p_K39_reaclib)*Y(Ar36)*state.rho + + screened_rates(k_Cl35_He4_to_K39_reaclib)*Y(Cl35)*state.rho + - screened_rates(k_K39_He4_to_Sc43_reaclib)*Y(K39)*state.rho + - screened_rates(k_K39_He4_to_p_Ca42_reaclib)*Y(K39)*state.rho; + jac.set(K39, He4, scratch); + + jac.set(K39, C12, 0.0); + + jac.set(K39, O16, 0.0); + + jac.set(K39, Ne20, 0.0); + + jac.set(K39, Mg23, 0.0); + + jac.set(K39, Mg24, 0.0); + + jac.set(K39, Al27, 0.0); + + jac.set(K39, Si27, 0.0); + + jac.set(K39, Si28, 0.0); + + jac.set(K39, Si29, 0.0); + + jac.set(K39, Si30, 0.0); + + jac.set(K39, Si31, 0.0); + + jac.set(K39, P29, 0.0); + + jac.set(K39, P31, 0.0); + + jac.set(K39, P33, 0.0); + + jac.set(K39, S32, 0.0); + + jac.set(K39, S33, 0.0); + + jac.set(K39, S34, 0.0); + + jac.set(K39, S35, 0.0); + + jac.set(K39, Cl33, 0.0); + + scratch = screened_rates(k_Cl35_He4_to_K39_reaclib)*Y(He4)*state.rho; + jac.set(K39, Cl35, scratch); + + jac.set(K39, Cl37, 0.0); + + scratch = screened_rates(k_Ar36_He4_to_p_K39_reaclib)*Y(He4)*state.rho; + jac.set(K39, Ar36, scratch); + + jac.set(K39, Ar37, 0.0); + + scratch = screened_rates(k_Ar38_p_to_K39_reaclib)*Y(H1)*state.rho; + jac.set(K39, Ar38, scratch); + + jac.set(K39, K37, 0.0); + + scratch = -screened_rates(k_K39_He4_to_Sc43_reaclib)*Y(He4)*state.rho + - screened_rates(k_K39_He4_to_p_Ca42_reaclib)*Y(He4)*state.rho + - screened_rates(k_K39_p_to_Ca40_reaclib)*Y(H1)*state.rho + - screened_rates(k_K39_p_to_He4_Ar36_reaclib)*Y(H1)*state.rho + - screened_rates(k_K39_to_He4_Cl35_reaclib) + - screened_rates(k_K39_to_p_Ar38_reaclib); + jac.set(K39, K39, scratch); + + scratch = screened_rates(k_Ca40_to_p_K39_reaclib); + jac.set(K39, Ca40, scratch); + + scratch = screened_rates(k_Ca42_p_to_He4_K39_reaclib)*Y(H1)*state.rho; + jac.set(K39, Ca42, scratch); + + jac.set(K39, Sc41, 0.0); + + scratch = screened_rates(k_Sc43_to_He4_K39_reaclib); + jac.set(K39, Sc43, scratch); + + jac.set(K39, Sc45, 0.0); + + jac.set(K39, Ti44, 0.0); + + jac.set(K39, Ti46, 0.0); + + jac.set(K39, Ti48, 0.0); + + jac.set(K39, V47, 0.0); + + jac.set(K39, V49, 0.0); + + jac.set(K39, V51, 0.0); + + jac.set(K39, Cr48, 0.0); + + jac.set(K39, Cr50, 0.0); + + jac.set(K39, Cr52, 0.0); + + jac.set(K39, Cr54, 0.0); + + jac.set(K39, Mn51, 0.0); + + jac.set(K39, Mn53, 0.0); + + jac.set(K39, Mn55, 0.0); + + jac.set(K39, Fe52, 0.0); + + jac.set(K39, Fe54, 0.0); + + jac.set(K39, Fe56, 0.0); + + jac.set(K39, Fe58, 0.0); + + jac.set(K39, Co55, 0.0); + + jac.set(K39, Co56, 0.0); + + jac.set(K39, Co57, 0.0); + + jac.set(K39, Co59, 0.0); + + jac.set(K39, Ni56, 0.0); + + jac.set(K39, Ni58, 0.0); + + jac.set(K39, Ni60, 0.0); + + jac.set(K39, Cu59, 0.0); + + jac.set(K39, Zn60, 0.0); + + + // Ca40 row + + scratch = -1.0*screened_rates(k_Ca40_n_n_to_Ca42_approx)*Y(Ca40)*Y(N)*amrex::Math::powi<2>(state.rho) + - screened_rates(k_Ca40_n_to_He4_Ar37_reaclib)*Y(Ca40)*state.rho + - 0.5*Y(Ca40)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Ca40_n_n_to_Ca42_approx_dYN + + Y(Ca42)*rate_eval.drate_Ca42_to_Ca40_n_n_approx_dYN; + jac.set(Ca40, N, scratch); + + scratch = -screened_rates(k_Ca40_p_to_He4_K37_reaclib)*Y(Ca40)*state.rho + - screened_rates(k_Ca40_p_to_Sc41_reaclib)*Y(Ca40)*state.rho + + screened_rates(k_K39_p_to_Ca40_reaclib)*Y(K39)*state.rho + + screened_rates(k_Sc43_p_to_He4_Ca40_reaclib)*Y(Sc43)*state.rho; + jac.set(Ca40, H1, scratch); + + scratch = screened_rates(k_Ar36_He4_to_Ca40_reaclib)*Y(Ar36)*state.rho + + screened_rates(k_Ar37_He4_to_n_Ca40_reaclib)*Y(Ar37)*state.rho + - screened_rates(k_Ca40_He4_to_Ti44_reaclib)*Y(Ca40)*state.rho + - screened_rates(k_Ca40_He4_to_p_Sc43_reaclib)*Y(Ca40)*state.rho + + screened_rates(k_K37_He4_to_p_Ca40_reaclib)*Y(K37)*state.rho; + jac.set(Ca40, He4, scratch); + + jac.set(Ca40, C12, 0.0); + + jac.set(Ca40, O16, 0.0); + + jac.set(Ca40, Ne20, 0.0); + + jac.set(Ca40, Mg23, 0.0); + + jac.set(Ca40, Mg24, 0.0); + + jac.set(Ca40, Al27, 0.0); + + jac.set(Ca40, Si27, 0.0); + + jac.set(Ca40, Si28, 0.0); + + jac.set(Ca40, Si29, 0.0); + + jac.set(Ca40, Si30, 0.0); + + jac.set(Ca40, Si31, 0.0); + + jac.set(Ca40, P29, 0.0); + + jac.set(Ca40, P31, 0.0); + + jac.set(Ca40, P33, 0.0); + + jac.set(Ca40, S32, 0.0); + + jac.set(Ca40, S33, 0.0); + + jac.set(Ca40, S34, 0.0); + + jac.set(Ca40, S35, 0.0); + + jac.set(Ca40, Cl33, 0.0); + + jac.set(Ca40, Cl35, 0.0); + + jac.set(Ca40, Cl37, 0.0); + + scratch = screened_rates(k_Ar36_He4_to_Ca40_reaclib)*Y(He4)*state.rho; + jac.set(Ca40, Ar36, scratch); + + scratch = screened_rates(k_Ar37_He4_to_n_Ca40_reaclib)*Y(He4)*state.rho; + jac.set(Ca40, Ar37, scratch); + + jac.set(Ca40, Ar38, 0.0); + + scratch = screened_rates(k_K37_He4_to_p_Ca40_reaclib)*Y(He4)*state.rho; + jac.set(Ca40, K37, scratch); + + scratch = screened_rates(k_K39_p_to_Ca40_reaclib)*Y(H1)*state.rho; + jac.set(Ca40, K39, scratch); + + scratch = -screened_rates(k_Ca40_He4_to_Ti44_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ca40_He4_to_p_Sc43_reaclib)*Y(He4)*state.rho + - 0.5*screened_rates(k_Ca40_n_n_to_Ca42_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + - screened_rates(k_Ca40_n_to_He4_Ar37_reaclib)*Y(N)*state.rho + - screened_rates(k_Ca40_p_to_He4_K37_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ca40_p_to_Sc41_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ca40_to_He4_Ar36_reaclib) + - screened_rates(k_Ca40_to_p_K39_reaclib); + jac.set(Ca40, Ca40, scratch); + + scratch = screened_rates(k_Ca42_to_Ca40_n_n_approx); + jac.set(Ca40, Ca42, scratch); + + scratch = screened_rates(k_Sc41_to_p_Ca40_reaclib); + jac.set(Ca40, Sc41, scratch); + + scratch = screened_rates(k_Sc43_p_to_He4_Ca40_reaclib)*Y(H1)*state.rho; + jac.set(Ca40, Sc43, scratch); + + jac.set(Ca40, Sc45, 0.0); + + scratch = screened_rates(k_Ti44_to_He4_Ca40_reaclib); + jac.set(Ca40, Ti44, scratch); + + jac.set(Ca40, Ti46, 0.0); + + jac.set(Ca40, Ti48, 0.0); + + jac.set(Ca40, V47, 0.0); + + jac.set(Ca40, V49, 0.0); + + jac.set(Ca40, V51, 0.0); + + jac.set(Ca40, Cr48, 0.0); + + jac.set(Ca40, Cr50, 0.0); + + jac.set(Ca40, Cr52, 0.0); + + jac.set(Ca40, Cr54, 0.0); + + jac.set(Ca40, Mn51, 0.0); + + jac.set(Ca40, Mn53, 0.0); + + jac.set(Ca40, Mn55, 0.0); + + jac.set(Ca40, Fe52, 0.0); + + jac.set(Ca40, Fe54, 0.0); + + jac.set(Ca40, Fe56, 0.0); + + jac.set(Ca40, Fe58, 0.0); + + jac.set(Ca40, Co55, 0.0); + + jac.set(Ca40, Co56, 0.0); + + jac.set(Ca40, Co57, 0.0); + + jac.set(Ca40, Co59, 0.0); + + jac.set(Ca40, Ni56, 0.0); + + jac.set(Ca40, Ni58, 0.0); + + jac.set(Ca40, Ni60, 0.0); + + jac.set(Ca40, Cu59, 0.0); + + jac.set(Ca40, Zn60, 0.0); + + + // Ca42 row + + scratch = 1.0*screened_rates(k_Ca40_n_n_to_Ca42_approx)*Y(Ca40)*Y(N)*amrex::Math::powi<2>(state.rho) + + 0.5*Y(Ca40)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Ca40_n_n_to_Ca42_approx_dYN + - Y(Ca42)*rate_eval.drate_Ca42_to_Ca40_n_n_approx_dYN; + jac.set(Ca42, N, scratch); + + scratch = -screened_rates(k_Ca42_p_to_He4_K39_reaclib)*Y(Ca42)*state.rho + - screened_rates(k_Ca42_p_to_Sc43_reaclib)*Y(Ca42)*state.rho + + screened_rates(k_Sc45_p_to_He4_Ca42_reaclib)*Y(Sc45)*state.rho; + jac.set(Ca42, H1, scratch); + + scratch = screened_rates(k_Ar38_He4_to_Ca42_reaclib)*Y(Ar38)*state.rho + - screened_rates(k_Ca42_He4_to_Ti46_reaclib)*Y(Ca42)*state.rho + - screened_rates(k_Ca42_He4_to_p_Sc45_reaclib)*Y(Ca42)*state.rho + + screened_rates(k_K39_He4_to_p_Ca42_reaclib)*Y(K39)*state.rho; + jac.set(Ca42, He4, scratch); + + jac.set(Ca42, C12, 0.0); + + jac.set(Ca42, O16, 0.0); + + jac.set(Ca42, Ne20, 0.0); + + jac.set(Ca42, Mg23, 0.0); + + jac.set(Ca42, Mg24, 0.0); + + jac.set(Ca42, Al27, 0.0); + + jac.set(Ca42, Si27, 0.0); + + jac.set(Ca42, Si28, 0.0); + + jac.set(Ca42, Si29, 0.0); + + jac.set(Ca42, Si30, 0.0); + + jac.set(Ca42, Si31, 0.0); + + jac.set(Ca42, P29, 0.0); + + jac.set(Ca42, P31, 0.0); + + jac.set(Ca42, P33, 0.0); + + jac.set(Ca42, S32, 0.0); + + jac.set(Ca42, S33, 0.0); + + jac.set(Ca42, S34, 0.0); + + jac.set(Ca42, S35, 0.0); + + jac.set(Ca42, Cl33, 0.0); + + jac.set(Ca42, Cl35, 0.0); + + jac.set(Ca42, Cl37, 0.0); + + jac.set(Ca42, Ar36, 0.0); + + jac.set(Ca42, Ar37, 0.0); + + scratch = screened_rates(k_Ar38_He4_to_Ca42_reaclib)*Y(He4)*state.rho; + jac.set(Ca42, Ar38, scratch); + + jac.set(Ca42, K37, 0.0); + + scratch = screened_rates(k_K39_He4_to_p_Ca42_reaclib)*Y(He4)*state.rho; + jac.set(Ca42, K39, scratch); + + scratch = 0.5*screened_rates(k_Ca40_n_n_to_Ca42_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); + jac.set(Ca42, Ca40, scratch); + + scratch = -screened_rates(k_Ca42_He4_to_Ti46_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ca42_He4_to_p_Sc45_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ca42_p_to_He4_K39_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ca42_p_to_Sc43_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ca42_to_Ca40_n_n_approx) + - screened_rates(k_Ca42_to_He4_Ar38_reaclib); + jac.set(Ca42, Ca42, scratch); + + jac.set(Ca42, Sc41, 0.0); + + scratch = screened_rates(k_Sc43_to_p_Ca42_reaclib); + jac.set(Ca42, Sc43, scratch); + + scratch = screened_rates(k_Sc45_p_to_He4_Ca42_reaclib)*Y(H1)*state.rho; + jac.set(Ca42, Sc45, scratch); + + jac.set(Ca42, Ti44, 0.0); + + scratch = screened_rates(k_Ti46_to_He4_Ca42_reaclib); + jac.set(Ca42, Ti46, scratch); + + jac.set(Ca42, Ti48, 0.0); + + jac.set(Ca42, V47, 0.0); + + jac.set(Ca42, V49, 0.0); + + jac.set(Ca42, V51, 0.0); + + jac.set(Ca42, Cr48, 0.0); + + jac.set(Ca42, Cr50, 0.0); + + jac.set(Ca42, Cr52, 0.0); + + jac.set(Ca42, Cr54, 0.0); + + jac.set(Ca42, Mn51, 0.0); + + jac.set(Ca42, Mn53, 0.0); + + jac.set(Ca42, Mn55, 0.0); + + jac.set(Ca42, Fe52, 0.0); + + jac.set(Ca42, Fe54, 0.0); + + jac.set(Ca42, Fe56, 0.0); + + jac.set(Ca42, Fe58, 0.0); + + jac.set(Ca42, Co55, 0.0); + + jac.set(Ca42, Co56, 0.0); + + jac.set(Ca42, Co57, 0.0); + + jac.set(Ca42, Co59, 0.0); + + jac.set(Ca42, Ni56, 0.0); + + jac.set(Ca42, Ni58, 0.0); + + jac.set(Ca42, Ni60, 0.0); + + jac.set(Ca42, Cu59, 0.0); + + jac.set(Ca42, Zn60, 0.0); + + + // Sc41 row + + scratch = -1.0*screened_rates(k_Sc41_n_n_to_Sc43_approx)*Y(Sc41)*Y(N)*amrex::Math::powi<2>(state.rho) + - 0.5*Y(Sc41)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Sc41_n_n_to_Sc43_approx_dYN + + Y(Sc43)*rate_eval.drate_Sc43_to_Sc41_n_n_approx_dYN; + jac.set(Sc41, N, scratch); + + scratch = screened_rates(k_Ca40_p_to_Sc41_reaclib)*Y(Ca40)*state.rho + + screened_rates(k_Ti44_p_to_He4_Sc41_reaclib)*Y(Ti44)*state.rho; + jac.set(Sc41, H1, scratch); + + scratch = screened_rates(k_K37_He4_to_Sc41_reaclib)*Y(K37)*state.rho + - screened_rates(k_Sc41_He4_to_p_Ti44_reaclib)*Y(Sc41)*state.rho; + jac.set(Sc41, He4, scratch); + + jac.set(Sc41, C12, 0.0); + + jac.set(Sc41, O16, 0.0); + + jac.set(Sc41, Ne20, 0.0); + + jac.set(Sc41, Mg23, 0.0); + + jac.set(Sc41, Mg24, 0.0); + + jac.set(Sc41, Al27, 0.0); + + jac.set(Sc41, Si27, 0.0); + + jac.set(Sc41, Si28, 0.0); + + jac.set(Sc41, Si29, 0.0); + + jac.set(Sc41, Si30, 0.0); + + jac.set(Sc41, Si31, 0.0); + + jac.set(Sc41, P29, 0.0); + + jac.set(Sc41, P31, 0.0); + + jac.set(Sc41, P33, 0.0); + + jac.set(Sc41, S32, 0.0); + + jac.set(Sc41, S33, 0.0); + + jac.set(Sc41, S34, 0.0); + + jac.set(Sc41, S35, 0.0); + + jac.set(Sc41, Cl33, 0.0); + + jac.set(Sc41, Cl35, 0.0); + + jac.set(Sc41, Cl37, 0.0); + + jac.set(Sc41, Ar36, 0.0); + + jac.set(Sc41, Ar37, 0.0); + + jac.set(Sc41, Ar38, 0.0); + + scratch = screened_rates(k_K37_He4_to_Sc41_reaclib)*Y(He4)*state.rho; + jac.set(Sc41, K37, scratch); + + jac.set(Sc41, K39, 0.0); + + scratch = screened_rates(k_Ca40_p_to_Sc41_reaclib)*Y(H1)*state.rho; + jac.set(Sc41, Ca40, scratch); + + jac.set(Sc41, Ca42, 0.0); + + scratch = -screened_rates(k_Sc41_He4_to_p_Ti44_reaclib)*Y(He4)*state.rho + - 0.5*screened_rates(k_Sc41_n_n_to_Sc43_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + - screened_rates(k_Sc41_to_He4_K37_reaclib) + - screened_rates(k_Sc41_to_p_Ca40_reaclib); + jac.set(Sc41, Sc41, scratch); + + scratch = screened_rates(k_Sc43_to_Sc41_n_n_approx); + jac.set(Sc41, Sc43, scratch); + + jac.set(Sc41, Sc45, 0.0); + + scratch = screened_rates(k_Ti44_p_to_He4_Sc41_reaclib)*Y(H1)*state.rho; + jac.set(Sc41, Ti44, scratch); + + jac.set(Sc41, Ti46, 0.0); + + jac.set(Sc41, Ti48, 0.0); + + jac.set(Sc41, V47, 0.0); + + jac.set(Sc41, V49, 0.0); + + jac.set(Sc41, V51, 0.0); + + jac.set(Sc41, Cr48, 0.0); + + jac.set(Sc41, Cr50, 0.0); + + jac.set(Sc41, Cr52, 0.0); + + jac.set(Sc41, Cr54, 0.0); + + jac.set(Sc41, Mn51, 0.0); + + jac.set(Sc41, Mn53, 0.0); + + jac.set(Sc41, Mn55, 0.0); + + jac.set(Sc41, Fe52, 0.0); + + jac.set(Sc41, Fe54, 0.0); + + jac.set(Sc41, Fe56, 0.0); + + jac.set(Sc41, Fe58, 0.0); + + jac.set(Sc41, Co55, 0.0); + + jac.set(Sc41, Co56, 0.0); + + jac.set(Sc41, Co57, 0.0); + + jac.set(Sc41, Co59, 0.0); + + jac.set(Sc41, Ni56, 0.0); + + jac.set(Sc41, Ni58, 0.0); + + jac.set(Sc41, Ni60, 0.0); + + jac.set(Sc41, Cu59, 0.0); + + jac.set(Sc41, Zn60, 0.0); + + + // Sc43 row + + scratch = 1.0*screened_rates(k_Sc41_n_n_to_Sc43_approx)*Y(Sc41)*Y(N)*amrex::Math::powi<2>(state.rho) + - 1.0*screened_rates(k_Sc43_n_n_to_Sc45_approx)*Y(Sc43)*Y(N)*amrex::Math::powi<2>(state.rho) + + 0.5*Y(Sc41)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Sc41_n_n_to_Sc43_approx_dYN + - 0.5*Y(Sc43)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Sc43_n_n_to_Sc45_approx_dYN + - Y(Sc43)*rate_eval.drate_Sc43_to_Sc41_n_n_approx_dYN + + Y(Sc45)*rate_eval.drate_Sc45_to_Sc43_n_n_approx_dYN; + jac.set(Sc43, N, scratch); + + scratch = screened_rates(k_Ca42_p_to_Sc43_reaclib)*Y(Ca42)*state.rho + - screened_rates(k_Sc43_p_to_He4_Ca40_reaclib)*Y(Sc43)*state.rho + - screened_rates(k_Sc43_p_to_Ti44_reaclib)*Y(Sc43)*state.rho + + screened_rates(k_Ti46_p_to_He4_Sc43_reaclib)*Y(Ti46)*state.rho; + jac.set(Sc43, H1, scratch); + + scratch = screened_rates(k_Ca40_He4_to_p_Sc43_reaclib)*Y(Ca40)*state.rho + + screened_rates(k_K39_He4_to_Sc43_reaclib)*Y(K39)*state.rho + - screened_rates(k_Sc43_He4_to_V47_reaclib)*Y(Sc43)*state.rho + - screened_rates(k_Sc43_He4_to_p_Ti46_reaclib)*Y(Sc43)*state.rho; + jac.set(Sc43, He4, scratch); + + jac.set(Sc43, C12, 0.0); + + jac.set(Sc43, O16, 0.0); + + jac.set(Sc43, Ne20, 0.0); + + jac.set(Sc43, Mg23, 0.0); + + jac.set(Sc43, Mg24, 0.0); + + jac.set(Sc43, Al27, 0.0); + + jac.set(Sc43, Si27, 0.0); + + jac.set(Sc43, Si28, 0.0); + + jac.set(Sc43, Si29, 0.0); + + jac.set(Sc43, Si30, 0.0); + + jac.set(Sc43, Si31, 0.0); + + jac.set(Sc43, P29, 0.0); + + jac.set(Sc43, P31, 0.0); + + jac.set(Sc43, P33, 0.0); + + jac.set(Sc43, S32, 0.0); + + jac.set(Sc43, S33, 0.0); + + jac.set(Sc43, S34, 0.0); + + jac.set(Sc43, S35, 0.0); + + jac.set(Sc43, Cl33, 0.0); + + jac.set(Sc43, Cl35, 0.0); + + jac.set(Sc43, Cl37, 0.0); + + jac.set(Sc43, Ar36, 0.0); + + jac.set(Sc43, Ar37, 0.0); + + jac.set(Sc43, Ar38, 0.0); + + jac.set(Sc43, K37, 0.0); + + scratch = screened_rates(k_K39_He4_to_Sc43_reaclib)*Y(He4)*state.rho; + jac.set(Sc43, K39, scratch); + + scratch = screened_rates(k_Ca40_He4_to_p_Sc43_reaclib)*Y(He4)*state.rho; + jac.set(Sc43, Ca40, scratch); + + scratch = screened_rates(k_Ca42_p_to_Sc43_reaclib)*Y(H1)*state.rho; + jac.set(Sc43, Ca42, scratch); + + scratch = 0.5*screened_rates(k_Sc41_n_n_to_Sc43_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); + jac.set(Sc43, Sc41, scratch); + + scratch = -screened_rates(k_Sc43_He4_to_V47_reaclib)*Y(He4)*state.rho + - screened_rates(k_Sc43_He4_to_p_Ti46_reaclib)*Y(He4)*state.rho + - 0.5*screened_rates(k_Sc43_n_n_to_Sc45_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + - screened_rates(k_Sc43_p_to_He4_Ca40_reaclib)*Y(H1)*state.rho + - screened_rates(k_Sc43_p_to_Ti44_reaclib)*Y(H1)*state.rho + - screened_rates(k_Sc43_to_He4_K39_reaclib) + - screened_rates(k_Sc43_to_Sc41_n_n_approx) + - screened_rates(k_Sc43_to_p_Ca42_reaclib); + jac.set(Sc43, Sc43, scratch); + + scratch = screened_rates(k_Sc45_to_Sc43_n_n_approx); + jac.set(Sc43, Sc45, scratch); + + scratch = screened_rates(k_Ti44_to_p_Sc43_reaclib); + jac.set(Sc43, Ti44, scratch); + + scratch = screened_rates(k_Ti46_p_to_He4_Sc43_reaclib)*Y(H1)*state.rho; + jac.set(Sc43, Ti46, scratch); + + jac.set(Sc43, Ti48, 0.0); + + scratch = screened_rates(k_V47_to_He4_Sc43_reaclib); + jac.set(Sc43, V47, scratch); + + jac.set(Sc43, V49, 0.0); + + jac.set(Sc43, V51, 0.0); + + jac.set(Sc43, Cr48, 0.0); + + jac.set(Sc43, Cr50, 0.0); + + jac.set(Sc43, Cr52, 0.0); + + jac.set(Sc43, Cr54, 0.0); + + jac.set(Sc43, Mn51, 0.0); + + jac.set(Sc43, Mn53, 0.0); + + jac.set(Sc43, Mn55, 0.0); + + jac.set(Sc43, Fe52, 0.0); + + jac.set(Sc43, Fe54, 0.0); + + jac.set(Sc43, Fe56, 0.0); + + jac.set(Sc43, Fe58, 0.0); + + jac.set(Sc43, Co55, 0.0); + + jac.set(Sc43, Co56, 0.0); + + jac.set(Sc43, Co57, 0.0); + + jac.set(Sc43, Co59, 0.0); + + jac.set(Sc43, Ni56, 0.0); + + jac.set(Sc43, Ni58, 0.0); + + jac.set(Sc43, Ni60, 0.0); + + jac.set(Sc43, Cu59, 0.0); + + jac.set(Sc43, Zn60, 0.0); + + + // Sc45 row + + scratch = 1.0*screened_rates(k_Sc43_n_n_to_Sc45_approx)*Y(Sc43)*Y(N)*amrex::Math::powi<2>(state.rho) + + 0.5*Y(Sc43)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Sc43_n_n_to_Sc45_approx_dYN + - Y(Sc45)*rate_eval.drate_Sc45_to_Sc43_n_n_approx_dYN; + jac.set(Sc45, N, scratch); + + scratch = -screened_rates(k_Sc45_p_to_He4_Ca42_reaclib)*Y(Sc45)*state.rho + - screened_rates(k_Sc45_p_to_Ti46_reaclib)*Y(Sc45)*state.rho + + screened_rates(k_Ti48_p_to_He4_Sc45_reaclib)*Y(Ti48)*state.rho; + jac.set(Sc45, H1, scratch); + + scratch = screened_rates(k_Ca42_He4_to_p_Sc45_reaclib)*Y(Ca42)*state.rho + - screened_rates(k_Sc45_He4_to_V49_reaclib)*Y(Sc45)*state.rho + - screened_rates(k_Sc45_He4_to_p_Ti48_reaclib)*Y(Sc45)*state.rho; + jac.set(Sc45, He4, scratch); + + jac.set(Sc45, C12, 0.0); + + jac.set(Sc45, O16, 0.0); + + jac.set(Sc45, Ne20, 0.0); + + jac.set(Sc45, Mg23, 0.0); + + jac.set(Sc45, Mg24, 0.0); + + jac.set(Sc45, Al27, 0.0); + + jac.set(Sc45, Si27, 0.0); + + jac.set(Sc45, Si28, 0.0); + + jac.set(Sc45, Si29, 0.0); + + jac.set(Sc45, Si30, 0.0); + + jac.set(Sc45, Si31, 0.0); + + jac.set(Sc45, P29, 0.0); + + jac.set(Sc45, P31, 0.0); + + jac.set(Sc45, P33, 0.0); + + jac.set(Sc45, S32, 0.0); + + jac.set(Sc45, S33, 0.0); + + jac.set(Sc45, S34, 0.0); + + jac.set(Sc45, S35, 0.0); + + jac.set(Sc45, Cl33, 0.0); + + jac.set(Sc45, Cl35, 0.0); + + jac.set(Sc45, Cl37, 0.0); + + jac.set(Sc45, Ar36, 0.0); + + jac.set(Sc45, Ar37, 0.0); + + jac.set(Sc45, Ar38, 0.0); + + jac.set(Sc45, K37, 0.0); + + jac.set(Sc45, K39, 0.0); + + jac.set(Sc45, Ca40, 0.0); + + scratch = screened_rates(k_Ca42_He4_to_p_Sc45_reaclib)*Y(He4)*state.rho; + jac.set(Sc45, Ca42, scratch); + + jac.set(Sc45, Sc41, 0.0); + + scratch = 0.5*screened_rates(k_Sc43_n_n_to_Sc45_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); + jac.set(Sc45, Sc43, scratch); + + scratch = -screened_rates(k_Sc45_He4_to_V49_reaclib)*Y(He4)*state.rho + - screened_rates(k_Sc45_He4_to_p_Ti48_reaclib)*Y(He4)*state.rho + - screened_rates(k_Sc45_p_to_He4_Ca42_reaclib)*Y(H1)*state.rho + - screened_rates(k_Sc45_p_to_Ti46_reaclib)*Y(H1)*state.rho + - screened_rates(k_Sc45_to_Sc43_n_n_approx); + jac.set(Sc45, Sc45, scratch); + + jac.set(Sc45, Ti44, 0.0); + + scratch = screened_rates(k_Ti46_to_p_Sc45_reaclib); + jac.set(Sc45, Ti46, scratch); + + scratch = screened_rates(k_Ti48_p_to_He4_Sc45_reaclib)*Y(H1)*state.rho; + jac.set(Sc45, Ti48, scratch); + + jac.set(Sc45, V47, 0.0); + + scratch = screened_rates(k_V49_to_He4_Sc45_reaclib); + jac.set(Sc45, V49, scratch); + + jac.set(Sc45, V51, 0.0); + + jac.set(Sc45, Cr48, 0.0); + + jac.set(Sc45, Cr50, 0.0); + + jac.set(Sc45, Cr52, 0.0); + + jac.set(Sc45, Cr54, 0.0); + + jac.set(Sc45, Mn51, 0.0); + + jac.set(Sc45, Mn53, 0.0); + + jac.set(Sc45, Mn55, 0.0); + + jac.set(Sc45, Fe52, 0.0); + + jac.set(Sc45, Fe54, 0.0); + + jac.set(Sc45, Fe56, 0.0); + + jac.set(Sc45, Fe58, 0.0); + + jac.set(Sc45, Co55, 0.0); + + jac.set(Sc45, Co56, 0.0); + + jac.set(Sc45, Co57, 0.0); + + jac.set(Sc45, Co59, 0.0); + + jac.set(Sc45, Ni56, 0.0); + + jac.set(Sc45, Ni58, 0.0); + + jac.set(Sc45, Ni60, 0.0); + + jac.set(Sc45, Cu59, 0.0); + + jac.set(Sc45, Zn60, 0.0); + + + // Ti44 row + + scratch = -1.0*screened_rates(k_Ti44_n_n_to_Ti46_approx)*Y(Ti44)*Y(N)*amrex::Math::powi<2>(state.rho) + - 0.5*Y(Ti44)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Ti44_n_n_to_Ti46_approx_dYN + + Y(Ti46)*rate_eval.drate_Ti46_to_Ti44_n_n_approx_dYN; + jac.set(Ti44, N, scratch); + + scratch = screened_rates(k_Sc43_p_to_Ti44_reaclib)*Y(Sc43)*state.rho + - screened_rates(k_Ti44_p_to_He4_Sc41_reaclib)*Y(Ti44)*state.rho + + screened_rates(k_V47_p_to_He4_Ti44_reaclib)*Y(V47)*state.rho; + jac.set(Ti44, H1, scratch); + + scratch = screened_rates(k_Ca40_He4_to_Ti44_reaclib)*Y(Ca40)*state.rho + + screened_rates(k_Sc41_He4_to_p_Ti44_reaclib)*Y(Sc41)*state.rho + - screened_rates(k_Ti44_He4_to_Cr48_reaclib)*Y(Ti44)*state.rho + - screened_rates(k_Ti44_He4_to_p_V47_reaclib)*Y(Ti44)*state.rho; + jac.set(Ti44, He4, scratch); + + jac.set(Ti44, C12, 0.0); + + jac.set(Ti44, O16, 0.0); + + jac.set(Ti44, Ne20, 0.0); + + jac.set(Ti44, Mg23, 0.0); + + jac.set(Ti44, Mg24, 0.0); + + jac.set(Ti44, Al27, 0.0); + + jac.set(Ti44, Si27, 0.0); + + jac.set(Ti44, Si28, 0.0); + + jac.set(Ti44, Si29, 0.0); + + jac.set(Ti44, Si30, 0.0); + + jac.set(Ti44, Si31, 0.0); + + jac.set(Ti44, P29, 0.0); + + jac.set(Ti44, P31, 0.0); + + jac.set(Ti44, P33, 0.0); + + jac.set(Ti44, S32, 0.0); + + jac.set(Ti44, S33, 0.0); + + jac.set(Ti44, S34, 0.0); + + jac.set(Ti44, S35, 0.0); + + jac.set(Ti44, Cl33, 0.0); + + jac.set(Ti44, Cl35, 0.0); + + jac.set(Ti44, Cl37, 0.0); + + jac.set(Ti44, Ar36, 0.0); + + jac.set(Ti44, Ar37, 0.0); + + jac.set(Ti44, Ar38, 0.0); + + jac.set(Ti44, K37, 0.0); + + jac.set(Ti44, K39, 0.0); + + scratch = screened_rates(k_Ca40_He4_to_Ti44_reaclib)*Y(He4)*state.rho; + jac.set(Ti44, Ca40, scratch); + + jac.set(Ti44, Ca42, 0.0); + + scratch = screened_rates(k_Sc41_He4_to_p_Ti44_reaclib)*Y(He4)*state.rho; + jac.set(Ti44, Sc41, scratch); + + scratch = screened_rates(k_Sc43_p_to_Ti44_reaclib)*Y(H1)*state.rho; + jac.set(Ti44, Sc43, scratch); + + jac.set(Ti44, Sc45, 0.0); + + scratch = -screened_rates(k_Ti44_He4_to_Cr48_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ti44_He4_to_p_V47_reaclib)*Y(He4)*state.rho + - 0.5*screened_rates(k_Ti44_n_n_to_Ti46_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + - screened_rates(k_Ti44_p_to_He4_Sc41_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ti44_to_He4_Ca40_reaclib) + - screened_rates(k_Ti44_to_p_Sc43_reaclib); + jac.set(Ti44, Ti44, scratch); + + scratch = screened_rates(k_Ti46_to_Ti44_n_n_approx); + jac.set(Ti44, Ti46, scratch); + + jac.set(Ti44, Ti48, 0.0); + + scratch = screened_rates(k_V47_p_to_He4_Ti44_reaclib)*Y(H1)*state.rho; + jac.set(Ti44, V47, scratch); + + jac.set(Ti44, V49, 0.0); + + jac.set(Ti44, V51, 0.0); + + scratch = screened_rates(k_Cr48_to_He4_Ti44_reaclib); + jac.set(Ti44, Cr48, scratch); + + jac.set(Ti44, Cr50, 0.0); + + jac.set(Ti44, Cr52, 0.0); + + jac.set(Ti44, Cr54, 0.0); + + jac.set(Ti44, Mn51, 0.0); + + jac.set(Ti44, Mn53, 0.0); + + jac.set(Ti44, Mn55, 0.0); + + jac.set(Ti44, Fe52, 0.0); + + jac.set(Ti44, Fe54, 0.0); + + jac.set(Ti44, Fe56, 0.0); + + jac.set(Ti44, Fe58, 0.0); + + jac.set(Ti44, Co55, 0.0); + + jac.set(Ti44, Co56, 0.0); + + jac.set(Ti44, Co57, 0.0); + + jac.set(Ti44, Co59, 0.0); + + jac.set(Ti44, Ni56, 0.0); + + jac.set(Ti44, Ni58, 0.0); + + jac.set(Ti44, Ni60, 0.0); + + jac.set(Ti44, Cu59, 0.0); + + jac.set(Ti44, Zn60, 0.0); + + + // Ti46 row + + scratch = 1.0*screened_rates(k_Ti44_n_n_to_Ti46_approx)*Y(Ti44)*Y(N)*amrex::Math::powi<2>(state.rho) + - 1.0*screened_rates(k_Ti46_n_n_to_Ti48_approx)*Y(Ti46)*Y(N)*amrex::Math::powi<2>(state.rho) + + 0.5*Y(Ti44)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Ti44_n_n_to_Ti46_approx_dYN + - 0.5*Y(Ti46)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Ti46_n_n_to_Ti48_approx_dYN + - Y(Ti46)*rate_eval.drate_Ti46_to_Ti44_n_n_approx_dYN + + Y(Ti48)*rate_eval.drate_Ti48_to_Ti46_n_n_approx_dYN; + jac.set(Ti46, N, scratch); + + scratch = screened_rates(k_Sc45_p_to_Ti46_reaclib)*Y(Sc45)*state.rho + - screened_rates(k_Ti46_p_to_He4_Sc43_reaclib)*Y(Ti46)*state.rho + - screened_rates(k_Ti46_p_to_V47_reaclib)*Y(Ti46)*state.rho + + screened_rates(k_V49_p_to_He4_Ti46_reaclib)*Y(V49)*state.rho; + jac.set(Ti46, H1, scratch); + + scratch = screened_rates(k_Ca42_He4_to_Ti46_reaclib)*Y(Ca42)*state.rho + + screened_rates(k_Sc43_He4_to_p_Ti46_reaclib)*Y(Sc43)*state.rho + - screened_rates(k_Ti46_He4_to_Cr50_reaclib)*Y(Ti46)*state.rho + - screened_rates(k_Ti46_He4_to_p_V49_reaclib)*Y(Ti46)*state.rho; + jac.set(Ti46, He4, scratch); + + jac.set(Ti46, C12, 0.0); + + jac.set(Ti46, O16, 0.0); + + jac.set(Ti46, Ne20, 0.0); + + jac.set(Ti46, Mg23, 0.0); + + jac.set(Ti46, Mg24, 0.0); + + jac.set(Ti46, Al27, 0.0); + + jac.set(Ti46, Si27, 0.0); + + jac.set(Ti46, Si28, 0.0); + + jac.set(Ti46, Si29, 0.0); + + jac.set(Ti46, Si30, 0.0); + + jac.set(Ti46, Si31, 0.0); + + jac.set(Ti46, P29, 0.0); + + jac.set(Ti46, P31, 0.0); + + jac.set(Ti46, P33, 0.0); + + jac.set(Ti46, S32, 0.0); + + jac.set(Ti46, S33, 0.0); + + jac.set(Ti46, S34, 0.0); + + jac.set(Ti46, S35, 0.0); + + jac.set(Ti46, Cl33, 0.0); + + jac.set(Ti46, Cl35, 0.0); + + jac.set(Ti46, Cl37, 0.0); + + jac.set(Ti46, Ar36, 0.0); + + jac.set(Ti46, Ar37, 0.0); + + jac.set(Ti46, Ar38, 0.0); + + jac.set(Ti46, K37, 0.0); + + jac.set(Ti46, K39, 0.0); + + jac.set(Ti46, Ca40, 0.0); + + scratch = screened_rates(k_Ca42_He4_to_Ti46_reaclib)*Y(He4)*state.rho; + jac.set(Ti46, Ca42, scratch); + + jac.set(Ti46, Sc41, 0.0); + + scratch = screened_rates(k_Sc43_He4_to_p_Ti46_reaclib)*Y(He4)*state.rho; + jac.set(Ti46, Sc43, scratch); + + scratch = screened_rates(k_Sc45_p_to_Ti46_reaclib)*Y(H1)*state.rho; + jac.set(Ti46, Sc45, scratch); + + scratch = 0.5*screened_rates(k_Ti44_n_n_to_Ti46_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); + jac.set(Ti46, Ti44, scratch); + + scratch = -screened_rates(k_Ti46_He4_to_Cr50_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ti46_He4_to_p_V49_reaclib)*Y(He4)*state.rho + - 0.5*screened_rates(k_Ti46_n_n_to_Ti48_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + - screened_rates(k_Ti46_p_to_He4_Sc43_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ti46_p_to_V47_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ti46_to_He4_Ca42_reaclib) + - screened_rates(k_Ti46_to_Ti44_n_n_approx) + - screened_rates(k_Ti46_to_p_Sc45_reaclib); + jac.set(Ti46, Ti46, scratch); + + scratch = screened_rates(k_Ti48_to_Ti46_n_n_approx); + jac.set(Ti46, Ti48, scratch); + + scratch = screened_rates(k_V47_to_p_Ti46_reaclib); + jac.set(Ti46, V47, scratch); + + scratch = screened_rates(k_V49_p_to_He4_Ti46_reaclib)*Y(H1)*state.rho; + jac.set(Ti46, V49, scratch); + + jac.set(Ti46, V51, 0.0); + + jac.set(Ti46, Cr48, 0.0); + + scratch = screened_rates(k_Cr50_to_He4_Ti46_reaclib); + jac.set(Ti46, Cr50, scratch); + + jac.set(Ti46, Cr52, 0.0); + + jac.set(Ti46, Cr54, 0.0); + + jac.set(Ti46, Mn51, 0.0); + + jac.set(Ti46, Mn53, 0.0); + + jac.set(Ti46, Mn55, 0.0); + + jac.set(Ti46, Fe52, 0.0); + + jac.set(Ti46, Fe54, 0.0); + + jac.set(Ti46, Fe56, 0.0); + + jac.set(Ti46, Fe58, 0.0); + + jac.set(Ti46, Co55, 0.0); + + jac.set(Ti46, Co56, 0.0); + + jac.set(Ti46, Co57, 0.0); + + jac.set(Ti46, Co59, 0.0); + + jac.set(Ti46, Ni56, 0.0); + + jac.set(Ti46, Ni58, 0.0); + + jac.set(Ti46, Ni60, 0.0); + + jac.set(Ti46, Cu59, 0.0); + + jac.set(Ti46, Zn60, 0.0); + + + // Ti48 row + + scratch = 1.0*screened_rates(k_Ti46_n_n_to_Ti48_approx)*Y(Ti46)*Y(N)*amrex::Math::powi<2>(state.rho) + + 0.5*Y(Ti46)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Ti46_n_n_to_Ti48_approx_dYN + - Y(Ti48)*rate_eval.drate_Ti48_to_Ti46_n_n_approx_dYN; + jac.set(Ti48, N, scratch); + + scratch = -screened_rates(k_Ti48_p_to_He4_Sc45_reaclib)*Y(Ti48)*state.rho + - screened_rates(k_Ti48_p_to_V49_reaclib)*Y(Ti48)*state.rho + + screened_rates(k_V51_p_to_He4_Ti48_reaclib)*Y(V51)*state.rho; + jac.set(Ti48, H1, scratch); + + scratch = screened_rates(k_Sc45_He4_to_p_Ti48_reaclib)*Y(Sc45)*state.rho + - screened_rates(k_Ti48_He4_to_Cr52_reaclib)*Y(Ti48)*state.rho + - screened_rates(k_Ti48_He4_to_p_V51_reaclib)*Y(Ti48)*state.rho; + jac.set(Ti48, He4, scratch); + + jac.set(Ti48, C12, 0.0); + + jac.set(Ti48, O16, 0.0); + + jac.set(Ti48, Ne20, 0.0); + + jac.set(Ti48, Mg23, 0.0); + + jac.set(Ti48, Mg24, 0.0); + + jac.set(Ti48, Al27, 0.0); + + jac.set(Ti48, Si27, 0.0); + + jac.set(Ti48, Si28, 0.0); + + jac.set(Ti48, Si29, 0.0); + + jac.set(Ti48, Si30, 0.0); + + jac.set(Ti48, Si31, 0.0); + + jac.set(Ti48, P29, 0.0); + + jac.set(Ti48, P31, 0.0); + + jac.set(Ti48, P33, 0.0); + + jac.set(Ti48, S32, 0.0); + + jac.set(Ti48, S33, 0.0); + + jac.set(Ti48, S34, 0.0); + + jac.set(Ti48, S35, 0.0); + + jac.set(Ti48, Cl33, 0.0); + + jac.set(Ti48, Cl35, 0.0); + + jac.set(Ti48, Cl37, 0.0); + + jac.set(Ti48, Ar36, 0.0); + + jac.set(Ti48, Ar37, 0.0); + + jac.set(Ti48, Ar38, 0.0); + + jac.set(Ti48, K37, 0.0); + + jac.set(Ti48, K39, 0.0); + + jac.set(Ti48, Ca40, 0.0); + + jac.set(Ti48, Ca42, 0.0); + + jac.set(Ti48, Sc41, 0.0); + + jac.set(Ti48, Sc43, 0.0); + + scratch = screened_rates(k_Sc45_He4_to_p_Ti48_reaclib)*Y(He4)*state.rho; + jac.set(Ti48, Sc45, scratch); + + jac.set(Ti48, Ti44, 0.0); + + scratch = 0.5*screened_rates(k_Ti46_n_n_to_Ti48_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); + jac.set(Ti48, Ti46, scratch); + + scratch = -screened_rates(k_Ti48_He4_to_Cr52_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ti48_He4_to_p_V51_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ti48_p_to_He4_Sc45_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ti48_p_to_V49_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ti48_to_Ti46_n_n_approx); + jac.set(Ti48, Ti48, scratch); + + jac.set(Ti48, V47, 0.0); + + scratch = screened_rates(k_V49_to_p_Ti48_reaclib); + jac.set(Ti48, V49, scratch); + + scratch = screened_rates(k_V51_p_to_He4_Ti48_reaclib)*Y(H1)*state.rho; + jac.set(Ti48, V51, scratch); + + jac.set(Ti48, Cr48, 0.0); + + jac.set(Ti48, Cr50, 0.0); + + scratch = screened_rates(k_Cr52_to_He4_Ti48_reaclib); + jac.set(Ti48, Cr52, scratch); + + jac.set(Ti48, Cr54, 0.0); + + jac.set(Ti48, Mn51, 0.0); + + jac.set(Ti48, Mn53, 0.0); + + jac.set(Ti48, Mn55, 0.0); + + jac.set(Ti48, Fe52, 0.0); + + jac.set(Ti48, Fe54, 0.0); + + jac.set(Ti48, Fe56, 0.0); + + jac.set(Ti48, Fe58, 0.0); + + jac.set(Ti48, Co55, 0.0); + + jac.set(Ti48, Co56, 0.0); + + jac.set(Ti48, Co57, 0.0); + + jac.set(Ti48, Co59, 0.0); + + jac.set(Ti48, Ni56, 0.0); + + jac.set(Ti48, Ni58, 0.0); + + jac.set(Ti48, Ni60, 0.0); + + jac.set(Ti48, Cu59, 0.0); + + jac.set(Ti48, Zn60, 0.0); + + + // V47 row + + scratch = -1.0*screened_rates(k_V47_n_n_to_V49_approx)*Y(V47)*Y(N)*amrex::Math::powi<2>(state.rho) + - 0.5*Y(V47)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_V47_n_n_to_V49_approx_dYN + + Y(V49)*rate_eval.drate_V49_to_V47_n_n_approx_dYN; + jac.set(V47, N, scratch); + + scratch = screened_rates(k_Cr50_p_to_He4_V47_reaclib)*Y(Cr50)*state.rho + + screened_rates(k_Ti46_p_to_V47_reaclib)*Y(Ti46)*state.rho + - screened_rates(k_V47_p_to_Cr48_reaclib)*Y(V47)*state.rho + - screened_rates(k_V47_p_to_He4_Ti44_reaclib)*Y(V47)*state.rho; + jac.set(V47, H1, scratch); + + scratch = screened_rates(k_Sc43_He4_to_V47_reaclib)*Y(Sc43)*state.rho + + screened_rates(k_Ti44_He4_to_p_V47_reaclib)*Y(Ti44)*state.rho + - screened_rates(k_V47_He4_to_Mn51_reaclib)*Y(V47)*state.rho + - screened_rates(k_V47_He4_to_p_Cr50_reaclib)*Y(V47)*state.rho; + jac.set(V47, He4, scratch); + + jac.set(V47, C12, 0.0); + + jac.set(V47, O16, 0.0); + + jac.set(V47, Ne20, 0.0); + + jac.set(V47, Mg23, 0.0); + + jac.set(V47, Mg24, 0.0); + + jac.set(V47, Al27, 0.0); + + jac.set(V47, Si27, 0.0); + + jac.set(V47, Si28, 0.0); + + jac.set(V47, Si29, 0.0); + + jac.set(V47, Si30, 0.0); + + jac.set(V47, Si31, 0.0); + + jac.set(V47, P29, 0.0); + + jac.set(V47, P31, 0.0); + + jac.set(V47, P33, 0.0); + + jac.set(V47, S32, 0.0); + + jac.set(V47, S33, 0.0); + + jac.set(V47, S34, 0.0); + + jac.set(V47, S35, 0.0); + + jac.set(V47, Cl33, 0.0); + + jac.set(V47, Cl35, 0.0); + + jac.set(V47, Cl37, 0.0); + + jac.set(V47, Ar36, 0.0); + + jac.set(V47, Ar37, 0.0); + + jac.set(V47, Ar38, 0.0); + + jac.set(V47, K37, 0.0); + + jac.set(V47, K39, 0.0); + + jac.set(V47, Ca40, 0.0); + + jac.set(V47, Ca42, 0.0); + + jac.set(V47, Sc41, 0.0); + + scratch = screened_rates(k_Sc43_He4_to_V47_reaclib)*Y(He4)*state.rho; + jac.set(V47, Sc43, scratch); + + jac.set(V47, Sc45, 0.0); + + scratch = screened_rates(k_Ti44_He4_to_p_V47_reaclib)*Y(He4)*state.rho; + jac.set(V47, Ti44, scratch); + + scratch = screened_rates(k_Ti46_p_to_V47_reaclib)*Y(H1)*state.rho; + jac.set(V47, Ti46, scratch); + + jac.set(V47, Ti48, 0.0); + + scratch = -screened_rates(k_V47_He4_to_Mn51_reaclib)*Y(He4)*state.rho + - screened_rates(k_V47_He4_to_p_Cr50_reaclib)*Y(He4)*state.rho + - 0.5*screened_rates(k_V47_n_n_to_V49_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + - screened_rates(k_V47_p_to_Cr48_reaclib)*Y(H1)*state.rho + - screened_rates(k_V47_p_to_He4_Ti44_reaclib)*Y(H1)*state.rho + - screened_rates(k_V47_to_He4_Sc43_reaclib) + - screened_rates(k_V47_to_p_Ti46_reaclib); + jac.set(V47, V47, scratch); + + scratch = screened_rates(k_V49_to_V47_n_n_approx); + jac.set(V47, V49, scratch); + + jac.set(V47, V51, 0.0); + + scratch = screened_rates(k_Cr48_to_p_V47_reaclib); + jac.set(V47, Cr48, scratch); + + scratch = screened_rates(k_Cr50_p_to_He4_V47_reaclib)*Y(H1)*state.rho; + jac.set(V47, Cr50, scratch); + + jac.set(V47, Cr52, 0.0); + + jac.set(V47, Cr54, 0.0); + + scratch = screened_rates(k_Mn51_to_He4_V47_reaclib); + jac.set(V47, Mn51, scratch); + + jac.set(V47, Mn53, 0.0); + + jac.set(V47, Mn55, 0.0); + + jac.set(V47, Fe52, 0.0); + + jac.set(V47, Fe54, 0.0); + + jac.set(V47, Fe56, 0.0); + + jac.set(V47, Fe58, 0.0); + + jac.set(V47, Co55, 0.0); + + jac.set(V47, Co56, 0.0); + + jac.set(V47, Co57, 0.0); + + jac.set(V47, Co59, 0.0); + + jac.set(V47, Ni56, 0.0); + + jac.set(V47, Ni58, 0.0); + + jac.set(V47, Ni60, 0.0); + + jac.set(V47, Cu59, 0.0); + + jac.set(V47, Zn60, 0.0); + + + // V49 row + + scratch = 1.0*screened_rates(k_V47_n_n_to_V49_approx)*Y(V47)*Y(N)*amrex::Math::powi<2>(state.rho) + - 1.0*screened_rates(k_V49_n_n_to_V51_approx)*Y(V49)*Y(N)*amrex::Math::powi<2>(state.rho) + + 0.5*Y(V47)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_V47_n_n_to_V49_approx_dYN + - 0.5*Y(V49)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_V49_n_n_to_V51_approx_dYN + - Y(V49)*rate_eval.drate_V49_to_V47_n_n_approx_dYN + + Y(V51)*rate_eval.drate_V51_to_V49_n_n_approx_dYN; + jac.set(V49, N, scratch); + + scratch = screened_rates(k_Cr52_p_to_He4_V49_reaclib)*Y(Cr52)*state.rho + + screened_rates(k_Ti48_p_to_V49_reaclib)*Y(Ti48)*state.rho + - screened_rates(k_V49_p_to_Cr50_reaclib)*Y(V49)*state.rho + - screened_rates(k_V49_p_to_He4_Ti46_reaclib)*Y(V49)*state.rho; + jac.set(V49, H1, scratch); + + scratch = screened_rates(k_Sc45_He4_to_V49_reaclib)*Y(Sc45)*state.rho + + screened_rates(k_Ti46_He4_to_p_V49_reaclib)*Y(Ti46)*state.rho + - screened_rates(k_V49_He4_to_Mn53_reaclib)*Y(V49)*state.rho + - screened_rates(k_V49_He4_to_p_Cr52_reaclib)*Y(V49)*state.rho; + jac.set(V49, He4, scratch); + + jac.set(V49, C12, 0.0); + + jac.set(V49, O16, 0.0); + + jac.set(V49, Ne20, 0.0); + + jac.set(V49, Mg23, 0.0); + + jac.set(V49, Mg24, 0.0); + + jac.set(V49, Al27, 0.0); + + jac.set(V49, Si27, 0.0); + + jac.set(V49, Si28, 0.0); + + jac.set(V49, Si29, 0.0); + + jac.set(V49, Si30, 0.0); + + jac.set(V49, Si31, 0.0); + + jac.set(V49, P29, 0.0); + + jac.set(V49, P31, 0.0); + + jac.set(V49, P33, 0.0); + + jac.set(V49, S32, 0.0); + + jac.set(V49, S33, 0.0); + + jac.set(V49, S34, 0.0); + + jac.set(V49, S35, 0.0); + + jac.set(V49, Cl33, 0.0); + + jac.set(V49, Cl35, 0.0); + + jac.set(V49, Cl37, 0.0); + + jac.set(V49, Ar36, 0.0); + + jac.set(V49, Ar37, 0.0); + + jac.set(V49, Ar38, 0.0); + + jac.set(V49, K37, 0.0); + + jac.set(V49, K39, 0.0); + + jac.set(V49, Ca40, 0.0); + + jac.set(V49, Ca42, 0.0); + + jac.set(V49, Sc41, 0.0); + + jac.set(V49, Sc43, 0.0); + + scratch = screened_rates(k_Sc45_He4_to_V49_reaclib)*Y(He4)*state.rho; + jac.set(V49, Sc45, scratch); + + jac.set(V49, Ti44, 0.0); + + scratch = screened_rates(k_Ti46_He4_to_p_V49_reaclib)*Y(He4)*state.rho; + jac.set(V49, Ti46, scratch); + + scratch = screened_rates(k_Ti48_p_to_V49_reaclib)*Y(H1)*state.rho; + jac.set(V49, Ti48, scratch); + + scratch = 0.5*screened_rates(k_V47_n_n_to_V49_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); + jac.set(V49, V47, scratch); + + scratch = -screened_rates(k_V49_He4_to_Mn53_reaclib)*Y(He4)*state.rho + - screened_rates(k_V49_He4_to_p_Cr52_reaclib)*Y(He4)*state.rho + - 0.5*screened_rates(k_V49_n_n_to_V51_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + - screened_rates(k_V49_p_to_Cr50_reaclib)*Y(H1)*state.rho + - screened_rates(k_V49_p_to_He4_Ti46_reaclib)*Y(H1)*state.rho + - screened_rates(k_V49_to_He4_Sc45_reaclib) + - screened_rates(k_V49_to_V47_n_n_approx) + - screened_rates(k_V49_to_p_Ti48_reaclib); + jac.set(V49, V49, scratch); + + scratch = screened_rates(k_V51_to_V49_n_n_approx); + jac.set(V49, V51, scratch); + + jac.set(V49, Cr48, 0.0); + + scratch = screened_rates(k_Cr50_to_p_V49_reaclib); + jac.set(V49, Cr50, scratch); + + scratch = screened_rates(k_Cr52_p_to_He4_V49_reaclib)*Y(H1)*state.rho; + jac.set(V49, Cr52, scratch); + + jac.set(V49, Cr54, 0.0); + + jac.set(V49, Mn51, 0.0); + + scratch = screened_rates(k_Mn53_to_He4_V49_reaclib); + jac.set(V49, Mn53, scratch); + + jac.set(V49, Mn55, 0.0); + + jac.set(V49, Fe52, 0.0); + + jac.set(V49, Fe54, 0.0); + + jac.set(V49, Fe56, 0.0); + + jac.set(V49, Fe58, 0.0); + + jac.set(V49, Co55, 0.0); + + jac.set(V49, Co56, 0.0); + + jac.set(V49, Co57, 0.0); + + jac.set(V49, Co59, 0.0); + + jac.set(V49, Ni56, 0.0); + + jac.set(V49, Ni58, 0.0); + + jac.set(V49, Ni60, 0.0); + + jac.set(V49, Cu59, 0.0); + + jac.set(V49, Zn60, 0.0); + + + // V51 row + + scratch = 1.0*screened_rates(k_V49_n_n_to_V51_approx)*Y(V49)*Y(N)*amrex::Math::powi<2>(state.rho) + + 0.5*Y(V49)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_V49_n_n_to_V51_approx_dYN + - Y(V51)*rate_eval.drate_V51_to_V49_n_n_approx_dYN; + jac.set(V51, N, scratch); + + scratch = screened_rates(k_Cr54_p_to_He4_V51_reaclib)*Y(Cr54)*state.rho + - screened_rates(k_V51_p_to_Cr52_reaclib)*Y(V51)*state.rho + - screened_rates(k_V51_p_to_He4_Ti48_reaclib)*Y(V51)*state.rho; + jac.set(V51, H1, scratch); + + scratch = screened_rates(k_Ti48_He4_to_p_V51_reaclib)*Y(Ti48)*state.rho + - screened_rates(k_V51_He4_to_Mn55_reaclib)*Y(V51)*state.rho + - screened_rates(k_V51_He4_to_p_Cr54_reaclib)*Y(V51)*state.rho; + jac.set(V51, He4, scratch); + + jac.set(V51, C12, 0.0); + + jac.set(V51, O16, 0.0); + + jac.set(V51, Ne20, 0.0); + + jac.set(V51, Mg23, 0.0); + + jac.set(V51, Mg24, 0.0); + + jac.set(V51, Al27, 0.0); + + jac.set(V51, Si27, 0.0); + + jac.set(V51, Si28, 0.0); + + jac.set(V51, Si29, 0.0); + + jac.set(V51, Si30, 0.0); + + jac.set(V51, Si31, 0.0); + + jac.set(V51, P29, 0.0); + + jac.set(V51, P31, 0.0); + + jac.set(V51, P33, 0.0); + + jac.set(V51, S32, 0.0); + + jac.set(V51, S33, 0.0); + + jac.set(V51, S34, 0.0); + + jac.set(V51, S35, 0.0); + + jac.set(V51, Cl33, 0.0); + + jac.set(V51, Cl35, 0.0); + + jac.set(V51, Cl37, 0.0); + + jac.set(V51, Ar36, 0.0); + + jac.set(V51, Ar37, 0.0); + + jac.set(V51, Ar38, 0.0); + + jac.set(V51, K37, 0.0); + + jac.set(V51, K39, 0.0); + + jac.set(V51, Ca40, 0.0); + + jac.set(V51, Ca42, 0.0); + + jac.set(V51, Sc41, 0.0); + + jac.set(V51, Sc43, 0.0); + + jac.set(V51, Sc45, 0.0); + + jac.set(V51, Ti44, 0.0); + + jac.set(V51, Ti46, 0.0); + + scratch = screened_rates(k_Ti48_He4_to_p_V51_reaclib)*Y(He4)*state.rho; + jac.set(V51, Ti48, scratch); + + jac.set(V51, V47, 0.0); + + scratch = 0.5*screened_rates(k_V49_n_n_to_V51_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); + jac.set(V51, V49, scratch); + + scratch = -screened_rates(k_V51_He4_to_Mn55_reaclib)*Y(He4)*state.rho + - screened_rates(k_V51_He4_to_p_Cr54_reaclib)*Y(He4)*state.rho + - screened_rates(k_V51_p_to_Cr52_reaclib)*Y(H1)*state.rho + - screened_rates(k_V51_p_to_He4_Ti48_reaclib)*Y(H1)*state.rho + - screened_rates(k_V51_to_V49_n_n_approx); + jac.set(V51, V51, scratch); + + jac.set(V51, Cr48, 0.0); + + jac.set(V51, Cr50, 0.0); + + scratch = screened_rates(k_Cr52_to_p_V51_reaclib); + jac.set(V51, Cr52, scratch); + + scratch = screened_rates(k_Cr54_p_to_He4_V51_reaclib)*Y(H1)*state.rho; + jac.set(V51, Cr54, scratch); + + jac.set(V51, Mn51, 0.0); + + jac.set(V51, Mn53, 0.0); + + scratch = screened_rates(k_Mn55_to_He4_V51_reaclib); + jac.set(V51, Mn55, scratch); + + jac.set(V51, Fe52, 0.0); + + jac.set(V51, Fe54, 0.0); + + jac.set(V51, Fe56, 0.0); + + jac.set(V51, Fe58, 0.0); + + jac.set(V51, Co55, 0.0); + + jac.set(V51, Co56, 0.0); + + jac.set(V51, Co57, 0.0); + + jac.set(V51, Co59, 0.0); + + jac.set(V51, Ni56, 0.0); + + jac.set(V51, Ni58, 0.0); + + jac.set(V51, Ni60, 0.0); + + jac.set(V51, Cu59, 0.0); + + jac.set(V51, Zn60, 0.0); + + + // Cr48 row + + scratch = -1.0*screened_rates(k_Cr48_n_n_to_Cr50_approx)*Y(Cr48)*Y(N)*amrex::Math::powi<2>(state.rho) + - 0.5*Y(Cr48)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Cr48_n_n_to_Cr50_approx_dYN + + Y(Cr50)*rate_eval.drate_Cr50_to_Cr48_n_n_approx_dYN; + jac.set(Cr48, N, scratch); + + scratch = screened_rates(k_Mn51_p_to_He4_Cr48_reaclib)*Y(Mn51)*state.rho + + screened_rates(k_V47_p_to_Cr48_reaclib)*Y(V47)*state.rho; + jac.set(Cr48, H1, scratch); + + scratch = -screened_rates(k_Cr48_He4_to_Fe52_reaclib)*Y(Cr48)*state.rho + - screened_rates(k_Cr48_He4_to_p_Mn51_reaclib)*Y(Cr48)*state.rho + + screened_rates(k_Ti44_He4_to_Cr48_reaclib)*Y(Ti44)*state.rho; + jac.set(Cr48, He4, scratch); + + jac.set(Cr48, C12, 0.0); + + jac.set(Cr48, O16, 0.0); + + jac.set(Cr48, Ne20, 0.0); + + jac.set(Cr48, Mg23, 0.0); + + jac.set(Cr48, Mg24, 0.0); + + jac.set(Cr48, Al27, 0.0); + + jac.set(Cr48, Si27, 0.0); + + jac.set(Cr48, Si28, 0.0); + + jac.set(Cr48, Si29, 0.0); + + jac.set(Cr48, Si30, 0.0); + + jac.set(Cr48, Si31, 0.0); + + jac.set(Cr48, P29, 0.0); + + jac.set(Cr48, P31, 0.0); + + jac.set(Cr48, P33, 0.0); + + jac.set(Cr48, S32, 0.0); + + jac.set(Cr48, S33, 0.0); + + jac.set(Cr48, S34, 0.0); + + jac.set(Cr48, S35, 0.0); + + jac.set(Cr48, Cl33, 0.0); + + jac.set(Cr48, Cl35, 0.0); + + jac.set(Cr48, Cl37, 0.0); + + jac.set(Cr48, Ar36, 0.0); + + jac.set(Cr48, Ar37, 0.0); + + jac.set(Cr48, Ar38, 0.0); + + jac.set(Cr48, K37, 0.0); + + jac.set(Cr48, K39, 0.0); + + jac.set(Cr48, Ca40, 0.0); + + jac.set(Cr48, Ca42, 0.0); + + jac.set(Cr48, Sc41, 0.0); + + jac.set(Cr48, Sc43, 0.0); + + jac.set(Cr48, Sc45, 0.0); + + scratch = screened_rates(k_Ti44_He4_to_Cr48_reaclib)*Y(He4)*state.rho; + jac.set(Cr48, Ti44, scratch); + + jac.set(Cr48, Ti46, 0.0); + + jac.set(Cr48, Ti48, 0.0); + + scratch = screened_rates(k_V47_p_to_Cr48_reaclib)*Y(H1)*state.rho; + jac.set(Cr48, V47, scratch); + + jac.set(Cr48, V49, 0.0); + + jac.set(Cr48, V51, 0.0); + + scratch = -screened_rates(k_Cr48_He4_to_Fe52_reaclib)*Y(He4)*state.rho + - screened_rates(k_Cr48_He4_to_p_Mn51_reaclib)*Y(He4)*state.rho + - 0.5*screened_rates(k_Cr48_n_n_to_Cr50_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + - screened_rates(k_Cr48_to_He4_Ti44_reaclib) + - screened_rates(k_Cr48_to_p_V47_reaclib); + jac.set(Cr48, Cr48, scratch); + + scratch = screened_rates(k_Cr50_to_Cr48_n_n_approx); + jac.set(Cr48, Cr50, scratch); + + jac.set(Cr48, Cr52, 0.0); + + jac.set(Cr48, Cr54, 0.0); + + scratch = screened_rates(k_Mn51_p_to_He4_Cr48_reaclib)*Y(H1)*state.rho; + jac.set(Cr48, Mn51, scratch); + + jac.set(Cr48, Mn53, 0.0); + + jac.set(Cr48, Mn55, 0.0); + + scratch = screened_rates(k_Fe52_to_He4_Cr48_reaclib); + jac.set(Cr48, Fe52, scratch); + + jac.set(Cr48, Fe54, 0.0); + + jac.set(Cr48, Fe56, 0.0); + + jac.set(Cr48, Fe58, 0.0); + + jac.set(Cr48, Co55, 0.0); + + jac.set(Cr48, Co56, 0.0); + + jac.set(Cr48, Co57, 0.0); + + jac.set(Cr48, Co59, 0.0); + + jac.set(Cr48, Ni56, 0.0); + + jac.set(Cr48, Ni58, 0.0); + + jac.set(Cr48, Ni60, 0.0); + + jac.set(Cr48, Cu59, 0.0); + + jac.set(Cr48, Zn60, 0.0); + + + // Cr50 row + + scratch = 1.0*screened_rates(k_Cr48_n_n_to_Cr50_approx)*Y(Cr48)*Y(N)*amrex::Math::powi<2>(state.rho) + - 1.0*screened_rates(k_Cr50_n_n_to_Cr52_approx)*Y(Cr50)*Y(N)*amrex::Math::powi<2>(state.rho) + + 0.5*Y(Cr48)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Cr48_n_n_to_Cr50_approx_dYN + - 0.5*Y(Cr50)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Cr50_n_n_to_Cr52_approx_dYN + - Y(Cr50)*rate_eval.drate_Cr50_to_Cr48_n_n_approx_dYN + + Y(Cr52)*rate_eval.drate_Cr52_to_Cr50_n_n_approx_dYN; + jac.set(Cr50, N, scratch); + + scratch = -screened_rates(k_Cr50_p_to_He4_V47_reaclib)*Y(Cr50)*state.rho + - screened_rates(k_Cr50_p_to_Mn51_reaclib)*Y(Cr50)*state.rho + + screened_rates(k_Mn53_p_to_He4_Cr50_reaclib)*Y(Mn53)*state.rho + + screened_rates(k_V49_p_to_Cr50_reaclib)*Y(V49)*state.rho; + jac.set(Cr50, H1, scratch); + + scratch = -screened_rates(k_Cr50_He4_to_Fe54_reaclib)*Y(Cr50)*state.rho + - screened_rates(k_Cr50_He4_to_p_Mn53_reaclib)*Y(Cr50)*state.rho + + screened_rates(k_Ti46_He4_to_Cr50_reaclib)*Y(Ti46)*state.rho + + screened_rates(k_V47_He4_to_p_Cr50_reaclib)*Y(V47)*state.rho; + jac.set(Cr50, He4, scratch); + + jac.set(Cr50, C12, 0.0); + + jac.set(Cr50, O16, 0.0); + + jac.set(Cr50, Ne20, 0.0); + + jac.set(Cr50, Mg23, 0.0); + + jac.set(Cr50, Mg24, 0.0); + + jac.set(Cr50, Al27, 0.0); + + jac.set(Cr50, Si27, 0.0); + + jac.set(Cr50, Si28, 0.0); + + jac.set(Cr50, Si29, 0.0); + + jac.set(Cr50, Si30, 0.0); + + jac.set(Cr50, Si31, 0.0); + + jac.set(Cr50, P29, 0.0); + + jac.set(Cr50, P31, 0.0); + + jac.set(Cr50, P33, 0.0); + + jac.set(Cr50, S32, 0.0); + + jac.set(Cr50, S33, 0.0); + + jac.set(Cr50, S34, 0.0); + + jac.set(Cr50, S35, 0.0); + + jac.set(Cr50, Cl33, 0.0); + + jac.set(Cr50, Cl35, 0.0); + + jac.set(Cr50, Cl37, 0.0); + + jac.set(Cr50, Ar36, 0.0); + + jac.set(Cr50, Ar37, 0.0); + + jac.set(Cr50, Ar38, 0.0); + + jac.set(Cr50, K37, 0.0); + + jac.set(Cr50, K39, 0.0); + + jac.set(Cr50, Ca40, 0.0); + + jac.set(Cr50, Ca42, 0.0); + + jac.set(Cr50, Sc41, 0.0); + + jac.set(Cr50, Sc43, 0.0); + + jac.set(Cr50, Sc45, 0.0); + + jac.set(Cr50, Ti44, 0.0); + + scratch = screened_rates(k_Ti46_He4_to_Cr50_reaclib)*Y(He4)*state.rho; + jac.set(Cr50, Ti46, scratch); + + jac.set(Cr50, Ti48, 0.0); + + scratch = screened_rates(k_V47_He4_to_p_Cr50_reaclib)*Y(He4)*state.rho; + jac.set(Cr50, V47, scratch); + + scratch = screened_rates(k_V49_p_to_Cr50_reaclib)*Y(H1)*state.rho; + jac.set(Cr50, V49, scratch); + + jac.set(Cr50, V51, 0.0); + + scratch = 0.5*screened_rates(k_Cr48_n_n_to_Cr50_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); + jac.set(Cr50, Cr48, scratch); + + scratch = -screened_rates(k_Cr50_He4_to_Fe54_reaclib)*Y(He4)*state.rho + - screened_rates(k_Cr50_He4_to_p_Mn53_reaclib)*Y(He4)*state.rho + - 0.5*screened_rates(k_Cr50_n_n_to_Cr52_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + - screened_rates(k_Cr50_p_to_He4_V47_reaclib)*Y(H1)*state.rho + - screened_rates(k_Cr50_p_to_Mn51_reaclib)*Y(H1)*state.rho + - screened_rates(k_Cr50_to_Cr48_n_n_approx) + - screened_rates(k_Cr50_to_He4_Ti46_reaclib) + - screened_rates(k_Cr50_to_p_V49_reaclib); + jac.set(Cr50, Cr50, scratch); + + scratch = screened_rates(k_Cr52_to_Cr50_n_n_approx); + jac.set(Cr50, Cr52, scratch); + + jac.set(Cr50, Cr54, 0.0); + + scratch = screened_rates(k_Mn51_to_p_Cr50_reaclib); + jac.set(Cr50, Mn51, scratch); + + scratch = screened_rates(k_Mn53_p_to_He4_Cr50_reaclib)*Y(H1)*state.rho; + jac.set(Cr50, Mn53, scratch); + + jac.set(Cr50, Mn55, 0.0); + + jac.set(Cr50, Fe52, 0.0); + + scratch = screened_rates(k_Fe54_to_He4_Cr50_reaclib); + jac.set(Cr50, Fe54, scratch); + + jac.set(Cr50, Fe56, 0.0); + + jac.set(Cr50, Fe58, 0.0); + + jac.set(Cr50, Co55, 0.0); + + jac.set(Cr50, Co56, 0.0); + + jac.set(Cr50, Co57, 0.0); + + jac.set(Cr50, Co59, 0.0); + + jac.set(Cr50, Ni56, 0.0); + + jac.set(Cr50, Ni58, 0.0); + + jac.set(Cr50, Ni60, 0.0); + + jac.set(Cr50, Cu59, 0.0); + + jac.set(Cr50, Zn60, 0.0); + + + // Cr52 row + + scratch = 1.0*screened_rates(k_Cr50_n_n_to_Cr52_approx)*Y(Cr50)*Y(N)*amrex::Math::powi<2>(state.rho) + - 1.0*screened_rates(k_Cr52_n_n_to_Cr54_approx)*Y(Cr52)*Y(N)*amrex::Math::powi<2>(state.rho) + + 0.5*Y(Cr50)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Cr50_n_n_to_Cr52_approx_dYN + - 0.5*Y(Cr52)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Cr52_n_n_to_Cr54_approx_dYN + - Y(Cr52)*rate_eval.drate_Cr52_to_Cr50_n_n_approx_dYN + + Y(Cr54)*rate_eval.drate_Cr54_to_Cr52_n_n_approx_dYN; + jac.set(Cr52, N, scratch); + + scratch = -screened_rates(k_Cr52_p_to_He4_V49_reaclib)*Y(Cr52)*state.rho + - screened_rates(k_Cr52_p_to_Mn53_reaclib)*Y(Cr52)*state.rho + + screened_rates(k_Mn55_p_to_He4_Cr52_reaclib)*Y(Mn55)*state.rho + + screened_rates(k_V51_p_to_Cr52_reaclib)*Y(V51)*state.rho; + jac.set(Cr52, H1, scratch); + + scratch = -screened_rates(k_Cr52_He4_to_Fe56_reaclib)*Y(Cr52)*state.rho + - screened_rates(k_Cr52_He4_to_p_Mn55_reaclib)*Y(Cr52)*state.rho + + screened_rates(k_Ti48_He4_to_Cr52_reaclib)*Y(Ti48)*state.rho + + screened_rates(k_V49_He4_to_p_Cr52_reaclib)*Y(V49)*state.rho; + jac.set(Cr52, He4, scratch); + + jac.set(Cr52, C12, 0.0); + + jac.set(Cr52, O16, 0.0); + + jac.set(Cr52, Ne20, 0.0); + + jac.set(Cr52, Mg23, 0.0); + + jac.set(Cr52, Mg24, 0.0); + + jac.set(Cr52, Al27, 0.0); + + jac.set(Cr52, Si27, 0.0); + + jac.set(Cr52, Si28, 0.0); + + jac.set(Cr52, Si29, 0.0); + + jac.set(Cr52, Si30, 0.0); + + jac.set(Cr52, Si31, 0.0); + + jac.set(Cr52, P29, 0.0); + + jac.set(Cr52, P31, 0.0); + + jac.set(Cr52, P33, 0.0); + + jac.set(Cr52, S32, 0.0); + + jac.set(Cr52, S33, 0.0); + + jac.set(Cr52, S34, 0.0); + + jac.set(Cr52, S35, 0.0); + + jac.set(Cr52, Cl33, 0.0); + + jac.set(Cr52, Cl35, 0.0); + + jac.set(Cr52, Cl37, 0.0); + + jac.set(Cr52, Ar36, 0.0); + + jac.set(Cr52, Ar37, 0.0); + + jac.set(Cr52, Ar38, 0.0); + + jac.set(Cr52, K37, 0.0); + + jac.set(Cr52, K39, 0.0); + + jac.set(Cr52, Ca40, 0.0); + + jac.set(Cr52, Ca42, 0.0); + + jac.set(Cr52, Sc41, 0.0); + + jac.set(Cr52, Sc43, 0.0); + + jac.set(Cr52, Sc45, 0.0); + + jac.set(Cr52, Ti44, 0.0); + + jac.set(Cr52, Ti46, 0.0); + + scratch = screened_rates(k_Ti48_He4_to_Cr52_reaclib)*Y(He4)*state.rho; + jac.set(Cr52, Ti48, scratch); + + jac.set(Cr52, V47, 0.0); + + scratch = screened_rates(k_V49_He4_to_p_Cr52_reaclib)*Y(He4)*state.rho; + jac.set(Cr52, V49, scratch); + + scratch = screened_rates(k_V51_p_to_Cr52_reaclib)*Y(H1)*state.rho; + jac.set(Cr52, V51, scratch); + + jac.set(Cr52, Cr48, 0.0); + + scratch = 0.5*screened_rates(k_Cr50_n_n_to_Cr52_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); + jac.set(Cr52, Cr50, scratch); + + scratch = -screened_rates(k_Cr52_He4_to_Fe56_reaclib)*Y(He4)*state.rho + - screened_rates(k_Cr52_He4_to_p_Mn55_reaclib)*Y(He4)*state.rho + - 0.5*screened_rates(k_Cr52_n_n_to_Cr54_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + - screened_rates(k_Cr52_p_to_He4_V49_reaclib)*Y(H1)*state.rho + - screened_rates(k_Cr52_p_to_Mn53_reaclib)*Y(H1)*state.rho + - screened_rates(k_Cr52_to_Cr50_n_n_approx) + - screened_rates(k_Cr52_to_He4_Ti48_reaclib) + - screened_rates(k_Cr52_to_p_V51_reaclib); + jac.set(Cr52, Cr52, scratch); + + scratch = screened_rates(k_Cr54_to_Cr52_n_n_approx); + jac.set(Cr52, Cr54, scratch); + + jac.set(Cr52, Mn51, 0.0); + + scratch = screened_rates(k_Mn53_to_p_Cr52_reaclib); + jac.set(Cr52, Mn53, scratch); + + scratch = screened_rates(k_Mn55_p_to_He4_Cr52_reaclib)*Y(H1)*state.rho; + jac.set(Cr52, Mn55, scratch); + + jac.set(Cr52, Fe52, 0.0); + + jac.set(Cr52, Fe54, 0.0); + + scratch = screened_rates(k_Fe56_to_He4_Cr52_reaclib); + jac.set(Cr52, Fe56, scratch); + + jac.set(Cr52, Fe58, 0.0); + + jac.set(Cr52, Co55, 0.0); + + jac.set(Cr52, Co56, 0.0); + + jac.set(Cr52, Co57, 0.0); + + jac.set(Cr52, Co59, 0.0); + + jac.set(Cr52, Ni56, 0.0); + + jac.set(Cr52, Ni58, 0.0); + + jac.set(Cr52, Ni60, 0.0); + + jac.set(Cr52, Cu59, 0.0); + + jac.set(Cr52, Zn60, 0.0); + + + // Cr54 row + + scratch = 1.0*screened_rates(k_Cr52_n_n_to_Cr54_approx)*Y(Cr52)*Y(N)*amrex::Math::powi<2>(state.rho) + + 0.5*Y(Cr52)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Cr52_n_n_to_Cr54_approx_dYN + - Y(Cr54)*rate_eval.drate_Cr54_to_Cr52_n_n_approx_dYN; + jac.set(Cr54, N, scratch); + + scratch = -screened_rates(k_Cr54_p_to_He4_V51_reaclib)*Y(Cr54)*state.rho + - screened_rates(k_Cr54_p_to_Mn55_reaclib)*Y(Cr54)*state.rho; + jac.set(Cr54, H1, scratch); + + scratch = -screened_rates(k_Cr54_He4_to_Fe58_reaclib)*Y(Cr54)*state.rho + + screened_rates(k_V51_He4_to_p_Cr54_reaclib)*Y(V51)*state.rho; + jac.set(Cr54, He4, scratch); + + jac.set(Cr54, C12, 0.0); + + jac.set(Cr54, O16, 0.0); + + jac.set(Cr54, Ne20, 0.0); + + jac.set(Cr54, Mg23, 0.0); + + jac.set(Cr54, Mg24, 0.0); + + jac.set(Cr54, Al27, 0.0); + + jac.set(Cr54, Si27, 0.0); + + jac.set(Cr54, Si28, 0.0); + + jac.set(Cr54, Si29, 0.0); + + jac.set(Cr54, Si30, 0.0); + + jac.set(Cr54, Si31, 0.0); + + jac.set(Cr54, P29, 0.0); + + jac.set(Cr54, P31, 0.0); + + jac.set(Cr54, P33, 0.0); + + jac.set(Cr54, S32, 0.0); + + jac.set(Cr54, S33, 0.0); + + jac.set(Cr54, S34, 0.0); + + jac.set(Cr54, S35, 0.0); + + jac.set(Cr54, Cl33, 0.0); + + jac.set(Cr54, Cl35, 0.0); + + jac.set(Cr54, Cl37, 0.0); + + jac.set(Cr54, Ar36, 0.0); + + jac.set(Cr54, Ar37, 0.0); + + jac.set(Cr54, Ar38, 0.0); + + jac.set(Cr54, K37, 0.0); + + jac.set(Cr54, K39, 0.0); + + jac.set(Cr54, Ca40, 0.0); + + jac.set(Cr54, Ca42, 0.0); + + jac.set(Cr54, Sc41, 0.0); + + jac.set(Cr54, Sc43, 0.0); + + jac.set(Cr54, Sc45, 0.0); + + jac.set(Cr54, Ti44, 0.0); + + jac.set(Cr54, Ti46, 0.0); + + jac.set(Cr54, Ti48, 0.0); + + jac.set(Cr54, V47, 0.0); + + jac.set(Cr54, V49, 0.0); + + scratch = screened_rates(k_V51_He4_to_p_Cr54_reaclib)*Y(He4)*state.rho; + jac.set(Cr54, V51, scratch); + + jac.set(Cr54, Cr48, 0.0); + + jac.set(Cr54, Cr50, 0.0); + + scratch = 0.5*screened_rates(k_Cr52_n_n_to_Cr54_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); + jac.set(Cr54, Cr52, scratch); + + scratch = -screened_rates(k_Cr54_He4_to_Fe58_reaclib)*Y(He4)*state.rho + - screened_rates(k_Cr54_p_to_He4_V51_reaclib)*Y(H1)*state.rho + - screened_rates(k_Cr54_p_to_Mn55_reaclib)*Y(H1)*state.rho + - screened_rates(k_Cr54_to_Cr52_n_n_approx); + jac.set(Cr54, Cr54, scratch); + + jac.set(Cr54, Mn51, 0.0); + + jac.set(Cr54, Mn53, 0.0); + + scratch = screened_rates(k_Mn55_to_p_Cr54_reaclib); + jac.set(Cr54, Mn55, scratch); + + jac.set(Cr54, Fe52, 0.0); + + jac.set(Cr54, Fe54, 0.0); + + jac.set(Cr54, Fe56, 0.0); + + scratch = screened_rates(k_Fe58_to_He4_Cr54_reaclib); + jac.set(Cr54, Fe58, scratch); + + jac.set(Cr54, Co55, 0.0); + + jac.set(Cr54, Co56, 0.0); + + jac.set(Cr54, Co57, 0.0); + + jac.set(Cr54, Co59, 0.0); + + jac.set(Cr54, Ni56, 0.0); + + jac.set(Cr54, Ni58, 0.0); + + jac.set(Cr54, Ni60, 0.0); + + jac.set(Cr54, Cu59, 0.0); + + jac.set(Cr54, Zn60, 0.0); + + + // Mn51 row + + scratch = -1.0*screened_rates(k_Mn51_n_n_to_Mn53_approx)*Y(Mn51)*Y(N)*amrex::Math::powi<2>(state.rho) + - 0.5*Y(Mn51)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Mn51_n_n_to_Mn53_approx_dYN + + Y(Mn53)*rate_eval.drate_Mn53_to_Mn51_n_n_approx_dYN; + jac.set(Mn51, N, scratch); + + scratch = screened_rates(k_Cr50_p_to_Mn51_reaclib)*Y(Cr50)*state.rho + + screened_rates(k_Fe54_p_to_He4_Mn51_reaclib)*Y(Fe54)*state.rho + - screened_rates(k_Mn51_p_to_Fe52_reaclib)*Y(Mn51)*state.rho + - screened_rates(k_Mn51_p_to_He4_Cr48_reaclib)*Y(Mn51)*state.rho; + jac.set(Mn51, H1, scratch); + + scratch = screened_rates(k_Cr48_He4_to_p_Mn51_reaclib)*Y(Cr48)*state.rho + - screened_rates(k_Mn51_He4_to_Co55_reaclib)*Y(Mn51)*state.rho + - screened_rates(k_Mn51_He4_to_p_Fe54_reaclib)*Y(Mn51)*state.rho + + screened_rates(k_V47_He4_to_Mn51_reaclib)*Y(V47)*state.rho; + jac.set(Mn51, He4, scratch); + + jac.set(Mn51, C12, 0.0); + + jac.set(Mn51, O16, 0.0); + + jac.set(Mn51, Ne20, 0.0); + + jac.set(Mn51, Mg23, 0.0); + + jac.set(Mn51, Mg24, 0.0); + + jac.set(Mn51, Al27, 0.0); + + jac.set(Mn51, Si27, 0.0); + + jac.set(Mn51, Si28, 0.0); + + jac.set(Mn51, Si29, 0.0); + + jac.set(Mn51, Si30, 0.0); + + jac.set(Mn51, Si31, 0.0); + + jac.set(Mn51, P29, 0.0); + + jac.set(Mn51, P31, 0.0); + + jac.set(Mn51, P33, 0.0); + + jac.set(Mn51, S32, 0.0); + + jac.set(Mn51, S33, 0.0); + + jac.set(Mn51, S34, 0.0); + + jac.set(Mn51, S35, 0.0); + + jac.set(Mn51, Cl33, 0.0); + + jac.set(Mn51, Cl35, 0.0); + + jac.set(Mn51, Cl37, 0.0); + + jac.set(Mn51, Ar36, 0.0); + + jac.set(Mn51, Ar37, 0.0); + + jac.set(Mn51, Ar38, 0.0); + + jac.set(Mn51, K37, 0.0); + + jac.set(Mn51, K39, 0.0); + + jac.set(Mn51, Ca40, 0.0); + + jac.set(Mn51, Ca42, 0.0); + + jac.set(Mn51, Sc41, 0.0); + + jac.set(Mn51, Sc43, 0.0); + + jac.set(Mn51, Sc45, 0.0); + + jac.set(Mn51, Ti44, 0.0); + + jac.set(Mn51, Ti46, 0.0); + + jac.set(Mn51, Ti48, 0.0); + + scratch = screened_rates(k_V47_He4_to_Mn51_reaclib)*Y(He4)*state.rho; + jac.set(Mn51, V47, scratch); + + jac.set(Mn51, V49, 0.0); + + jac.set(Mn51, V51, 0.0); + + scratch = screened_rates(k_Cr48_He4_to_p_Mn51_reaclib)*Y(He4)*state.rho; + jac.set(Mn51, Cr48, scratch); + + scratch = screened_rates(k_Cr50_p_to_Mn51_reaclib)*Y(H1)*state.rho; + jac.set(Mn51, Cr50, scratch); + + jac.set(Mn51, Cr52, 0.0); + + jac.set(Mn51, Cr54, 0.0); + + scratch = -screened_rates(k_Mn51_He4_to_Co55_reaclib)*Y(He4)*state.rho + - screened_rates(k_Mn51_He4_to_p_Fe54_reaclib)*Y(He4)*state.rho + - 0.5*screened_rates(k_Mn51_n_n_to_Mn53_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + - screened_rates(k_Mn51_p_to_Fe52_reaclib)*Y(H1)*state.rho + - screened_rates(k_Mn51_p_to_He4_Cr48_reaclib)*Y(H1)*state.rho + - screened_rates(k_Mn51_to_He4_V47_reaclib) + - screened_rates(k_Mn51_to_p_Cr50_reaclib); + jac.set(Mn51, Mn51, scratch); + + scratch = screened_rates(k_Mn53_to_Mn51_n_n_approx); + jac.set(Mn51, Mn53, scratch); + + jac.set(Mn51, Mn55, 0.0); + + scratch = screened_rates(k_Fe52_to_p_Mn51_reaclib); + jac.set(Mn51, Fe52, scratch); + + scratch = screened_rates(k_Fe54_p_to_He4_Mn51_reaclib)*Y(H1)*state.rho; + jac.set(Mn51, Fe54, scratch); + + jac.set(Mn51, Fe56, 0.0); + + jac.set(Mn51, Fe58, 0.0); + + scratch = screened_rates(k_Co55_to_He4_Mn51_reaclib); + jac.set(Mn51, Co55, scratch); + + jac.set(Mn51, Co56, 0.0); + + jac.set(Mn51, Co57, 0.0); + + jac.set(Mn51, Co59, 0.0); + + jac.set(Mn51, Ni56, 0.0); + + jac.set(Mn51, Ni58, 0.0); + + jac.set(Mn51, Ni60, 0.0); + + jac.set(Mn51, Cu59, 0.0); + + jac.set(Mn51, Zn60, 0.0); + + + // Mn53 row + + scratch = screened_rates(k_Co56_n_to_He4_Mn53_reaclib)*Y(Co56)*state.rho + + 1.0*screened_rates(k_Mn51_n_n_to_Mn53_approx)*Y(Mn51)*Y(N)*amrex::Math::powi<2>(state.rho) + - 1.0*screened_rates(k_Mn53_n_n_to_Mn55_approx)*Y(Mn53)*Y(N)*amrex::Math::powi<2>(state.rho) + + 0.5*Y(Mn51)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Mn51_n_n_to_Mn53_approx_dYN + - 0.5*Y(Mn53)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Mn53_n_n_to_Mn55_approx_dYN + - Y(Mn53)*rate_eval.drate_Mn53_to_Mn51_n_n_approx_dYN + + Y(Mn55)*rate_eval.drate_Mn55_to_Mn53_n_n_approx_dYN; + jac.set(Mn53, N, scratch); + + scratch = screened_rates(k_Cr52_p_to_Mn53_reaclib)*Y(Cr52)*state.rho + + screened_rates(k_Fe56_p_to_He4_Mn53_reaclib)*Y(Fe56)*state.rho + - screened_rates(k_Mn53_p_to_Fe54_reaclib)*Y(Mn53)*state.rho + - screened_rates(k_Mn53_p_to_He4_Cr50_reaclib)*Y(Mn53)*state.rho; + jac.set(Mn53, H1, scratch); + + scratch = screened_rates(k_Cr50_He4_to_p_Mn53_reaclib)*Y(Cr50)*state.rho + - screened_rates(k_Mn53_He4_to_Co57_reaclib)*Y(Mn53)*state.rho + - screened_rates(k_Mn53_He4_to_n_Co56_reaclib)*Y(Mn53)*state.rho + - screened_rates(k_Mn53_He4_to_p_Fe56_reaclib)*Y(Mn53)*state.rho + + screened_rates(k_V49_He4_to_Mn53_reaclib)*Y(V49)*state.rho; + jac.set(Mn53, He4, scratch); + + jac.set(Mn53, C12, 0.0); + + jac.set(Mn53, O16, 0.0); + + jac.set(Mn53, Ne20, 0.0); + + jac.set(Mn53, Mg23, 0.0); + + jac.set(Mn53, Mg24, 0.0); + + jac.set(Mn53, Al27, 0.0); + + jac.set(Mn53, Si27, 0.0); + + jac.set(Mn53, Si28, 0.0); + + jac.set(Mn53, Si29, 0.0); + + jac.set(Mn53, Si30, 0.0); + + jac.set(Mn53, Si31, 0.0); + + jac.set(Mn53, P29, 0.0); + + jac.set(Mn53, P31, 0.0); + + jac.set(Mn53, P33, 0.0); + + jac.set(Mn53, S32, 0.0); + + jac.set(Mn53, S33, 0.0); + + jac.set(Mn53, S34, 0.0); + + jac.set(Mn53, S35, 0.0); + + jac.set(Mn53, Cl33, 0.0); + + jac.set(Mn53, Cl35, 0.0); + + jac.set(Mn53, Cl37, 0.0); + + jac.set(Mn53, Ar36, 0.0); + + jac.set(Mn53, Ar37, 0.0); + + jac.set(Mn53, Ar38, 0.0); + + jac.set(Mn53, K37, 0.0); + + jac.set(Mn53, K39, 0.0); + + jac.set(Mn53, Ca40, 0.0); + + jac.set(Mn53, Ca42, 0.0); + + jac.set(Mn53, Sc41, 0.0); + + jac.set(Mn53, Sc43, 0.0); + + jac.set(Mn53, Sc45, 0.0); + + jac.set(Mn53, Ti44, 0.0); + + jac.set(Mn53, Ti46, 0.0); + + jac.set(Mn53, Ti48, 0.0); + + jac.set(Mn53, V47, 0.0); + + scratch = screened_rates(k_V49_He4_to_Mn53_reaclib)*Y(He4)*state.rho; + jac.set(Mn53, V49, scratch); + + jac.set(Mn53, V51, 0.0); + + jac.set(Mn53, Cr48, 0.0); + + scratch = screened_rates(k_Cr50_He4_to_p_Mn53_reaclib)*Y(He4)*state.rho; + jac.set(Mn53, Cr50, scratch); + + scratch = screened_rates(k_Cr52_p_to_Mn53_reaclib)*Y(H1)*state.rho; + jac.set(Mn53, Cr52, scratch); + + jac.set(Mn53, Cr54, 0.0); + + scratch = 0.5*screened_rates(k_Mn51_n_n_to_Mn53_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); + jac.set(Mn53, Mn51, scratch); + + scratch = -screened_rates(k_Mn53_He4_to_Co57_reaclib)*Y(He4)*state.rho + - screened_rates(k_Mn53_He4_to_n_Co56_reaclib)*Y(He4)*state.rho + - screened_rates(k_Mn53_He4_to_p_Fe56_reaclib)*Y(He4)*state.rho + - 0.5*screened_rates(k_Mn53_n_n_to_Mn55_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + - screened_rates(k_Mn53_p_to_Fe54_reaclib)*Y(H1)*state.rho + - screened_rates(k_Mn53_p_to_He4_Cr50_reaclib)*Y(H1)*state.rho + - screened_rates(k_Mn53_to_He4_V49_reaclib) + - screened_rates(k_Mn53_to_Mn51_n_n_approx) + - screened_rates(k_Mn53_to_p_Cr52_reaclib); + jac.set(Mn53, Mn53, scratch); + + scratch = screened_rates(k_Mn55_to_Mn53_n_n_approx); + jac.set(Mn53, Mn55, scratch); + + jac.set(Mn53, Fe52, 0.0); + + scratch = screened_rates(k_Fe54_to_p_Mn53_reaclib); + jac.set(Mn53, Fe54, scratch); + + scratch = screened_rates(k_Fe56_p_to_He4_Mn53_reaclib)*Y(H1)*state.rho; + jac.set(Mn53, Fe56, scratch); + + jac.set(Mn53, Fe58, 0.0); + + jac.set(Mn53, Co55, 0.0); + + scratch = screened_rates(k_Co56_n_to_He4_Mn53_reaclib)*Y(N)*state.rho; + jac.set(Mn53, Co56, scratch); + + scratch = screened_rates(k_Co57_to_He4_Mn53_reaclib); + jac.set(Mn53, Co57, scratch); + + jac.set(Mn53, Co59, 0.0); + + jac.set(Mn53, Ni56, 0.0); + + jac.set(Mn53, Ni58, 0.0); + + jac.set(Mn53, Ni60, 0.0); + + jac.set(Mn53, Cu59, 0.0); + + jac.set(Mn53, Zn60, 0.0); + + + // Mn55 row + + scratch = 1.0*screened_rates(k_Mn53_n_n_to_Mn55_approx)*Y(Mn53)*Y(N)*amrex::Math::powi<2>(state.rho) + + 0.5*Y(Mn53)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Mn53_n_n_to_Mn55_approx_dYN + - Y(Mn55)*rate_eval.drate_Mn55_to_Mn53_n_n_approx_dYN; + jac.set(Mn55, N, scratch); + + scratch = screened_rates(k_Cr54_p_to_Mn55_reaclib)*Y(Cr54)*state.rho + + screened_rates(k_Fe58_p_to_He4_Mn55_reaclib)*Y(Fe58)*state.rho + - screened_rates(k_Mn55_p_to_Fe56_reaclib)*Y(Mn55)*state.rho + - screened_rates(k_Mn55_p_to_He4_Cr52_reaclib)*Y(Mn55)*state.rho; + jac.set(Mn55, H1, scratch); + + scratch = screened_rates(k_Cr52_He4_to_p_Mn55_reaclib)*Y(Cr52)*state.rho + - screened_rates(k_Mn55_He4_to_Co59_reaclib)*Y(Mn55)*state.rho + - screened_rates(k_Mn55_He4_to_p_Fe58_reaclib)*Y(Mn55)*state.rho + + screened_rates(k_V51_He4_to_Mn55_reaclib)*Y(V51)*state.rho; + jac.set(Mn55, He4, scratch); + + jac.set(Mn55, C12, 0.0); + + jac.set(Mn55, O16, 0.0); + + jac.set(Mn55, Ne20, 0.0); + + jac.set(Mn55, Mg23, 0.0); + + jac.set(Mn55, Mg24, 0.0); + + jac.set(Mn55, Al27, 0.0); + + jac.set(Mn55, Si27, 0.0); + + jac.set(Mn55, Si28, 0.0); + + jac.set(Mn55, Si29, 0.0); + + jac.set(Mn55, Si30, 0.0); + + jac.set(Mn55, Si31, 0.0); + + jac.set(Mn55, P29, 0.0); + + jac.set(Mn55, P31, 0.0); + + jac.set(Mn55, P33, 0.0); + + jac.set(Mn55, S32, 0.0); + + jac.set(Mn55, S33, 0.0); + + jac.set(Mn55, S34, 0.0); + + jac.set(Mn55, S35, 0.0); + + jac.set(Mn55, Cl33, 0.0); + + jac.set(Mn55, Cl35, 0.0); + + jac.set(Mn55, Cl37, 0.0); + + jac.set(Mn55, Ar36, 0.0); + + jac.set(Mn55, Ar37, 0.0); + + jac.set(Mn55, Ar38, 0.0); + + jac.set(Mn55, K37, 0.0); + + jac.set(Mn55, K39, 0.0); + + jac.set(Mn55, Ca40, 0.0); + + jac.set(Mn55, Ca42, 0.0); + + jac.set(Mn55, Sc41, 0.0); + + jac.set(Mn55, Sc43, 0.0); + + jac.set(Mn55, Sc45, 0.0); + + jac.set(Mn55, Ti44, 0.0); + + jac.set(Mn55, Ti46, 0.0); + + jac.set(Mn55, Ti48, 0.0); + + jac.set(Mn55, V47, 0.0); + + jac.set(Mn55, V49, 0.0); + + scratch = screened_rates(k_V51_He4_to_Mn55_reaclib)*Y(He4)*state.rho; + jac.set(Mn55, V51, scratch); + + jac.set(Mn55, Cr48, 0.0); + + jac.set(Mn55, Cr50, 0.0); + + scratch = screened_rates(k_Cr52_He4_to_p_Mn55_reaclib)*Y(He4)*state.rho; + jac.set(Mn55, Cr52, scratch); + + scratch = screened_rates(k_Cr54_p_to_Mn55_reaclib)*Y(H1)*state.rho; + jac.set(Mn55, Cr54, scratch); + + jac.set(Mn55, Mn51, 0.0); + + scratch = 0.5*screened_rates(k_Mn53_n_n_to_Mn55_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); + jac.set(Mn55, Mn53, scratch); + + scratch = -screened_rates(k_Mn55_He4_to_Co59_reaclib)*Y(He4)*state.rho + - screened_rates(k_Mn55_He4_to_p_Fe58_reaclib)*Y(He4)*state.rho + - screened_rates(k_Mn55_p_to_Fe56_reaclib)*Y(H1)*state.rho + - screened_rates(k_Mn55_p_to_He4_Cr52_reaclib)*Y(H1)*state.rho + - screened_rates(k_Mn55_to_He4_V51_reaclib) + - screened_rates(k_Mn55_to_Mn53_n_n_approx) + - screened_rates(k_Mn55_to_p_Cr54_reaclib); + jac.set(Mn55, Mn55, scratch); + + jac.set(Mn55, Fe52, 0.0); + + jac.set(Mn55, Fe54, 0.0); + + scratch = screened_rates(k_Fe56_to_p_Mn55_reaclib); + jac.set(Mn55, Fe56, scratch); + + scratch = screened_rates(k_Fe58_p_to_He4_Mn55_reaclib)*Y(H1)*state.rho; + jac.set(Mn55, Fe58, scratch); + + jac.set(Mn55, Co55, 0.0); + + jac.set(Mn55, Co56, 0.0); + + jac.set(Mn55, Co57, 0.0); + + scratch = screened_rates(k_Co59_to_He4_Mn55_reaclib); + jac.set(Mn55, Co59, scratch); + + jac.set(Mn55, Ni56, 0.0); + + jac.set(Mn55, Ni58, 0.0); + + jac.set(Mn55, Ni60, 0.0); + + jac.set(Mn55, Cu59, 0.0); + + jac.set(Mn55, Zn60, 0.0); + + + // Fe52 row + + scratch = -1.0*screened_rates(k_Fe52_n_n_to_Fe54_approx)*Y(Fe52)*Y(N)*amrex::Math::powi<2>(state.rho) + - 0.5*Y(Fe52)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Fe52_n_n_to_Fe54_approx_dYN + + Y(Fe54)*rate_eval.drate_Fe54_to_Fe52_n_n_approx_dYN; + jac.set(Fe52, N, scratch); + + scratch = screened_rates(k_Co55_p_to_He4_Fe52_reaclib)*Y(Co55)*state.rho + + screened_rates(k_Mn51_p_to_Fe52_reaclib)*Y(Mn51)*state.rho; + jac.set(Fe52, H1, scratch); + + scratch = screened_rates(k_Cr48_He4_to_Fe52_reaclib)*Y(Cr48)*state.rho + - screened_rates(k_Fe52_He4_to_Ni56_reaclib)*Y(Fe52)*state.rho + - screened_rates(k_Fe52_He4_to_p_Co55_reaclib)*Y(Fe52)*state.rho; + jac.set(Fe52, He4, scratch); + + jac.set(Fe52, C12, 0.0); + + jac.set(Fe52, O16, 0.0); + + jac.set(Fe52, Ne20, 0.0); + + jac.set(Fe52, Mg23, 0.0); + + jac.set(Fe52, Mg24, 0.0); + + jac.set(Fe52, Al27, 0.0); + + jac.set(Fe52, Si27, 0.0); + + jac.set(Fe52, Si28, 0.0); + + jac.set(Fe52, Si29, 0.0); + + jac.set(Fe52, Si30, 0.0); + + jac.set(Fe52, Si31, 0.0); + + jac.set(Fe52, P29, 0.0); + + jac.set(Fe52, P31, 0.0); + + jac.set(Fe52, P33, 0.0); + + jac.set(Fe52, S32, 0.0); + + jac.set(Fe52, S33, 0.0); + + jac.set(Fe52, S34, 0.0); + + jac.set(Fe52, S35, 0.0); + + jac.set(Fe52, Cl33, 0.0); + + jac.set(Fe52, Cl35, 0.0); + + jac.set(Fe52, Cl37, 0.0); + + jac.set(Fe52, Ar36, 0.0); + + jac.set(Fe52, Ar37, 0.0); + + jac.set(Fe52, Ar38, 0.0); + + jac.set(Fe52, K37, 0.0); + + jac.set(Fe52, K39, 0.0); + + jac.set(Fe52, Ca40, 0.0); + + jac.set(Fe52, Ca42, 0.0); + + jac.set(Fe52, Sc41, 0.0); + + jac.set(Fe52, Sc43, 0.0); + + jac.set(Fe52, Sc45, 0.0); + + jac.set(Fe52, Ti44, 0.0); + + jac.set(Fe52, Ti46, 0.0); + + jac.set(Fe52, Ti48, 0.0); + + jac.set(Fe52, V47, 0.0); + + jac.set(Fe52, V49, 0.0); + + jac.set(Fe52, V51, 0.0); + + scratch = screened_rates(k_Cr48_He4_to_Fe52_reaclib)*Y(He4)*state.rho; + jac.set(Fe52, Cr48, scratch); + + jac.set(Fe52, Cr50, 0.0); + + jac.set(Fe52, Cr52, 0.0); + + jac.set(Fe52, Cr54, 0.0); + + scratch = screened_rates(k_Mn51_p_to_Fe52_reaclib)*Y(H1)*state.rho; + jac.set(Fe52, Mn51, scratch); + + jac.set(Fe52, Mn53, 0.0); + + jac.set(Fe52, Mn55, 0.0); + + scratch = -screened_rates(k_Fe52_He4_to_Ni56_reaclib)*Y(He4)*state.rho + - screened_rates(k_Fe52_He4_to_p_Co55_reaclib)*Y(He4)*state.rho + - 0.5*screened_rates(k_Fe52_n_n_to_Fe54_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + - screened_rates(k_Fe52_to_He4_Cr48_reaclib) + - screened_rates(k_Fe52_to_p_Mn51_reaclib); + jac.set(Fe52, Fe52, scratch); + + scratch = screened_rates(k_Fe54_to_Fe52_n_n_approx); + jac.set(Fe52, Fe54, scratch); + + jac.set(Fe52, Fe56, 0.0); + + jac.set(Fe52, Fe58, 0.0); + + scratch = screened_rates(k_Co55_p_to_He4_Fe52_reaclib)*Y(H1)*state.rho; + jac.set(Fe52, Co55, scratch); + + jac.set(Fe52, Co56, 0.0); + + jac.set(Fe52, Co57, 0.0); + + jac.set(Fe52, Co59, 0.0); + + scratch = screened_rates(k_Ni56_to_He4_Fe52_reaclib); + jac.set(Fe52, Ni56, scratch); + + jac.set(Fe52, Ni58, 0.0); + + jac.set(Fe52, Ni60, 0.0); + + jac.set(Fe52, Cu59, 0.0); + + jac.set(Fe52, Zn60, 0.0); + + + // Fe54 row + + scratch = 1.0*screened_rates(k_Fe52_n_n_to_Fe54_approx)*Y(Fe52)*Y(N)*amrex::Math::powi<2>(state.rho) + - 1.0*screened_rates(k_Fe54_n_n_to_Fe56_approx)*Y(Fe54)*Y(N)*amrex::Math::powi<2>(state.rho) + + 0.5*Y(Fe52)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Fe52_n_n_to_Fe54_approx_dYN + - 0.5*Y(Fe54)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Fe54_n_n_to_Fe56_approx_dYN + - Y(Fe54)*rate_eval.drate_Fe54_to_Fe52_n_n_approx_dYN + + Y(Fe56)*rate_eval.drate_Fe56_to_Fe54_n_n_approx_dYN; + jac.set(Fe54, N, scratch); + + scratch = screened_rates(k_Co57_p_to_He4_Fe54_reaclib)*Y(Co57)*state.rho + - screened_rates(k_Fe54_p_to_Co55_reaclib)*Y(Fe54)*state.rho + - screened_rates(k_Fe54_p_to_He4_Mn51_reaclib)*Y(Fe54)*state.rho + + screened_rates(k_Mn53_p_to_Fe54_reaclib)*Y(Mn53)*state.rho; + jac.set(Fe54, H1, scratch); + + scratch = screened_rates(k_Cr50_He4_to_Fe54_reaclib)*Y(Cr50)*state.rho + - screened_rates(k_Fe54_He4_to_Ni58_reaclib)*Y(Fe54)*state.rho + - screened_rates(k_Fe54_He4_to_p_Co57_reaclib)*Y(Fe54)*state.rho + + screened_rates(k_Mn51_He4_to_p_Fe54_reaclib)*Y(Mn51)*state.rho; + jac.set(Fe54, He4, scratch); + + jac.set(Fe54, C12, 0.0); + + jac.set(Fe54, O16, 0.0); + + jac.set(Fe54, Ne20, 0.0); + + jac.set(Fe54, Mg23, 0.0); + + jac.set(Fe54, Mg24, 0.0); + + jac.set(Fe54, Al27, 0.0); + + jac.set(Fe54, Si27, 0.0); + + jac.set(Fe54, Si28, 0.0); + + jac.set(Fe54, Si29, 0.0); + + jac.set(Fe54, Si30, 0.0); + + jac.set(Fe54, Si31, 0.0); + + jac.set(Fe54, P29, 0.0); + + jac.set(Fe54, P31, 0.0); + + jac.set(Fe54, P33, 0.0); + + jac.set(Fe54, S32, 0.0); + + jac.set(Fe54, S33, 0.0); + + jac.set(Fe54, S34, 0.0); + + jac.set(Fe54, S35, 0.0); + + jac.set(Fe54, Cl33, 0.0); + + jac.set(Fe54, Cl35, 0.0); + + jac.set(Fe54, Cl37, 0.0); + + jac.set(Fe54, Ar36, 0.0); + + jac.set(Fe54, Ar37, 0.0); + + jac.set(Fe54, Ar38, 0.0); + + jac.set(Fe54, K37, 0.0); + + jac.set(Fe54, K39, 0.0); + + jac.set(Fe54, Ca40, 0.0); + + jac.set(Fe54, Ca42, 0.0); + + jac.set(Fe54, Sc41, 0.0); + + jac.set(Fe54, Sc43, 0.0); + + jac.set(Fe54, Sc45, 0.0); + + jac.set(Fe54, Ti44, 0.0); + + jac.set(Fe54, Ti46, 0.0); + + jac.set(Fe54, Ti48, 0.0); + + jac.set(Fe54, V47, 0.0); + + jac.set(Fe54, V49, 0.0); + + jac.set(Fe54, V51, 0.0); + + jac.set(Fe54, Cr48, 0.0); + + scratch = screened_rates(k_Cr50_He4_to_Fe54_reaclib)*Y(He4)*state.rho; + jac.set(Fe54, Cr50, scratch); + + jac.set(Fe54, Cr52, 0.0); + + jac.set(Fe54, Cr54, 0.0); + + scratch = screened_rates(k_Mn51_He4_to_p_Fe54_reaclib)*Y(He4)*state.rho; + jac.set(Fe54, Mn51, scratch); + + scratch = screened_rates(k_Mn53_p_to_Fe54_reaclib)*Y(H1)*state.rho; + jac.set(Fe54, Mn53, scratch); + + jac.set(Fe54, Mn55, 0.0); + + scratch = 0.5*screened_rates(k_Fe52_n_n_to_Fe54_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); + jac.set(Fe54, Fe52, scratch); + + scratch = -screened_rates(k_Fe54_He4_to_Ni58_reaclib)*Y(He4)*state.rho + - screened_rates(k_Fe54_He4_to_p_Co57_reaclib)*Y(He4)*state.rho + - 0.5*screened_rates(k_Fe54_n_n_to_Fe56_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + - screened_rates(k_Fe54_p_to_Co55_reaclib)*Y(H1)*state.rho + - screened_rates(k_Fe54_p_to_He4_Mn51_reaclib)*Y(H1)*state.rho + - screened_rates(k_Fe54_to_Fe52_n_n_approx) + - screened_rates(k_Fe54_to_He4_Cr50_reaclib) + - screened_rates(k_Fe54_to_p_Mn53_reaclib); + jac.set(Fe54, Fe54, scratch); + + scratch = screened_rates(k_Fe56_to_Fe54_n_n_approx); + jac.set(Fe54, Fe56, scratch); + + jac.set(Fe54, Fe58, 0.0); + + scratch = screened_rates(k_Co55_to_p_Fe54_reaclib); + jac.set(Fe54, Co55, scratch); + + jac.set(Fe54, Co56, 0.0); + + scratch = screened_rates(k_Co57_p_to_He4_Fe54_reaclib)*Y(H1)*state.rho; + jac.set(Fe54, Co57, scratch); + + jac.set(Fe54, Co59, 0.0); + + jac.set(Fe54, Ni56, 0.0); + + scratch = screened_rates(k_Ni58_to_He4_Fe54_reaclib); + jac.set(Fe54, Ni58, scratch); + + jac.set(Fe54, Ni60, 0.0); + + jac.set(Fe54, Cu59, 0.0); + + jac.set(Fe54, Zn60, 0.0); + + + // Fe56 row + + scratch = screened_rates(k_Co56_n_to_p_Fe56_reaclib)*Y(Co56)*state.rho + + 1.0*screened_rates(k_Fe54_n_n_to_Fe56_approx)*Y(Fe54)*Y(N)*amrex::Math::powi<2>(state.rho) + - 1.0*screened_rates(k_Fe56_n_n_to_Fe58_approx)*Y(Fe56)*Y(N)*amrex::Math::powi<2>(state.rho) + + 0.5*Y(Fe54)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Fe54_n_n_to_Fe56_approx_dYN + - 0.5*Y(Fe56)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Fe56_n_n_to_Fe58_approx_dYN + - Y(Fe56)*rate_eval.drate_Fe56_to_Fe54_n_n_approx_dYN + + Y(Fe58)*rate_eval.drate_Fe58_to_Fe56_n_n_approx_dYN; + jac.set(Fe56, N, scratch); + + scratch = screened_rates(k_Co59_p_to_He4_Fe56_reaclib)*Y(Co59)*state.rho + - screened_rates(k_Fe56_p_to_Co57_reaclib)*Y(Fe56)*state.rho + - screened_rates(k_Fe56_p_to_He4_Mn53_reaclib)*Y(Fe56)*state.rho + - screened_rates(k_Fe56_p_to_n_Co56_reaclib)*Y(Fe56)*state.rho + + screened_rates(k_Mn55_p_to_Fe56_reaclib)*Y(Mn55)*state.rho; + jac.set(Fe56, H1, scratch); + + scratch = screened_rates(k_Cr52_He4_to_Fe56_reaclib)*Y(Cr52)*state.rho + - screened_rates(k_Fe56_He4_to_Ni60_reaclib)*Y(Fe56)*state.rho + - screened_rates(k_Fe56_He4_to_p_Co59_reaclib)*Y(Fe56)*state.rho + + screened_rates(k_Mn53_He4_to_p_Fe56_reaclib)*Y(Mn53)*state.rho; + jac.set(Fe56, He4, scratch); + + jac.set(Fe56, C12, 0.0); + + jac.set(Fe56, O16, 0.0); + + jac.set(Fe56, Ne20, 0.0); + + jac.set(Fe56, Mg23, 0.0); + + jac.set(Fe56, Mg24, 0.0); + + jac.set(Fe56, Al27, 0.0); + + jac.set(Fe56, Si27, 0.0); + + jac.set(Fe56, Si28, 0.0); + + jac.set(Fe56, Si29, 0.0); + + jac.set(Fe56, Si30, 0.0); + + jac.set(Fe56, Si31, 0.0); + + jac.set(Fe56, P29, 0.0); + + jac.set(Fe56, P31, 0.0); + + jac.set(Fe56, P33, 0.0); + + jac.set(Fe56, S32, 0.0); + + jac.set(Fe56, S33, 0.0); + + jac.set(Fe56, S34, 0.0); + + jac.set(Fe56, S35, 0.0); + + jac.set(Fe56, Cl33, 0.0); + + jac.set(Fe56, Cl35, 0.0); + + jac.set(Fe56, Cl37, 0.0); + + jac.set(Fe56, Ar36, 0.0); + + jac.set(Fe56, Ar37, 0.0); + + jac.set(Fe56, Ar38, 0.0); + + jac.set(Fe56, K37, 0.0); + + jac.set(Fe56, K39, 0.0); + + jac.set(Fe56, Ca40, 0.0); + + jac.set(Fe56, Ca42, 0.0); + + jac.set(Fe56, Sc41, 0.0); + + jac.set(Fe56, Sc43, 0.0); + + jac.set(Fe56, Sc45, 0.0); + + jac.set(Fe56, Ti44, 0.0); + + jac.set(Fe56, Ti46, 0.0); + + jac.set(Fe56, Ti48, 0.0); + + jac.set(Fe56, V47, 0.0); + + jac.set(Fe56, V49, 0.0); + + jac.set(Fe56, V51, 0.0); + + jac.set(Fe56, Cr48, 0.0); + + jac.set(Fe56, Cr50, 0.0); + + scratch = screened_rates(k_Cr52_He4_to_Fe56_reaclib)*Y(He4)*state.rho; + jac.set(Fe56, Cr52, scratch); + + jac.set(Fe56, Cr54, 0.0); + + jac.set(Fe56, Mn51, 0.0); + + scratch = screened_rates(k_Mn53_He4_to_p_Fe56_reaclib)*Y(He4)*state.rho; + jac.set(Fe56, Mn53, scratch); + + scratch = screened_rates(k_Mn55_p_to_Fe56_reaclib)*Y(H1)*state.rho; + jac.set(Fe56, Mn55, scratch); + + jac.set(Fe56, Fe52, 0.0); + + scratch = 0.5*screened_rates(k_Fe54_n_n_to_Fe56_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); + jac.set(Fe56, Fe54, scratch); + + scratch = -screened_rates(k_Fe56_He4_to_Ni60_reaclib)*Y(He4)*state.rho + - screened_rates(k_Fe56_He4_to_p_Co59_reaclib)*Y(He4)*state.rho + - 0.5*screened_rates(k_Fe56_n_n_to_Fe58_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + - screened_rates(k_Fe56_p_to_Co57_reaclib)*Y(H1)*state.rho + - screened_rates(k_Fe56_p_to_He4_Mn53_reaclib)*Y(H1)*state.rho + - screened_rates(k_Fe56_p_to_n_Co56_reaclib)*Y(H1)*state.rho + - screened_rates(k_Fe56_to_Co56_beta_neg_weaktab) + - screened_rates(k_Fe56_to_Fe54_n_n_approx) + - screened_rates(k_Fe56_to_He4_Cr52_reaclib) + - screened_rates(k_Fe56_to_p_Mn55_reaclib); + jac.set(Fe56, Fe56, scratch); + + scratch = screened_rates(k_Fe58_to_Fe56_n_n_approx); + jac.set(Fe56, Fe58, scratch); + + jac.set(Fe56, Co55, 0.0); + + scratch = screened_rates(k_Co56_n_to_p_Fe56_reaclib)*Y(N)*state.rho + + screened_rates(k_Co56_to_Fe56_electron_capture_weaktab); + jac.set(Fe56, Co56, scratch); + + scratch = screened_rates(k_Co57_to_p_Fe56_reaclib); + jac.set(Fe56, Co57, scratch); + + scratch = screened_rates(k_Co59_p_to_He4_Fe56_reaclib)*Y(H1)*state.rho; + jac.set(Fe56, Co59, scratch); + + jac.set(Fe56, Ni56, 0.0); + + jac.set(Fe56, Ni58, 0.0); + + scratch = screened_rates(k_Ni60_to_He4_Fe56_reaclib); + jac.set(Fe56, Ni60, scratch); + + jac.set(Fe56, Cu59, 0.0); + + jac.set(Fe56, Zn60, 0.0); + + + // Fe58 row + + scratch = 1.0*screened_rates(k_Fe56_n_n_to_Fe58_approx)*Y(Fe56)*Y(N)*amrex::Math::powi<2>(state.rho) + + 0.5*Y(Fe56)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Fe56_n_n_to_Fe58_approx_dYN + - Y(Fe58)*rate_eval.drate_Fe58_to_Fe56_n_n_approx_dYN; + jac.set(Fe58, N, scratch); + + scratch = -screened_rates(k_Fe58_p_to_Co59_reaclib)*Y(Fe58)*state.rho + - screened_rates(k_Fe58_p_to_He4_Mn55_reaclib)*Y(Fe58)*state.rho; + jac.set(Fe58, H1, scratch); + + scratch = screened_rates(k_Cr54_He4_to_Fe58_reaclib)*Y(Cr54)*state.rho + + screened_rates(k_Mn55_He4_to_p_Fe58_reaclib)*Y(Mn55)*state.rho; + jac.set(Fe58, He4, scratch); + + jac.set(Fe58, C12, 0.0); + + jac.set(Fe58, O16, 0.0); + + jac.set(Fe58, Ne20, 0.0); + + jac.set(Fe58, Mg23, 0.0); + + jac.set(Fe58, Mg24, 0.0); + + jac.set(Fe58, Al27, 0.0); + + jac.set(Fe58, Si27, 0.0); + + jac.set(Fe58, Si28, 0.0); + + jac.set(Fe58, Si29, 0.0); + + jac.set(Fe58, Si30, 0.0); + + jac.set(Fe58, Si31, 0.0); + + jac.set(Fe58, P29, 0.0); + + jac.set(Fe58, P31, 0.0); + + jac.set(Fe58, P33, 0.0); + + jac.set(Fe58, S32, 0.0); + + jac.set(Fe58, S33, 0.0); + + jac.set(Fe58, S34, 0.0); + + jac.set(Fe58, S35, 0.0); + + jac.set(Fe58, Cl33, 0.0); + + jac.set(Fe58, Cl35, 0.0); + + jac.set(Fe58, Cl37, 0.0); + + jac.set(Fe58, Ar36, 0.0); + + jac.set(Fe58, Ar37, 0.0); + + jac.set(Fe58, Ar38, 0.0); + + jac.set(Fe58, K37, 0.0); + + jac.set(Fe58, K39, 0.0); + + jac.set(Fe58, Ca40, 0.0); + + jac.set(Fe58, Ca42, 0.0); + + jac.set(Fe58, Sc41, 0.0); + + jac.set(Fe58, Sc43, 0.0); + + jac.set(Fe58, Sc45, 0.0); + + jac.set(Fe58, Ti44, 0.0); + + jac.set(Fe58, Ti46, 0.0); + + jac.set(Fe58, Ti48, 0.0); + + jac.set(Fe58, V47, 0.0); + + jac.set(Fe58, V49, 0.0); + + jac.set(Fe58, V51, 0.0); + + jac.set(Fe58, Cr48, 0.0); + + jac.set(Fe58, Cr50, 0.0); + + jac.set(Fe58, Cr52, 0.0); + + scratch = screened_rates(k_Cr54_He4_to_Fe58_reaclib)*Y(He4)*state.rho; + jac.set(Fe58, Cr54, scratch); + + jac.set(Fe58, Mn51, 0.0); + + jac.set(Fe58, Mn53, 0.0); + + scratch = screened_rates(k_Mn55_He4_to_p_Fe58_reaclib)*Y(He4)*state.rho; + jac.set(Fe58, Mn55, scratch); + + jac.set(Fe58, Fe52, 0.0); + + jac.set(Fe58, Fe54, 0.0); + + scratch = 0.5*screened_rates(k_Fe56_n_n_to_Fe58_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); + jac.set(Fe58, Fe56, scratch); + + scratch = -screened_rates(k_Fe58_p_to_Co59_reaclib)*Y(H1)*state.rho + - screened_rates(k_Fe58_p_to_He4_Mn55_reaclib)*Y(H1)*state.rho + - screened_rates(k_Fe58_to_Fe56_n_n_approx) + - screened_rates(k_Fe58_to_He4_Cr54_reaclib); + jac.set(Fe58, Fe58, scratch); + + jac.set(Fe58, Co55, 0.0); + + jac.set(Fe58, Co56, 0.0); + + jac.set(Fe58, Co57, 0.0); + + scratch = screened_rates(k_Co59_to_p_Fe58_reaclib); + jac.set(Fe58, Co59, scratch); + + jac.set(Fe58, Ni56, 0.0); + + jac.set(Fe58, Ni58, 0.0); + + jac.set(Fe58, Ni60, 0.0); + + jac.set(Fe58, Cu59, 0.0); + + jac.set(Fe58, Zn60, 0.0); + + + // Co55 row + + scratch = -screened_rates(k_Co55_n_to_Co56_reaclib)*Y(Co55)*state.rho; + jac.set(Co55, N, scratch); + + scratch = -screened_rates(k_Co55_p_to_He4_Fe52_reaclib)*Y(Co55)*state.rho + - screened_rates(k_Co55_p_to_Ni56_reaclib)*Y(Co55)*state.rho + + screened_rates(k_Fe54_p_to_Co55_reaclib)*Y(Fe54)*state.rho + + screened_rates(k_Ni58_p_to_He4_Co55_reaclib)*Y(Ni58)*state.rho; + jac.set(Co55, H1, scratch); + + scratch = -screened_rates(k_Co55_He4_to_Cu59_reaclib)*Y(Co55)*state.rho + - screened_rates(k_Co55_He4_to_p_Ni58_reaclib)*Y(Co55)*state.rho + + screened_rates(k_Fe52_He4_to_p_Co55_reaclib)*Y(Fe52)*state.rho + + screened_rates(k_Mn51_He4_to_Co55_reaclib)*Y(Mn51)*state.rho; + jac.set(Co55, He4, scratch); + + jac.set(Co55, C12, 0.0); + + jac.set(Co55, O16, 0.0); + + jac.set(Co55, Ne20, 0.0); + + jac.set(Co55, Mg23, 0.0); + + jac.set(Co55, Mg24, 0.0); + + jac.set(Co55, Al27, 0.0); + + jac.set(Co55, Si27, 0.0); + + jac.set(Co55, Si28, 0.0); + + jac.set(Co55, Si29, 0.0); + + jac.set(Co55, Si30, 0.0); + + jac.set(Co55, Si31, 0.0); + + jac.set(Co55, P29, 0.0); + + jac.set(Co55, P31, 0.0); + + jac.set(Co55, P33, 0.0); + + jac.set(Co55, S32, 0.0); + + jac.set(Co55, S33, 0.0); + + jac.set(Co55, S34, 0.0); + + jac.set(Co55, S35, 0.0); + + jac.set(Co55, Cl33, 0.0); + + jac.set(Co55, Cl35, 0.0); + + jac.set(Co55, Cl37, 0.0); + + jac.set(Co55, Ar36, 0.0); + + jac.set(Co55, Ar37, 0.0); + + jac.set(Co55, Ar38, 0.0); + + jac.set(Co55, K37, 0.0); + + jac.set(Co55, K39, 0.0); + + jac.set(Co55, Ca40, 0.0); + + jac.set(Co55, Ca42, 0.0); + + jac.set(Co55, Sc41, 0.0); + + jac.set(Co55, Sc43, 0.0); + + jac.set(Co55, Sc45, 0.0); + + jac.set(Co55, Ti44, 0.0); + + jac.set(Co55, Ti46, 0.0); + + jac.set(Co55, Ti48, 0.0); + + jac.set(Co55, V47, 0.0); + + jac.set(Co55, V49, 0.0); + + jac.set(Co55, V51, 0.0); + + jac.set(Co55, Cr48, 0.0); + + jac.set(Co55, Cr50, 0.0); + + jac.set(Co55, Cr52, 0.0); + + jac.set(Co55, Cr54, 0.0); + + scratch = screened_rates(k_Mn51_He4_to_Co55_reaclib)*Y(He4)*state.rho; + jac.set(Co55, Mn51, scratch); + + jac.set(Co55, Mn53, 0.0); + + jac.set(Co55, Mn55, 0.0); + + scratch = screened_rates(k_Fe52_He4_to_p_Co55_reaclib)*Y(He4)*state.rho; + jac.set(Co55, Fe52, scratch); + + scratch = screened_rates(k_Fe54_p_to_Co55_reaclib)*Y(H1)*state.rho; + jac.set(Co55, Fe54, scratch); + + jac.set(Co55, Fe56, 0.0); + + jac.set(Co55, Fe58, 0.0); + + scratch = -screened_rates(k_Co55_He4_to_Cu59_reaclib)*Y(He4)*state.rho + - screened_rates(k_Co55_He4_to_p_Ni58_reaclib)*Y(He4)*state.rho + - screened_rates(k_Co55_n_to_Co56_reaclib)*Y(N)*state.rho + - screened_rates(k_Co55_p_to_He4_Fe52_reaclib)*Y(H1)*state.rho + - screened_rates(k_Co55_p_to_Ni56_reaclib)*Y(H1)*state.rho + - screened_rates(k_Co55_to_He4_Mn51_reaclib) + - screened_rates(k_Co55_to_p_Fe54_reaclib); + jac.set(Co55, Co55, scratch); + + scratch = screened_rates(k_Co56_to_n_Co55_reaclib); + jac.set(Co55, Co56, scratch); + + jac.set(Co55, Co57, 0.0); + + jac.set(Co55, Co59, 0.0); + + scratch = screened_rates(k_Ni56_to_p_Co55_reaclib); + jac.set(Co55, Ni56, scratch); + + scratch = screened_rates(k_Ni58_p_to_He4_Co55_reaclib)*Y(H1)*state.rho; + jac.set(Co55, Ni58, scratch); + + jac.set(Co55, Ni60, 0.0); + + scratch = screened_rates(k_Cu59_to_He4_Co55_reaclib); + jac.set(Co55, Cu59, scratch); + + jac.set(Co55, Zn60, 0.0); + + + // Co56 row + + scratch = screened_rates(k_Co55_n_to_Co56_reaclib)*Y(Co55)*state.rho + - screened_rates(k_Co56_n_to_Co57_reaclib)*Y(Co56)*state.rho + - screened_rates(k_Co56_n_to_He4_Mn53_reaclib)*Y(Co56)*state.rho + - screened_rates(k_Co56_n_to_p_Fe56_reaclib)*Y(Co56)*state.rho + + screened_rates(k_Cu59_n_to_He4_Co56_reaclib)*Y(Cu59)*state.rho + + screened_rates(k_Ni56_n_to_p_Co56_reaclib)*Y(Ni56)*state.rho; + jac.set(Co56, N, scratch); + + scratch = -screened_rates(k_Co56_p_to_n_Ni56_reaclib)*Y(Co56)*state.rho + + screened_rates(k_Fe56_p_to_n_Co56_reaclib)*Y(Fe56)*state.rho; + jac.set(Co56, H1, scratch); + + scratch = -screened_rates(k_Co56_He4_to_n_Cu59_reaclib)*Y(Co56)*state.rho + + screened_rates(k_Mn53_He4_to_n_Co56_reaclib)*Y(Mn53)*state.rho; + jac.set(Co56, He4, scratch); + + jac.set(Co56, C12, 0.0); + + jac.set(Co56, O16, 0.0); + + jac.set(Co56, Ne20, 0.0); + + jac.set(Co56, Mg23, 0.0); + + jac.set(Co56, Mg24, 0.0); + + jac.set(Co56, Al27, 0.0); + + jac.set(Co56, Si27, 0.0); + + jac.set(Co56, Si28, 0.0); + + jac.set(Co56, Si29, 0.0); + + jac.set(Co56, Si30, 0.0); + + jac.set(Co56, Si31, 0.0); + + jac.set(Co56, P29, 0.0); + + jac.set(Co56, P31, 0.0); + + jac.set(Co56, P33, 0.0); + + jac.set(Co56, S32, 0.0); + + jac.set(Co56, S33, 0.0); + + jac.set(Co56, S34, 0.0); + + jac.set(Co56, S35, 0.0); + + jac.set(Co56, Cl33, 0.0); + + jac.set(Co56, Cl35, 0.0); + + jac.set(Co56, Cl37, 0.0); + + jac.set(Co56, Ar36, 0.0); + + jac.set(Co56, Ar37, 0.0); + + jac.set(Co56, Ar38, 0.0); + + jac.set(Co56, K37, 0.0); + + jac.set(Co56, K39, 0.0); + + jac.set(Co56, Ca40, 0.0); + + jac.set(Co56, Ca42, 0.0); + + jac.set(Co56, Sc41, 0.0); + + jac.set(Co56, Sc43, 0.0); + + jac.set(Co56, Sc45, 0.0); + + jac.set(Co56, Ti44, 0.0); + + jac.set(Co56, Ti46, 0.0); + + jac.set(Co56, Ti48, 0.0); + + jac.set(Co56, V47, 0.0); + + jac.set(Co56, V49, 0.0); + + jac.set(Co56, V51, 0.0); + + jac.set(Co56, Cr48, 0.0); + + jac.set(Co56, Cr50, 0.0); + + jac.set(Co56, Cr52, 0.0); + + jac.set(Co56, Cr54, 0.0); + + jac.set(Co56, Mn51, 0.0); + + scratch = screened_rates(k_Mn53_He4_to_n_Co56_reaclib)*Y(He4)*state.rho; + jac.set(Co56, Mn53, scratch); + + jac.set(Co56, Mn55, 0.0); + + jac.set(Co56, Fe52, 0.0); + + jac.set(Co56, Fe54, 0.0); + + scratch = screened_rates(k_Fe56_p_to_n_Co56_reaclib)*Y(H1)*state.rho + + screened_rates(k_Fe56_to_Co56_beta_neg_weaktab); + jac.set(Co56, Fe56, scratch); + + jac.set(Co56, Fe58, 0.0); + + scratch = screened_rates(k_Co55_n_to_Co56_reaclib)*Y(N)*state.rho; + jac.set(Co56, Co55, scratch); + + scratch = -screened_rates(k_Co56_He4_to_n_Cu59_reaclib)*Y(He4)*state.rho + - screened_rates(k_Co56_n_to_Co57_reaclib)*Y(N)*state.rho + - screened_rates(k_Co56_n_to_He4_Mn53_reaclib)*Y(N)*state.rho + - screened_rates(k_Co56_n_to_p_Fe56_reaclib)*Y(N)*state.rho + - screened_rates(k_Co56_p_to_n_Ni56_reaclib)*Y(H1)*state.rho + - screened_rates(k_Co56_to_Fe56_electron_capture_weaktab) + - screened_rates(k_Co56_to_Ni56_beta_neg_weaktab) + - screened_rates(k_Co56_to_n_Co55_reaclib); + jac.set(Co56, Co56, scratch); + + scratch = screened_rates(k_Co57_to_n_Co56_reaclib); + jac.set(Co56, Co57, scratch); + + jac.set(Co56, Co59, 0.0); + + scratch = screened_rates(k_Ni56_n_to_p_Co56_reaclib)*Y(N)*state.rho + + screened_rates(k_Ni56_to_Co56_electron_capture_weaktab); + jac.set(Co56, Ni56, scratch); + + jac.set(Co56, Ni58, 0.0); + + jac.set(Co56, Ni60, 0.0); + + scratch = screened_rates(k_Cu59_n_to_He4_Co56_reaclib)*Y(N)*state.rho; + jac.set(Co56, Cu59, scratch); + + jac.set(Co56, Zn60, 0.0); + + + // Co57 row + + scratch = screened_rates(k_Co56_n_to_Co57_reaclib)*Y(Co56)*state.rho + - 1.0*screened_rates(k_Co57_n_n_to_Co59_approx)*Y(Co57)*Y(N)*amrex::Math::powi<2>(state.rho) + - 0.5*Y(Co57)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Co57_n_n_to_Co59_approx_dYN + + Y(Co59)*rate_eval.drate_Co59_to_Co57_n_n_approx_dYN; + jac.set(Co57, N, scratch); + + scratch = -screened_rates(k_Co57_p_to_He4_Fe54_reaclib)*Y(Co57)*state.rho + - screened_rates(k_Co57_p_to_Ni58_reaclib)*Y(Co57)*state.rho + + screened_rates(k_Fe56_p_to_Co57_reaclib)*Y(Fe56)*state.rho + + screened_rates(k_Ni60_p_to_He4_Co57_reaclib)*Y(Ni60)*state.rho; + jac.set(Co57, H1, scratch); + + scratch = -screened_rates(k_Co57_He4_to_p_Ni60_reaclib)*Y(Co57)*state.rho + + screened_rates(k_Fe54_He4_to_p_Co57_reaclib)*Y(Fe54)*state.rho + + screened_rates(k_Mn53_He4_to_Co57_reaclib)*Y(Mn53)*state.rho; + jac.set(Co57, He4, scratch); + + jac.set(Co57, C12, 0.0); + + jac.set(Co57, O16, 0.0); + + jac.set(Co57, Ne20, 0.0); + + jac.set(Co57, Mg23, 0.0); + + jac.set(Co57, Mg24, 0.0); + + jac.set(Co57, Al27, 0.0); + + jac.set(Co57, Si27, 0.0); + + jac.set(Co57, Si28, 0.0); + + jac.set(Co57, Si29, 0.0); + + jac.set(Co57, Si30, 0.0); + + jac.set(Co57, Si31, 0.0); + + jac.set(Co57, P29, 0.0); + + jac.set(Co57, P31, 0.0); + + jac.set(Co57, P33, 0.0); + + jac.set(Co57, S32, 0.0); + + jac.set(Co57, S33, 0.0); + + jac.set(Co57, S34, 0.0); + + jac.set(Co57, S35, 0.0); + + jac.set(Co57, Cl33, 0.0); + + jac.set(Co57, Cl35, 0.0); + + jac.set(Co57, Cl37, 0.0); + + jac.set(Co57, Ar36, 0.0); + + jac.set(Co57, Ar37, 0.0); + + jac.set(Co57, Ar38, 0.0); + + jac.set(Co57, K37, 0.0); + + jac.set(Co57, K39, 0.0); + + jac.set(Co57, Ca40, 0.0); + + jac.set(Co57, Ca42, 0.0); + + jac.set(Co57, Sc41, 0.0); + + jac.set(Co57, Sc43, 0.0); + + jac.set(Co57, Sc45, 0.0); + + jac.set(Co57, Ti44, 0.0); + + jac.set(Co57, Ti46, 0.0); + + jac.set(Co57, Ti48, 0.0); + + jac.set(Co57, V47, 0.0); + + jac.set(Co57, V49, 0.0); + + jac.set(Co57, V51, 0.0); + + jac.set(Co57, Cr48, 0.0); + + jac.set(Co57, Cr50, 0.0); + + jac.set(Co57, Cr52, 0.0); + + jac.set(Co57, Cr54, 0.0); + + jac.set(Co57, Mn51, 0.0); + + scratch = screened_rates(k_Mn53_He4_to_Co57_reaclib)*Y(He4)*state.rho; + jac.set(Co57, Mn53, scratch); + + jac.set(Co57, Mn55, 0.0); + + jac.set(Co57, Fe52, 0.0); + + scratch = screened_rates(k_Fe54_He4_to_p_Co57_reaclib)*Y(He4)*state.rho; + jac.set(Co57, Fe54, scratch); + + scratch = screened_rates(k_Fe56_p_to_Co57_reaclib)*Y(H1)*state.rho; + jac.set(Co57, Fe56, scratch); + + jac.set(Co57, Fe58, 0.0); + + jac.set(Co57, Co55, 0.0); + + scratch = screened_rates(k_Co56_n_to_Co57_reaclib)*Y(N)*state.rho; + jac.set(Co57, Co56, scratch); + + scratch = -screened_rates(k_Co57_He4_to_p_Ni60_reaclib)*Y(He4)*state.rho + - 0.5*screened_rates(k_Co57_n_n_to_Co59_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + - screened_rates(k_Co57_p_to_He4_Fe54_reaclib)*Y(H1)*state.rho + - screened_rates(k_Co57_p_to_Ni58_reaclib)*Y(H1)*state.rho + - screened_rates(k_Co57_to_He4_Mn53_reaclib) + - screened_rates(k_Co57_to_n_Co56_reaclib) + - screened_rates(k_Co57_to_p_Fe56_reaclib); + jac.set(Co57, Co57, scratch); + + scratch = screened_rates(k_Co59_to_Co57_n_n_approx); + jac.set(Co57, Co59, scratch); + + jac.set(Co57, Ni56, 0.0); + + scratch = screened_rates(k_Ni58_to_p_Co57_reaclib); + jac.set(Co57, Ni58, scratch); + + scratch = screened_rates(k_Ni60_p_to_He4_Co57_reaclib)*Y(H1)*state.rho; + jac.set(Co57, Ni60, scratch); + + jac.set(Co57, Cu59, 0.0); + + jac.set(Co57, Zn60, 0.0); + + + // Co59 row + + scratch = 1.0*screened_rates(k_Co57_n_n_to_Co59_approx)*Y(Co57)*Y(N)*amrex::Math::powi<2>(state.rho) + + 0.5*Y(Co57)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Co57_n_n_to_Co59_approx_dYN + - Y(Co59)*rate_eval.drate_Co59_to_Co57_n_n_approx_dYN; + jac.set(Co59, N, scratch); + + scratch = -screened_rates(k_Co59_p_to_He4_Fe56_reaclib)*Y(Co59)*state.rho + - screened_rates(k_Co59_p_to_Ni60_reaclib)*Y(Co59)*state.rho + + screened_rates(k_Fe58_p_to_Co59_reaclib)*Y(Fe58)*state.rho; + jac.set(Co59, H1, scratch); + + scratch = screened_rates(k_Fe56_He4_to_p_Co59_reaclib)*Y(Fe56)*state.rho + + screened_rates(k_Mn55_He4_to_Co59_reaclib)*Y(Mn55)*state.rho; + jac.set(Co59, He4, scratch); + + jac.set(Co59, C12, 0.0); + + jac.set(Co59, O16, 0.0); + + jac.set(Co59, Ne20, 0.0); + + jac.set(Co59, Mg23, 0.0); + + jac.set(Co59, Mg24, 0.0); + + jac.set(Co59, Al27, 0.0); + + jac.set(Co59, Si27, 0.0); + + jac.set(Co59, Si28, 0.0); + + jac.set(Co59, Si29, 0.0); + + jac.set(Co59, Si30, 0.0); + + jac.set(Co59, Si31, 0.0); + + jac.set(Co59, P29, 0.0); + + jac.set(Co59, P31, 0.0); + + jac.set(Co59, P33, 0.0); + + jac.set(Co59, S32, 0.0); + + jac.set(Co59, S33, 0.0); + + jac.set(Co59, S34, 0.0); + + jac.set(Co59, S35, 0.0); + + jac.set(Co59, Cl33, 0.0); + + jac.set(Co59, Cl35, 0.0); + + jac.set(Co59, Cl37, 0.0); + + jac.set(Co59, Ar36, 0.0); + + jac.set(Co59, Ar37, 0.0); + + jac.set(Co59, Ar38, 0.0); + + jac.set(Co59, K37, 0.0); + + jac.set(Co59, K39, 0.0); + + jac.set(Co59, Ca40, 0.0); + + jac.set(Co59, Ca42, 0.0); + + jac.set(Co59, Sc41, 0.0); + + jac.set(Co59, Sc43, 0.0); + + jac.set(Co59, Sc45, 0.0); + + jac.set(Co59, Ti44, 0.0); + + jac.set(Co59, Ti46, 0.0); + + jac.set(Co59, Ti48, 0.0); + + jac.set(Co59, V47, 0.0); + + jac.set(Co59, V49, 0.0); + + jac.set(Co59, V51, 0.0); + + jac.set(Co59, Cr48, 0.0); + + jac.set(Co59, Cr50, 0.0); + + jac.set(Co59, Cr52, 0.0); + + jac.set(Co59, Cr54, 0.0); + + jac.set(Co59, Mn51, 0.0); + + jac.set(Co59, Mn53, 0.0); + + scratch = screened_rates(k_Mn55_He4_to_Co59_reaclib)*Y(He4)*state.rho; + jac.set(Co59, Mn55, scratch); + + jac.set(Co59, Fe52, 0.0); + + jac.set(Co59, Fe54, 0.0); + + scratch = screened_rates(k_Fe56_He4_to_p_Co59_reaclib)*Y(He4)*state.rho; + jac.set(Co59, Fe56, scratch); + + scratch = screened_rates(k_Fe58_p_to_Co59_reaclib)*Y(H1)*state.rho; + jac.set(Co59, Fe58, scratch); + + jac.set(Co59, Co55, 0.0); + + jac.set(Co59, Co56, 0.0); + + scratch = 0.5*screened_rates(k_Co57_n_n_to_Co59_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); + jac.set(Co59, Co57, scratch); + + scratch = -screened_rates(k_Co59_p_to_He4_Fe56_reaclib)*Y(H1)*state.rho + - screened_rates(k_Co59_p_to_Ni60_reaclib)*Y(H1)*state.rho + - screened_rates(k_Co59_to_Co57_n_n_approx) + - screened_rates(k_Co59_to_He4_Mn55_reaclib) + - screened_rates(k_Co59_to_p_Fe58_reaclib); + jac.set(Co59, Co59, scratch); + + jac.set(Co59, Ni56, 0.0); + + jac.set(Co59, Ni58, 0.0); + + scratch = screened_rates(k_Ni60_to_p_Co59_reaclib); + jac.set(Co59, Ni60, scratch); + + jac.set(Co59, Cu59, 0.0); + + jac.set(Co59, Zn60, 0.0); + + + // Ni56 row + + scratch = -1.0*screened_rates(k_Ni56_n_n_to_Ni58_approx)*Y(Ni56)*Y(N)*amrex::Math::powi<2>(state.rho) + - screened_rates(k_Ni56_n_to_p_Co56_reaclib)*Y(Ni56)*state.rho + - 0.5*Y(Ni56)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Ni56_n_n_to_Ni58_approx_dYN + + Y(Ni58)*rate_eval.drate_Ni58_to_Ni56_n_n_approx_dYN; + jac.set(Ni56, N, scratch); + + scratch = screened_rates(k_Co55_p_to_Ni56_reaclib)*Y(Co55)*state.rho + + screened_rates(k_Co56_p_to_n_Ni56_reaclib)*Y(Co56)*state.rho + + screened_rates(k_Cu59_p_to_He4_Ni56_reaclib)*Y(Cu59)*state.rho; + jac.set(Ni56, H1, scratch); + + scratch = screened_rates(k_Fe52_He4_to_Ni56_reaclib)*Y(Fe52)*state.rho + - screened_rates(k_Ni56_He4_to_Zn60_reaclib)*Y(Ni56)*state.rho + - screened_rates(k_Ni56_He4_to_p_Cu59_reaclib)*Y(Ni56)*state.rho; + jac.set(Ni56, He4, scratch); + + jac.set(Ni56, C12, 0.0); + + jac.set(Ni56, O16, 0.0); + + jac.set(Ni56, Ne20, 0.0); + + jac.set(Ni56, Mg23, 0.0); + + jac.set(Ni56, Mg24, 0.0); + + jac.set(Ni56, Al27, 0.0); + + jac.set(Ni56, Si27, 0.0); + + jac.set(Ni56, Si28, 0.0); + + jac.set(Ni56, Si29, 0.0); + + jac.set(Ni56, Si30, 0.0); + + jac.set(Ni56, Si31, 0.0); + + jac.set(Ni56, P29, 0.0); + + jac.set(Ni56, P31, 0.0); + + jac.set(Ni56, P33, 0.0); + + jac.set(Ni56, S32, 0.0); + + jac.set(Ni56, S33, 0.0); + + jac.set(Ni56, S34, 0.0); + + jac.set(Ni56, S35, 0.0); + + jac.set(Ni56, Cl33, 0.0); + + jac.set(Ni56, Cl35, 0.0); + + jac.set(Ni56, Cl37, 0.0); + + jac.set(Ni56, Ar36, 0.0); + + jac.set(Ni56, Ar37, 0.0); + + jac.set(Ni56, Ar38, 0.0); + + jac.set(Ni56, K37, 0.0); + + jac.set(Ni56, K39, 0.0); + + jac.set(Ni56, Ca40, 0.0); + + jac.set(Ni56, Ca42, 0.0); + + jac.set(Ni56, Sc41, 0.0); + + jac.set(Ni56, Sc43, 0.0); + + jac.set(Ni56, Sc45, 0.0); + + jac.set(Ni56, Ti44, 0.0); + + jac.set(Ni56, Ti46, 0.0); + + jac.set(Ni56, Ti48, 0.0); + + jac.set(Ni56, V47, 0.0); + + jac.set(Ni56, V49, 0.0); + + jac.set(Ni56, V51, 0.0); + + jac.set(Ni56, Cr48, 0.0); + + jac.set(Ni56, Cr50, 0.0); + + jac.set(Ni56, Cr52, 0.0); + + jac.set(Ni56, Cr54, 0.0); + + jac.set(Ni56, Mn51, 0.0); + + jac.set(Ni56, Mn53, 0.0); + + jac.set(Ni56, Mn55, 0.0); + + scratch = screened_rates(k_Fe52_He4_to_Ni56_reaclib)*Y(He4)*state.rho; + jac.set(Ni56, Fe52, scratch); + + jac.set(Ni56, Fe54, 0.0); + + jac.set(Ni56, Fe56, 0.0); + + jac.set(Ni56, Fe58, 0.0); + + scratch = screened_rates(k_Co55_p_to_Ni56_reaclib)*Y(H1)*state.rho; + jac.set(Ni56, Co55, scratch); + + scratch = screened_rates(k_Co56_p_to_n_Ni56_reaclib)*Y(H1)*state.rho + + screened_rates(k_Co56_to_Ni56_beta_neg_weaktab); + jac.set(Ni56, Co56, scratch); + + jac.set(Ni56, Co57, 0.0); + + jac.set(Ni56, Co59, 0.0); + + scratch = -screened_rates(k_Ni56_He4_to_Zn60_reaclib)*Y(He4)*state.rho + - screened_rates(k_Ni56_He4_to_p_Cu59_reaclib)*Y(He4)*state.rho + - 0.5*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_n_to_p_Co56_reaclib)*Y(N)*state.rho + - screened_rates(k_Ni56_to_Co56_electron_capture_weaktab) + - screened_rates(k_Ni56_to_He4_Fe52_reaclib) + - screened_rates(k_Ni56_to_p_Co55_reaclib); + jac.set(Ni56, Ni56, scratch); + + scratch = screened_rates(k_Ni58_to_Ni56_n_n_approx); + jac.set(Ni56, Ni58, scratch); + + jac.set(Ni56, Ni60, 0.0); + + scratch = screened_rates(k_Cu59_p_to_He4_Ni56_reaclib)*Y(H1)*state.rho; + jac.set(Ni56, Cu59, scratch); + + scratch = screened_rates(k_Zn60_to_He4_Ni56_reaclib); + jac.set(Ni56, Zn60, scratch); + + + // Ni58 row + + scratch = 1.0*screened_rates(k_Ni56_n_n_to_Ni58_approx)*Y(Ni56)*Y(N)*amrex::Math::powi<2>(state.rho) + - 1.0*screened_rates(k_Ni58_n_n_to_Ni60_approx)*Y(Ni58)*Y(N)*amrex::Math::powi<2>(state.rho) + + 0.5*Y(Ni56)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Ni56_n_n_to_Ni58_approx_dYN + - 0.5*Y(Ni58)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Ni58_n_n_to_Ni60_approx_dYN + - Y(Ni58)*rate_eval.drate_Ni58_to_Ni56_n_n_approx_dYN + + Y(Ni60)*rate_eval.drate_Ni60_to_Ni58_n_n_approx_dYN; + jac.set(Ni58, N, scratch); + + scratch = screened_rates(k_Co57_p_to_Ni58_reaclib)*Y(Co57)*state.rho + - screened_rates(k_Ni58_p_to_Cu59_reaclib)*Y(Ni58)*state.rho + - screened_rates(k_Ni58_p_to_He4_Co55_reaclib)*Y(Ni58)*state.rho; + jac.set(Ni58, H1, scratch); + + scratch = screened_rates(k_Co55_He4_to_p_Ni58_reaclib)*Y(Co55)*state.rho + + screened_rates(k_Fe54_He4_to_Ni58_reaclib)*Y(Fe54)*state.rho; + jac.set(Ni58, He4, scratch); + + jac.set(Ni58, C12, 0.0); + + jac.set(Ni58, O16, 0.0); + + jac.set(Ni58, Ne20, 0.0); + + jac.set(Ni58, Mg23, 0.0); + + jac.set(Ni58, Mg24, 0.0); + + jac.set(Ni58, Al27, 0.0); + + jac.set(Ni58, Si27, 0.0); + + jac.set(Ni58, Si28, 0.0); + + jac.set(Ni58, Si29, 0.0); + + jac.set(Ni58, Si30, 0.0); + + jac.set(Ni58, Si31, 0.0); + + jac.set(Ni58, P29, 0.0); + + jac.set(Ni58, P31, 0.0); + + jac.set(Ni58, P33, 0.0); + + jac.set(Ni58, S32, 0.0); + + jac.set(Ni58, S33, 0.0); + + jac.set(Ni58, S34, 0.0); + + jac.set(Ni58, S35, 0.0); + + jac.set(Ni58, Cl33, 0.0); + + jac.set(Ni58, Cl35, 0.0); + + jac.set(Ni58, Cl37, 0.0); + + jac.set(Ni58, Ar36, 0.0); + + jac.set(Ni58, Ar37, 0.0); + + jac.set(Ni58, Ar38, 0.0); + + jac.set(Ni58, K37, 0.0); + + jac.set(Ni58, K39, 0.0); + + jac.set(Ni58, Ca40, 0.0); + + jac.set(Ni58, Ca42, 0.0); + + jac.set(Ni58, Sc41, 0.0); + + jac.set(Ni58, Sc43, 0.0); + + jac.set(Ni58, Sc45, 0.0); + + jac.set(Ni58, Ti44, 0.0); + + jac.set(Ni58, Ti46, 0.0); + + jac.set(Ni58, Ti48, 0.0); + + jac.set(Ni58, V47, 0.0); + + jac.set(Ni58, V49, 0.0); + + jac.set(Ni58, V51, 0.0); + + jac.set(Ni58, Cr48, 0.0); + + jac.set(Ni58, Cr50, 0.0); + + jac.set(Ni58, Cr52, 0.0); + + jac.set(Ni58, Cr54, 0.0); + + jac.set(Ni58, Mn51, 0.0); + + jac.set(Ni58, Mn53, 0.0); + + jac.set(Ni58, Mn55, 0.0); + + jac.set(Ni58, Fe52, 0.0); + + scratch = screened_rates(k_Fe54_He4_to_Ni58_reaclib)*Y(He4)*state.rho; + jac.set(Ni58, Fe54, scratch); + + jac.set(Ni58, Fe56, 0.0); + + jac.set(Ni58, Fe58, 0.0); + + scratch = screened_rates(k_Co55_He4_to_p_Ni58_reaclib)*Y(He4)*state.rho; + jac.set(Ni58, Co55, scratch); + + jac.set(Ni58, Co56, 0.0); + + scratch = screened_rates(k_Co57_p_to_Ni58_reaclib)*Y(H1)*state.rho; + jac.set(Ni58, Co57, scratch); + + jac.set(Ni58, Co59, 0.0); + + scratch = 0.5*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 = -0.5*screened_rates(k_Ni58_n_n_to_Ni60_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho) + - screened_rates(k_Ni58_p_to_Cu59_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ni58_p_to_He4_Co55_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ni58_to_He4_Fe54_reaclib) + - screened_rates(k_Ni58_to_Ni56_n_n_approx) + - screened_rates(k_Ni58_to_p_Co57_reaclib); + jac.set(Ni58, Ni58, scratch); + + scratch = screened_rates(k_Ni60_to_Ni58_n_n_approx); + jac.set(Ni58, Ni60, scratch); + + scratch = screened_rates(k_Cu59_to_p_Ni58_reaclib); + jac.set(Ni58, Cu59, scratch); + + jac.set(Ni58, Zn60, 0.0); + + + // Ni60 row + + scratch = 1.0*screened_rates(k_Ni58_n_n_to_Ni60_approx)*Y(Ni58)*Y(N)*amrex::Math::powi<2>(state.rho) + + 0.5*Y(Ni58)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho)*rate_eval.drate_Ni58_n_n_to_Ni60_approx_dYN + - Y(Ni60)*rate_eval.drate_Ni60_to_Ni58_n_n_approx_dYN; + jac.set(Ni60, N, scratch); + + scratch = screened_rates(k_Co59_p_to_Ni60_reaclib)*Y(Co59)*state.rho + - screened_rates(k_Ni60_p_to_He4_Co57_reaclib)*Y(Ni60)*state.rho; + jac.set(Ni60, H1, scratch); + + scratch = screened_rates(k_Co57_He4_to_p_Ni60_reaclib)*Y(Co57)*state.rho + + screened_rates(k_Fe56_He4_to_Ni60_reaclib)*Y(Fe56)*state.rho; + jac.set(Ni60, He4, scratch); + + jac.set(Ni60, C12, 0.0); + + jac.set(Ni60, O16, 0.0); + + jac.set(Ni60, Ne20, 0.0); + + jac.set(Ni60, Mg23, 0.0); + + jac.set(Ni60, Mg24, 0.0); + + jac.set(Ni60, Al27, 0.0); + + jac.set(Ni60, Si27, 0.0); + + jac.set(Ni60, Si28, 0.0); + + jac.set(Ni60, Si29, 0.0); + + jac.set(Ni60, Si30, 0.0); + + jac.set(Ni60, Si31, 0.0); + + jac.set(Ni60, P29, 0.0); + + jac.set(Ni60, P31, 0.0); + + jac.set(Ni60, P33, 0.0); + + jac.set(Ni60, S32, 0.0); + + jac.set(Ni60, S33, 0.0); + + jac.set(Ni60, S34, 0.0); + + jac.set(Ni60, S35, 0.0); + + jac.set(Ni60, Cl33, 0.0); + + jac.set(Ni60, Cl35, 0.0); + + jac.set(Ni60, Cl37, 0.0); + + jac.set(Ni60, Ar36, 0.0); + + jac.set(Ni60, Ar37, 0.0); + + jac.set(Ni60, Ar38, 0.0); + + jac.set(Ni60, K37, 0.0); + + jac.set(Ni60, K39, 0.0); + + jac.set(Ni60, Ca40, 0.0); + + jac.set(Ni60, Ca42, 0.0); + + jac.set(Ni60, Sc41, 0.0); + + jac.set(Ni60, Sc43, 0.0); + + jac.set(Ni60, Sc45, 0.0); + + jac.set(Ni60, Ti44, 0.0); + + jac.set(Ni60, Ti46, 0.0); + + jac.set(Ni60, Ti48, 0.0); + + jac.set(Ni60, V47, 0.0); + + jac.set(Ni60, V49, 0.0); + + jac.set(Ni60, V51, 0.0); + + jac.set(Ni60, Cr48, 0.0); + + jac.set(Ni60, Cr50, 0.0); + + jac.set(Ni60, Cr52, 0.0); + + jac.set(Ni60, Cr54, 0.0); + + jac.set(Ni60, Mn51, 0.0); + + jac.set(Ni60, Mn53, 0.0); + + jac.set(Ni60, Mn55, 0.0); + + jac.set(Ni60, Fe52, 0.0); + + jac.set(Ni60, Fe54, 0.0); + + scratch = screened_rates(k_Fe56_He4_to_Ni60_reaclib)*Y(He4)*state.rho; + jac.set(Ni60, Fe56, scratch); + + jac.set(Ni60, Fe58, 0.0); + + jac.set(Ni60, Co55, 0.0); + + jac.set(Ni60, Co56, 0.0); + + scratch = screened_rates(k_Co57_He4_to_p_Ni60_reaclib)*Y(He4)*state.rho; + jac.set(Ni60, Co57, scratch); + + scratch = screened_rates(k_Co59_p_to_Ni60_reaclib)*Y(H1)*state.rho; + jac.set(Ni60, Co59, scratch); + + jac.set(Ni60, Ni56, 0.0); + + scratch = 0.5*screened_rates(k_Ni58_n_n_to_Ni60_approx)*amrex::Math::powi<2>(Y(N))*amrex::Math::powi<2>(state.rho); + jac.set(Ni60, Ni58, scratch); + + scratch = -screened_rates(k_Ni60_p_to_He4_Co57_reaclib)*Y(H1)*state.rho + - screened_rates(k_Ni60_to_He4_Fe56_reaclib) + - screened_rates(k_Ni60_to_Ni58_n_n_approx) + - screened_rates(k_Ni60_to_p_Co59_reaclib); + jac.set(Ni60, Ni60, scratch); + + jac.set(Ni60, Cu59, 0.0); + + jac.set(Ni60, Zn60, 0.0); + + + // Cu59 row + + scratch = -screened_rates(k_Cu59_n_to_He4_Co56_reaclib)*Y(Cu59)*state.rho; + jac.set(Cu59, N, scratch); + + scratch = -screened_rates(k_Cu59_p_to_He4_Ni56_reaclib)*Y(Cu59)*state.rho + - screened_rates(k_Cu59_p_to_Zn60_reaclib)*Y(Cu59)*state.rho + + screened_rates(k_Ni58_p_to_Cu59_reaclib)*Y(Ni58)*state.rho; + jac.set(Cu59, H1, scratch); + + scratch = screened_rates(k_Co55_He4_to_Cu59_reaclib)*Y(Co55)*state.rho + + screened_rates(k_Co56_He4_to_n_Cu59_reaclib)*Y(Co56)*state.rho + + screened_rates(k_Ni56_He4_to_p_Cu59_reaclib)*Y(Ni56)*state.rho; + jac.set(Cu59, He4, scratch); + + jac.set(Cu59, C12, 0.0); + + jac.set(Cu59, O16, 0.0); + + jac.set(Cu59, Ne20, 0.0); + + jac.set(Cu59, Mg23, 0.0); + + jac.set(Cu59, Mg24, 0.0); + + jac.set(Cu59, Al27, 0.0); + + jac.set(Cu59, Si27, 0.0); + + jac.set(Cu59, Si28, 0.0); + + jac.set(Cu59, Si29, 0.0); + + jac.set(Cu59, Si30, 0.0); + + jac.set(Cu59, Si31, 0.0); + + jac.set(Cu59, P29, 0.0); + + jac.set(Cu59, P31, 0.0); + + jac.set(Cu59, P33, 0.0); + + jac.set(Cu59, S32, 0.0); + + jac.set(Cu59, S33, 0.0); + + jac.set(Cu59, S34, 0.0); + + jac.set(Cu59, S35, 0.0); + + jac.set(Cu59, Cl33, 0.0); + + jac.set(Cu59, Cl35, 0.0); + + jac.set(Cu59, Cl37, 0.0); + + jac.set(Cu59, Ar36, 0.0); + + jac.set(Cu59, Ar37, 0.0); + + jac.set(Cu59, Ar38, 0.0); + + jac.set(Cu59, K37, 0.0); + + jac.set(Cu59, K39, 0.0); + + jac.set(Cu59, Ca40, 0.0); + + jac.set(Cu59, Ca42, 0.0); + + jac.set(Cu59, Sc41, 0.0); + + jac.set(Cu59, Sc43, 0.0); + + jac.set(Cu59, Sc45, 0.0); + + jac.set(Cu59, Ti44, 0.0); + + jac.set(Cu59, Ti46, 0.0); + + jac.set(Cu59, Ti48, 0.0); + + jac.set(Cu59, V47, 0.0); + + jac.set(Cu59, V49, 0.0); + + jac.set(Cu59, V51, 0.0); + + jac.set(Cu59, Cr48, 0.0); + + jac.set(Cu59, Cr50, 0.0); + + jac.set(Cu59, Cr52, 0.0); + + jac.set(Cu59, Cr54, 0.0); + + jac.set(Cu59, Mn51, 0.0); + + jac.set(Cu59, Mn53, 0.0); + + jac.set(Cu59, Mn55, 0.0); + + jac.set(Cu59, Fe52, 0.0); + + jac.set(Cu59, Fe54, 0.0); + + jac.set(Cu59, Fe56, 0.0); + + jac.set(Cu59, Fe58, 0.0); + + scratch = screened_rates(k_Co55_He4_to_Cu59_reaclib)*Y(He4)*state.rho; + jac.set(Cu59, Co55, scratch); + + scratch = screened_rates(k_Co56_He4_to_n_Cu59_reaclib)*Y(He4)*state.rho; + jac.set(Cu59, Co56, scratch); + + jac.set(Cu59, Co57, 0.0); + + jac.set(Cu59, Co59, 0.0); + + scratch = screened_rates(k_Ni56_He4_to_p_Cu59_reaclib)*Y(He4)*state.rho; + jac.set(Cu59, Ni56, scratch); + + scratch = screened_rates(k_Ni58_p_to_Cu59_reaclib)*Y(H1)*state.rho; + jac.set(Cu59, Ni58, scratch); + + jac.set(Cu59, Ni60, 0.0); + + scratch = -screened_rates(k_Cu59_n_to_He4_Co56_reaclib)*Y(N)*state.rho + - screened_rates(k_Cu59_p_to_He4_Ni56_reaclib)*Y(H1)*state.rho + - screened_rates(k_Cu59_p_to_Zn60_reaclib)*Y(H1)*state.rho + - screened_rates(k_Cu59_to_He4_Co55_reaclib) + - screened_rates(k_Cu59_to_p_Ni58_reaclib); + jac.set(Cu59, Cu59, scratch); + + scratch = screened_rates(k_Zn60_to_p_Cu59_reaclib); + jac.set(Cu59, Zn60, scratch); + + + // Zn60 row + + jac.set(Zn60, N, 0.0); + + scratch = screened_rates(k_Cu59_p_to_Zn60_reaclib)*Y(Cu59)*state.rho; + jac.set(Zn60, H1, scratch); + + scratch = screened_rates(k_Ni56_He4_to_Zn60_reaclib)*Y(Ni56)*state.rho; + jac.set(Zn60, He4, scratch); + + jac.set(Zn60, C12, 0.0); + + jac.set(Zn60, O16, 0.0); + + jac.set(Zn60, Ne20, 0.0); + + jac.set(Zn60, Mg23, 0.0); + + jac.set(Zn60, Mg24, 0.0); + + jac.set(Zn60, Al27, 0.0); + + jac.set(Zn60, Si27, 0.0); + + jac.set(Zn60, Si28, 0.0); + + jac.set(Zn60, Si29, 0.0); + + jac.set(Zn60, Si30, 0.0); + + jac.set(Zn60, Si31, 0.0); + + jac.set(Zn60, P29, 0.0); + + jac.set(Zn60, P31, 0.0); + + jac.set(Zn60, P33, 0.0); + + jac.set(Zn60, S32, 0.0); + + jac.set(Zn60, S33, 0.0); + + jac.set(Zn60, S34, 0.0); + + jac.set(Zn60, S35, 0.0); + + jac.set(Zn60, Cl33, 0.0); + + jac.set(Zn60, Cl35, 0.0); + + jac.set(Zn60, Cl37, 0.0); + + jac.set(Zn60, Ar36, 0.0); + + jac.set(Zn60, Ar37, 0.0); + + jac.set(Zn60, Ar38, 0.0); + + jac.set(Zn60, K37, 0.0); + + jac.set(Zn60, K39, 0.0); + + jac.set(Zn60, Ca40, 0.0); + + jac.set(Zn60, Ca42, 0.0); + + jac.set(Zn60, Sc41, 0.0); + + jac.set(Zn60, Sc43, 0.0); + + jac.set(Zn60, Sc45, 0.0); + + jac.set(Zn60, Ti44, 0.0); + + jac.set(Zn60, Ti46, 0.0); + + jac.set(Zn60, Ti48, 0.0); + + jac.set(Zn60, V47, 0.0); + + jac.set(Zn60, V49, 0.0); + + jac.set(Zn60, V51, 0.0); + + jac.set(Zn60, Cr48, 0.0); + + jac.set(Zn60, Cr50, 0.0); + + jac.set(Zn60, Cr52, 0.0); + + jac.set(Zn60, Cr54, 0.0); + + jac.set(Zn60, Mn51, 0.0); + + jac.set(Zn60, Mn53, 0.0); + + jac.set(Zn60, Mn55, 0.0); + + jac.set(Zn60, Fe52, 0.0); + + jac.set(Zn60, Fe54, 0.0); + + jac.set(Zn60, Fe56, 0.0); + + jac.set(Zn60, Fe58, 0.0); + + jac.set(Zn60, Co55, 0.0); + + jac.set(Zn60, Co56, 0.0); + + jac.set(Zn60, Co57, 0.0); + + jac.set(Zn60, Co59, 0.0); + + scratch = screened_rates(k_Ni56_He4_to_Zn60_reaclib)*Y(He4)*state.rho; + jac.set(Zn60, Ni56, scratch); + + jac.set(Zn60, Ni58, 0.0); + + jac.set(Zn60, Ni60, 0.0); + + scratch = screened_rates(k_Cu59_p_to_Zn60_reaclib)*Y(H1)*state.rho; + jac.set(Zn60, Cu59, scratch); + + scratch = -screened_rates(k_Zn60_to_He4_Ni56_reaclib) + - screened_rates(k_Zn60_to_p_Cu59_reaclib); + jac.set(Zn60, Zn60, scratch); + + + + // add ∂λ_weak / ∂Y_e terms now + // this uses ∂Y_e/∂Y_i = Z_i + for (int irow = 1; irow <= NumSpec; ++irow) { + const auto dweak = rate_eval.dweak_ydot_dYe(irow); + if (dweak == 0.0_rt) { + continue; + } + for (int jcol = 1; jcol <= NumSpec; ++jcol) { + jac.add(irow, jcol, dweak * NetworkProperties::zion(jcol)); + } + } + +} + + + +template +AMREX_GPU_DEVICE AMREX_INLINE +void actual_jac(const burn_t& state, MatrixType& jac) +{ + + // Set molar abundances + amrex::Array1D Y; + for (int i = 1; i <= NumSpec; ++i) { + Y(i) = state.xn[i-1] * aion_inv[i-1]; + } + + + rate_derivs_t rate_eval; + + constexpr int do_T_derivatives = 1; + + evaluate_rates(state, Y, rate_eval); + + // there are effectively 4 regions in the Jacobian: + // + // | + // 1) ∂Ydot_i/∂Y_j | 3) ∂Ydot/∂e + // | + // -----------------+--------------- + // | + // 2) ∂edot/∂Y_j | 4) ∂edot/∂e + // | + + + // region 1 + + // Species Jacobian elements with respect to other species + // J_ij = ∂(Ydot_i)/∂Y_j + + jac_nuc(state, jac, Y, rate_eval); + + + // region 2 + + // Energy generation rate Jacobian elements with respect to species + // J_{ienuc,j} = ∂(ε_nuc)/∂Y_j + // + // we compute this as ∂(ε_nuc)/∂Y_j = -N_A Σ_i ∂(Ydot_i)/∂Y_j m_i c² + + for (int j = 1; j <= NumSpec; ++j) { + // create a function that gives us jac(i) for the column j + auto jac_slice_2 = [&](int i) -> amrex::Real { return jac.get(i, j); }; + + amrex::Real tmp{}; + ener_gener_rate(jac_slice_2, tmp); + jac(net_ienuc,j) = tmp; + } + + // Account for the weak rate neutrino losses + // There are two contributions here: + // ∂(ε_{ν,weak})/∂Y_j and ∂(ε_{ν,weak})/∂Y_e ∂Y_e/∂Y_j + for (int jcol = 1; jcol <= NumSpec; ++jcol) { + jac.add(net_ienuc, jcol, + rate_eval.denuc_weak_dY(jcol) + + rate_eval.denuc_weak_dYe * NetworkProperties::zion(jcol)); + } + + // Account for the thermal neutrino losses + + amrex::Real dsneutdt{}; +#ifdef NEUTRINOS + amrex::Real sneut, dsneutdd, dsnuda, dsnudz; + constexpr int do_derivatives{1}; + neutrino_cooling(state.T, state.rho, state.abar, state.zbar, + sneut, dsneutdt, dsneutdd, dsnuda, dsnudz); + + for (int j = 1; j <= NumSpec; ++j) { + amrex::Real b1 = (-state.abar * state.abar * dsnuda + (zion[j-1] - state.zbar) * state.abar * dsnudz); + jac.add(net_ienuc, j, -b1); + } +#endif + + + // region 3 + + // J_{i,ienuc} = ∂(Ydot_i)/∂T for rows i = 1, ..., NumSpec + + amrex::Array1D yderivs; + + // Evaluate the Jacobian elements with respect to energy by + // calling the RHS using d(rate) / dT and then transform them + // to our energy integration variable. + + rhs_nuc(state, yderivs, Y, rate_eval.dscreened_rates_dT); + + // convert the derivatives in this column from ∂/∂T to ∂/∂e + for (int k = 1; k <= NumSpec; k++) { + jac.set(k, net_ienuc, temperature_to_energy_jacobian(state, yderivs(k))); + } + + + // region 4 + + // J_{ienuc, ienuc} = ∂(edot)/∂e. + // We start by doing the derivatives as ∂/∂T. + + // first the contribution from the strong rates, ∂(ε_nuc)/∂T, + // which we compute as ∂(ε_nuc)/∂T = -N_A Σ ∂(Ydot_i)/T m_i c² + + amrex::Real jac_e_T{}; + + ener_gener_rate(yderivs, jac_e_T); + + // Account for the weak rate neutrino losses + jac_e_T += rate_eval.denuc_weak_dT; + + // and the thermal neutrino contribution + + jac_e_T -= dsneutdt; + + // finally, convert d(de/dt)/dT to d(de/dt)/de + + jac.set(net_ienuc, net_ienuc, temperature_to_energy_jacobian(state, jac_e_T)); + +} + + +AMREX_INLINE +void actual_rhs_init () { + + +} + + +#endif diff --git a/networks/massive-star-medium/approximate_rates.H b/networks/massive-star-medium/approximate_rates.H new file mode 100644 index 0000000000..2135956351 --- /dev/null +++ b/networks/massive-star-medium/approximate_rates.H @@ -0,0 +1,1182 @@ +#ifndef APPROXIMATE_RATES_H +#define APPROXIMATE_RATES_H + +#include +#include + +#include +#include +#include + +namespace approximate_rates { + + using namespace Rates; + using namespace Species; + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni56_n_n_to_Ni58_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Ni57_n_to_Ni58_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Ni57_to_n_Ni56_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r1_ng = rate_eval.screened_rates(k_Ni56_n_to_Ni57_reaclib); + rate = 2.0_rt * r1_ng * r2_ng * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_ng = rate_eval.dscreened_rates_dT(k_Ni56_n_to_Ni57_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Ni57_n_to_Ni58_reaclib); + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Ni57_to_n_Ni56_reaclib); + drate_dT = 2.0_rt * (dr1dT_ng * r2_ng * dd + r1_ng * dr2dT_ng * dd - r1_ng * r2_ng * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn)); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Ni56_n_n_to_Ni58_approx_dYN = drate_dYN; + } + 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; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni58_to_Ni56_n_n_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Ni57_n_to_Ni58_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Ni57_to_n_Ni56_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r2_gn = rate_eval.screened_rates(k_Ni58_to_n_Ni57_reaclib); + 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_reaclib); + amrex::Real dr2dT_gn = rate_eval.dscreened_rates_dT(k_Ni58_to_n_Ni57_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Ni57_n_to_Ni58_reaclib); + drate_dT = dr1dT_gn * r2_gn * dd + r1_gn * dr2dT_gn * dd - r1_gn * r2_gn * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Ni58_to_Ni56_n_n_approx_dYN = drate_dYN; + } + 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; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni58_n_n_to_Ni60_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Ni59_n_to_Ni60_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Ni59_to_n_Ni58_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r1_ng = rate_eval.screened_rates(k_Ni58_n_to_Ni59_reaclib); + rate = 2.0_rt * r1_ng * r2_ng * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_ng = rate_eval.dscreened_rates_dT(k_Ni58_n_to_Ni59_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Ni59_n_to_Ni60_reaclib); + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Ni59_to_n_Ni58_reaclib); + drate_dT = 2.0_rt * (dr1dT_ng * r2_ng * dd + r1_ng * dr2dT_ng * dd - r1_ng * r2_ng * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn)); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Ni58_n_n_to_Ni60_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Ni58_n_n_to_Ni60_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni58_n_n_to_Ni60_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni60_to_Ni58_n_n_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Ni59_n_to_Ni60_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Ni59_to_n_Ni58_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r2_gn = rate_eval.screened_rates(k_Ni60_to_n_Ni59_reaclib); + rate = r1_gn * r2_gn * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Ni59_to_n_Ni58_reaclib); + amrex::Real dr2dT_gn = rate_eval.dscreened_rates_dT(k_Ni60_to_n_Ni59_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Ni59_n_to_Ni60_reaclib); + drate_dT = dr1dT_gn * r2_gn * dd + r1_gn * dr2dT_gn * dd - r1_gn * r2_gn * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Ni60_to_Ni58_n_n_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Ni60_to_Ni58_n_n_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni60_to_Ni58_n_n_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co57_n_n_to_Co59_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Co58_n_to_Co59_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Co58_to_n_Co57_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r1_ng = rate_eval.screened_rates(k_Co57_n_to_Co58_reaclib); + rate = 2.0_rt * r1_ng * r2_ng * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_ng = rate_eval.dscreened_rates_dT(k_Co57_n_to_Co58_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Co58_n_to_Co59_reaclib); + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Co58_to_n_Co57_reaclib); + drate_dT = 2.0_rt * (dr1dT_ng * r2_ng * dd + r1_ng * dr2dT_ng * dd - r1_ng * r2_ng * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn)); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Co57_n_n_to_Co59_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Co57_n_n_to_Co59_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co57_n_n_to_Co59_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co59_to_Co57_n_n_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Co58_n_to_Co59_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Co58_to_n_Co57_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r2_gn = rate_eval.screened_rates(k_Co59_to_n_Co58_reaclib); + rate = r1_gn * r2_gn * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Co58_to_n_Co57_reaclib); + amrex::Real dr2dT_gn = rate_eval.dscreened_rates_dT(k_Co59_to_n_Co58_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Co58_n_to_Co59_reaclib); + drate_dT = dr1dT_gn * r2_gn * dd + r1_gn * dr2dT_gn * dd - r1_gn * r2_gn * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Co59_to_Co57_n_n_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Co59_to_Co57_n_n_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co59_to_Co57_n_n_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe52_n_n_to_Fe54_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Fe53_n_to_Fe54_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Fe53_to_n_Fe52_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r1_ng = rate_eval.screened_rates(k_Fe52_n_to_Fe53_reaclib); + rate = 2.0_rt * r1_ng * r2_ng * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_ng = rate_eval.dscreened_rates_dT(k_Fe52_n_to_Fe53_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Fe53_n_to_Fe54_reaclib); + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Fe53_to_n_Fe52_reaclib); + drate_dT = 2.0_rt * (dr1dT_ng * r2_ng * dd + r1_ng * dr2dT_ng * dd - r1_ng * r2_ng * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn)); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Fe52_n_n_to_Fe54_approx_dYN = drate_dYN; + } + 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; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe54_to_Fe52_n_n_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Fe53_n_to_Fe54_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Fe53_to_n_Fe52_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r2_gn = rate_eval.screened_rates(k_Fe54_to_n_Fe53_reaclib); + 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_reaclib); + amrex::Real dr2dT_gn = rate_eval.dscreened_rates_dT(k_Fe54_to_n_Fe53_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Fe53_n_to_Fe54_reaclib); + drate_dT = dr1dT_gn * r2_gn * dd + r1_gn * dr2dT_gn * dd - r1_gn * r2_gn * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Fe54_to_Fe52_n_n_approx_dYN = drate_dYN; + } + 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; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe54_n_n_to_Fe56_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Fe55_n_to_Fe56_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Fe55_to_n_Fe54_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r1_ng = rate_eval.screened_rates(k_Fe54_n_to_Fe55_reaclib); + rate = 2.0_rt * r1_ng * r2_ng * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_ng = rate_eval.dscreened_rates_dT(k_Fe54_n_to_Fe55_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Fe55_n_to_Fe56_reaclib); + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Fe55_to_n_Fe54_reaclib); + drate_dT = 2.0_rt * (dr1dT_ng * r2_ng * dd + r1_ng * dr2dT_ng * dd - r1_ng * r2_ng * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn)); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Fe54_n_n_to_Fe56_approx_dYN = drate_dYN; + } + 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; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe56_to_Fe54_n_n_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Fe55_n_to_Fe56_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Fe55_to_n_Fe54_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r2_gn = rate_eval.screened_rates(k_Fe56_to_n_Fe55_reaclib); + 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_reaclib); + amrex::Real dr2dT_gn = rate_eval.dscreened_rates_dT(k_Fe56_to_n_Fe55_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Fe55_n_to_Fe56_reaclib); + drate_dT = dr1dT_gn * r2_gn * dd + r1_gn * dr2dT_gn * dd - r1_gn * r2_gn * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Fe56_to_Fe54_n_n_approx_dYN = drate_dYN; + } + 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; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe56_n_n_to_Fe58_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Fe57_n_to_Fe58_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Fe57_to_n_Fe56_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r1_ng = rate_eval.screened_rates(k_Fe56_n_to_Fe57_reaclib); + rate = 2.0_rt * r1_ng * r2_ng * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_ng = rate_eval.dscreened_rates_dT(k_Fe56_n_to_Fe57_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Fe57_n_to_Fe58_reaclib); + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Fe57_to_n_Fe56_reaclib); + drate_dT = 2.0_rt * (dr1dT_ng * r2_ng * dd + r1_ng * dr2dT_ng * dd - r1_ng * r2_ng * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn)); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Fe56_n_n_to_Fe58_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Fe56_n_n_to_Fe58_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe56_n_n_to_Fe58_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe58_to_Fe56_n_n_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Fe57_n_to_Fe58_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Fe57_to_n_Fe56_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r2_gn = rate_eval.screened_rates(k_Fe58_to_n_Fe57_reaclib); + rate = r1_gn * r2_gn * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Fe57_to_n_Fe56_reaclib); + amrex::Real dr2dT_gn = rate_eval.dscreened_rates_dT(k_Fe58_to_n_Fe57_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Fe57_n_to_Fe58_reaclib); + drate_dT = dr1dT_gn * r2_gn * dd + r1_gn * dr2dT_gn * dd - r1_gn * r2_gn * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Fe58_to_Fe56_n_n_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Fe58_to_Fe56_n_n_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe58_to_Fe56_n_n_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn51_n_n_to_Mn53_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Mn52_n_to_Mn53_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Mn52_to_n_Mn51_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r1_ng = rate_eval.screened_rates(k_Mn51_n_to_Mn52_reaclib); + rate = 2.0_rt * r1_ng * r2_ng * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_ng = rate_eval.dscreened_rates_dT(k_Mn51_n_to_Mn52_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Mn52_n_to_Mn53_reaclib); + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Mn52_to_n_Mn51_reaclib); + drate_dT = 2.0_rt * (dr1dT_ng * r2_ng * dd + r1_ng * dr2dT_ng * dd - r1_ng * r2_ng * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn)); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Mn51_n_n_to_Mn53_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Mn51_n_n_to_Mn53_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn51_n_n_to_Mn53_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn53_to_Mn51_n_n_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Mn52_n_to_Mn53_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Mn52_to_n_Mn51_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r2_gn = rate_eval.screened_rates(k_Mn53_to_n_Mn52_reaclib); + rate = r1_gn * r2_gn * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Mn52_to_n_Mn51_reaclib); + amrex::Real dr2dT_gn = rate_eval.dscreened_rates_dT(k_Mn53_to_n_Mn52_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Mn52_n_to_Mn53_reaclib); + drate_dT = dr1dT_gn * r2_gn * dd + r1_gn * dr2dT_gn * dd - r1_gn * r2_gn * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Mn53_to_Mn51_n_n_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Mn53_to_Mn51_n_n_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn53_to_Mn51_n_n_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn53_n_n_to_Mn55_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Mn54_n_to_Mn55_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Mn54_to_n_Mn53_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r1_ng = rate_eval.screened_rates(k_Mn53_n_to_Mn54_reaclib); + rate = 2.0_rt * r1_ng * r2_ng * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_ng = rate_eval.dscreened_rates_dT(k_Mn53_n_to_Mn54_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Mn54_n_to_Mn55_reaclib); + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Mn54_to_n_Mn53_reaclib); + drate_dT = 2.0_rt * (dr1dT_ng * r2_ng * dd + r1_ng * dr2dT_ng * dd - r1_ng * r2_ng * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn)); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Mn53_n_n_to_Mn55_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Mn53_n_n_to_Mn55_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn53_n_n_to_Mn55_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn55_to_Mn53_n_n_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Mn54_n_to_Mn55_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Mn54_to_n_Mn53_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r2_gn = rate_eval.screened_rates(k_Mn55_to_n_Mn54_reaclib); + rate = r1_gn * r2_gn * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Mn54_to_n_Mn53_reaclib); + amrex::Real dr2dT_gn = rate_eval.dscreened_rates_dT(k_Mn55_to_n_Mn54_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Mn54_n_to_Mn55_reaclib); + drate_dT = dr1dT_gn * r2_gn * dd + r1_gn * dr2dT_gn * dd - r1_gn * r2_gn * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Mn55_to_Mn53_n_n_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Mn55_to_Mn53_n_n_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn55_to_Mn53_n_n_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr48_n_n_to_Cr50_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Cr49_n_to_Cr50_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Cr49_to_n_Cr48_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r1_ng = rate_eval.screened_rates(k_Cr48_n_to_Cr49_reaclib); + rate = 2.0_rt * r1_ng * r2_ng * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_ng = rate_eval.dscreened_rates_dT(k_Cr48_n_to_Cr49_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Cr49_n_to_Cr50_reaclib); + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Cr49_to_n_Cr48_reaclib); + drate_dT = 2.0_rt * (dr1dT_ng * r2_ng * dd + r1_ng * dr2dT_ng * dd - r1_ng * r2_ng * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn)); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Cr48_n_n_to_Cr50_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Cr48_n_n_to_Cr50_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr48_n_n_to_Cr50_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr50_to_Cr48_n_n_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Cr49_n_to_Cr50_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Cr49_to_n_Cr48_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r2_gn = rate_eval.screened_rates(k_Cr50_to_n_Cr49_reaclib); + rate = r1_gn * r2_gn * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Cr49_to_n_Cr48_reaclib); + amrex::Real dr2dT_gn = rate_eval.dscreened_rates_dT(k_Cr50_to_n_Cr49_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Cr49_n_to_Cr50_reaclib); + drate_dT = dr1dT_gn * r2_gn * dd + r1_gn * dr2dT_gn * dd - r1_gn * r2_gn * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Cr50_to_Cr48_n_n_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Cr50_to_Cr48_n_n_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr50_to_Cr48_n_n_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr50_n_n_to_Cr52_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Cr51_n_to_Cr52_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Cr51_to_n_Cr50_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r1_ng = rate_eval.screened_rates(k_Cr50_n_to_Cr51_reaclib); + rate = 2.0_rt * r1_ng * r2_ng * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_ng = rate_eval.dscreened_rates_dT(k_Cr50_n_to_Cr51_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Cr51_n_to_Cr52_reaclib); + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Cr51_to_n_Cr50_reaclib); + drate_dT = 2.0_rt * (dr1dT_ng * r2_ng * dd + r1_ng * dr2dT_ng * dd - r1_ng * r2_ng * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn)); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Cr50_n_n_to_Cr52_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Cr50_n_n_to_Cr52_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr50_n_n_to_Cr52_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr52_to_Cr50_n_n_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Cr51_n_to_Cr52_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Cr51_to_n_Cr50_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r2_gn = rate_eval.screened_rates(k_Cr52_to_n_Cr51_reaclib); + rate = r1_gn * r2_gn * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Cr51_to_n_Cr50_reaclib); + amrex::Real dr2dT_gn = rate_eval.dscreened_rates_dT(k_Cr52_to_n_Cr51_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Cr51_n_to_Cr52_reaclib); + drate_dT = dr1dT_gn * r2_gn * dd + r1_gn * dr2dT_gn * dd - r1_gn * r2_gn * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Cr52_to_Cr50_n_n_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Cr52_to_Cr50_n_n_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr52_to_Cr50_n_n_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr52_n_n_to_Cr54_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Cr53_n_to_Cr54_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Cr53_to_n_Cr52_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r1_ng = rate_eval.screened_rates(k_Cr52_n_to_Cr53_reaclib); + rate = 2.0_rt * r1_ng * r2_ng * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_ng = rate_eval.dscreened_rates_dT(k_Cr52_n_to_Cr53_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Cr53_n_to_Cr54_reaclib); + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Cr53_to_n_Cr52_reaclib); + drate_dT = 2.0_rt * (dr1dT_ng * r2_ng * dd + r1_ng * dr2dT_ng * dd - r1_ng * r2_ng * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn)); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Cr52_n_n_to_Cr54_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Cr52_n_n_to_Cr54_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr52_n_n_to_Cr54_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr54_to_Cr52_n_n_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Cr53_n_to_Cr54_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Cr53_to_n_Cr52_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r2_gn = rate_eval.screened_rates(k_Cr54_to_n_Cr53_reaclib); + rate = r1_gn * r2_gn * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Cr53_to_n_Cr52_reaclib); + amrex::Real dr2dT_gn = rate_eval.dscreened_rates_dT(k_Cr54_to_n_Cr53_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Cr53_n_to_Cr54_reaclib); + drate_dT = dr1dT_gn * r2_gn * dd + r1_gn * dr2dT_gn * dd - r1_gn * r2_gn * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Cr54_to_Cr52_n_n_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Cr54_to_Cr52_n_n_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr54_to_Cr52_n_n_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V47_n_n_to_V49_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_V48_n_to_V49_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_V48_to_n_V47_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r1_ng = rate_eval.screened_rates(k_V47_n_to_V48_reaclib); + rate = 2.0_rt * r1_ng * r2_ng * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_ng = rate_eval.dscreened_rates_dT(k_V47_n_to_V48_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_V48_n_to_V49_reaclib); + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_V48_to_n_V47_reaclib); + drate_dT = 2.0_rt * (dr1dT_ng * r2_ng * dd + r1_ng * dr2dT_ng * dd - r1_ng * r2_ng * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn)); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_V47_n_n_to_V49_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_V47_n_n_to_V49_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V47_n_n_to_V49_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V49_to_V47_n_n_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_V48_n_to_V49_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_V48_to_n_V47_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r2_gn = rate_eval.screened_rates(k_V49_to_n_V48_reaclib); + rate = r1_gn * r2_gn * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_V48_to_n_V47_reaclib); + amrex::Real dr2dT_gn = rate_eval.dscreened_rates_dT(k_V49_to_n_V48_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_V48_n_to_V49_reaclib); + drate_dT = dr1dT_gn * r2_gn * dd + r1_gn * dr2dT_gn * dd - r1_gn * r2_gn * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_V49_to_V47_n_n_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_V49_to_V47_n_n_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V49_to_V47_n_n_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V49_n_n_to_V51_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_V50_n_to_V51_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_V50_to_n_V49_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r1_ng = rate_eval.screened_rates(k_V49_n_to_V50_reaclib); + rate = 2.0_rt * r1_ng * r2_ng * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_ng = rate_eval.dscreened_rates_dT(k_V49_n_to_V50_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_V50_n_to_V51_reaclib); + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_V50_to_n_V49_reaclib); + drate_dT = 2.0_rt * (dr1dT_ng * r2_ng * dd + r1_ng * dr2dT_ng * dd - r1_ng * r2_ng * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn)); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_V49_n_n_to_V51_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_V49_n_n_to_V51_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V49_n_n_to_V51_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V51_to_V49_n_n_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_V50_n_to_V51_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_V50_to_n_V49_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r2_gn = rate_eval.screened_rates(k_V51_to_n_V50_reaclib); + rate = r1_gn * r2_gn * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_V50_to_n_V49_reaclib); + amrex::Real dr2dT_gn = rate_eval.dscreened_rates_dT(k_V51_to_n_V50_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_V50_n_to_V51_reaclib); + drate_dT = dr1dT_gn * r2_gn * dd + r1_gn * dr2dT_gn * dd - r1_gn * r2_gn * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_V51_to_V49_n_n_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_V51_to_V49_n_n_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V51_to_V49_n_n_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti44_n_n_to_Ti46_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Ti45_n_to_Ti46_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Ti45_to_n_Ti44_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r1_ng = rate_eval.screened_rates(k_Ti44_n_to_Ti45_reaclib); + rate = 2.0_rt * r1_ng * r2_ng * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_ng = rate_eval.dscreened_rates_dT(k_Ti44_n_to_Ti45_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Ti45_n_to_Ti46_reaclib); + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Ti45_to_n_Ti44_reaclib); + drate_dT = 2.0_rt * (dr1dT_ng * r2_ng * dd + r1_ng * dr2dT_ng * dd - r1_ng * r2_ng * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn)); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Ti44_n_n_to_Ti46_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Ti44_n_n_to_Ti46_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti44_n_n_to_Ti46_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti46_to_Ti44_n_n_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Ti45_n_to_Ti46_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Ti45_to_n_Ti44_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r2_gn = rate_eval.screened_rates(k_Ti46_to_n_Ti45_reaclib); + rate = r1_gn * r2_gn * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Ti45_to_n_Ti44_reaclib); + amrex::Real dr2dT_gn = rate_eval.dscreened_rates_dT(k_Ti46_to_n_Ti45_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Ti45_n_to_Ti46_reaclib); + drate_dT = dr1dT_gn * r2_gn * dd + r1_gn * dr2dT_gn * dd - r1_gn * r2_gn * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Ti46_to_Ti44_n_n_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Ti46_to_Ti44_n_n_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti46_to_Ti44_n_n_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti46_n_n_to_Ti48_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Ti47_n_to_Ti48_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Ti47_to_n_Ti46_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r1_ng = rate_eval.screened_rates(k_Ti46_n_to_Ti47_reaclib); + rate = 2.0_rt * r1_ng * r2_ng * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_ng = rate_eval.dscreened_rates_dT(k_Ti46_n_to_Ti47_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Ti47_n_to_Ti48_reaclib); + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Ti47_to_n_Ti46_reaclib); + drate_dT = 2.0_rt * (dr1dT_ng * r2_ng * dd + r1_ng * dr2dT_ng * dd - r1_ng * r2_ng * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn)); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Ti46_n_n_to_Ti48_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Ti46_n_n_to_Ti48_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti46_n_n_to_Ti48_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti48_to_Ti46_n_n_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Ti47_n_to_Ti48_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Ti47_to_n_Ti46_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r2_gn = rate_eval.screened_rates(k_Ti48_to_n_Ti47_reaclib); + rate = r1_gn * r2_gn * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Ti47_to_n_Ti46_reaclib); + amrex::Real dr2dT_gn = rate_eval.dscreened_rates_dT(k_Ti48_to_n_Ti47_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Ti47_n_to_Ti48_reaclib); + drate_dT = dr1dT_gn * r2_gn * dd + r1_gn * dr2dT_gn * dd - r1_gn * r2_gn * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Ti48_to_Ti46_n_n_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Ti48_to_Ti46_n_n_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti48_to_Ti46_n_n_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc41_n_n_to_Sc43_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Sc42_n_to_Sc43_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Sc42_to_n_Sc41_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r1_ng = rate_eval.screened_rates(k_Sc41_n_to_Sc42_reaclib); + rate = 2.0_rt * r1_ng * r2_ng * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_ng = rate_eval.dscreened_rates_dT(k_Sc41_n_to_Sc42_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Sc42_n_to_Sc43_reaclib); + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Sc42_to_n_Sc41_reaclib); + drate_dT = 2.0_rt * (dr1dT_ng * r2_ng * dd + r1_ng * dr2dT_ng * dd - r1_ng * r2_ng * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn)); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Sc41_n_n_to_Sc43_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Sc41_n_n_to_Sc43_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc41_n_n_to_Sc43_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc43_to_Sc41_n_n_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Sc42_n_to_Sc43_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Sc42_to_n_Sc41_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r2_gn = rate_eval.screened_rates(k_Sc43_to_n_Sc42_reaclib); + rate = r1_gn * r2_gn * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Sc42_to_n_Sc41_reaclib); + amrex::Real dr2dT_gn = rate_eval.dscreened_rates_dT(k_Sc43_to_n_Sc42_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Sc42_n_to_Sc43_reaclib); + drate_dT = dr1dT_gn * r2_gn * dd + r1_gn * dr2dT_gn * dd - r1_gn * r2_gn * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Sc43_to_Sc41_n_n_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Sc43_to_Sc41_n_n_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc43_to_Sc41_n_n_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc43_n_n_to_Sc45_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Sc44_n_to_Sc45_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Sc44_to_n_Sc43_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r1_ng = rate_eval.screened_rates(k_Sc43_n_to_Sc44_reaclib); + rate = 2.0_rt * r1_ng * r2_ng * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_ng = rate_eval.dscreened_rates_dT(k_Sc43_n_to_Sc44_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Sc44_n_to_Sc45_reaclib); + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Sc44_to_n_Sc43_reaclib); + drate_dT = 2.0_rt * (dr1dT_ng * r2_ng * dd + r1_ng * dr2dT_ng * dd - r1_ng * r2_ng * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn)); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Sc43_n_n_to_Sc45_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Sc43_n_n_to_Sc45_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc43_n_n_to_Sc45_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc45_to_Sc43_n_n_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Sc44_n_to_Sc45_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Sc44_to_n_Sc43_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r2_gn = rate_eval.screened_rates(k_Sc45_to_n_Sc44_reaclib); + rate = r1_gn * r2_gn * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Sc44_to_n_Sc43_reaclib); + amrex::Real dr2dT_gn = rate_eval.dscreened_rates_dT(k_Sc45_to_n_Sc44_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Sc44_n_to_Sc45_reaclib); + drate_dT = dr1dT_gn * r2_gn * dd + r1_gn * dr2dT_gn * dd - r1_gn * r2_gn * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Sc45_to_Sc43_n_n_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Sc45_to_Sc43_n_n_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc45_to_Sc43_n_n_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ca40_n_n_to_Ca42_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Ca41_n_to_Ca42_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Ca41_to_n_Ca40_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r1_ng = rate_eval.screened_rates(k_Ca40_n_to_Ca41_reaclib); + rate = 2.0_rt * r1_ng * r2_ng * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_ng = rate_eval.dscreened_rates_dT(k_Ca40_n_to_Ca41_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Ca41_n_to_Ca42_reaclib); + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Ca41_to_n_Ca40_reaclib); + drate_dT = 2.0_rt * (dr1dT_ng * r2_ng * dd + r1_ng * dr2dT_ng * dd - r1_ng * r2_ng * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn)); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Ca40_n_n_to_Ca42_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Ca40_n_n_to_Ca42_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ca40_n_n_to_Ca42_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ca42_to_Ca40_n_n_approx(T& rate_eval, const amrex::Real rho, const amrex::Array1D& Y) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real drate_dYN{}; + amrex::Real Yn = Y(N); + amrex::Real r2_ng = rate_eval.screened_rates(k_Ca41_n_to_Ca42_reaclib); + amrex::Real r1_gn = rate_eval.screened_rates(k_Ca41_to_n_Ca40_reaclib); + amrex::Real dd = 1.0_rt / (rho * Yn * r2_ng + r1_gn); + amrex::Real r2_gn = rate_eval.screened_rates(k_Ca42_to_n_Ca41_reaclib); + rate = r1_gn * r2_gn * dd; + if constexpr (std::is_same_v) { + amrex::Real dr1dT_gn = rate_eval.dscreened_rates_dT(k_Ca41_to_n_Ca40_reaclib); + amrex::Real dr2dT_gn = rate_eval.dscreened_rates_dT(k_Ca42_to_n_Ca41_reaclib); + amrex::Real dr2dT_ng = rate_eval.dscreened_rates_dT(k_Ca41_n_to_Ca42_reaclib); + drate_dT = dr1dT_gn * r2_gn * dd + r1_gn * dr2dT_gn * dd - r1_gn * r2_gn * dd * dd * (rho * Yn * dr2dT_ng + dr1dT_gn); + drate_dYN = -rate * dd * rho * r2_ng; + } + if constexpr (std::is_same_v) { + rate_eval.drate_Ca42_to_Ca40_n_n_approx_dYN = drate_dYN; + } + rate_eval.screened_rates(k_Ca42_to_Ca40_n_n_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ca42_to_Ca40_n_n_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_C12_C12_to_Mg24_approx(T& rate_eval) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real r_pY = rate_eval.screened_rates(k_Na23_p_to_C12_C12_reaclib); + amrex::Real r_pa = rate_eval.screened_rates(k_Na23_p_to_He4_Ne20_reaclib); + amrex::Real r_pg = rate_eval.screened_rates(k_Na23_p_to_Mg24_reaclib); + amrex::Real dd = 1.0_rt / (r_pY + r_pa + r_pg); + amrex::Real r_Yg = 0.0_rt; + amrex::Real r_Yp = rate_eval.screened_rates(k_C12_C12_to_p_Na23_reaclib); + rate = r_Yg + r_Yp * r_pg * dd; + if constexpr (std::is_same_v) { + amrex::Real drdT_pY = rate_eval.dscreened_rates_dT(k_Na23_p_to_C12_C12_reaclib); + amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_Na23_p_to_He4_Ne20_reaclib); + amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_Na23_p_to_Mg24_reaclib); + amrex::Real drdT_Yg = 0.0_rt; + amrex::Real drdT_Yp = rate_eval.dscreened_rates_dT(k_C12_C12_to_p_Na23_reaclib); + drate_dT = drdT_Yg + drdT_Yp * r_pg * dd + r_Yp * drdT_pg * dd - r_Yp * r_pg * dd * dd * (drdT_pY + drdT_pa + drdT_pg); + } + rate_eval.screened_rates(k_C12_C12_to_Mg24_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_C12_C12_to_Mg24_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mg24_to_C12_C12_approx(T& rate_eval) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real r_pY = rate_eval.screened_rates(k_Na23_p_to_C12_C12_reaclib); + amrex::Real r_pa = rate_eval.screened_rates(k_Na23_p_to_He4_Ne20_reaclib); + amrex::Real r_pg = rate_eval.screened_rates(k_Na23_p_to_Mg24_reaclib); + amrex::Real dd = 1.0_rt / (r_pY + r_pa + r_pg); + amrex::Real r_gY = 0.0_rt; + amrex::Real r_gp = rate_eval.screened_rates(k_Mg24_to_p_Na23_reaclib); + rate = r_gY + r_pY * r_gp * dd; + if constexpr (std::is_same_v) { + amrex::Real drdT_pY = rate_eval.dscreened_rates_dT(k_Na23_p_to_C12_C12_reaclib); + amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_Na23_p_to_He4_Ne20_reaclib); + amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_Na23_p_to_Mg24_reaclib); + amrex::Real drdT_gY = 0.0_rt; + amrex::Real drdT_gp = rate_eval.dscreened_rates_dT(k_Mg24_to_p_Na23_reaclib); + drate_dT = drdT_gY + drdT_pY * r_gp * dd + r_pY * drdT_gp * dd - r_pY * r_gp * dd * dd * (drdT_pY + drdT_pa + drdT_pg); + } + rate_eval.screened_rates(k_Mg24_to_C12_C12_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mg24_to_C12_C12_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_C12_C12_to_Ne20_He4_approx(T& rate_eval) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real r_pY = rate_eval.screened_rates(k_Na23_p_to_C12_C12_reaclib); + amrex::Real r_pa = rate_eval.screened_rates(k_Na23_p_to_He4_Ne20_reaclib); + amrex::Real r_pg = rate_eval.screened_rates(k_Na23_p_to_Mg24_reaclib); + amrex::Real dd = 1.0_rt / (r_pY + r_pa + r_pg); + amrex::Real r_Ya = rate_eval.screened_rates(k_C12_C12_to_He4_Ne20_reaclib); + amrex::Real r_Yp = rate_eval.screened_rates(k_C12_C12_to_p_Na23_reaclib); + rate = r_Ya + r_Yp * r_pa * dd; + if constexpr (std::is_same_v) { + amrex::Real drdT_pY = rate_eval.dscreened_rates_dT(k_Na23_p_to_C12_C12_reaclib); + amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_Na23_p_to_He4_Ne20_reaclib); + amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_Na23_p_to_Mg24_reaclib); + amrex::Real drdT_Ya = rate_eval.dscreened_rates_dT(k_C12_C12_to_He4_Ne20_reaclib); + amrex::Real drdT_Yp = rate_eval.dscreened_rates_dT(k_C12_C12_to_p_Na23_reaclib); + drate_dT = drdT_Ya + drdT_Yp * r_pa * dd + r_Ya * drdT_pa * dd - r_Yp * r_pa * dd * dd * (drdT_pY + drdT_pa + drdT_pg); + } + rate_eval.screened_rates(k_C12_C12_to_Ne20_He4_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_C12_C12_to_Ne20_He4_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ne20_He4_to_C12_C12_approx(T& rate_eval) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real r_pY = rate_eval.screened_rates(k_Na23_p_to_C12_C12_reaclib); + amrex::Real r_pa = rate_eval.screened_rates(k_Na23_p_to_He4_Ne20_reaclib); + amrex::Real r_pg = rate_eval.screened_rates(k_Na23_p_to_Mg24_reaclib); + amrex::Real dd = 1.0_rt / (r_pY + r_pa + r_pg); + amrex::Real r_aY = rate_eval.screened_rates(k_Ne20_He4_to_C12_C12_reaclib); + amrex::Real r_ap = rate_eval.screened_rates(k_Ne20_He4_to_p_Na23_reaclib); + rate = r_aY + r_pY * r_ap * dd; + if constexpr (std::is_same_v) { + amrex::Real drdT_pY = rate_eval.dscreened_rates_dT(k_Na23_p_to_C12_C12_reaclib); + amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_Na23_p_to_He4_Ne20_reaclib); + amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_Na23_p_to_Mg24_reaclib); + amrex::Real drdT_aY = rate_eval.dscreened_rates_dT(k_Ne20_He4_to_C12_C12_reaclib); + amrex::Real drdT_ap = rate_eval.dscreened_rates_dT(k_Ne20_He4_to_p_Na23_reaclib); + drate_dT = drdT_aY + drdT_pY * r_ap * dd + r_pY * drdT_ap * dd - r_pY * r_ap * dd * dd * (drdT_pY + drdT_pa + drdT_pg); + } + rate_eval.screened_rates(k_Ne20_He4_to_C12_C12_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ne20_He4_to_C12_C12_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ne20_He4_to_Mg24_approx(T& rate_eval) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real r_pg = rate_eval.screened_rates(k_Na23_p_to_Mg24_reaclib); + amrex::Real r_pa = rate_eval.screened_rates(k_Na23_p_to_He4_Ne20_reaclib); + amrex::Real r_pY = rate_eval.screened_rates(k_Na23_p_to_C12_C12_reaclib); + amrex::Real dd = 1.0_rt / (r_pg + r_pa + r_pY); + amrex::Real r_ag = rate_eval.screened_rates(k_Ne20_He4_to_Mg24_reaclib); + amrex::Real r_ap = rate_eval.screened_rates(k_Ne20_He4_to_p_Na23_reaclib); + rate = r_ag + r_ap * r_pg * dd; + if constexpr (std::is_same_v) { + amrex::Real drdT_ag = rate_eval.dscreened_rates_dT(k_Ne20_He4_to_Mg24_reaclib); + amrex::Real drdT_ap = rate_eval.dscreened_rates_dT(k_Ne20_He4_to_p_Na23_reaclib); + amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_Na23_p_to_Mg24_reaclib); + amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_Na23_p_to_He4_Ne20_reaclib); + amrex::Real drdT_pY = rate_eval.dscreened_rates_dT(k_Na23_p_to_C12_C12_reaclib); + drate_dT = drdT_ag + drdT_ap * r_pg * dd + r_ap * drdT_pg * dd - r_ap * r_pg * dd * dd * (drdT_pg + drdT_pa + drdT_pY); + } + rate_eval.screened_rates(k_Ne20_He4_to_Mg24_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ne20_He4_to_Mg24_approx) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mg24_to_Ne20_He4_approx(T& rate_eval) { + + amrex::Real rate{}, drate_dT{}; + amrex::Real r_pg = rate_eval.screened_rates(k_Na23_p_to_Mg24_reaclib); + amrex::Real r_pa = rate_eval.screened_rates(k_Na23_p_to_He4_Ne20_reaclib); + amrex::Real r_pY = rate_eval.screened_rates(k_Na23_p_to_C12_C12_reaclib); + amrex::Real dd = 1.0_rt / (r_pg + r_pa + r_pY); + amrex::Real r_ga = rate_eval.screened_rates(k_Mg24_to_He4_Ne20_reaclib); + amrex::Real r_gp = rate_eval.screened_rates(k_Mg24_to_p_Na23_reaclib); + rate = r_ga + r_gp * r_pa * dd; + if constexpr (std::is_same_v) { + amrex::Real drdT_ga = rate_eval.dscreened_rates_dT(k_Mg24_to_He4_Ne20_reaclib); + amrex::Real drdT_pa = rate_eval.dscreened_rates_dT(k_Na23_p_to_He4_Ne20_reaclib); + amrex::Real drdT_gp = rate_eval.dscreened_rates_dT(k_Mg24_to_p_Na23_reaclib); + amrex::Real drdT_pg = rate_eval.dscreened_rates_dT(k_Na23_p_to_Mg24_reaclib); + amrex::Real drdT_pY = rate_eval.dscreened_rates_dT(k_Na23_p_to_C12_C12_reaclib); + drate_dT = drdT_ga + drdT_gp * r_pa * dd + r_gp * drdT_pa * dd - r_gp * r_pa * dd * dd * (drdT_pg + drdT_pa + drdT_pY); + } + rate_eval.screened_rates(k_Mg24_to_Ne20_He4_approx) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mg24_to_Ne20_He4_approx) = drate_dT; + } + } + + +} +#endif diff --git a/networks/massive-star-medium/beta_limited_rates.H b/networks/massive-star-medium/beta_limited_rates.H new file mode 100644 index 0000000000..014da62a15 --- /dev/null +++ b/networks/massive-star-medium/beta_limited_rates.H @@ -0,0 +1,17 @@ +#ifndef BETA_LIMITED_RATES_H +#define BETA_LIMITED_RATES_H + +#include +#include + +#include +#include +#include + +namespace beta_limited_rates { + + using namespace Rates; + + +} +#endif diff --git a/networks/massive-star-medium/branched_rates.H b/networks/massive-star-medium/branched_rates.H new file mode 100644 index 0000000000..166793c55a --- /dev/null +++ b/networks/massive-star-medium/branched_rates.H @@ -0,0 +1,21 @@ +#ifndef BRANCHED_RATES_H +#define BRANCHED_RATES_H + +#include +#include + +#include +#include +#include +#include +#include + +namespace branched_rates { + + using namespace Rates; + + using namespace temp_tabular; + + +} +#endif diff --git a/networks/massive-star-medium/derived_rates.H b/networks/massive-star-medium/derived_rates.H new file mode 100644 index 0000000000..24451e687c --- /dev/null +++ b/networks/massive-star-medium/derived_rates.H @@ -0,0 +1,16 @@ +#ifndef DERIVED_RATES_H +#define DERIVED_RATES_H + +#include +#include +#include +#include +#include + +namespace derived_rates { + + using namespace Rates; + + +} +#endif diff --git a/networks/massive-star-medium/fill_rates.H b/networks/massive-star-medium/fill_rates.H new file mode 100644 index 0000000000..9faadfe47d --- /dev/null +++ b/networks/massive-star-medium/fill_rates.H @@ -0,0 +1,4031 @@ +#ifndef FILL_RATES_H +#define FILL_RATES_H + +#include +#include + +#include +#include +#include + +namespace rate_util { + + using namespace Rates; + using namespace Species; + + template + AMREX_GPU_DEVICE AMREX_INLINE + void + fill_rates([[maybe_unused]] const tf_t& tfactors, + [[maybe_unused]] const amrex::Real temp, + [[maybe_unused]] const amrex::Real rho, + [[maybe_unused]] const amrex::Real rhoy, + [[maybe_unused]] const amrex::Array1D& Y, + [[maybe_unused]] T& rate_eval) + { + + [[maybe_unused]] amrex::Real rate{}; + [[maybe_unused]] amrex::Real drate_dT{}; + + [[maybe_unused]] const amrex::Real log_temp = std::log10(temp); + [[maybe_unused]] const amrex::Real log_rhoy = std::log10(rhoy); + + rate_eval.enuc_weak = 0.0_rt; + + if constexpr (std::is_same_v) { + for (int n = 1; n <= NumSpec; ++n) { + rate_eval.dweak_ydot_dYe(n) = 0.0_rt; + rate_eval.denuc_weak_dY(n) = 0.0_rt; + } + rate_eval.denuc_weak_dT = 0.0_rt; + rate_eval.denuc_weak_dYe = 0.0_rt; + + } + + // rates are filled in a topologically-sorted order + + { + // O16_to_He4_C12_reaclib + reaclib_rates::rate_O16_to_He4_C12_reaclib(rate_eval, tfactors); + } + + { + // Ne20_to_He4_O16_reaclib + reaclib_rates::rate_Ne20_to_He4_O16_reaclib(rate_eval, tfactors); + } + + { + // Mg24_to_n_Mg23_reaclib + reaclib_rates::rate_Mg24_to_n_Mg23_reaclib(rate_eval, tfactors); + } + + { + // Si27_to_He4_Mg23_reaclib + reaclib_rates::rate_Si27_to_He4_Mg23_reaclib(rate_eval, tfactors); + } + + { + // Si28_to_n_Si27_reaclib + reaclib_rates::rate_Si28_to_n_Si27_reaclib(rate_eval, tfactors); + } + + { + // Si28_to_p_Al27_reaclib + reaclib_rates::rate_Si28_to_p_Al27_reaclib(rate_eval, tfactors); + } + + { + // Si28_to_He4_Mg24_reaclib + reaclib_rates::rate_Si28_to_He4_Mg24_reaclib(rate_eval, tfactors); + } + + { + // Si29_to_n_Si28_reaclib + reaclib_rates::rate_Si29_to_n_Si28_reaclib(rate_eval, tfactors); + } + + { + // Si30_to_n_Si29_reaclib + reaclib_rates::rate_Si30_to_n_Si29_reaclib(rate_eval, tfactors); + } + + { + // Si31_to_n_Si30_reaclib + reaclib_rates::rate_Si31_to_n_Si30_reaclib(rate_eval, tfactors); + } + + { + // P29_to_p_Si28_reaclib + reaclib_rates::rate_P29_to_p_Si28_reaclib(rate_eval, tfactors); + } + + { + // P31_to_p_Si30_reaclib + reaclib_rates::rate_P31_to_p_Si30_reaclib(rate_eval, tfactors); + } + + { + // P31_to_He4_Al27_reaclib + reaclib_rates::rate_P31_to_He4_Al27_reaclib(rate_eval, tfactors); + } + + { + // S32_to_p_P31_reaclib + reaclib_rates::rate_S32_to_p_P31_reaclib(rate_eval, tfactors); + } + + { + // S32_to_He4_Si28_reaclib + reaclib_rates::rate_S32_to_He4_Si28_reaclib(rate_eval, tfactors); + } + + { + // S33_to_n_S32_reaclib + reaclib_rates::rate_S33_to_n_S32_reaclib(rate_eval, tfactors); + } + + { + // S33_to_He4_Si29_reaclib + reaclib_rates::rate_S33_to_He4_Si29_reaclib(rate_eval, tfactors); + } + + { + // S34_to_n_S33_reaclib + reaclib_rates::rate_S34_to_n_S33_reaclib(rate_eval, tfactors); + } + + { + // S34_to_p_P33_reaclib + reaclib_rates::rate_S34_to_p_P33_reaclib(rate_eval, tfactors); + } + + { + // S34_to_He4_Si30_reaclib + reaclib_rates::rate_S34_to_He4_Si30_reaclib(rate_eval, tfactors); + } + + { + // S35_to_n_S34_reaclib + reaclib_rates::rate_S35_to_n_S34_reaclib(rate_eval, tfactors); + } + + { + // S35_to_He4_Si31_reaclib + reaclib_rates::rate_S35_to_He4_Si31_reaclib(rate_eval, tfactors); + } + + { + // Cl33_to_p_S32_reaclib + reaclib_rates::rate_Cl33_to_p_S32_reaclib(rate_eval, tfactors); + } + + { + // Cl33_to_He4_P29_reaclib + reaclib_rates::rate_Cl33_to_He4_P29_reaclib(rate_eval, tfactors); + } + + { + // Cl35_to_p_S34_reaclib + reaclib_rates::rate_Cl35_to_p_S34_reaclib(rate_eval, tfactors); + } + + { + // Cl35_to_He4_P31_reaclib + reaclib_rates::rate_Cl35_to_He4_P31_reaclib(rate_eval, tfactors); + } + + { + // Cl37_to_He4_P33_reaclib + reaclib_rates::rate_Cl37_to_He4_P33_reaclib(rate_eval, tfactors); + } + + { + // Ar36_to_p_Cl35_reaclib + reaclib_rates::rate_Ar36_to_p_Cl35_reaclib(rate_eval, tfactors); + } + + { + // Ar36_to_He4_S32_reaclib + reaclib_rates::rate_Ar36_to_He4_S32_reaclib(rate_eval, tfactors); + } + + { + // Ar37_to_n_Ar36_reaclib + reaclib_rates::rate_Ar37_to_n_Ar36_reaclib(rate_eval, tfactors); + } + + { + // Ar37_to_He4_S33_reaclib + reaclib_rates::rate_Ar37_to_He4_S33_reaclib(rate_eval, tfactors); + } + + { + // Ar38_to_n_Ar37_reaclib + reaclib_rates::rate_Ar38_to_n_Ar37_reaclib(rate_eval, tfactors); + } + + { + // Ar38_to_p_Cl37_reaclib + reaclib_rates::rate_Ar38_to_p_Cl37_reaclib(rate_eval, tfactors); + } + + { + // Ar38_to_He4_S34_reaclib + reaclib_rates::rate_Ar38_to_He4_S34_reaclib(rate_eval, tfactors); + } + + { + // K37_to_p_Ar36_reaclib + reaclib_rates::rate_K37_to_p_Ar36_reaclib(rate_eval, tfactors); + } + + { + // K37_to_He4_Cl33_reaclib + reaclib_rates::rate_K37_to_He4_Cl33_reaclib(rate_eval, tfactors); + } + + { + // K39_to_p_Ar38_reaclib + reaclib_rates::rate_K39_to_p_Ar38_reaclib(rate_eval, tfactors); + } + + { + // K39_to_He4_Cl35_reaclib + reaclib_rates::rate_K39_to_He4_Cl35_reaclib(rate_eval, tfactors); + } + + { + // Ca40_to_p_K39_reaclib + reaclib_rates::rate_Ca40_to_p_K39_reaclib(rate_eval, tfactors); + } + + { + // Ca40_to_He4_Ar36_reaclib + reaclib_rates::rate_Ca40_to_He4_Ar36_reaclib(rate_eval, tfactors); + } + + { + // Ca42_to_He4_Ar38_reaclib + reaclib_rates::rate_Ca42_to_He4_Ar38_reaclib(rate_eval, tfactors); + } + + { + // Sc41_to_p_Ca40_reaclib + reaclib_rates::rate_Sc41_to_p_Ca40_reaclib(rate_eval, tfactors); + } + + { + // Sc41_to_He4_K37_reaclib + reaclib_rates::rate_Sc41_to_He4_K37_reaclib(rate_eval, tfactors); + } + + { + // Sc43_to_p_Ca42_reaclib + reaclib_rates::rate_Sc43_to_p_Ca42_reaclib(rate_eval, tfactors); + } + + { + // Sc43_to_He4_K39_reaclib + reaclib_rates::rate_Sc43_to_He4_K39_reaclib(rate_eval, tfactors); + } + + { + // Ti44_to_p_Sc43_reaclib + reaclib_rates::rate_Ti44_to_p_Sc43_reaclib(rate_eval, tfactors); + } + + { + // Ti44_to_He4_Ca40_reaclib + reaclib_rates::rate_Ti44_to_He4_Ca40_reaclib(rate_eval, tfactors); + } + + { + // Ti46_to_p_Sc45_reaclib + reaclib_rates::rate_Ti46_to_p_Sc45_reaclib(rate_eval, tfactors); + } + + { + // Ti46_to_He4_Ca42_reaclib + reaclib_rates::rate_Ti46_to_He4_Ca42_reaclib(rate_eval, tfactors); + } + + { + // V47_to_p_Ti46_reaclib + reaclib_rates::rate_V47_to_p_Ti46_reaclib(rate_eval, tfactors); + } + + { + // V47_to_He4_Sc43_reaclib + reaclib_rates::rate_V47_to_He4_Sc43_reaclib(rate_eval, tfactors); + } + + { + // V49_to_p_Ti48_reaclib + reaclib_rates::rate_V49_to_p_Ti48_reaclib(rate_eval, tfactors); + } + + { + // V49_to_He4_Sc45_reaclib + reaclib_rates::rate_V49_to_He4_Sc45_reaclib(rate_eval, tfactors); + } + + { + // Cr48_to_p_V47_reaclib + reaclib_rates::rate_Cr48_to_p_V47_reaclib(rate_eval, tfactors); + } + + { + // Cr48_to_He4_Ti44_reaclib + reaclib_rates::rate_Cr48_to_He4_Ti44_reaclib(rate_eval, tfactors); + } + + { + // Cr50_to_p_V49_reaclib + reaclib_rates::rate_Cr50_to_p_V49_reaclib(rate_eval, tfactors); + } + + { + // Cr50_to_He4_Ti46_reaclib + reaclib_rates::rate_Cr50_to_He4_Ti46_reaclib(rate_eval, tfactors); + } + + { + // Cr52_to_p_V51_reaclib + reaclib_rates::rate_Cr52_to_p_V51_reaclib(rate_eval, tfactors); + } + + { + // Cr52_to_He4_Ti48_reaclib + reaclib_rates::rate_Cr52_to_He4_Ti48_reaclib(rate_eval, tfactors); + } + + { + // Mn51_to_p_Cr50_reaclib + reaclib_rates::rate_Mn51_to_p_Cr50_reaclib(rate_eval, tfactors); + } + + { + // Mn51_to_He4_V47_reaclib + reaclib_rates::rate_Mn51_to_He4_V47_reaclib(rate_eval, tfactors); + } + + { + // Mn53_to_p_Cr52_reaclib + reaclib_rates::rate_Mn53_to_p_Cr52_reaclib(rate_eval, tfactors); + } + + { + // Mn53_to_He4_V49_reaclib + reaclib_rates::rate_Mn53_to_He4_V49_reaclib(rate_eval, tfactors); + } + + { + // Mn55_to_p_Cr54_reaclib + reaclib_rates::rate_Mn55_to_p_Cr54_reaclib(rate_eval, tfactors); + } + + { + // Mn55_to_He4_V51_reaclib + reaclib_rates::rate_Mn55_to_He4_V51_reaclib(rate_eval, tfactors); + } + + { + // Fe52_to_p_Mn51_reaclib + reaclib_rates::rate_Fe52_to_p_Mn51_reaclib(rate_eval, tfactors); + } + + { + // Fe52_to_He4_Cr48_reaclib + reaclib_rates::rate_Fe52_to_He4_Cr48_reaclib(rate_eval, tfactors); + } + + { + // Fe54_to_p_Mn53_reaclib + reaclib_rates::rate_Fe54_to_p_Mn53_reaclib(rate_eval, tfactors); + } + + { + // Fe54_to_He4_Cr50_reaclib + reaclib_rates::rate_Fe54_to_He4_Cr50_reaclib(rate_eval, tfactors); + } + + { + // Fe56_to_p_Mn55_reaclib + reaclib_rates::rate_Fe56_to_p_Mn55_reaclib(rate_eval, tfactors); + } + + { + // Fe56_to_He4_Cr52_reaclib + reaclib_rates::rate_Fe56_to_He4_Cr52_reaclib(rate_eval, tfactors); + } + + { + // Fe58_to_He4_Cr54_reaclib + reaclib_rates::rate_Fe58_to_He4_Cr54_reaclib(rate_eval, tfactors); + } + + { + // Co55_to_p_Fe54_reaclib + reaclib_rates::rate_Co55_to_p_Fe54_reaclib(rate_eval, tfactors); + } + + { + // Co55_to_He4_Mn51_reaclib + reaclib_rates::rate_Co55_to_He4_Mn51_reaclib(rate_eval, tfactors); + } + + { + // Co56_to_n_Co55_reaclib + reaclib_rates::rate_Co56_to_n_Co55_reaclib(rate_eval, tfactors); + } + + { + // Co57_to_n_Co56_reaclib + reaclib_rates::rate_Co57_to_n_Co56_reaclib(rate_eval, tfactors); + } + + { + // Co57_to_p_Fe56_reaclib + reaclib_rates::rate_Co57_to_p_Fe56_reaclib(rate_eval, tfactors); + } + + { + // Co57_to_He4_Mn53_reaclib + reaclib_rates::rate_Co57_to_He4_Mn53_reaclib(rate_eval, tfactors); + } + + { + // Co59_to_p_Fe58_reaclib + reaclib_rates::rate_Co59_to_p_Fe58_reaclib(rate_eval, tfactors); + } + + { + // Co59_to_He4_Mn55_reaclib + reaclib_rates::rate_Co59_to_He4_Mn55_reaclib(rate_eval, tfactors); + } + + { + // Ni56_to_p_Co55_reaclib + reaclib_rates::rate_Ni56_to_p_Co55_reaclib(rate_eval, tfactors); + } + + { + // Ni56_to_He4_Fe52_reaclib + reaclib_rates::rate_Ni56_to_He4_Fe52_reaclib(rate_eval, tfactors); + } + + { + // Ni58_to_p_Co57_reaclib + reaclib_rates::rate_Ni58_to_p_Co57_reaclib(rate_eval, tfactors); + } + + { + // Ni58_to_He4_Fe54_reaclib + reaclib_rates::rate_Ni58_to_He4_Fe54_reaclib(rate_eval, tfactors); + } + + { + // Ni60_to_p_Co59_reaclib + reaclib_rates::rate_Ni60_to_p_Co59_reaclib(rate_eval, tfactors); + } + + { + // Ni60_to_He4_Fe56_reaclib + reaclib_rates::rate_Ni60_to_He4_Fe56_reaclib(rate_eval, tfactors); + } + + { + // Cu59_to_p_Ni58_reaclib + reaclib_rates::rate_Cu59_to_p_Ni58_reaclib(rate_eval, tfactors); + } + + { + // Cu59_to_He4_Co55_reaclib + reaclib_rates::rate_Cu59_to_He4_Co55_reaclib(rate_eval, tfactors); + } + + { + // Zn60_to_p_Cu59_reaclib + reaclib_rates::rate_Zn60_to_p_Cu59_reaclib(rate_eval, tfactors); + } + + { + // Zn60_to_He4_Ni56_reaclib + reaclib_rates::rate_Zn60_to_He4_Ni56_reaclib(rate_eval, tfactors); + } + + { + // C12_to_3He4_reaclib + reaclib_rates::rate_C12_to_3He4_reaclib(rate_eval, tfactors); + } + + { + // C12_He4_to_O16_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_C12); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_C12); + } +#endif + reaclib_rates::rate_C12_He4_to_O16_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // O16_He4_to_Ne20_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_O16); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_O16); + } +#endif + reaclib_rates::rate_O16_He4_to_Ne20_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Mg23_n_to_Mg24_reaclib + reaclib_rates::rate_Mg23_n_to_Mg24_reaclib(rate_eval, tfactors); + } + + { + // Mg23_He4_to_Si27_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Mg23); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Mg23); + } +#endif + reaclib_rates::rate_Mg23_He4_to_Si27_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Mg24_He4_to_Si28_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Mg24); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Mg24); + } +#endif + reaclib_rates::rate_Mg24_He4_to_Si28_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Al27_p_to_Si28_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Al27); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Al27); + } +#endif + reaclib_rates::rate_Al27_p_to_Si28_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Al27_He4_to_P31_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Al27); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Al27); + } +#endif + reaclib_rates::rate_Al27_He4_to_P31_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Si27_n_to_Si28_reaclib + reaclib_rates::rate_Si27_n_to_Si28_reaclib(rate_eval, tfactors); + } + + { + // Si28_n_to_Si29_reaclib + reaclib_rates::rate_Si28_n_to_Si29_reaclib(rate_eval, tfactors); + } + + { + // Si28_p_to_P29_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Si28); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Si28); + } +#endif + reaclib_rates::rate_Si28_p_to_P29_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Si28_He4_to_S32_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Si28); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Si28); + } +#endif + reaclib_rates::rate_Si28_He4_to_S32_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Si29_n_to_Si30_reaclib + reaclib_rates::rate_Si29_n_to_Si30_reaclib(rate_eval, tfactors); + } + + { + // Si29_He4_to_S33_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Si29); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Si29); + } +#endif + reaclib_rates::rate_Si29_He4_to_S33_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Si30_n_to_Si31_reaclib + reaclib_rates::rate_Si30_n_to_Si31_reaclib(rate_eval, tfactors); + } + + { + // Si30_p_to_P31_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Si30); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Si30); + } +#endif + reaclib_rates::rate_Si30_p_to_P31_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Si30_He4_to_S34_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Si30); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Si30); + } +#endif + reaclib_rates::rate_Si30_He4_to_S34_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Si31_He4_to_S35_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Si31); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Si31); + } +#endif + reaclib_rates::rate_Si31_He4_to_S35_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // P29_He4_to_Cl33_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_P29); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_P29); + } +#endif + reaclib_rates::rate_P29_He4_to_Cl33_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // P31_p_to_S32_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_P31); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_P31); + } +#endif + reaclib_rates::rate_P31_p_to_S32_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // P31_He4_to_Cl35_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_P31); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_P31); + } +#endif + reaclib_rates::rate_P31_He4_to_Cl35_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // P33_p_to_S34_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_P33); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_P33); + } +#endif + reaclib_rates::rate_P33_p_to_S34_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // P33_He4_to_Cl37_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_P33); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_P33); + } +#endif + reaclib_rates::rate_P33_He4_to_Cl37_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // S32_n_to_S33_reaclib + reaclib_rates::rate_S32_n_to_S33_reaclib(rate_eval, tfactors); + } + + { + // S32_p_to_Cl33_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_S32); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_S32); + } +#endif + reaclib_rates::rate_S32_p_to_Cl33_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // S32_He4_to_Ar36_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_S32); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_S32); + } +#endif + reaclib_rates::rate_S32_He4_to_Ar36_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // S33_n_to_S34_reaclib + reaclib_rates::rate_S33_n_to_S34_reaclib(rate_eval, tfactors); + } + + { + // S33_He4_to_Ar37_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_S33); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_S33); + } +#endif + reaclib_rates::rate_S33_He4_to_Ar37_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // S34_n_to_S35_reaclib + reaclib_rates::rate_S34_n_to_S35_reaclib(rate_eval, tfactors); + } + + { + // S34_p_to_Cl35_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_S34); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_S34); + } +#endif + reaclib_rates::rate_S34_p_to_Cl35_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // S34_He4_to_Ar38_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_S34); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_S34); + } +#endif + reaclib_rates::rate_S34_He4_to_Ar38_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cl33_He4_to_K37_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Cl33); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Cl33); + } +#endif + reaclib_rates::rate_Cl33_He4_to_K37_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cl35_p_to_Ar36_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Cl35); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Cl35); + } +#endif + reaclib_rates::rate_Cl35_p_to_Ar36_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cl35_He4_to_K39_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Cl35); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Cl35); + } +#endif + reaclib_rates::rate_Cl35_He4_to_K39_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cl37_p_to_Ar38_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Cl37); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Cl37); + } +#endif + reaclib_rates::rate_Cl37_p_to_Ar38_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ar36_n_to_Ar37_reaclib + reaclib_rates::rate_Ar36_n_to_Ar37_reaclib(rate_eval, tfactors); + } + + { + // Ar36_p_to_K37_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Ar36); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Ar36); + } +#endif + reaclib_rates::rate_Ar36_p_to_K37_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ar36_He4_to_Ca40_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ar36); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ar36); + } +#endif + reaclib_rates::rate_Ar36_He4_to_Ca40_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ar37_n_to_Ar38_reaclib + reaclib_rates::rate_Ar37_n_to_Ar38_reaclib(rate_eval, tfactors); + } + + { + // Ar38_p_to_K39_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Ar38); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Ar38); + } +#endif + reaclib_rates::rate_Ar38_p_to_K39_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ar38_He4_to_Ca42_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ar38); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ar38); + } +#endif + reaclib_rates::rate_Ar38_He4_to_Ca42_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // K37_He4_to_Sc41_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_K37); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_K37); + } +#endif + reaclib_rates::rate_K37_He4_to_Sc41_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // K39_p_to_Ca40_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_K39); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_K39); + } +#endif + reaclib_rates::rate_K39_p_to_Ca40_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // K39_He4_to_Sc43_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_K39); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_K39); + } +#endif + reaclib_rates::rate_K39_He4_to_Sc43_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ca40_p_to_Sc41_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Ca40); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Ca40); + } +#endif + reaclib_rates::rate_Ca40_p_to_Sc41_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ca40_He4_to_Ti44_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ca40); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ca40); + } +#endif + reaclib_rates::rate_Ca40_He4_to_Ti44_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ca42_p_to_Sc43_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Ca42); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Ca42); + } +#endif + reaclib_rates::rate_Ca42_p_to_Sc43_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ca42_He4_to_Ti46_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ca42); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ca42); + } +#endif + reaclib_rates::rate_Ca42_He4_to_Ti46_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Sc43_p_to_Ti44_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Sc43); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Sc43); + } +#endif + reaclib_rates::rate_Sc43_p_to_Ti44_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Sc43_He4_to_V47_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Sc43); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Sc43); + } +#endif + reaclib_rates::rate_Sc43_He4_to_V47_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Sc45_p_to_Ti46_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Sc45); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Sc45); + } +#endif + reaclib_rates::rate_Sc45_p_to_Ti46_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Sc45_He4_to_V49_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Sc45); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Sc45); + } +#endif + reaclib_rates::rate_Sc45_He4_to_V49_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ti44_He4_to_Cr48_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ti44); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ti44); + } +#endif + reaclib_rates::rate_Ti44_He4_to_Cr48_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ti46_p_to_V47_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Ti46); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Ti46); + } +#endif + reaclib_rates::rate_Ti46_p_to_V47_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ti46_He4_to_Cr50_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ti46); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ti46); + } +#endif + reaclib_rates::rate_Ti46_He4_to_Cr50_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ti48_p_to_V49_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Ti48); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Ti48); + } +#endif + reaclib_rates::rate_Ti48_p_to_V49_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ti48_He4_to_Cr52_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ti48); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ti48); + } +#endif + reaclib_rates::rate_Ti48_He4_to_Cr52_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // V47_p_to_Cr48_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_V47); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_V47); + } +#endif + reaclib_rates::rate_V47_p_to_Cr48_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // V47_He4_to_Mn51_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_V47); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_V47); + } +#endif + reaclib_rates::rate_V47_He4_to_Mn51_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // V49_p_to_Cr50_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_V49); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_V49); + } +#endif + reaclib_rates::rate_V49_p_to_Cr50_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // V49_He4_to_Mn53_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_V49); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_V49); + } +#endif + reaclib_rates::rate_V49_He4_to_Mn53_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // V51_p_to_Cr52_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_V51); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_V51); + } +#endif + reaclib_rates::rate_V51_p_to_Cr52_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // V51_He4_to_Mn55_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_V51); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_V51); + } +#endif + reaclib_rates::rate_V51_He4_to_Mn55_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cr48_He4_to_Fe52_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Cr48); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Cr48); + } +#endif + reaclib_rates::rate_Cr48_He4_to_Fe52_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cr50_p_to_Mn51_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Cr50); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Cr50); + } +#endif + reaclib_rates::rate_Cr50_p_to_Mn51_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cr50_He4_to_Fe54_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Cr50); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Cr50); + } +#endif + reaclib_rates::rate_Cr50_He4_to_Fe54_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cr52_p_to_Mn53_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Cr52); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Cr52); + } +#endif + reaclib_rates::rate_Cr52_p_to_Mn53_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cr52_He4_to_Fe56_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Cr52); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Cr52); + } +#endif + reaclib_rates::rate_Cr52_He4_to_Fe56_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cr54_p_to_Mn55_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Cr54); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Cr54); + } +#endif + reaclib_rates::rate_Cr54_p_to_Mn55_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cr54_He4_to_Fe58_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Cr54); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Cr54); + } +#endif + reaclib_rates::rate_Cr54_He4_to_Fe58_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Mn51_p_to_Fe52_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Mn51); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Mn51); + } +#endif + reaclib_rates::rate_Mn51_p_to_Fe52_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Mn51_He4_to_Co55_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Mn51); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Mn51); + } +#endif + reaclib_rates::rate_Mn51_He4_to_Co55_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Mn53_p_to_Fe54_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Mn53); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Mn53); + } +#endif + reaclib_rates::rate_Mn53_p_to_Fe54_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Mn53_He4_to_Co57_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Mn53); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Mn53); + } +#endif + reaclib_rates::rate_Mn53_He4_to_Co57_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Mn55_p_to_Fe56_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Mn55); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Mn55); + } +#endif + reaclib_rates::rate_Mn55_p_to_Fe56_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Mn55_He4_to_Co59_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Mn55); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Mn55); + } +#endif + reaclib_rates::rate_Mn55_He4_to_Co59_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Fe52_He4_to_Ni56_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Fe52); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Fe52); + } +#endif + reaclib_rates::rate_Fe52_He4_to_Ni56_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Fe54_p_to_Co55_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Fe54); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Fe54); + } +#endif + reaclib_rates::rate_Fe54_p_to_Co55_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Fe54_He4_to_Ni58_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Fe54); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Fe54); + } +#endif + reaclib_rates::rate_Fe54_He4_to_Ni58_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Fe56_p_to_Co57_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Fe56); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Fe56); + } +#endif + reaclib_rates::rate_Fe56_p_to_Co57_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Fe56_He4_to_Ni60_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Fe56); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Fe56); + } +#endif + reaclib_rates::rate_Fe56_He4_to_Ni60_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Fe58_p_to_Co59_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Fe58); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Fe58); + } +#endif + reaclib_rates::rate_Fe58_p_to_Co59_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Co55_n_to_Co56_reaclib + reaclib_rates::rate_Co55_n_to_Co56_reaclib(rate_eval, tfactors); + } + + { + // Co55_p_to_Ni56_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Co55); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Co55); + } +#endif + reaclib_rates::rate_Co55_p_to_Ni56_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Co55_He4_to_Cu59_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Co55); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Co55); + } +#endif + reaclib_rates::rate_Co55_He4_to_Cu59_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Co56_n_to_Co57_reaclib + reaclib_rates::rate_Co56_n_to_Co57_reaclib(rate_eval, tfactors); + } + + { + // Co57_p_to_Ni58_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Co57); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Co57); + } +#endif + reaclib_rates::rate_Co57_p_to_Ni58_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Co59_p_to_Ni60_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Co59); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Co59); + } +#endif + reaclib_rates::rate_Co59_p_to_Ni60_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ni56_He4_to_Zn60_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ni56); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ni56); + } +#endif + reaclib_rates::rate_Ni56_He4_to_Zn60_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ni58_p_to_Cu59_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Ni58); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Ni58); + } +#endif + reaclib_rates::rate_Ni58_p_to_Cu59_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cu59_p_to_Zn60_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Cu59); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Cu59); + } +#endif + reaclib_rates::rate_Cu59_p_to_Zn60_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // C12_C12_to_n_Mg23_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_C12_C12); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_C12_C12); + } +#endif + reaclib_rates::rate_C12_C12_to_n_Mg23_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // O16_C12_to_n_Si27_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_C12_O16); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_C12_O16); + } +#endif + reaclib_rates::rate_O16_C12_to_n_Si27_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // O16_C12_to_p_Al27_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_C12_O16); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_C12_O16); + } +#endif + reaclib_rates::rate_O16_C12_to_p_Al27_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // O16_C12_to_He4_Mg24_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_C12_O16); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_C12_O16); + } +#endif + reaclib_rates::rate_O16_C12_to_He4_Mg24_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // O16_O16_to_p_P31_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_O16_O16); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_O16_O16); + } +#endif + reaclib_rates::rate_O16_O16_to_p_P31_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // O16_O16_to_He4_Si28_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_O16_O16); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_O16_O16); + } +#endif + reaclib_rates::rate_O16_O16_to_He4_Si28_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ne20_He4_to_n_Mg23_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ne20); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ne20); + } +#endif + reaclib_rates::rate_Ne20_He4_to_n_Mg23_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ne20_C12_to_p_P31_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_C12_Ne20); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_C12_Ne20); + } +#endif + reaclib_rates::rate_Ne20_C12_to_p_P31_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ne20_C12_to_He4_Si28_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_C12_Ne20); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_C12_Ne20); + } +#endif + reaclib_rates::rate_Ne20_C12_to_He4_Si28_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Mg23_n_to_He4_Ne20_reaclib + reaclib_rates::rate_Mg23_n_to_He4_Ne20_reaclib(rate_eval, tfactors); + } + + { + // Mg23_n_to_C12_C12_reaclib + reaclib_rates::rate_Mg23_n_to_C12_C12_reaclib(rate_eval, tfactors); + } + + { + // Mg24_He4_to_n_Si27_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Mg24); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Mg24); + } +#endif + reaclib_rates::rate_Mg24_He4_to_n_Si27_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Mg24_He4_to_p_Al27_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Mg24); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Mg24); + } +#endif + reaclib_rates::rate_Mg24_He4_to_p_Al27_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Mg24_He4_to_C12_O16_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Mg24); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Mg24); + } +#endif + reaclib_rates::rate_Mg24_He4_to_C12_O16_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Al27_p_to_n_Si27_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Al27); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Al27); + } +#endif + reaclib_rates::rate_Al27_p_to_n_Si27_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Al27_p_to_He4_Mg24_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Al27); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Al27); + } +#endif + reaclib_rates::rate_Al27_p_to_He4_Mg24_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Al27_p_to_C12_O16_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Al27); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Al27); + } +#endif + reaclib_rates::rate_Al27_p_to_C12_O16_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Al27_He4_to_p_Si30_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Al27); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Al27); + } +#endif + reaclib_rates::rate_Al27_He4_to_p_Si30_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Si27_n_to_p_Al27_reaclib + reaclib_rates::rate_Si27_n_to_p_Al27_reaclib(rate_eval, tfactors); + } + + { + // Si27_n_to_He4_Mg24_reaclib + reaclib_rates::rate_Si27_n_to_He4_Mg24_reaclib(rate_eval, tfactors); + } + + { + // Si27_n_to_C12_O16_reaclib + reaclib_rates::rate_Si27_n_to_C12_O16_reaclib(rate_eval, tfactors); + } + + { + // Si28_He4_to_p_P31_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Si28); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Si28); + } +#endif + reaclib_rates::rate_Si28_He4_to_p_P31_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Si28_He4_to_C12_Ne20_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Si28); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Si28); + } +#endif + reaclib_rates::rate_Si28_He4_to_C12_Ne20_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Si28_He4_to_O16_O16_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Si28); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Si28); + } +#endif + reaclib_rates::rate_Si28_He4_to_O16_O16_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Si29_p_to_n_P29_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Si29); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Si29); + } +#endif + reaclib_rates::rate_Si29_p_to_n_P29_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Si29_He4_to_n_S32_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Si29); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Si29); + } +#endif + reaclib_rates::rate_Si29_He4_to_n_S32_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Si30_p_to_He4_Al27_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Si30); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Si30); + } +#endif + reaclib_rates::rate_Si30_p_to_He4_Al27_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Si30_He4_to_n_S33_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Si30); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Si30); + } +#endif + reaclib_rates::rate_Si30_He4_to_n_S33_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Si30_He4_to_p_P33_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Si30); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Si30); + } +#endif + reaclib_rates::rate_Si30_He4_to_p_P33_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Si31_p_to_n_P31_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Si31); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Si31); + } +#endif + reaclib_rates::rate_Si31_p_to_n_P31_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Si31_He4_to_n_S34_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Si31); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Si31); + } +#endif + reaclib_rates::rate_Si31_He4_to_n_S34_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // P29_n_to_p_Si29_reaclib + reaclib_rates::rate_P29_n_to_p_Si29_reaclib(rate_eval, tfactors); + } + + { + // P29_He4_to_p_S32_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_P29); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_P29); + } +#endif + reaclib_rates::rate_P29_He4_to_p_S32_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // P31_n_to_p_Si31_reaclib + reaclib_rates::rate_P31_n_to_p_Si31_reaclib(rate_eval, tfactors); + } + + { + // P31_p_to_He4_Si28_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_P31); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_P31); + } +#endif + reaclib_rates::rate_P31_p_to_He4_Si28_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // P31_p_to_C12_Ne20_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_P31); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_P31); + } +#endif + reaclib_rates::rate_P31_p_to_C12_Ne20_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // P31_p_to_O16_O16_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_P31); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_P31); + } +#endif + reaclib_rates::rate_P31_p_to_O16_O16_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // P31_He4_to_p_S34_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_P31); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_P31); + } +#endif + reaclib_rates::rate_P31_He4_to_p_S34_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // P33_p_to_n_S33_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_P33); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_P33); + } +#endif + reaclib_rates::rate_P33_p_to_n_S33_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // P33_p_to_He4_Si30_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_P33); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_P33); + } +#endif + reaclib_rates::rate_P33_p_to_He4_Si30_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // S32_n_to_He4_Si29_reaclib + reaclib_rates::rate_S32_n_to_He4_Si29_reaclib(rate_eval, tfactors); + } + + { + // S32_p_to_He4_P29_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_S32); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_S32); + } +#endif + reaclib_rates::rate_S32_p_to_He4_P29_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // S32_He4_to_p_Cl35_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_S32); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_S32); + } +#endif + reaclib_rates::rate_S32_He4_to_p_Cl35_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // S33_n_to_p_P33_reaclib + reaclib_rates::rate_S33_n_to_p_P33_reaclib(rate_eval, tfactors); + } + + { + // S33_n_to_He4_Si30_reaclib + reaclib_rates::rate_S33_n_to_He4_Si30_reaclib(rate_eval, tfactors); + } + + { + // S33_p_to_n_Cl33_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_S33); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_S33); + } +#endif + reaclib_rates::rate_S33_p_to_n_Cl33_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // S33_He4_to_n_Ar36_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_S33); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_S33); + } +#endif + reaclib_rates::rate_S33_He4_to_n_Ar36_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // S34_n_to_He4_Si31_reaclib + reaclib_rates::rate_S34_n_to_He4_Si31_reaclib(rate_eval, tfactors); + } + + { + // S34_p_to_He4_P31_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_S34); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_S34); + } +#endif + reaclib_rates::rate_S34_p_to_He4_P31_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // S34_He4_to_n_Ar37_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_S34); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_S34); + } +#endif + reaclib_rates::rate_S34_He4_to_n_Ar37_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // S34_He4_to_p_Cl37_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_S34); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_S34); + } +#endif + reaclib_rates::rate_S34_He4_to_p_Cl37_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // S35_p_to_n_Cl35_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_S35); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_S35); + } +#endif + reaclib_rates::rate_S35_p_to_n_Cl35_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // S35_He4_to_n_Ar38_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_S35); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_S35); + } +#endif + reaclib_rates::rate_S35_He4_to_n_Ar38_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cl33_n_to_p_S33_reaclib + reaclib_rates::rate_Cl33_n_to_p_S33_reaclib(rate_eval, tfactors); + } + + { + // Cl33_He4_to_p_Ar36_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Cl33); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Cl33); + } +#endif + reaclib_rates::rate_Cl33_He4_to_p_Ar36_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cl35_n_to_p_S35_reaclib + reaclib_rates::rate_Cl35_n_to_p_S35_reaclib(rate_eval, tfactors); + } + + { + // Cl35_p_to_He4_S32_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Cl35); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Cl35); + } +#endif + reaclib_rates::rate_Cl35_p_to_He4_S32_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cl35_He4_to_p_Ar38_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Cl35); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Cl35); + } +#endif + reaclib_rates::rate_Cl35_He4_to_p_Ar38_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cl37_p_to_n_Ar37_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Cl37); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Cl37); + } +#endif + reaclib_rates::rate_Cl37_p_to_n_Ar37_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cl37_p_to_He4_S34_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Cl37); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Cl37); + } +#endif + reaclib_rates::rate_Cl37_p_to_He4_S34_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ar36_n_to_He4_S33_reaclib + reaclib_rates::rate_Ar36_n_to_He4_S33_reaclib(rate_eval, tfactors); + } + + { + // Ar36_p_to_He4_Cl33_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Ar36); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Ar36); + } +#endif + reaclib_rates::rate_Ar36_p_to_He4_Cl33_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ar36_He4_to_p_K39_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ar36); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ar36); + } +#endif + reaclib_rates::rate_Ar36_He4_to_p_K39_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ar37_n_to_p_Cl37_reaclib + reaclib_rates::rate_Ar37_n_to_p_Cl37_reaclib(rate_eval, tfactors); + } + + { + // Ar37_n_to_He4_S34_reaclib + reaclib_rates::rate_Ar37_n_to_He4_S34_reaclib(rate_eval, tfactors); + } + + { + // Ar37_p_to_n_K37_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Ar37); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Ar37); + } +#endif + reaclib_rates::rate_Ar37_p_to_n_K37_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ar37_He4_to_n_Ca40_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ar37); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ar37); + } +#endif + reaclib_rates::rate_Ar37_He4_to_n_Ca40_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ar38_n_to_He4_S35_reaclib + reaclib_rates::rate_Ar38_n_to_He4_S35_reaclib(rate_eval, tfactors); + } + + { + // Ar38_p_to_He4_Cl35_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Ar38); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Ar38); + } +#endif + reaclib_rates::rate_Ar38_p_to_He4_Cl35_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // K37_n_to_p_Ar37_reaclib + reaclib_rates::rate_K37_n_to_p_Ar37_reaclib(rate_eval, tfactors); + } + + { + // K37_He4_to_p_Ca40_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_K37); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_K37); + } +#endif + reaclib_rates::rate_K37_He4_to_p_Ca40_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // K39_p_to_He4_Ar36_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_K39); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_K39); + } +#endif + reaclib_rates::rate_K39_p_to_He4_Ar36_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // K39_He4_to_p_Ca42_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_K39); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_K39); + } +#endif + reaclib_rates::rate_K39_He4_to_p_Ca42_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ca40_n_to_He4_Ar37_reaclib + reaclib_rates::rate_Ca40_n_to_He4_Ar37_reaclib(rate_eval, tfactors); + } + + { + // Ca40_p_to_He4_K37_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Ca40); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Ca40); + } +#endif + reaclib_rates::rate_Ca40_p_to_He4_K37_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ca40_He4_to_p_Sc43_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ca40); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ca40); + } +#endif + reaclib_rates::rate_Ca40_He4_to_p_Sc43_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ca42_p_to_He4_K39_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Ca42); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Ca42); + } +#endif + reaclib_rates::rate_Ca42_p_to_He4_K39_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ca42_He4_to_p_Sc45_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ca42); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ca42); + } +#endif + reaclib_rates::rate_Ca42_He4_to_p_Sc45_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Sc41_He4_to_p_Ti44_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Sc41); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Sc41); + } +#endif + reaclib_rates::rate_Sc41_He4_to_p_Ti44_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Sc43_p_to_He4_Ca40_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Sc43); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Sc43); + } +#endif + reaclib_rates::rate_Sc43_p_to_He4_Ca40_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Sc43_He4_to_p_Ti46_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Sc43); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Sc43); + } +#endif + reaclib_rates::rate_Sc43_He4_to_p_Ti46_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Sc45_p_to_He4_Ca42_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Sc45); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Sc45); + } +#endif + reaclib_rates::rate_Sc45_p_to_He4_Ca42_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Sc45_He4_to_p_Ti48_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Sc45); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Sc45); + } +#endif + reaclib_rates::rate_Sc45_He4_to_p_Ti48_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ti44_p_to_He4_Sc41_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Ti44); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Ti44); + } +#endif + reaclib_rates::rate_Ti44_p_to_He4_Sc41_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ti44_He4_to_p_V47_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ti44); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ti44); + } +#endif + reaclib_rates::rate_Ti44_He4_to_p_V47_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ti46_p_to_He4_Sc43_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Ti46); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Ti46); + } +#endif + reaclib_rates::rate_Ti46_p_to_He4_Sc43_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ti46_He4_to_p_V49_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ti46); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ti46); + } +#endif + reaclib_rates::rate_Ti46_He4_to_p_V49_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ti48_p_to_He4_Sc45_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Ti48); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Ti48); + } +#endif + reaclib_rates::rate_Ti48_p_to_He4_Sc45_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ti48_He4_to_p_V51_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ti48); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ti48); + } +#endif + reaclib_rates::rate_Ti48_He4_to_p_V51_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // V47_p_to_He4_Ti44_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_V47); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_V47); + } +#endif + reaclib_rates::rate_V47_p_to_He4_Ti44_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // V47_He4_to_p_Cr50_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_V47); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_V47); + } +#endif + reaclib_rates::rate_V47_He4_to_p_Cr50_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // V49_p_to_He4_Ti46_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_V49); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_V49); + } +#endif + reaclib_rates::rate_V49_p_to_He4_Ti46_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // V49_He4_to_p_Cr52_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_V49); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_V49); + } +#endif + reaclib_rates::rate_V49_He4_to_p_Cr52_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // V51_p_to_He4_Ti48_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_V51); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_V51); + } +#endif + reaclib_rates::rate_V51_p_to_He4_Ti48_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // V51_He4_to_p_Cr54_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_V51); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_V51); + } +#endif + reaclib_rates::rate_V51_He4_to_p_Cr54_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cr48_He4_to_p_Mn51_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Cr48); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Cr48); + } +#endif + reaclib_rates::rate_Cr48_He4_to_p_Mn51_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cr50_p_to_He4_V47_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Cr50); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Cr50); + } +#endif + reaclib_rates::rate_Cr50_p_to_He4_V47_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cr50_He4_to_p_Mn53_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Cr50); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Cr50); + } +#endif + reaclib_rates::rate_Cr50_He4_to_p_Mn53_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cr52_p_to_He4_V49_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Cr52); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Cr52); + } +#endif + reaclib_rates::rate_Cr52_p_to_He4_V49_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cr52_He4_to_p_Mn55_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Cr52); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Cr52); + } +#endif + reaclib_rates::rate_Cr52_He4_to_p_Mn55_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cr54_p_to_He4_V51_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Cr54); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Cr54); + } +#endif + reaclib_rates::rate_Cr54_p_to_He4_V51_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Mn51_p_to_He4_Cr48_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Mn51); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Mn51); + } +#endif + reaclib_rates::rate_Mn51_p_to_He4_Cr48_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Mn51_He4_to_p_Fe54_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Mn51); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Mn51); + } +#endif + reaclib_rates::rate_Mn51_He4_to_p_Fe54_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Mn53_p_to_He4_Cr50_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Mn53); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Mn53); + } +#endif + reaclib_rates::rate_Mn53_p_to_He4_Cr50_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Mn53_He4_to_n_Co56_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Mn53); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Mn53); + } +#endif + reaclib_rates::rate_Mn53_He4_to_n_Co56_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Mn53_He4_to_p_Fe56_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Mn53); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Mn53); + } +#endif + reaclib_rates::rate_Mn53_He4_to_p_Fe56_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Mn55_p_to_He4_Cr52_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Mn55); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Mn55); + } +#endif + reaclib_rates::rate_Mn55_p_to_He4_Cr52_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Mn55_He4_to_p_Fe58_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Mn55); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Mn55); + } +#endif + reaclib_rates::rate_Mn55_He4_to_p_Fe58_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Fe52_He4_to_p_Co55_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Fe52); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Fe52); + } +#endif + reaclib_rates::rate_Fe52_He4_to_p_Co55_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Fe54_p_to_He4_Mn51_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Fe54); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Fe54); + } +#endif + reaclib_rates::rate_Fe54_p_to_He4_Mn51_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Fe54_He4_to_p_Co57_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Fe54); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Fe54); + } +#endif + reaclib_rates::rate_Fe54_He4_to_p_Co57_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Fe56_p_to_n_Co56_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Fe56); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Fe56); + } +#endif + reaclib_rates::rate_Fe56_p_to_n_Co56_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Fe56_p_to_He4_Mn53_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Fe56); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Fe56); + } +#endif + reaclib_rates::rate_Fe56_p_to_He4_Mn53_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Fe56_He4_to_p_Co59_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Fe56); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Fe56); + } +#endif + reaclib_rates::rate_Fe56_He4_to_p_Co59_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Fe58_p_to_He4_Mn55_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Fe58); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Fe58); + } +#endif + reaclib_rates::rate_Fe58_p_to_He4_Mn55_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Co55_p_to_He4_Fe52_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Co55); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Co55); + } +#endif + reaclib_rates::rate_Co55_p_to_He4_Fe52_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Co55_He4_to_p_Ni58_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Co55); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Co55); + } +#endif + reaclib_rates::rate_Co55_He4_to_p_Ni58_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Co56_n_to_p_Fe56_reaclib + reaclib_rates::rate_Co56_n_to_p_Fe56_reaclib(rate_eval, tfactors); + } + + { + // Co56_n_to_He4_Mn53_reaclib + reaclib_rates::rate_Co56_n_to_He4_Mn53_reaclib(rate_eval, tfactors); + } + + { + // Co56_p_to_n_Ni56_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Co56); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Co56); + } +#endif + reaclib_rates::rate_Co56_p_to_n_Ni56_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Co56_He4_to_n_Cu59_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Co56); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Co56); + } +#endif + reaclib_rates::rate_Co56_He4_to_n_Cu59_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Co57_p_to_He4_Fe54_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Co57); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Co57); + } +#endif + reaclib_rates::rate_Co57_p_to_He4_Fe54_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Co57_He4_to_p_Ni60_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Co57); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Co57); + } +#endif + reaclib_rates::rate_Co57_He4_to_p_Ni60_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Co59_p_to_He4_Fe56_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Co59); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Co59); + } +#endif + reaclib_rates::rate_Co59_p_to_He4_Fe56_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ni56_n_to_p_Co56_reaclib + reaclib_rates::rate_Ni56_n_to_p_Co56_reaclib(rate_eval, tfactors); + } + + { + // Ni56_He4_to_p_Cu59_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ni56); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ni56); + } +#endif + reaclib_rates::rate_Ni56_He4_to_p_Cu59_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ni58_p_to_He4_Co55_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Ni58); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Ni58); + } +#endif + reaclib_rates::rate_Ni58_p_to_He4_Co55_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ni60_p_to_He4_Co57_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Ni60); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Ni60); + } +#endif + reaclib_rates::rate_Ni60_p_to_He4_Co57_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Cu59_n_to_He4_Co56_reaclib + reaclib_rates::rate_Cu59_n_to_He4_Co56_reaclib(rate_eval, tfactors); + } + + { + // Cu59_p_to_He4_Ni56_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Cu59); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Cu59); + } +#endif + reaclib_rates::rate_Cu59_p_to_He4_Ni56_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // He4_He4_He4_to_C12_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_He4) + rate_eval.log_screen(k_He4_Be8); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_He4) + rate_eval.dlog_screen_dT(k_He4_Be8); + } +#endif + reaclib_rates::rate_He4_He4_He4_to_C12_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ni56_n_to_Ni57_reaclib + reaclib_rates::rate_Ni56_n_to_Ni57_reaclib(rate_eval, tfactors); + } + + { + // Ni57_to_n_Ni56_reaclib + reaclib_rates::rate_Ni57_to_n_Ni56_reaclib(rate_eval, tfactors); + } + + { + // Ni57_n_to_Ni58_reaclib + reaclib_rates::rate_Ni57_n_to_Ni58_reaclib(rate_eval, tfactors); + } + + { + // Ni58_to_n_Ni57_reaclib + reaclib_rates::rate_Ni58_to_n_Ni57_reaclib(rate_eval, tfactors); + } + + { + // Ni58_n_to_Ni59_reaclib + reaclib_rates::rate_Ni58_n_to_Ni59_reaclib(rate_eval, tfactors); + } + + { + // Ni59_to_n_Ni58_reaclib + reaclib_rates::rate_Ni59_to_n_Ni58_reaclib(rate_eval, tfactors); + } + + { + // Ni59_n_to_Ni60_reaclib + reaclib_rates::rate_Ni59_n_to_Ni60_reaclib(rate_eval, tfactors); + } + + { + // Ni60_to_n_Ni59_reaclib + reaclib_rates::rate_Ni60_to_n_Ni59_reaclib(rate_eval, tfactors); + } + + { + // Co57_n_to_Co58_reaclib + reaclib_rates::rate_Co57_n_to_Co58_reaclib(rate_eval, tfactors); + } + + { + // Co58_to_n_Co57_reaclib + reaclib_rates::rate_Co58_to_n_Co57_reaclib(rate_eval, tfactors); + } + + { + // Co58_n_to_Co59_reaclib + reaclib_rates::rate_Co58_n_to_Co59_reaclib(rate_eval, tfactors); + } + + { + // Co59_to_n_Co58_reaclib + reaclib_rates::rate_Co59_to_n_Co58_reaclib(rate_eval, tfactors); + } + + { + // Fe52_n_to_Fe53_reaclib + reaclib_rates::rate_Fe52_n_to_Fe53_reaclib(rate_eval, tfactors); + } + + { + // Fe53_to_n_Fe52_reaclib + reaclib_rates::rate_Fe53_to_n_Fe52_reaclib(rate_eval, tfactors); + } + + { + // Fe53_n_to_Fe54_reaclib + reaclib_rates::rate_Fe53_n_to_Fe54_reaclib(rate_eval, tfactors); + } + + { + // Fe54_to_n_Fe53_reaclib + reaclib_rates::rate_Fe54_to_n_Fe53_reaclib(rate_eval, tfactors); + } + + { + // Fe54_n_to_Fe55_reaclib + reaclib_rates::rate_Fe54_n_to_Fe55_reaclib(rate_eval, tfactors); + } + + { + // Fe55_to_n_Fe54_reaclib + reaclib_rates::rate_Fe55_to_n_Fe54_reaclib(rate_eval, tfactors); + } + + { + // Fe55_n_to_Fe56_reaclib + reaclib_rates::rate_Fe55_n_to_Fe56_reaclib(rate_eval, tfactors); + } + + { + // Fe56_to_n_Fe55_reaclib + reaclib_rates::rate_Fe56_to_n_Fe55_reaclib(rate_eval, tfactors); + } + + { + // Fe56_n_to_Fe57_reaclib + reaclib_rates::rate_Fe56_n_to_Fe57_reaclib(rate_eval, tfactors); + } + + { + // Fe57_to_n_Fe56_reaclib + reaclib_rates::rate_Fe57_to_n_Fe56_reaclib(rate_eval, tfactors); + } + + { + // Fe57_n_to_Fe58_reaclib + reaclib_rates::rate_Fe57_n_to_Fe58_reaclib(rate_eval, tfactors); + } + + { + // Fe58_to_n_Fe57_reaclib + reaclib_rates::rate_Fe58_to_n_Fe57_reaclib(rate_eval, tfactors); + } + + { + // Mn51_n_to_Mn52_reaclib + reaclib_rates::rate_Mn51_n_to_Mn52_reaclib(rate_eval, tfactors); + } + + { + // Mn52_to_n_Mn51_reaclib + reaclib_rates::rate_Mn52_to_n_Mn51_reaclib(rate_eval, tfactors); + } + + { + // Mn52_n_to_Mn53_reaclib + reaclib_rates::rate_Mn52_n_to_Mn53_reaclib(rate_eval, tfactors); + } + + { + // Mn53_to_n_Mn52_reaclib + reaclib_rates::rate_Mn53_to_n_Mn52_reaclib(rate_eval, tfactors); + } + + { + // Mn53_n_to_Mn54_reaclib + reaclib_rates::rate_Mn53_n_to_Mn54_reaclib(rate_eval, tfactors); + } + + { + // Mn54_to_n_Mn53_reaclib + reaclib_rates::rate_Mn54_to_n_Mn53_reaclib(rate_eval, tfactors); + } + + { + // Mn54_n_to_Mn55_reaclib + reaclib_rates::rate_Mn54_n_to_Mn55_reaclib(rate_eval, tfactors); + } + + { + // Mn55_to_n_Mn54_reaclib + reaclib_rates::rate_Mn55_to_n_Mn54_reaclib(rate_eval, tfactors); + } + + { + // Cr48_n_to_Cr49_reaclib + reaclib_rates::rate_Cr48_n_to_Cr49_reaclib(rate_eval, tfactors); + } + + { + // Cr49_to_n_Cr48_reaclib + reaclib_rates::rate_Cr49_to_n_Cr48_reaclib(rate_eval, tfactors); + } + + { + // Cr49_n_to_Cr50_reaclib + reaclib_rates::rate_Cr49_n_to_Cr50_reaclib(rate_eval, tfactors); + } + + { + // Cr50_to_n_Cr49_reaclib + reaclib_rates::rate_Cr50_to_n_Cr49_reaclib(rate_eval, tfactors); + } + + { + // Cr50_n_to_Cr51_reaclib + reaclib_rates::rate_Cr50_n_to_Cr51_reaclib(rate_eval, tfactors); + } + + { + // Cr51_to_n_Cr50_reaclib + reaclib_rates::rate_Cr51_to_n_Cr50_reaclib(rate_eval, tfactors); + } + + { + // Cr51_n_to_Cr52_reaclib + reaclib_rates::rate_Cr51_n_to_Cr52_reaclib(rate_eval, tfactors); + } + + { + // Cr52_to_n_Cr51_reaclib + reaclib_rates::rate_Cr52_to_n_Cr51_reaclib(rate_eval, tfactors); + } + + { + // Cr52_n_to_Cr53_reaclib + reaclib_rates::rate_Cr52_n_to_Cr53_reaclib(rate_eval, tfactors); + } + + { + // Cr53_to_n_Cr52_reaclib + reaclib_rates::rate_Cr53_to_n_Cr52_reaclib(rate_eval, tfactors); + } + + { + // Cr53_n_to_Cr54_reaclib + reaclib_rates::rate_Cr53_n_to_Cr54_reaclib(rate_eval, tfactors); + } + + { + // Cr54_to_n_Cr53_reaclib + reaclib_rates::rate_Cr54_to_n_Cr53_reaclib(rate_eval, tfactors); + } + + { + // V47_n_to_V48_reaclib + reaclib_rates::rate_V47_n_to_V48_reaclib(rate_eval, tfactors); + } + + { + // V48_to_n_V47_reaclib + reaclib_rates::rate_V48_to_n_V47_reaclib(rate_eval, tfactors); + } + + { + // V48_n_to_V49_reaclib + reaclib_rates::rate_V48_n_to_V49_reaclib(rate_eval, tfactors); + } + + { + // V49_to_n_V48_reaclib + reaclib_rates::rate_V49_to_n_V48_reaclib(rate_eval, tfactors); + } + + { + // V49_n_to_V50_reaclib + reaclib_rates::rate_V49_n_to_V50_reaclib(rate_eval, tfactors); + } + + { + // V50_to_n_V49_reaclib + reaclib_rates::rate_V50_to_n_V49_reaclib(rate_eval, tfactors); + } + + { + // V50_n_to_V51_reaclib + reaclib_rates::rate_V50_n_to_V51_reaclib(rate_eval, tfactors); + } + + { + // V51_to_n_V50_reaclib + reaclib_rates::rate_V51_to_n_V50_reaclib(rate_eval, tfactors); + } + + { + // Ti44_n_to_Ti45_reaclib + reaclib_rates::rate_Ti44_n_to_Ti45_reaclib(rate_eval, tfactors); + } + + { + // Ti45_to_n_Ti44_reaclib + reaclib_rates::rate_Ti45_to_n_Ti44_reaclib(rate_eval, tfactors); + } + + { + // Ti45_n_to_Ti46_reaclib + reaclib_rates::rate_Ti45_n_to_Ti46_reaclib(rate_eval, tfactors); + } + + { + // Ti46_to_n_Ti45_reaclib + reaclib_rates::rate_Ti46_to_n_Ti45_reaclib(rate_eval, tfactors); + } + + { + // Ti46_n_to_Ti47_reaclib + reaclib_rates::rate_Ti46_n_to_Ti47_reaclib(rate_eval, tfactors); + } + + { + // Ti47_to_n_Ti46_reaclib + reaclib_rates::rate_Ti47_to_n_Ti46_reaclib(rate_eval, tfactors); + } + + { + // Ti47_n_to_Ti48_reaclib + reaclib_rates::rate_Ti47_n_to_Ti48_reaclib(rate_eval, tfactors); + } + + { + // Ti48_to_n_Ti47_reaclib + reaclib_rates::rate_Ti48_to_n_Ti47_reaclib(rate_eval, tfactors); + } + + { + // Sc41_n_to_Sc42_reaclib + reaclib_rates::rate_Sc41_n_to_Sc42_reaclib(rate_eval, tfactors); + } + + { + // Sc42_to_n_Sc41_reaclib + reaclib_rates::rate_Sc42_to_n_Sc41_reaclib(rate_eval, tfactors); + } + + { + // Sc42_n_to_Sc43_reaclib + reaclib_rates::rate_Sc42_n_to_Sc43_reaclib(rate_eval, tfactors); + } + + { + // Sc43_to_n_Sc42_reaclib + reaclib_rates::rate_Sc43_to_n_Sc42_reaclib(rate_eval, tfactors); + } + + { + // Sc43_n_to_Sc44_reaclib + reaclib_rates::rate_Sc43_n_to_Sc44_reaclib(rate_eval, tfactors); + } + + { + // Sc44_to_n_Sc43_reaclib + reaclib_rates::rate_Sc44_to_n_Sc43_reaclib(rate_eval, tfactors); + } + + { + // Sc44_n_to_Sc45_reaclib + reaclib_rates::rate_Sc44_n_to_Sc45_reaclib(rate_eval, tfactors); + } + + { + // Sc45_to_n_Sc44_reaclib + reaclib_rates::rate_Sc45_to_n_Sc44_reaclib(rate_eval, tfactors); + } + + { + // Ca40_n_to_Ca41_reaclib + reaclib_rates::rate_Ca40_n_to_Ca41_reaclib(rate_eval, tfactors); + } + + { + // Ca41_to_n_Ca40_reaclib + reaclib_rates::rate_Ca41_to_n_Ca40_reaclib(rate_eval, tfactors); + } + + { + // Ca41_n_to_Ca42_reaclib + reaclib_rates::rate_Ca41_n_to_Ca42_reaclib(rate_eval, tfactors); + } + + { + // Ca42_to_n_Ca41_reaclib + reaclib_rates::rate_Ca42_to_n_Ca41_reaclib(rate_eval, tfactors); + } + + { + // C12_C12_to_p_Na23_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_C12_C12); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_C12_C12); + } +#endif + reaclib_rates::rate_C12_C12_to_p_Na23_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Na23_p_to_C12_C12_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Na23); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Na23); + } +#endif + reaclib_rates::rate_Na23_p_to_C12_C12_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Na23_p_to_He4_Ne20_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Na23); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Na23); + } +#endif + reaclib_rates::rate_Na23_p_to_He4_Ne20_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Na23_p_to_Mg24_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_p_Na23); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_p_Na23); + } +#endif + reaclib_rates::rate_Na23_p_to_Mg24_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Mg24_to_p_Na23_reaclib + reaclib_rates::rate_Mg24_to_p_Na23_reaclib(rate_eval, tfactors); + } + + { + // C12_C12_to_He4_Ne20_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_C12_C12); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_C12_C12); + } +#endif + reaclib_rates::rate_C12_C12_to_He4_Ne20_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ne20_He4_to_C12_C12_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ne20); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ne20); + } +#endif + reaclib_rates::rate_Ne20_He4_to_C12_C12_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ne20_He4_to_p_Na23_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ne20); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ne20); + } +#endif + reaclib_rates::rate_Ne20_He4_to_p_Na23_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Ne20_He4_to_Mg24_reaclib + amrex::Real log_scor {0.0_rt}; + amrex::Real dlog_scor_dT {0.0_rt}; +#ifdef SCREENING + log_scor = rate_eval.log_screen(k_He4_Ne20); + if constexpr (std::is_same_v) { + dlog_scor_dT = rate_eval.dlog_screen_dT(k_He4_Ne20); + } +#endif + reaclib_rates::rate_Ne20_He4_to_Mg24_reaclib(rate_eval, tfactors, log_scor, dlog_scor_dT); + } + + { + // Mg24_to_He4_Ne20_reaclib + reaclib_rates::rate_Mg24_to_He4_Ne20_reaclib(rate_eval, tfactors); + } + + { + // Al27_to_Si27_beta_neg_weaktab + tabular_weak_rates::rate_Al27_to_Si27_beta_neg_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Si27_to_Al27_electron_capture_weaktab + tabular_weak_rates::rate_Si27_to_Al27_electron_capture_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // P29_to_Si29_electron_capture_weaktab + tabular_weak_rates::rate_P29_to_Si29_electron_capture_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Si29_to_P29_beta_neg_weaktab + tabular_weak_rates::rate_Si29_to_P29_beta_neg_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // P31_to_Si31_electron_capture_weaktab + tabular_weak_rates::rate_P31_to_Si31_electron_capture_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Si31_to_P31_beta_neg_weaktab + tabular_weak_rates::rate_Si31_to_P31_beta_neg_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Cl33_to_S33_electron_capture_weaktab + tabular_weak_rates::rate_Cl33_to_S33_electron_capture_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // P33_to_S33_beta_neg_weaktab + tabular_weak_rates::rate_P33_to_S33_beta_neg_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // S33_to_Cl33_beta_neg_weaktab + tabular_weak_rates::rate_S33_to_Cl33_beta_neg_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // S33_to_P33_electron_capture_weaktab + tabular_weak_rates::rate_S33_to_P33_electron_capture_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Cl35_to_S35_electron_capture_weaktab + tabular_weak_rates::rate_Cl35_to_S35_electron_capture_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // S35_to_Cl35_beta_neg_weaktab + tabular_weak_rates::rate_S35_to_Cl35_beta_neg_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Ar37_to_Cl37_electron_capture_weaktab + tabular_weak_rates::rate_Ar37_to_Cl37_electron_capture_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Ar37_to_K37_beta_neg_weaktab + tabular_weak_rates::rate_Ar37_to_K37_beta_neg_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Cl37_to_Ar37_beta_neg_weaktab + tabular_weak_rates::rate_Cl37_to_Ar37_beta_neg_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // K37_to_Ar37_electron_capture_weaktab + tabular_weak_rates::rate_K37_to_Ar37_electron_capture_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Co56_to_Fe56_electron_capture_weaktab + tabular_weak_rates::rate_Co56_to_Fe56_electron_capture_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Co56_to_Ni56_beta_neg_weaktab + tabular_weak_rates::rate_Co56_to_Ni56_beta_neg_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Fe56_to_Co56_beta_neg_weaktab + tabular_weak_rates::rate_Fe56_to_Co56_beta_neg_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Ni56_to_Co56_electron_capture_weaktab + tabular_weak_rates::rate_Ni56_to_Co56_electron_capture_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // n_to_p_beta_neg_weaktab + tabular_weak_rates::rate_n_to_p_beta_neg_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // p_to_n_electron_capture_weaktab + tabular_weak_rates::rate_p_to_n_electron_capture_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Ni56_n_n_to_Ni58_approx + approximate_rates::rate_Ni56_n_n_to_Ni58_approx(rate_eval, rho, Y); + } + + { + // Ni58_to_Ni56_n_n_approx + approximate_rates::rate_Ni58_to_Ni56_n_n_approx(rate_eval, rho, Y); + } + + { + // Ni58_n_n_to_Ni60_approx + approximate_rates::rate_Ni58_n_n_to_Ni60_approx(rate_eval, rho, Y); + } + + { + // Ni60_to_Ni58_n_n_approx + approximate_rates::rate_Ni60_to_Ni58_n_n_approx(rate_eval, rho, Y); + } + + { + // Co57_n_n_to_Co59_approx + approximate_rates::rate_Co57_n_n_to_Co59_approx(rate_eval, rho, Y); + } + + { + // Co59_to_Co57_n_n_approx + approximate_rates::rate_Co59_to_Co57_n_n_approx(rate_eval, rho, Y); + } + + { + // Fe52_n_n_to_Fe54_approx + approximate_rates::rate_Fe52_n_n_to_Fe54_approx(rate_eval, rho, Y); + } + + { + // Fe54_to_Fe52_n_n_approx + approximate_rates::rate_Fe54_to_Fe52_n_n_approx(rate_eval, rho, Y); + } + + { + // Fe54_n_n_to_Fe56_approx + approximate_rates::rate_Fe54_n_n_to_Fe56_approx(rate_eval, rho, Y); + } + + { + // Fe56_to_Fe54_n_n_approx + approximate_rates::rate_Fe56_to_Fe54_n_n_approx(rate_eval, rho, Y); + } + + { + // Fe56_n_n_to_Fe58_approx + approximate_rates::rate_Fe56_n_n_to_Fe58_approx(rate_eval, rho, Y); + } + + { + // Fe58_to_Fe56_n_n_approx + approximate_rates::rate_Fe58_to_Fe56_n_n_approx(rate_eval, rho, Y); + } + + { + // Mn51_n_n_to_Mn53_approx + approximate_rates::rate_Mn51_n_n_to_Mn53_approx(rate_eval, rho, Y); + } + + { + // Mn53_to_Mn51_n_n_approx + approximate_rates::rate_Mn53_to_Mn51_n_n_approx(rate_eval, rho, Y); + } + + { + // Mn53_n_n_to_Mn55_approx + approximate_rates::rate_Mn53_n_n_to_Mn55_approx(rate_eval, rho, Y); + } + + { + // Mn55_to_Mn53_n_n_approx + approximate_rates::rate_Mn55_to_Mn53_n_n_approx(rate_eval, rho, Y); + } + + { + // Cr48_n_n_to_Cr50_approx + approximate_rates::rate_Cr48_n_n_to_Cr50_approx(rate_eval, rho, Y); + } + + { + // Cr50_to_Cr48_n_n_approx + approximate_rates::rate_Cr50_to_Cr48_n_n_approx(rate_eval, rho, Y); + } + + { + // Cr50_n_n_to_Cr52_approx + approximate_rates::rate_Cr50_n_n_to_Cr52_approx(rate_eval, rho, Y); + } + + { + // Cr52_to_Cr50_n_n_approx + approximate_rates::rate_Cr52_to_Cr50_n_n_approx(rate_eval, rho, Y); + } + + { + // Cr52_n_n_to_Cr54_approx + approximate_rates::rate_Cr52_n_n_to_Cr54_approx(rate_eval, rho, Y); + } + + { + // Cr54_to_Cr52_n_n_approx + approximate_rates::rate_Cr54_to_Cr52_n_n_approx(rate_eval, rho, Y); + } + + { + // V47_n_n_to_V49_approx + approximate_rates::rate_V47_n_n_to_V49_approx(rate_eval, rho, Y); + } + + { + // V49_to_V47_n_n_approx + approximate_rates::rate_V49_to_V47_n_n_approx(rate_eval, rho, Y); + } + + { + // V49_n_n_to_V51_approx + approximate_rates::rate_V49_n_n_to_V51_approx(rate_eval, rho, Y); + } + + { + // V51_to_V49_n_n_approx + approximate_rates::rate_V51_to_V49_n_n_approx(rate_eval, rho, Y); + } + + { + // Ti44_n_n_to_Ti46_approx + approximate_rates::rate_Ti44_n_n_to_Ti46_approx(rate_eval, rho, Y); + } + + { + // Ti46_to_Ti44_n_n_approx + approximate_rates::rate_Ti46_to_Ti44_n_n_approx(rate_eval, rho, Y); + } + + { + // Ti46_n_n_to_Ti48_approx + approximate_rates::rate_Ti46_n_n_to_Ti48_approx(rate_eval, rho, Y); + } + + { + // Ti48_to_Ti46_n_n_approx + approximate_rates::rate_Ti48_to_Ti46_n_n_approx(rate_eval, rho, Y); + } + + { + // Sc41_n_n_to_Sc43_approx + approximate_rates::rate_Sc41_n_n_to_Sc43_approx(rate_eval, rho, Y); + } + + { + // Sc43_to_Sc41_n_n_approx + approximate_rates::rate_Sc43_to_Sc41_n_n_approx(rate_eval, rho, Y); + } + + { + // Sc43_n_n_to_Sc45_approx + approximate_rates::rate_Sc43_n_n_to_Sc45_approx(rate_eval, rho, Y); + } + + { + // Sc45_to_Sc43_n_n_approx + approximate_rates::rate_Sc45_to_Sc43_n_n_approx(rate_eval, rho, Y); + } + + { + // Ca40_n_n_to_Ca42_approx + approximate_rates::rate_Ca40_n_n_to_Ca42_approx(rate_eval, rho, Y); + } + + { + // Ca42_to_Ca40_n_n_approx + approximate_rates::rate_Ca42_to_Ca40_n_n_approx(rate_eval, rho, Y); + } + + { + // C12_C12_to_Mg24_approx + approximate_rates::rate_C12_C12_to_Mg24_approx(rate_eval); + } + + { + // Mg24_to_C12_C12_approx + approximate_rates::rate_Mg24_to_C12_C12_approx(rate_eval); + } + + { + // C12_C12_to_Ne20_He4_approx + approximate_rates::rate_C12_C12_to_Ne20_He4_approx(rate_eval); + } + + { + // Ne20_He4_to_C12_C12_approx + approximate_rates::rate_Ne20_He4_to_C12_C12_approx(rate_eval); + } + + { + // Ne20_He4_to_Mg24_approx + approximate_rates::rate_Ne20_He4_to_Mg24_approx(rate_eval); + } + + { + // Mg24_to_Ne20_He4_approx + approximate_rates::rate_Mg24_to_Ne20_He4_approx(rate_eval); + } + + + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void + fill_weak_rates([[maybe_unused]] const tf_t& tfactors, + [[maybe_unused]] const amrex::Real temp, + [[maybe_unused]] const amrex::Real rho, + [[maybe_unused]] const amrex::Real rhoy, + [[maybe_unused]] const amrex::Array1D& Y, + [[maybe_unused]] T& rate_eval) + { + + [[maybe_unused]] amrex::Real rate{}; + [[maybe_unused]] amrex::Real drate_dT{}; + + [[maybe_unused]] const amrex::Real log_temp = std::log10(temp); + [[maybe_unused]] const amrex::Real log_rhoy = std::log10(rhoy); + + // we are not doing derivatives + static_assert(std::is_same_v); + + rate_eval.enuc_weak = 0.0_rt; + + // rates are filled in a topologically-sorted order + + { + // Al27_to_Si27_beta_neg_weaktab + tabular_weak_rates::rate_Al27_to_Si27_beta_neg_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Si27_to_Al27_electron_capture_weaktab + tabular_weak_rates::rate_Si27_to_Al27_electron_capture_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // P29_to_Si29_electron_capture_weaktab + tabular_weak_rates::rate_P29_to_Si29_electron_capture_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Si29_to_P29_beta_neg_weaktab + tabular_weak_rates::rate_Si29_to_P29_beta_neg_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // P31_to_Si31_electron_capture_weaktab + tabular_weak_rates::rate_P31_to_Si31_electron_capture_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Si31_to_P31_beta_neg_weaktab + tabular_weak_rates::rate_Si31_to_P31_beta_neg_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Cl33_to_S33_electron_capture_weaktab + tabular_weak_rates::rate_Cl33_to_S33_electron_capture_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // P33_to_S33_beta_neg_weaktab + tabular_weak_rates::rate_P33_to_S33_beta_neg_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // S33_to_Cl33_beta_neg_weaktab + tabular_weak_rates::rate_S33_to_Cl33_beta_neg_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // S33_to_P33_electron_capture_weaktab + tabular_weak_rates::rate_S33_to_P33_electron_capture_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Cl35_to_S35_electron_capture_weaktab + tabular_weak_rates::rate_Cl35_to_S35_electron_capture_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // S35_to_Cl35_beta_neg_weaktab + tabular_weak_rates::rate_S35_to_Cl35_beta_neg_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Ar37_to_Cl37_electron_capture_weaktab + tabular_weak_rates::rate_Ar37_to_Cl37_electron_capture_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Ar37_to_K37_beta_neg_weaktab + tabular_weak_rates::rate_Ar37_to_K37_beta_neg_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Cl37_to_Ar37_beta_neg_weaktab + tabular_weak_rates::rate_Cl37_to_Ar37_beta_neg_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // K37_to_Ar37_electron_capture_weaktab + tabular_weak_rates::rate_K37_to_Ar37_electron_capture_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Co56_to_Fe56_electron_capture_weaktab + tabular_weak_rates::rate_Co56_to_Fe56_electron_capture_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Co56_to_Ni56_beta_neg_weaktab + tabular_weak_rates::rate_Co56_to_Ni56_beta_neg_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Fe56_to_Co56_beta_neg_weaktab + tabular_weak_rates::rate_Fe56_to_Co56_beta_neg_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // Ni56_to_Co56_electron_capture_weaktab + tabular_weak_rates::rate_Ni56_to_Co56_electron_capture_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // n_to_p_beta_neg_weaktab + tabular_weak_rates::rate_n_to_p_beta_neg_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + { + // p_to_n_electron_capture_weaktab + tabular_weak_rates::rate_p_to_n_electron_capture_weaktab(rate_eval, temp, log_temp, rho, rhoy, log_rhoy, Y); + } + + + } + +} + +#endif diff --git a/networks/massive-star-medium/interp_tools.H b/networks/massive-star-medium/interp_tools.H new file mode 100644 index 0000000000..e35235bfe1 --- /dev/null +++ b/networks/massive-star-medium/interp_tools.H @@ -0,0 +1,222 @@ +#ifndef INTERP_TOOLS_H +#define INTERP_TOOLS_H + +#include + +using namespace amrex::literals; + +namespace interp_net { + + // index locator + // return the index i such that x_array[i] <= x0 < x_array[i+1] + + template + AMREX_GPU_HOST_DEVICE AMREX_INLINE + int + find_index(const amrex::Real x0, const T& x_array) { + + int left = x_array.lo(); + int right = x_array.hi(); + + int idx = -1; + + if (x0 >= x_array(left) && x0 < x_array(right)) { + + // find the largest x element <= x0 using a + // binary search + + while (left < right) { + int mid = (left + right) / 2; + if (x_array(mid) > x0) { + right = mid; + } else { + left = mid + 1; + } + } + + idx = right - 1; + } + + return idx; + } + + // an index locator that extrapolates at the boundaries instead + // of returning -1 + + template + AMREX_GPU_HOST_DEVICE AMREX_INLINE + int + find_index_extrap(const amrex::Real x0, const T& x_array) { + + int left = x_array.lo(); + int right = x_array.hi(); + + int idx; + + if (x0 < x_array(left)) { + idx = left; + } else if (x0 >= x_array(right)) { + idx = right - 1; + } else { + idx = find_index(x0, x_array); + } + + return idx; + } + + template + AMREX_GPU_HOST_DEVICE AMREX_INLINE + std::pair + linear_extrap(const amrex::Real xv, const int idx0, const int idx1, + const T& x_array, const T& f_array) { + + const auto x0 = x_array(idx0); + const auto x1 = x_array(idx1); + + const auto f0 = f_array(idx0); + const auto f1 = f_array(idx1); + + const amrex::Real slope = (f1 - f0) / (x1 - x0); + const amrex::Real f = f0 + slope * (xv - x0); + + amrex::Real dfdx {0.0_rt}; + if constexpr (do_derivative) { + dfdx = slope; + } + + return {f, dfdx}; + } + + AMREX_GPU_HOST_DEVICE AMREX_INLINE + amrex::Real + limit_slope(const amrex::Real hm, const amrex::Real hp, + const amrex::Real dm, const amrex::Real dp) { + // Slope Limiter to preserve monotonicity + // See C. Moler, Numerical Computing with Matlab, 2004. + // :doi:`10.1137/1.9780898717952`, Chapter 3.4 + + if (dm * dp <= 0.0_rt) { + return 0.0_rt; + } + + const amrex::Real w1 = 2.0_rt * hp + hm; + const amrex::Real w2 = hp + 2.0_rt * hm; + return (w1 + w2) / (w1 / dm + w2 / dp); + } + + // Monotone cubic Hermite interpolation + // Uses Hermite polynomials as basis to construct the cubic interpolant + // + // H(x) = f0 H_{1,0}(x) + f1 H_{1,1}(x) + f'0 Ĥ_{1,0}(x) + f'1 Ĥ_{1,0}(x) + // + // The slope f' is limited to preserve monotonicity. + // Also use simple one-sided slope for edge cases + // this version works for unevenly spaced data points + // it will return f and f' at x = xv + // + // See C. Moler, Numerical Computing with Matlab, 2004. + // :doi:`10.1137/1.9780898717952`, Chapter 3.4 and 3.6 + + template + AMREX_GPU_HOST_DEVICE AMREX_INLINE + std::pair + monotone_cubic_interp(const amrex::Real xv, const int idx, + const T& x_array, const T& f_array) { + + const int ilo = x_array.lo(); + const int ihi = x_array.hi(); + + // Clamp index within table boundary + // Note idx should already be clamped within [ilo, ihi-1] + AMREX_ASSERT(idx >= ilo && idx < ihi); + + const int im1 = amrex::max(idx - 1, ilo); + const int ip1 = idx + 1; + const int ip2 = amrex::min(idx + 2, ihi); + + const auto x_im1 = x_array(im1); + const auto x_idx = x_array(idx); + const auto x_ip1 = x_array(ip1); + const auto x_ip2 = x_array(ip2); + + const auto f_im1 = f_array(im1); + const auto f_idx = f_array(idx); + const auto f_ip1 = f_array(ip1); + const auto f_ip2 = f_array(ip2); + + // the main interval we are working with + const amrex::Real h = x_ip1 - x_idx; + const amrex::Real h_inv = 1.0_rt / h; + + // Compute the slope at i0 and i0 + 1 + amrex::Real m0, m1; + m1 = m0 = (f_ip1 - f_idx) * h_inv; + + // If NOT on the edge, compute the slope from the other side + // and limit the slope to preserve monotonicity + if (idx != ilo) { + amrex::Real d_im1 = (f_idx - f_im1) / (x_idx - x_im1); + m0 = limit_slope(x_idx - x_im1, x_ip1 - x_idx, d_im1, m0); + } + + if (ip1 != ihi) { + amrex::Real d_ip1 = (f_ip2 - f_ip1) / (x_ip2 - x_ip1); + m1 = limit_slope(x_ip1 - x_idx, x_ip2 - x_ip1, m1, d_ip1); + } + + // Compute cubic Hermite polynomial basis + const amrex::Real t = (xv - x_idx) * h_inv; + const amrex::Real t2 = t * t; + const amrex::Real t3 = t2 * t; + + const amrex::Real H1 = -2.0_rt * t3 + 3.0_rt * t2; + const amrex::Real H0 = -H1 + 1.0_rt; + const amrex::Real Hhat1 = h * (t3 - t2); + const amrex::Real Hhat0 = h * (t3 - 2.0_rt * t2 + t); + + // Construct the interpolant + // H_3(x) = f0 H_{1,0}(x) + f1 H_{1,1}(x) + f'0 Ĥ_{1,0}(x) + f'1 Ĥ_{1,0}(x) + + const amrex::Real fv = f_idx * H0 + f_ip1 * H1 + m0 * Hhat0 + m1 * Hhat1; + + // Compute the derivative if necessary + amrex::Real dfdx {0.0_rt}; + if constexpr (do_derivative) { + const amrex::Real dH1dx = -6.0_rt * (t2 - t) * h_inv; + const amrex::Real dH0dx = -dH1dx; + const amrex::Real dHhat1dx = 3.0_rt * t2 - 2.0_rt * t; + const amrex::Real dHhat0dx = 3.0_rt * t2 - 4.0_rt * t + 1.0_rt; + dfdx = f_idx * dH0dx + f_ip1 * dH1dx + m0 * dHhat0dx + m1 * dHhat1dx; + } + + return {fv, dfdx}; + } + + template + AMREX_GPU_HOST_DEVICE AMREX_INLINE + std::pair + monotone_1d_interp(const amrex::Real xv, const T& x_array, const T& f_array) { + // Main driver for interpolating and extrapolating 1D table data. + // Uses monotone Hermite cubic interpolation and linear extrapolation + // to preserve monotonicity. + + // find the index such that x_array[idx] <= xv < x_array[idx+1] + // We already ensure that ilo <= i <= ihi - 1 + const int idx = interp_net::find_index_extrap(xv, x_array); + + const int ilo = x_array.lo(); + const int ihi = x_array.hi(); + + if (xv < x_array(ilo)) { + return linear_extrap(xv, ilo, ilo+1, x_array, f_array); + } + + if (xv > x_array(ihi)){ + return linear_extrap(xv, ihi, ihi-1, x_array, f_array); + } + + return monotone_cubic_interp(xv, idx, x_array, f_array); + } + +} +#endif diff --git a/networks/massive-star-medium/massive-star-medium.png b/networks/massive-star-medium/massive-star-medium.png new file mode 100644 index 0000000000..ca4999eebc Binary files /dev/null and b/networks/massive-star-medium/massive-star-medium.png differ diff --git a/networks/massive-star-medium/massive_star_medium.py b/networks/massive-star-medium/massive_star_medium.py new file mode 100644 index 0000000000..289f8b009e --- /dev/null +++ b/networks/massive-star-medium/massive_star_medium.py @@ -0,0 +1,53 @@ +import pynucastro as pyna + + +def create_network(network_type="amrex"): + + nuc = ["n", "h1", "he4", "c12", "o16", + "ne20", "na23", "mg23-24", "al27", + "si27-31", "p29,31,33", "s32-35", "cl33,35,37", + "ar36-38", "k37,39", "ca40-42", "sc41-45", + "ti44-48", "v47-51", "cr48-54", "mn51-55", + "fe52-58", "co55-59", "ni56-60", "cu59", "zn60"] + + net = pyna.network_helper(nuc, network_type=network_type, tabular_ordering=["ffn", "oda", "pruet_fuller", "langanke"], + use_detailed_balance=False) + + intermediate_n_nuc = ["ni57", "ni59", "co58", "fe53", "fe55", + "fe57", "mn52", "mn54", "cr49", "cr51", + "cr53", "v48", "v50", "ti45", "ti47", + "sc42", "sc44", "ca41"] + + net.make_nn_g_approx(intermediate_nuclei=intermediate_n_nuc) + net.remove_nuclei(intermediate_n_nuc) + + net.make_CO_burning_approx("C") + net.remove_nuclei(["na23"]) + + return net + + +def doit(): + + net = create_network() + + net.summary() + + nuclei_list = net.unique_nuclei + print("[", end="") + for n in nuclei_list: + print(f'"{n}", ', end="") + print("]") + + fig = net.plot(rotated=True, size=(1300, 700), + node_size=500, node_font_size="9", + legend_coord=(4, 3), + highlight_filter_function=lambda r: isinstance(r, pyna.rates.TabularWeakRate)) + + fig.savefig("massive-star-medium.png") + + net.write_network() + + +if __name__ == "__main__": + doit() diff --git a/networks/massive-star-medium/modified_rates.H b/networks/massive-star-medium/modified_rates.H new file mode 100644 index 0000000000..bf166879d7 --- /dev/null +++ b/networks/massive-star-medium/modified_rates.H @@ -0,0 +1,24 @@ +#ifndef MODIFIED_RATES_H +#define MODIFIED_RATES_H + +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace modified_rates { + + using namespace Rates; + + using namespace reaclib_rates; + using namespace temp_tabular; + using namespace beta_limited_rates; + + +} +#endif diff --git a/networks/massive-star-medium/partition_functions.H b/networks/massive-star-medium/partition_functions.H new file mode 100644 index 0000000000..4cc2be9ae5 --- /dev/null +++ b/networks/massive-star-medium/partition_functions.H @@ -0,0 +1,258 @@ +#ifndef PARTITION_FUNCTIONS_H +#define PARTITION_FUNCTIONS_H + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +using namespace amrex::literals; +using namespace Species; + +namespace part_fun { + + + // interpolation routine + + template + AMREX_GPU_DEVICE AMREX_INLINE + void interpolate_pf(const amrex::Real t9, int idx, + const T& temp_array, const T& pf_array, + amrex::Real& logpf, amrex::Real& dlogpf_dT9) { + + // if the index is -1, we are either outside of the bounds or + // we never computed it. try recomputing here + if (idx == -1) { + idx = interp_net::find_index(t9, temp_array); + } + + // if the index is still -1, then we are out-of-bounds, so + // just skip the interpolation + + if (idx != -1) { + + // we have idx such that: + // temp_array[idx] <= t9 < temp_array[idx+1] + AMREX_ASSERT(t9 >= temp_array(idx) && t9 < temp_array(idx+1)); + + // find the derivative: dlog(pf)/dT9 -- this is + // (log(pf_{i+1}) - log(pf_i)) / (T_{i+1} - T_i) + + dlogpf_dT9 = (pf_array(idx+1) - pf_array(idx)) / + (temp_array(idx+1) - temp_array(idx)); + + // find log(PF) + + logpf = pf_array(idx) + dlogpf_dT9 * (t9 - temp_array(idx)); + + } else { + + // T < the smallest T or >= the largest T in the partition function table + logpf = 0.0; + dlogpf_dT9 = 0.0; + + } + + } + + struct pf_cache_t { + // Store the coefficient and derivative adjacent in memory, as they're + // always accessed at the same time. + amrex::Array2D data; + AMREX_GPU_DEVICE AMREX_INLINE + pf_cache_t() { + // The entries will be default-initialized to -900, + // log(partition_function) should never be -900. + for (int i = 1; i <= NumSpecTotal; ++i) { + data(i, 1) = -900.0_rt; + data(i, 2) = -900.0_rt; + } + } + }; + +} + +// get the partition function for nucleus inuc. Here pf_cache +// should already contain the index into the temp / pf arrays + +AMREX_GPU_DEVICE AMREX_INLINE +void get_partition_function(const int inuc, + [[maybe_unused]] const amrex::Real T9, + const part_fun::pf_cache_t& pf_cache, + amrex::Real& logpf, amrex::Real& dlogpf_dT9) { + + logpf = 0.0_rt; + dlogpf_dT9 = 0.0_rt; + + // inuc is the 1-based index for the species + + switch (inuc) { + + + default: + + logpf = 0.0_rt; + dlogpf_dT9 = 0.0_rt; + + } + +} + + +// a version of get_partition_function where we have not cached the +// index into the arrays. Uses tfactors instead of T9 as argument, +// and returns pf and dpf_dT instead of logpf and dlogpf_dT9 + +AMREX_GPU_DEVICE AMREX_INLINE +void get_partition_function(const int inuc, + [[maybe_unused]] const tf_t& tfactors, + amrex::Real& pf, amrex::Real& dpf_dT) { + + // create a dummy cache. This will initialize the indices + // to -1 and we will force a search for the correct index + // when we do the interpolation. + + part_fun::pf_cache_t pf_cache; + + amrex::Real logpf, dlogpf_dT9; + get_partition_function(inuc, tfactors.T9, pf_cache, logpf, dlogpf_dT9); + + // Convert logpf to pf and dlogpf_dT9 to dpf_dT + pf = std::exp(logpf); + dpf_dT = pf * dlogpf_dT9 * 1.e-9_rt; +} + + +AMREX_GPU_DEVICE AMREX_INLINE +void get_partition_function_cached(const int inuc, const amrex::Real T9, + part_fun::pf_cache_t& pf_cache, + amrex::Real& logpf, amrex::Real& dlogpf_dT9) { + if (pf_cache.data(inuc, 1) != -900.0_rt) { + // present in cache + amrex::ignore_unused(T9); + logpf = pf_cache.data(inuc, 1); + dlogpf_dT9 = pf_cache.data(inuc, 2); + } else { + get_partition_function(inuc, T9, pf_cache, logpf, dlogpf_dT9); + pf_cache.data(inuc, 1) = logpf; + pf_cache.data(inuc, 2) = dlogpf_dT9; + } +} + + +template +AMREX_GPU_DEVICE AMREX_INLINE +constexpr amrex::Real get_spin_state() { + + static_assert(spec >= 1 && spec <= NumSpec); + + // Set the spin states (2J + 1) of the element + + if constexpr ( + spec == He4 || spec == C12 || spec == O16 || + spec == Ne20 || spec == Mg24 || spec == Si28 || + spec == Si30 || spec == S32 || spec == S34 || + spec == Ar36 || spec == Ar38 || spec == Ca40 || + spec == Ca42 || spec == Ti44 || spec == Ti46 || + spec == Ti48 || spec == Cr48 || spec == Cr50 || + spec == Cr52 || spec == Cr54 || spec == Fe52 || + spec == Fe54 || spec == Fe56 || spec == Fe58 || + spec == Ni56 || spec == Ni58 || spec == Ni60 || + spec == Zn60 || spec == Sc42 + ) + { + return 1.0_rt; + } + else if constexpr ( + spec == N || spec == H1 || spec == Si29 || + spec == P29 || spec == P31 || spec == P33 || + spec == Fe57 + ) + { + return 2.0_rt; + } + else if constexpr ( + spec == Mg23 || spec == Si31 || spec == S33 || + spec == S35 || spec == Cl33 || spec == Cl35 || + spec == Cl37 || spec == Ar37 || spec == K37 || + spec == K39 || spec == V47 || spec == Cu59 || + spec == Ni57 || spec == Ni59 || spec == Fe55 || + spec == Cr53 || spec == Na23 + ) + { + return 4.0_rt; + } + else if constexpr ( + spec == Co58 || spec == Sc44 + ) + { + return 5.0_rt; + } + else if constexpr ( + spec == Al27 || spec == Si27 || spec == Mn51 || + spec == Mn55 || spec == Cr49 || spec == Ti47 + ) + { + return 6.0_rt; + } + else if constexpr ( + spec == Mn54 + ) + { + return 7.0_rt; + } + else if constexpr ( + spec == Sc41 || spec == Sc43 || spec == Sc45 || + spec == V49 || spec == V51 || spec == Mn53 || + spec == Co55 || spec == Co57 || spec == Co59 || + spec == Fe53 || spec == Cr51 || spec == Ti45 || + spec == Ca41 + ) + { + return 8.0_rt; + } + else if constexpr ( + spec == Co56 || spec == V48 + ) + { + return 9.0_rt; + } + else if constexpr ( + spec == Mn52 || spec == V50 + ) + { + return 13.0_rt; + } + + // Return -1 if we don't recognize the species. + return -1.0_rt; +} + + +// Legacy (non-templated) interface + +AMREX_GPU_DEVICE AMREX_INLINE +amrex::Real get_spin_state (int spec) { + + amrex::Real s = -1.0_rt; + + // Set the spin states (2J + 1) of the element + + amrex::constexpr_for<1, NumSpec+1>([&] (auto n) { + if (n == spec) { + s = get_spin_state(); + } + }); + + return s; +} + + +#endif diff --git a/networks/massive-star-medium/pynucastro-info.txt b/networks/massive-star-medium/pynucastro-info.txt new file mode 100644 index 0000000000..f6741a44d8 --- /dev/null +++ b/networks/massive-star-medium/pynucastro-info.txt @@ -0,0 +1 @@ +pynucastro version: 3.2.0.post3+g8d7dc1e4e.d20261104 diff --git a/networks/massive-star-medium/pynucastro.net b/networks/massive-star-medium/pynucastro.net new file mode 100644 index 0000000000..a49f72b856 --- /dev/null +++ b/networks/massive-star-medium/pynucastro.net @@ -0,0 +1,79 @@ +neutron n 1.0 0.0 +hydrogen-1 H1 1.0 1.0 +helium-4 He4 4.0 2.0 +carbon-12 C12 12.0 6.0 +oxygen-16 O16 16.0 8.0 +neon-20 Ne20 20.0 10.0 +magnesium-23 Mg23 23.0 12.0 +magnesium-24 Mg24 24.0 12.0 +aluminum-27 Al27 27.0 13.0 +silicon-27 Si27 27.0 14.0 +silicon-28 Si28 28.0 14.0 +silicon-29 Si29 29.0 14.0 +silicon-30 Si30 30.0 14.0 +silicon-31 Si31 31.0 14.0 +phosphorus-29 P29 29.0 15.0 +phosphorus-31 P31 31.0 15.0 +phosphorus-33 P33 33.0 15.0 +sulfur-32 S32 32.0 16.0 +sulfur-33 S33 33.0 16.0 +sulfur-34 S34 34.0 16.0 +sulfur-35 S35 35.0 16.0 +chlorine-33 Cl33 33.0 17.0 +chlorine-35 Cl35 35.0 17.0 +chlorine-37 Cl37 37.0 17.0 +argon-36 Ar36 36.0 18.0 +argon-37 Ar37 37.0 18.0 +argon-38 Ar38 38.0 18.0 +potassium-37 K37 37.0 19.0 +potassium-39 K39 39.0 19.0 +calcium-40 Ca40 40.0 20.0 +calcium-42 Ca42 42.0 20.0 +scandium-41 Sc41 41.0 21.0 +scandium-43 Sc43 43.0 21.0 +scandium-45 Sc45 45.0 21.0 +titanium-44 Ti44 44.0 22.0 +titanium-46 Ti46 46.0 22.0 +titanium-48 Ti48 48.0 22.0 +vanadium-47 V47 47.0 23.0 +vanadium-49 V49 49.0 23.0 +vanadium-51 V51 51.0 23.0 +chromium-48 Cr48 48.0 24.0 +chromium-50 Cr50 50.0 24.0 +chromium-52 Cr52 52.0 24.0 +chromium-54 Cr54 54.0 24.0 +manganese-51 Mn51 51.0 25.0 +manganese-53 Mn53 53.0 25.0 +manganese-55 Mn55 55.0 25.0 +iron-52 Fe52 52.0 26.0 +iron-54 Fe54 54.0 26.0 +iron-56 Fe56 56.0 26.0 +iron-58 Fe58 58.0 26.0 +cobalt-55 Co55 55.0 27.0 +cobalt-56 Co56 56.0 27.0 +cobalt-57 Co57 57.0 27.0 +cobalt-59 Co59 59.0 27.0 +nickel-56 Ni56 56.0 28.0 +nickel-58 Ni58 58.0 28.0 +nickel-60 Ni60 60.0 28.0 +copper-59 Cu59 59.0 29.0 +zinc-60 Zn60 60.0 30.0 +__extra_nickel-57 Ni57 57.0 28.0 +__extra_nickel-59 Ni59 59.0 28.0 +__extra_cobalt-58 Co58 58.0 27.0 +__extra_iron-53 Fe53 53.0 26.0 +__extra_iron-55 Fe55 55.0 26.0 +__extra_iron-57 Fe57 57.0 26.0 +__extra_manganese-52 Mn52 52.0 25.0 +__extra_manganese-54 Mn54 54.0 25.0 +__extra_chromium-49 Cr49 49.0 24.0 +__extra_chromium-51 Cr51 51.0 24.0 +__extra_chromium-53 Cr53 53.0 24.0 +__extra_vanadium-48 V48 48.0 23.0 +__extra_vanadium-50 V50 50.0 23.0 +__extra_titanium-45 Ti45 45.0 22.0 +__extra_titanium-47 Ti47 47.0 22.0 +__extra_scandium-42 Sc42 42.0 21.0 +__extra_scandium-44 Sc44 44.0 21.0 +__extra_calcium-41 Ca41 41.0 20.0 +__extra_sodium-23 Na23 23.0 11.0 diff --git a/networks/massive-star-medium/rate_type.H b/networks/massive-star-medium/rate_type.H new file mode 100644 index 0000000000..c7aaaea054 --- /dev/null +++ b/networks/massive-star-medium/rate_type.H @@ -0,0 +1,65 @@ +#ifndef NET_RATE_TYPE_H +#define NET_RATE_TYPE_H + +#include + +struct rate_t { + amrex::Array1D screened_rates; +#ifdef SCREENING + amrex::Array1D log_screen; +#endif + amrex::Real enuc_weak; +}; + +struct rate_derivs_t { + amrex::Array1D screened_rates; + amrex::Array1D dscreened_rates_dT; +#ifdef SCREENING + amrex::Array1D log_screen; + amrex::Array1D dlog_screen_dT; +#endif + amrex::Array1D dweak_ydot_dYe; + amrex::Real enuc_weak; + amrex::Array1D denuc_weak_dY; + amrex::Real denuc_weak_dT; + amrex::Real denuc_weak_dYe; + amrex::Real drate_Ni56_n_n_to_Ni58_approx_dYN{}; + amrex::Real drate_Ni58_to_Ni56_n_n_approx_dYN{}; + amrex::Real drate_Ni58_n_n_to_Ni60_approx_dYN{}; + amrex::Real drate_Ni60_to_Ni58_n_n_approx_dYN{}; + amrex::Real drate_Co57_n_n_to_Co59_approx_dYN{}; + amrex::Real drate_Co59_to_Co57_n_n_approx_dYN{}; + amrex::Real drate_Fe52_n_n_to_Fe54_approx_dYN{}; + amrex::Real drate_Fe54_to_Fe52_n_n_approx_dYN{}; + amrex::Real drate_Fe54_n_n_to_Fe56_approx_dYN{}; + amrex::Real drate_Fe56_to_Fe54_n_n_approx_dYN{}; + amrex::Real drate_Fe56_n_n_to_Fe58_approx_dYN{}; + amrex::Real drate_Fe58_to_Fe56_n_n_approx_dYN{}; + amrex::Real drate_Mn51_n_n_to_Mn53_approx_dYN{}; + amrex::Real drate_Mn53_to_Mn51_n_n_approx_dYN{}; + amrex::Real drate_Mn53_n_n_to_Mn55_approx_dYN{}; + amrex::Real drate_Mn55_to_Mn53_n_n_approx_dYN{}; + amrex::Real drate_Cr48_n_n_to_Cr50_approx_dYN{}; + amrex::Real drate_Cr50_to_Cr48_n_n_approx_dYN{}; + amrex::Real drate_Cr50_n_n_to_Cr52_approx_dYN{}; + amrex::Real drate_Cr52_to_Cr50_n_n_approx_dYN{}; + amrex::Real drate_Cr52_n_n_to_Cr54_approx_dYN{}; + amrex::Real drate_Cr54_to_Cr52_n_n_approx_dYN{}; + amrex::Real drate_V47_n_n_to_V49_approx_dYN{}; + amrex::Real drate_V49_to_V47_n_n_approx_dYN{}; + amrex::Real drate_V49_n_n_to_V51_approx_dYN{}; + amrex::Real drate_V51_to_V49_n_n_approx_dYN{}; + amrex::Real drate_Ti44_n_n_to_Ti46_approx_dYN{}; + amrex::Real drate_Ti46_to_Ti44_n_n_approx_dYN{}; + amrex::Real drate_Ti46_n_n_to_Ti48_approx_dYN{}; + amrex::Real drate_Ti48_to_Ti46_n_n_approx_dYN{}; + amrex::Real drate_Sc41_n_n_to_Sc43_approx_dYN{}; + amrex::Real drate_Sc43_to_Sc41_n_n_approx_dYN{}; + amrex::Real drate_Sc43_n_n_to_Sc45_approx_dYN{}; + amrex::Real drate_Sc45_to_Sc43_n_n_approx_dYN{}; + amrex::Real drate_Ca40_n_n_to_Ca42_approx_dYN{}; + amrex::Real drate_Ca42_to_Ca40_n_n_approx_dYN{}; +}; + + +#endif \ No newline at end of file diff --git a/networks/massive-star-medium/reaclib_rates.H b/networks/massive-star-medium/reaclib_rates.H new file mode 100644 index 0000000000..8aff519d18 --- /dev/null +++ b/networks/massive-star-medium/reaclib_rates.H @@ -0,0 +1,17567 @@ +#ifndef REACLIB_RATES_H +#define REACLIB_RATES_H + +#include +#include + +#include +#include +#include + + +namespace reaclib_rates { + + using namespace Rates; + using namespace Species; + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_O16_to_He4_C12_reaclib(T& rate_eval, const tf_t& tfactors) { + + // O16 --> He4 + C12 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // nac2 + ln_set_rate = 94.3131 + -84.503 * tfactors.T9i + 58.9128 * tfactors.T913i + -148.273 * tfactors.T913 + + 9.08324 * tfactors.T9 + -0.541041 * tfactors.T953 + 71.8554 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 84.503 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // nac2 + ln_set_rate = 279.295 + -84.9515 * tfactors.T9i + 103.411 * tfactors.T913i + -420.567 * tfactors.T913 + + 64.0874 * tfactors.T9 + -12.4624 * tfactors.T953 + 138.803 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 84.9515 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_O16_to_He4_C12_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_O16_to_He4_C12_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ne20_to_He4_O16_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ne20 --> He4 + O16 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // co10r + ln_set_rate = 28.6431 + -65.246 * tfactors.T9i; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 65.246 * tfactors.T9i * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // co10n + ln_set_rate = 48.6604 + -54.8875 * tfactors.T9i + -39.7262 * tfactors.T913i + -0.210799 * tfactors.T913 + + 0.442879 * tfactors.T9 + -0.0797753 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 54.8875 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // co10r + ln_set_rate = 34.2658 + -67.6518 * tfactors.T9i + -3.65925 * tfactors.T913 + + 0.714224 * tfactors.T9 + -0.00107508 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 67.6518 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -3.65925 * tfactors.T923i + + 0.714224 + (5.0/3.0) * -0.00107508 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ne20_to_He4_O16_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ne20_to_He4_O16_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mg24_to_n_Mg23_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Mg24 --> n + Mg23 + + amrex::Real rate{}, drate_dT{}; + 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 = 32.0344 + -191.835 * tfactors.T9i + 2.66964 * tfactors.T913 + + -0.448904 * tfactors.T9 + 0.0326505 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 191.835 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 2.66964 * tfactors.T923i + + -0.448904 + (5.0/3.0) * 0.0326505 * tfactors.T923 + 1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mg24_to_n_Mg23_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mg24_to_n_Mg23_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si27_to_He4_Mg23_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Si27 --> He4 + Mg23 + + amrex::Real rate{}, drate_dT{}; + 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 = 68.1469 + -108.333 * tfactors.T9i + -53.203 * tfactors.T913i + -4.6318 * tfactors.T913 + + -0.130951 * tfactors.T9 + 0.014691 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 108.333 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -53.203 * tfactors.T943i + (1.0/3.0) * -4.6318 * tfactors.T923i + + -0.130951 + (5.0/3.0) * 0.014691 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si27_to_He4_Mg23_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si27_to_He4_Mg23_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si28_to_n_Si27_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Si28 --> n + Si27 + + amrex::Real rate{}, drate_dT{}; + 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 = 34.5835 + -199.363 * tfactors.T9i + 0.559804 * tfactors.T913 + + -0.0233808 * tfactors.T9 + -0.00121313 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 199.363 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 0.559804 * tfactors.T923i + + -0.0233808 + (5.0/3.0) * -0.00121313 * tfactors.T923 + 1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si28_to_n_Si27_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si28_to_n_Si27_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si28_to_p_Al27_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Si28 --> p + Al27 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10n + ln_set_rate = 46.5494 + -134.445 * tfactors.T9i + -23.2205 * tfactors.T913i + + -2.0 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 134.445 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -23.2205 * tfactors.T943i + + (5.0/3.0) * -2.0 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = 111.466 + -134.832 * tfactors.T9i + -26.8327 * tfactors.T913i + -116.137 * tfactors.T913 + + 0.00950567 * tfactors.T9 + 0.00999755 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 134.832 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = 11.7765 + -136.349 * tfactors.T9i + 23.8634 * tfactors.T913 + + -3.70135 * tfactors.T9 + 0.28964 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 136.349 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 23.8634 * tfactors.T923i + + -3.70135 + (5.0/3.0) * 0.28964 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si28_to_p_Al27_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si28_to_p_Al27_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si28_to_He4_Mg24_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Si28 --> He4 + Mg24 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // st08r + ln_set_rate = 32.9006 + -131.488 * tfactors.T9i; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 131.488 * tfactors.T9i * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // st08r + ln_set_rate = -25.6886 + -128.693 * tfactors.T9i + 21.3721 * tfactors.T913i + 37.7649 * tfactors.T913 + + -4.10635 * tfactors.T9 + 0.249618 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 128.693 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si28_to_He4_Mg24_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si28_to_He4_Mg24_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si29_to_n_Si28_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Si29 --> n + Si28 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ka02 + ln_set_rate = 31.7355 + -98.3365 * tfactors.T9i + + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 98.3365 * tfactors.T9i * tfactors.T9i + + 1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // ka02r + ln_set_rate = 29.8758 + -98.7165 * tfactors.T9i + 7.68863 * tfactors.T913 + + -1.7991 * tfactors.T9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 98.7165 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 7.68863 * tfactors.T923i + + -1.7991; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si29_to_n_Si28_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si29_to_n_Si28_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si30_to_n_Si29_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Si30 --> n + Si29 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ka02n + ln_set_rate = 36.1504 + -123.112 * tfactors.T9i + 0.650904 * tfactors.T913 + + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 123.112 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 0.650904 * tfactors.T923i + + 1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // ka02r + ln_set_rate = 33.9492 + -123.292 * tfactors.T9i + 5.50678 * tfactors.T913 + + -2.85656 * tfactors.T9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 123.292 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 5.50678 * tfactors.T923i + + -2.85656; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si30_to_n_Si29_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si30_to_n_Si29_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si31_to_n_Si30_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Si31 --> n + Si30 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 13.0759 + -76.3737 * tfactors.T9i + -12.3502 * tfactors.T913i + 34.6486 * tfactors.T913 + + -1.89409 * tfactors.T9 + 0.0781979 * tfactors.T953 + -12.9601 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 76.3737 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -12.3502 * tfactors.T943i + (1.0/3.0) * 34.6486 * tfactors.T923i + + -1.89409 + (5.0/3.0) * 0.0781979 * tfactors.T923 + -12.9601 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si31_to_n_Si30_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si31_to_n_Si30_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_P29_to_p_Si28_reaclib(T& rate_eval, const tf_t& tfactors) { + + // P29 --> p + Si28 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10n + ln_set_rate = 39.1379 + -31.8984 * tfactors.T9i + -23.8173 * tfactors.T913i + 7.08203 * tfactors.T913 + + -1.44753 * tfactors.T9 + 0.0804296 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 31.8984 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -23.8173 * tfactors.T943i + (1.0/3.0) * 7.08203 * tfactors.T923i + + -1.44753 + (5.0/3.0) * 0.0804296 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = 28.6997 + -36.0408 * tfactors.T9i; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 36.0408 * tfactors.T9i * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_P29_to_p_Si28_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_P29_to_p_Si28_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_P31_to_p_Si30_reaclib(T& rate_eval, const tf_t& tfactors) { + + // P31 --> p + Si30 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // de20r + ln_set_rate = 18.7213 + -85.9282 * tfactors.T9i + + 6.49034 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 85.9282 * tfactors.T9i * tfactors.T9i + + 6.49034 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // de20r + ln_set_rate = 4.04359 + -85.6217 * tfactors.T9i + + 2.80331 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 85.6217 * tfactors.T9i * tfactors.T9i + + 2.80331 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // de20r + ln_set_rate = -1115.38 + -180.553 * tfactors.T9i + + -895.258 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 180.553 * tfactors.T9i * tfactors.T9i + + -895.258 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // de20r + ln_set_rate = 32.9288 + -90.2661 * tfactors.T9i + + -0.070816 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 90.2661 * tfactors.T9i * tfactors.T9i + + -0.070816 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // de20r + ln_set_rate = -11.8961 + -85.2694 * tfactors.T9i + + -0.128387 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 85.2694 * tfactors.T9i * tfactors.T9i + + -0.128387 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // de20r + ln_set_rate = 35.3329 + -91.3175 * tfactors.T9i + + 0.3809 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 91.3175 * tfactors.T9i * tfactors.T9i + + 0.3809 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // de20r + ln_set_rate = 31.761 + -89.8588 * tfactors.T9i + + 2.7883 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 89.8588 * tfactors.T9i * tfactors.T9i + + 2.7883 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // de20r + ln_set_rate = -311.303 + -85.8097 * tfactors.T9i + + -77.047 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 85.8097 * tfactors.T9i * tfactors.T9i + + -77.047 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_P31_to_p_Si30_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_P31_to_p_Si30_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_P31_to_He4_Al27_reaclib(T& rate_eval, const tf_t& tfactors) { + + // P31 --> He4 + Al27 + + amrex::Real rate{}, drate_dT{}; + 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 = 73.2168 + -112.206 * tfactors.T9i + -56.5351 * tfactors.T913i + -0.896208 * tfactors.T913 + + -1.72024 * tfactors.T9 + 0.185409 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 112.206 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -56.5351 * tfactors.T943i + (1.0/3.0) * -0.896208 * tfactors.T923i + + -1.72024 + (5.0/3.0) * 0.185409 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_P31_to_He4_Al27_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_P31_to_He4_Al27_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S32_to_p_P31_reaclib(T& rate_eval, const tf_t& tfactors) { + + // S32 --> p + P31 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10r + ln_set_rate = 25.1729 + -106.637 * tfactors.T9i + 8.09341 * tfactors.T913 + + -0.615971 * tfactors.T9 + 0.031159 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 106.637 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 8.09341 * tfactors.T923i + + -0.615971 + (5.0/3.0) * 0.031159 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = 21.6829 + -105.119 * tfactors.T9i; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 105.119 * tfactors.T9i * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10n + ln_set_rate = 43.6109 + -102.86 * tfactors.T9i + -25.3278 * tfactors.T913i + 6.4931 * tfactors.T913 + + -9.27513 * tfactors.T9 + -0.610439 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 102.86 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S32_to_p_P31_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S32_to_p_P31_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S32_to_He4_Si28_reaclib(T& rate_eval, const tf_t& tfactors) { + + // S32 --> He4 + Si28 + + amrex::Real rate{}, drate_dT{}; + 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 = 72.813 + -80.626 * tfactors.T9i + -59.4896 * tfactors.T913i + 4.47205 * tfactors.T913 + + -4.78989 * tfactors.T9 + 0.557201 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 80.626 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S32_to_He4_Si28_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S32_to_He4_Si28_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S33_to_n_S32_reaclib(T& rate_eval, const tf_t& tfactors) { + + // S33 --> n + S32 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 34.7199 + -100.079 * tfactors.T9i + -15.0178 * tfactors.T913i + 16.3567 * tfactors.T913 + + -0.436839 * tfactors.T9 + -0.00574462 * tfactors.T953 + -8.28034 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 100.079 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -15.0178 * tfactors.T943i + (1.0/3.0) * 16.3567 * tfactors.T923i + + -0.436839 + (5.0/3.0) * -0.00574462 * tfactors.T923 + -8.28034 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S33_to_n_S32_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S33_to_n_S32_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S33_to_He4_Si29_reaclib(T& rate_eval, const tf_t& tfactors) { + + // S33 --> He4 + Si29 + + amrex::Real rate{}, drate_dT{}; + 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 = 73.7708 + -82.576 * tfactors.T9i + -59.5755 * tfactors.T913i + 1.06274 * tfactors.T913 + + -3.07529 * tfactors.T9 + 0.372011 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 82.576 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -59.5755 * tfactors.T943i + (1.0/3.0) * 1.06274 * tfactors.T923i + + -3.07529 + (5.0/3.0) * 0.372011 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S33_to_He4_Si29_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S33_to_He4_Si29_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S34_to_n_S33_reaclib(T& rate_eval, const tf_t& tfactors) { + + // S34 --> n + S33 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 20.868 + -132.246 * tfactors.T9i + -23.1351 * tfactors.T913i + 43.3623 * tfactors.T913 + + -2.74733 * tfactors.T9 + 0.159045 * tfactors.T953 + -18.1332 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 132.246 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -23.1351 * tfactors.T943i + (1.0/3.0) * 43.3623 * tfactors.T923i + + -2.74733 + (5.0/3.0) * 0.159045 * tfactors.T923 + -18.1332 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S34_to_n_S33_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S34_to_n_S33_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S34_to_p_P33_reaclib(T& rate_eval, const tf_t& tfactors) { + + // S34 --> p + P33 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // rath + ln_set_rate = 198.208 + -130.135 * tfactors.T9i + 161.691 * tfactors.T913i + -350.015 * tfactors.T913 + + 24.3597 * tfactors.T9 + -1.56396 * tfactors.T953 + 151.463 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 130.135 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 161.691 * tfactors.T943i + (1.0/3.0) * -350.015 * tfactors.T923i + + 24.3597 + (5.0/3.0) * -1.56396 * tfactors.T923 + 151.463 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S34_to_p_P33_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S34_to_p_P33_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S34_to_He4_Si30_reaclib(T& rate_eval, const tf_t& tfactors) { + + // S34 --> He4 + Si30 + + amrex::Real rate{}, drate_dT{}; + 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 = 72.4051 + -91.9515 * tfactors.T9i + -59.6559 * tfactors.T913i + 3.70141 * tfactors.T913 + + -3.12537 * tfactors.T9 + 0.307626 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 91.9515 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -59.6559 * tfactors.T943i + (1.0/3.0) * 3.70141 * tfactors.T923i + + -3.12537 + (5.0/3.0) * 0.307626 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S34_to_He4_Si30_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S34_to_He4_Si30_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S35_to_n_S34_reaclib(T& rate_eval, const tf_t& tfactors) { + + // S35 --> n + S34 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 63.6891 + -81.2902 * tfactors.T9i + 25.2182 * tfactors.T913i + -59.2704 * tfactors.T913 + + 4.22256 * tfactors.T9 + -0.274247 * tfactors.T953 + 26.032 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 81.2902 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 25.2182 * tfactors.T943i + (1.0/3.0) * -59.2704 * tfactors.T923i + + 4.22256 + (5.0/3.0) * -0.274247 * tfactors.T923 + 26.032 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S35_to_n_S34_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S35_to_n_S34_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S35_to_He4_Si31_reaclib(T& rate_eval, const tf_t& tfactors) { + + // S35 --> He4 + Si31 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // rath + ln_set_rate = -48.3481 + -98.5134 * tfactors.T9i + -98.5176 * tfactors.T913i + 171.207 * tfactors.T913 + + -14.3839 * tfactors.T9 + 0.960708 * tfactors.T953 + -60.4936 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 98.5134 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -98.5176 * tfactors.T943i + (1.0/3.0) * 171.207 * tfactors.T923i + + -14.3839 + (5.0/3.0) * 0.960708 * tfactors.T923 + -60.4936 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S35_to_He4_Si31_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S35_to_He4_Si31_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cl33_to_p_S32_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cl33 --> p + S32 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10r + ln_set_rate = 91.6078 + -29.4248 * tfactors.T9i + -33.7204 * tfactors.T913i + -32.7355 * tfactors.T913 + + 3.92526 * tfactors.T9 + -0.250479 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 29.4248 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -33.7204 * tfactors.T943i + (1.0/3.0) * -32.7355 * tfactors.T923i + + 3.92526 + (5.0/3.0) * -0.250479 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10n + ln_set_rate = 74.7432 + -26.4211 * tfactors.T9i + -29.7741 * tfactors.T913i + -87.4473 * tfactors.T913 + + 182.189 * tfactors.T9 + -128.625 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 26.4211 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -29.7741 * tfactors.T943i + (1.0/3.0) * -87.4473 * tfactors.T923i + + 182.189 + (5.0/3.0) * -128.625 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = -4.96497 + -27.2952 * tfactors.T9i; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 27.2952 * tfactors.T9i * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cl33_to_p_S32_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cl33_to_p_S32_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cl33_to_He4_P29_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cl33 --> He4 + P29 + + amrex::Real rate{}, drate_dT{}; + 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 = 66.203 + -75.1475 * tfactors.T9i + -62.3802 * tfactors.T913i + 0.593062 * tfactors.T913 + + -1.14226 * tfactors.T9 + 0.0934776 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 75.1475 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -62.3802 * tfactors.T943i + (1.0/3.0) * 0.593062 * tfactors.T923i + + -1.14226 + (5.0/3.0) * 0.0934776 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cl33_to_He4_P29_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cl33_to_He4_P29_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cl35_to_p_S34_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cl35 --> p + S34 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // se19r + ln_set_rate = 22.7104 + -77.1013 * tfactors.T9i; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 77.1013 * tfactors.T9i * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // se19r + ln_set_rate = -37.7488 + -101.622 * tfactors.T9i + 454.53 * tfactors.T913i + -375.557 * tfactors.T913 + + 12.6533 * tfactors.T9 + -0.408677 * tfactors.T953 + 246.618 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 101.622 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 454.53 * tfactors.T943i + (1.0/3.0) * -375.557 * tfactors.T923i + + 12.6533 + (5.0/3.0) * -0.408677 * tfactors.T923 + 246.618 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // se19r + ln_set_rate = 14.5754 + -75.9594 * tfactors.T9i; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 75.9594 * tfactors.T9i * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // se19r + ln_set_rate = 30.5303 + -79.6891 * tfactors.T9i; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 79.6891 * tfactors.T9i * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // se19r + ln_set_rate = 7.39781 + -75.3374 * tfactors.T9i; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 75.3374 * tfactors.T9i * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // se19r + ln_set_rate = 29.2773 + -79.0392 * tfactors.T9i; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 79.0392 * tfactors.T9i * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // se19r + ln_set_rate = 4.33927 + -75.1053 * tfactors.T9i; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 75.1053 * tfactors.T9i * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // se19r + ln_set_rate = 28.0819 + -78.5751 * tfactors.T9i; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 78.5751 * tfactors.T9i * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cl35_to_p_S34_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cl35_to_p_S34_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cl35_to_He4_P31_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cl35 --> He4 + P31 + + amrex::Real rate{}, drate_dT{}; + 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 = 74.6679 + -81.2033 * tfactors.T9i + -62.5433 * tfactors.T913i + -2.95026 * tfactors.T913 + + -0.89652 * tfactors.T9 + 0.0774126 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 81.2033 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -62.5433 * tfactors.T943i + (1.0/3.0) * -2.95026 * tfactors.T923i + + -0.89652 + (5.0/3.0) * 0.0774126 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cl35_to_He4_P31_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cl35_to_He4_P31_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cl37_to_He4_P33_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cl37 --> He4 + P33 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // rath + ln_set_rate = 75.154 + -94.4688 * tfactors.T9i + 21.2001 * tfactors.T913i + -84.0086 * tfactors.T913 + + 1.39426 * tfactors.T9 + 0.0896178 * tfactors.T953 + 49.3178 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 94.4688 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 21.2001 * tfactors.T943i + (1.0/3.0) * -84.0086 * tfactors.T923i + + 1.39426 + (5.0/3.0) * 0.0896178 * tfactors.T923 + 49.3178 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cl37_to_He4_P33_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cl37_to_He4_P33_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar36_to_p_Cl35_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ar36 --> p + Cl35 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10r + ln_set_rate = 17.2028 + -102.37 * tfactors.T9i + 18.0179 * tfactors.T913 + + -2.86304 * tfactors.T9 + 0.250854 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 102.37 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 18.0179 * tfactors.T923i + + -2.86304 + (5.0/3.0) * 0.250854 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = 16.0169 + -100.729 * tfactors.T9i; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 100.729 * tfactors.T9i * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = -17.4751 + -99.2838 * tfactors.T9i; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 99.2838 * tfactors.T9i * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10n + ln_set_rate = 60.7366 + -98.7191 * tfactors.T9i + -27.8971 * tfactors.T913i + -16.2304 * tfactors.T913 + + 35.255 * tfactors.T9 + -25.8411 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 98.7191 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ar36_to_p_Cl35_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar36_to_p_Cl35_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar36_to_He4_S32_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ar36 --> He4 + S32 + + amrex::Real rate{}, drate_dT{}; + 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 = 73.8164 + -77.0627 * tfactors.T9i + -65.3709 * tfactors.T913i + 5.68294 * tfactors.T913 + + -5.00388 * tfactors.T9 + 0.571407 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 77.0627 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ar36_to_He4_S32_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar36_to_He4_S32_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar37_to_n_Ar36_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ar37 --> n + Ar36 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 34.2933 + -101.941 * tfactors.T9i + -3.1764 * tfactors.T913i + 5.13191 * tfactors.T913 + + -0.00639688 * tfactors.T9 + -0.0292833 * tfactors.T953 + -1.24683 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 101.941 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -3.1764 * tfactors.T943i + (1.0/3.0) * 5.13191 * tfactors.T923i + + -0.00639688 + (5.0/3.0) * -0.0292833 * tfactors.T923 + -1.24683 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ar37_to_n_Ar36_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar37_to_n_Ar36_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar37_to_He4_S33_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ar37 --> He4 + S33 + + amrex::Real rate{}, drate_dT{}; + 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 = 74.852 + -78.7549 * tfactors.T9i + -65.4446 * tfactors.T913i + 3.59607 * tfactors.T913 + + -3.40501 * tfactors.T9 + 0.363961 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 78.7549 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -65.4446 * tfactors.T943i + (1.0/3.0) * 3.59607 * tfactors.T923i + + -3.40501 + (5.0/3.0) * 0.363961 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ar37_to_He4_S33_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar37_to_He4_S33_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar38_to_n_Ar37_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ar38 --> n + Ar37 + + amrex::Real rate{}, drate_dT{}; + 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 = 39.8454 + -137.376 * tfactors.T9i + -0.825362 * tfactors.T913 + + 0.336634 * tfactors.T9 + -0.0509617 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 137.376 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -0.825362 * tfactors.T923i + + 0.336634 + (5.0/3.0) * -0.0509617 * tfactors.T923 + 1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ar38_to_n_Ar37_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar38_to_n_Ar37_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar38_to_p_Cl37_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ar38 --> p + Cl37 + + amrex::Real rate{}, drate_dT{}; + 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 = 59.0616 + -118.853 * tfactors.T9i + -27.9113 * tfactors.T913i + 0.282028 * tfactors.T913 + + -1.80122 * tfactors.T9 + 0.21751 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 118.853 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -27.9113 * tfactors.T943i + (1.0/3.0) * 0.282028 * tfactors.T923i + + -1.80122 + (5.0/3.0) * 0.21751 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ar38_to_p_Cl37_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar38_to_p_Cl37_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar38_to_He4_S34_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ar38 --> He4 + S34 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // cn18 + ln_set_rate = 253.654 + -101.617 * tfactors.T9i + 635.332 * tfactors.T913i + -902.05 * tfactors.T913 + + 42.5623 * tfactors.T9 + -2.08434 * tfactors.T953 + 478.85 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 101.617 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 635.332 * tfactors.T943i + (1.0/3.0) * -902.05 * tfactors.T923i + + 42.5623 + (5.0/3.0) * -2.08434 * tfactors.T923 + 478.85 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ar38_to_He4_S34_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar38_to_He4_S34_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_K37_to_p_Ar36_reaclib(T& rate_eval, const tf_t& tfactors) { + + // K37 --> p + Ar36 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10r + ln_set_rate = 26.976 + -25.1829 * tfactors.T9i; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 25.1829 * tfactors.T9i * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = 25.4611 + -30.5381 * tfactors.T9i + 7.50962 * tfactors.T913 + + -1.68675 * tfactors.T9 + 0.189725 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 30.5381 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 7.50962 * tfactors.T923i + + -1.68675 + (5.0/3.0) * 0.189725 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10n + ln_set_rate = 43.7706 + -21.5578 * tfactors.T9i + -28.9682 * tfactors.T913i + + -1.0 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 21.5578 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -28.9682 * tfactors.T943i + + (5.0/3.0) * -1.0 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_K37_to_p_Ar36_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_K37_to_p_Ar36_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_K37_to_He4_Cl33_reaclib(T& rate_eval, const tf_t& tfactors) { + + // K37 --> He4 + Cl33 + + amrex::Real rate{}, drate_dT{}; + 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 = 71.6063 + -72.1995 * tfactors.T9i + -68.1442 * tfactors.T913i + -2.72746 * tfactors.T913 + + -0.317537 * tfactors.T9 + 0.0162782 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 72.1995 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -68.1442 * tfactors.T943i + (1.0/3.0) * -2.72746 * tfactors.T923i + + -0.317537 + (5.0/3.0) * 0.0162782 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_K37_to_He4_Cl33_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_K37_to_He4_Cl33_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_K39_to_p_Ar38_reaclib(T& rate_eval, const tf_t& tfactors) { + + // K39 --> p + Ar38 + + amrex::Real rate{}, drate_dT{}; + 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 = 57.5639 + -74.0533 * tfactors.T9i + -29.0021 * tfactors.T913i + -0.525968 * tfactors.T913 + + -1.94216 * tfactors.T9 + 0.267346 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 74.0533 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -29.0021 * tfactors.T943i + (1.0/3.0) * -0.525968 * tfactors.T923i + + -1.94216 + (5.0/3.0) * 0.267346 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_K39_to_p_Ar38_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_K39_to_p_Ar38_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_K39_to_He4_Cl35_reaclib(T& rate_eval, const tf_t& tfactors) { + + // K39 --> He4 + Cl35 + + amrex::Real rate{}, drate_dT{}; + 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 = 77.6477 + -83.7658 * tfactors.T9i + -68.2848 * tfactors.T913i + 0.0178545 * tfactors.T913 + + -2.06783 * tfactors.T9 + 0.199659 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 83.7658 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -68.2848 * tfactors.T943i + (1.0/3.0) * 0.0178545 * tfactors.T923i + + -2.06783 + (5.0/3.0) * 0.199659 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_K39_to_He4_Cl35_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_K39_to_He4_Cl35_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ca40_to_p_K39_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ca40 --> p + K39 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // lo18r + ln_set_rate = 2786.44 + -101.871 * tfactors.T9i + 802.18 * tfactors.T913i + -4010.27 * tfactors.T913 + + 1137.69 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 101.871 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 802.18 * tfactors.T943i + (1.0/3.0) * -4010.27 * tfactors.T923i + + 1137.69 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // lo18r + ln_set_rate = 613.153 + -109.213 * tfactors.T9i + 641.844 * tfactors.T913i + -1248.49 * tfactors.T913 + + 566.426 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 109.213 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 641.844 * tfactors.T943i + (1.0/3.0) * -1248.49 * tfactors.T923i + + 566.426 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // lo18r + ln_set_rate = 127.306 + -98.3134 * tfactors.T9i + 41.1723 * tfactors.T913i + -149.299 * tfactors.T913 + + 10.5229 * tfactors.T9 + -0.68208 * tfactors.T953 + 60.7367 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 98.3134 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ca40_to_p_K39_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ca40_to_p_K39_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ca40_to_He4_Ar36_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ca40 --> He4 + Ar36 + + amrex::Real rate{}, drate_dT{}; + 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 = 77.2826 + -81.6916 * tfactors.T9i + -71.0046 * tfactors.T913i + 4.0656 * tfactors.T913 + + -5.26509 * tfactors.T9 + 0.683546 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 81.6916 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ca40_to_He4_Ar36_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ca40_to_He4_Ar36_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ca42_to_He4_Ar38_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ca42 --> He4 + Ar38 + + amrex::Real rate{}, drate_dT{}; + 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 = 77.5813 + -72.6145 * tfactors.T9i + -71.1296 * tfactors.T913i + 2.75299 * tfactors.T913 + + -2.43406 * tfactors.T9 + 0.199511 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 72.6145 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -71.1296 * tfactors.T943i + (1.0/3.0) * 2.75299 * tfactors.T923i + + -2.43406 + (5.0/3.0) * 0.199511 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ca42_to_He4_Ar38_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ca42_to_He4_Ar38_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc41_to_p_Ca40_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Sc41 --> p + Ca40 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10r + ln_set_rate = 72.2762 + -46.1048 * tfactors.T9i + -33.7287 * tfactors.T913 + + 5.22449 * tfactors.T9 + -0.357104 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 46.1048 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -33.7287 * tfactors.T923i + + 5.22449 + (5.0/3.0) * -0.357104 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10n + ln_set_rate = 41.5969 + -12.5925 * tfactors.T9i + -31.1711 * tfactors.T913i + + -1.0 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 12.5925 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -31.1711 * tfactors.T943i + + (5.0/3.0) * -1.0 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = 27.2189 + -19.9148 * tfactors.T9i; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 19.9148 * tfactors.T9i * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Sc41_to_p_Ca40_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc41_to_p_Ca40_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc41_to_He4_K37_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Sc41 --> He4 + K37 + + amrex::Real rate{}, drate_dT{}; + 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 = 74.8459 + -72.7267 * tfactors.T9i + -73.6776 * tfactors.T913i + -5.3733 * tfactors.T913 + + 0.685776 * tfactors.T9 + -0.123735 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 72.7267 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -73.6776 * tfactors.T943i + (1.0/3.0) * -5.3733 * tfactors.T923i + + 0.685776 + (5.0/3.0) * -0.123735 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Sc41_to_He4_K37_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc41_to_He4_K37_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc43_to_p_Ca42_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Sc43 --> p + Ca42 + + amrex::Real rate{}, drate_dT{}; + 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 = 57.4102 + -57.2082 * tfactors.T9i + -31.1381 * tfactors.T913i + -0.151667 * tfactors.T913 + + -1.76926 * tfactors.T9 + 0.219569 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 57.2082 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -31.1381 * tfactors.T943i + (1.0/3.0) * -0.151667 * tfactors.T923i + + -1.76926 + (5.0/3.0) * 0.219569 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Sc43_to_p_Ca42_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc43_to_p_Ca42_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc43_to_He4_K39_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Sc43 --> He4 + K39 + + amrex::Real rate{}, drate_dT{}; + 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 = 78.3727 + -55.7693 * tfactors.T9i + -73.8006 * tfactors.T913i + 1.87885 * tfactors.T913 + + -2.75862 * tfactors.T9 + 0.279678 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 55.7693 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -73.8006 * tfactors.T943i + (1.0/3.0) * 1.87885 * tfactors.T923i + + -2.75862 + (5.0/3.0) * 0.279678 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Sc43_to_He4_K39_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc43_to_He4_K39_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti44_to_p_Sc43_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ti44 --> p + Sc43 + + amrex::Real rate{}, drate_dT{}; + 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 = 62.5939 + -100.373 * tfactors.T9i + -32.1734 * tfactors.T913i + -1.77078 * tfactors.T913 + + -2.21706 * tfactors.T9 + 0.298499 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 100.373 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ti44_to_p_Sc43_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti44_to_p_Sc43_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti44_to_He4_Ca40_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ti44 --> He4 + Ca40 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // chw0 + ln_set_rate = 78.6991 + -59.4974 * tfactors.T9i + -76.4273 * tfactors.T913i + 3.87451 * tfactors.T913 + + -3.61477 * tfactors.T9 + 0.367451 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 59.4974 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ti44_to_He4_Ca40_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti44_to_He4_Ca40_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti46_to_p_Sc45_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ti46 --> p + Sc45 + + amrex::Real rate{}, drate_dT{}; + 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 = 60.5905 + -120.044 * tfactors.T9i + -32.1843 * tfactors.T913i + 1.38642 * tfactors.T913 + + -1.64811 * tfactors.T9 + 0.157323 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 120.044 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -32.1843 * tfactors.T943i + (1.0/3.0) * 1.38642 * tfactors.T923i + + -1.64811 + (5.0/3.0) * 0.157323 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ti46_to_p_Sc45_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti46_to_p_Sc45_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti46_to_He4_Ca42_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ti46 --> He4 + Ca42 + + amrex::Real rate{}, drate_dT{}; + 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 = 79.7886 + -92.8507 * tfactors.T9i + -76.5379 * tfactors.T913i + 2.80099 * tfactors.T913 + + -2.34788 * tfactors.T9 + 0.150014 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 92.8507 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -76.5379 * tfactors.T943i + (1.0/3.0) * 2.80099 * tfactors.T923i + + -2.34788 + (5.0/3.0) * 0.150014 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ti46_to_He4_Ca42_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti46_to_He4_Ca42_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V47_to_p_Ti46_reaclib(T& rate_eval, const tf_t& tfactors) { + + // V47 --> p + Ti46 + + amrex::Real rate{}, drate_dT{}; + 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 = 58.0555 + -59.9674 * tfactors.T9i + -33.2034 * tfactors.T913i + 0.505619 * tfactors.T913 + + -1.73654 * tfactors.T9 + 0.207342 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 59.9674 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -33.2034 * tfactors.T943i + (1.0/3.0) * 0.505619 * tfactors.T923i + + -1.73654 + (5.0/3.0) * 0.207342 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V47_to_p_Ti46_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V47_to_p_Ti46_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V47_to_He4_Sc43_reaclib(T& rate_eval, const tf_t& tfactors) { + + // V47 --> He4 + Sc43 + + amrex::Real rate{}, drate_dT{}; + 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 = 84.6713 + -95.6099 * tfactors.T9i + -79.122 * tfactors.T913i + -7.07006 * tfactors.T913 + + 0.424183 * tfactors.T9 + -0.0665231 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 95.6099 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -79.122 * tfactors.T943i + (1.0/3.0) * -7.07006 * tfactors.T923i + + 0.424183 + (5.0/3.0) * -0.0665231 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V47_to_He4_Sc43_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V47_to_He4_Sc43_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V49_to_p_Ti48_reaclib(T& rate_eval, const tf_t& tfactors) { + + // V49 --> p + Ti48 + + amrex::Real rate{}, drate_dT{}; + 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 = 56.8861 + -78.4254 * tfactors.T9i + -33.2133 * tfactors.T913i + 0.564373 * tfactors.T913 + + -1.18789 * tfactors.T9 + 0.110892 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 78.4254 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -33.2133 * tfactors.T943i + (1.0/3.0) * 0.564373 * tfactors.T923i + + -1.18789 + (5.0/3.0) * 0.110892 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V49_to_p_Ti48_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V49_to_p_Ti48_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V49_to_He4_Sc45_reaclib(T& rate_eval, const tf_t& tfactors) { + + // V49 --> He4 + Sc45 + + amrex::Real rate{}, drate_dT{}; + 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 = 85.107 + -108.085 * tfactors.T9i + -79.222 * tfactors.T913i + -5.31022 * tfactors.T913 + + -1.37323 * tfactors.T9 + 0.21679 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 108.085 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -79.222 * tfactors.T943i + (1.0/3.0) * -5.31022 * tfactors.T923i + + -1.37323 + (5.0/3.0) * 0.21679 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V49_to_He4_Sc45_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V49_to_He4_Sc45_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr48_to_p_V47_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cr48 --> p + V47 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // nfisn + ln_set_rate = 48.892 + -93.8243 * tfactors.T9i + -45.9868 * tfactors.T913i + 13.6822 * tfactors.T913 + + -0.376902 * tfactors.T9 + -0.0194875 * tfactors.T953 + -6.92325 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 93.8243 * 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.92325 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // nfisn + ln_set_rate = 65.6231 + -94.5854 * tfactors.T9i + -110.655 * tfactors.T913i + 83.0232 * tfactors.T913 + + -19.7762 * tfactors.T9 + 3.03961 * tfactors.T953 + -47.9742 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 94.5854 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // nfisn + ln_set_rate = 67.7403 + -100.13 * tfactors.T9i + -34.0548 * tfactors.T913i + -3.41973 * tfactors.T913 + + 1.16501 * tfactors.T9 + -0.105543 * tfactors.T953 + -6.20886 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 100.13 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // nfisn + ln_set_rate = 536.523 + -99.3659 * tfactors.T9i + 317.171 * tfactors.T913i + -911.679 * tfactors.T913 + + 94.4245 * tfactors.T9 + -10.1973 * tfactors.T953 + 332.227 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 99.3659 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr48_to_p_V47_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr48_to_p_V47_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr48_to_He4_Ti44_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cr48 --> He4 + Ti44 + + amrex::Real rate{}, drate_dT{}; + 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 = 89.7573 + -89.3041 * tfactors.T9i + -81.667 * tfactors.T913i + -10.6333 * tfactors.T913 + + -0.672613 * tfactors.T9 + 0.161209 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 89.3041 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr48_to_He4_Ti44_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr48_to_He4_Ti44_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr50_to_p_V49_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cr50 --> p + V49 + + amrex::Real rate{}, drate_dT{}; + 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 = 60.9884 + -111.305 * tfactors.T9i + -34.217 * tfactors.T913i + 1.28258 * tfactors.T913 + + -1.5098 * tfactors.T9 + 0.142011 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 111.305 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -34.217 * tfactors.T943i + (1.0/3.0) * 1.28258 * tfactors.T923i + + -1.5098 + (5.0/3.0) * 0.142011 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr50_to_p_V49_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr50_to_p_V49_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr50_to_He4_Ti46_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cr50 --> He4 + Ti46 + + amrex::Real rate{}, drate_dT{}; + 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 = 82.0042 + -99.346 * tfactors.T9i + -81.7658 * tfactors.T913i + 3.48637 * tfactors.T913 + + -3.9188 * tfactors.T9 + 0.440356 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 99.346 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -81.7658 * tfactors.T943i + (1.0/3.0) * 3.48637 * tfactors.T923i + + -3.9188 + (5.0/3.0) * 0.440356 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr50_to_He4_Ti46_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr50_to_He4_Ti46_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr52_to_p_V51_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cr52 --> p + V51 + + amrex::Real rate{}, drate_dT{}; + 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 = 59.9066 + -121.899 * tfactors.T9i + -34.2261 * tfactors.T913i + 3.30454 * tfactors.T913 + + -2.61654 * tfactors.T9 + 0.283602 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 121.899 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -34.2261 * tfactors.T943i + (1.0/3.0) * 3.30454 * tfactors.T923i + + -2.61654 + (5.0/3.0) * 0.283602 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr52_to_p_V51_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr52_to_p_V51_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr52_to_He4_Ti48_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cr52 --> He4 + Ti48 + + amrex::Real rate{}, drate_dT{}; + 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 = 81.6507 + -108.55 * tfactors.T9i + -81.8569 * tfactors.T913i + 4.92305 * tfactors.T913 + + -5.04112 * tfactors.T9 + 0.6175 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 108.55 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -81.8569 * tfactors.T943i + (1.0/3.0) * 4.92305 * tfactors.T923i + + -5.04112 + (5.0/3.0) * 0.6175 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr52_to_He4_Ti48_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr52_to_He4_Ti48_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn51_to_p_Cr50_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Mn51 --> p + Cr50 + + amrex::Real rate{}, drate_dT{}; + 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 = 57.7375 + -61.1651 * tfactors.T9i + -35.2065 * tfactors.T913i + 0.884621 * tfactors.T913 + + -1.76421 * tfactors.T9 + 0.202494 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 61.1651 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -35.2065 * tfactors.T943i + (1.0/3.0) * 0.884621 * tfactors.T923i + + -1.76421 + (5.0/3.0) * 0.202494 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn51_to_p_Cr50_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn51_to_p_Cr50_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn51_to_He4_V47_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Mn51 --> He4 + V47 + + amrex::Real rate{}, drate_dT{}; + 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 = 81.4259 + -100.544 * tfactors.T9i + -84.2732 * tfactors.T913i + -2.98061 * tfactors.T913 + + -0.531361 * tfactors.T9 + 0.023612 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 100.544 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -84.2732 * tfactors.T943i + (1.0/3.0) * -2.98061 * tfactors.T923i + + -0.531361 + (5.0/3.0) * 0.023612 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn51_to_He4_V47_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn51_to_He4_V47_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn53_to_p_Cr52_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Mn53 --> p + Cr52 + + amrex::Real rate{}, drate_dT{}; + 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 = 57.2932 + -76.1248 * tfactors.T9i + -35.2154 * tfactors.T913i + 0.73019 * tfactors.T913 + + -1.26018 * tfactors.T9 + 0.121141 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 76.1248 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -35.2154 * tfactors.T943i + (1.0/3.0) * 0.73019 * tfactors.T923i + + -1.26018 + (5.0/3.0) * 0.121141 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn53_to_p_Cr52_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn53_to_p_Cr52_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn53_to_He4_V49_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Mn53 --> He4 + V49 + + amrex::Real rate{}, drate_dT{}; + 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 = 87.4299 + -106.249 * tfactors.T9i + -84.3633 * tfactors.T913i + -5.28933 * tfactors.T913 + + -1.3103 * tfactors.T9 + 0.187088 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 106.249 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -84.3633 * tfactors.T943i + (1.0/3.0) * -5.28933 * tfactors.T923i + + -1.3103 + (5.0/3.0) * 0.187088 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn53_to_He4_V49_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn53_to_He4_V49_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn55_to_p_Cr54_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Mn55 --> p + Cr54 + + amrex::Real rate{}, drate_dT{}; + 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 = 56.8219 + -93.6136 * tfactors.T9i + -35.2237 * tfactors.T913i + 2.60768 * tfactors.T913 + + -1.7864 * tfactors.T9 + 0.134189 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 93.6136 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -35.2237 * tfactors.T943i + (1.0/3.0) * 2.60768 * tfactors.T923i + + -1.7864 + (5.0/3.0) * 0.134189 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn55_to_p_Cr54_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn55_to_p_Cr54_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn55_to_He4_V51_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Mn55 --> He4 + V51 + + amrex::Real rate{}, drate_dT{}; + 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 = 86.8796 + -92.0714 * tfactors.T9i + -84.4467 * tfactors.T913i + -1.29542 * tfactors.T913 + + -3.56909 * tfactors.T9 + 0.513926 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 92.0714 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -84.4467 * tfactors.T943i + (1.0/3.0) * -1.29542 * tfactors.T923i + + -3.56909 + (5.0/3.0) * 0.513926 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn55_to_He4_V51_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn55_to_He4_V51_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe52_to_p_Mn51_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Fe52 --> p + Mn51 + + amrex::Real rate{}, drate_dT{}; + 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.728 + -85.6325 * tfactors.T9i + -36.1825 * tfactors.T913i + 0.873042 * tfactors.T913 + + -2.89731 * tfactors.T9 + 0.364394 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 85.6325 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe52_to_p_Mn51_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe52_to_p_Mn51_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe52_to_He4_Cr48_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Fe52 --> He4 + Cr48 + + amrex::Real rate{}, drate_dT{}; + 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 = 90.1474 + -92.109 * tfactors.T9i + -86.7459 * tfactors.T913i + -9.79373 * tfactors.T913 + + -0.772169 * tfactors.T9 + 0.155883 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 92.109 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe52_to_He4_Cr48_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe52_to_He4_Cr48_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe54_to_p_Mn53_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Fe54 --> p + Mn53 + + amrex::Real rate{}, drate_dT{}; + 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.3432 + -102.741 * tfactors.T9i + -36.1913 * tfactors.T913i + 1.44056 * tfactors.T913 + + -1.50734 * tfactors.T9 + 0.142124 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 102.741 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -36.1913 * tfactors.T943i + (1.0/3.0) * 1.44056 * tfactors.T923i + + -1.50734 + (5.0/3.0) * 0.142124 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe54_to_p_Mn53_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe54_to_p_Mn53_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe54_to_He4_Cr50_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Fe54 --> He4 + Cr50 + + amrex::Real rate{}, drate_dT{}; + 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 = 84.6959 + -97.6852 * tfactors.T9i + -86.8349 * tfactors.T913i + 2.37343 * tfactors.T913 + + -3.65677 * tfactors.T9 + 0.412128 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 97.6852 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -86.8349 * tfactors.T943i + (1.0/3.0) * 2.37343 * tfactors.T923i + + -3.65677 + (5.0/3.0) * 0.412128 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe54_to_He4_Cr50_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe54_to_He4_Cr50_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe56_to_p_Mn55_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Fe56 --> p + Mn55 + + amrex::Real rate{}, drate_dT{}; + 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.6593 + -118.177 * tfactors.T9i + -36.1995 * tfactors.T913i + 1.15346 * tfactors.T913 + + -1.94437 * tfactors.T9 + 0.218429 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 118.177 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -36.1995 * tfactors.T943i + (1.0/3.0) * 1.15346 * tfactors.T923i + + -1.94437 + (5.0/3.0) * 0.218429 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe56_to_p_Mn55_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe56_to_p_Mn55_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe56_to_He4_Cr52_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Fe56 --> He4 + Cr52 + + amrex::Real rate{}, drate_dT{}; + 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 = 82.9955 + -88.349 * tfactors.T9i + -86.9175 * tfactors.T913i + 5.655 * tfactors.T913 + + -4.53625 * tfactors.T9 + 0.479806 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 88.349 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -86.9175 * tfactors.T943i + (1.0/3.0) * 5.655 * tfactors.T923i + + -4.53625 + (5.0/3.0) * 0.479806 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe56_to_He4_Cr52_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe56_to_He4_Cr52_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe58_to_He4_Cr54_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Fe58 --> He4 + Cr54 + + amrex::Real rate{}, drate_dT{}; + 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 = 88.2775 + -88.7256 * tfactors.T9i + -86.9945 * tfactors.T913i + -1.05674 * tfactors.T913 + + -4.13443 * tfactors.T9 + 0.599141 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 88.7256 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -86.9945 * tfactors.T943i + (1.0/3.0) * -1.05674 * tfactors.T923i + + -4.13443 + (5.0/3.0) * 0.599141 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe58_to_He4_Cr54_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe58_to_He4_Cr54_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co55_to_p_Fe54_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Co55 --> p + Fe54 + + amrex::Real rate{}, drate_dT{}; + 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 = 57.8292 + -58.766 * tfactors.T9i + -37.1544 * tfactors.T913i + 0.950364 * tfactors.T913 + + -1.77529 * tfactors.T9 + 0.198562 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 58.766 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co55_to_p_Fe54_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co55_to_p_Fe54_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co55_to_He4_Mn51_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Co55 --> He4 + Mn51 + + amrex::Real rate{}, drate_dT{}; + 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 = 90.613 + -95.2861 * tfactors.T9i + -89.274 * tfactors.T913i + -10.4373 * tfactors.T913 + + 1.00492 * tfactors.T9 + -0.125548 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 95.2861 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co55_to_He4_Mn51_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co55_to_He4_Mn51_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co56_to_n_Co55_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Co56 --> n + Co55 + + amrex::Real rate{}, drate_dT{}; + 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 = 40.626 + -117.009 * tfactors.T9i + -1.86357 * tfactors.T913 + + 0.616591 * tfactors.T9 + -0.0839313 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 117.009 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co56_to_n_Co55_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co56_to_n_Co55_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co57_to_n_Co56_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Co57 --> n + Co56 + + amrex::Real rate{}, drate_dT{}; + 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 = 41.1522 + -132.015 * tfactors.T9i + -1.37855 * tfactors.T913 + + 0.299896 * tfactors.T9 + -0.04382 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 132.015 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co57_to_n_Co56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co57_to_n_Co56_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co57_to_p_Fe56_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Co57 --> p + Fe56 + + amrex::Real rate{}, drate_dT{}; + 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 = 57.6663 + -69.9498 * tfactors.T9i + -37.1625 * tfactors.T913i + 1.06776 * tfactors.T913 + + -1.31689 * tfactors.T9 + 0.122089 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 69.9498 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co57_to_p_Fe56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co57_to_p_Fe56_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co57_to_He4_Mn53_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Co57 --> He4 + Mn53 + + amrex::Real rate{}, drate_dT{}; + 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 = 87.0081 + -82.174 * tfactors.T9i + -89.3558 * tfactors.T913i + 0.000882861 * tfactors.T913 + + -2.79327 * tfactors.T9 + 0.309057 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 82.174 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -89.3558 * tfactors.T943i + (1.0/3.0) * 0.000882861 * tfactors.T923i + + -2.79327 + (5.0/3.0) * 0.309057 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co57_to_He4_Mn53_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co57_to_He4_Mn53_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co59_to_p_Fe58_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Co59 --> p + Fe58 + + amrex::Real rate{}, drate_dT{}; + 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 = 57.8189 + -85.4551 * tfactors.T9i + -37.17 * tfactors.T913i + 1.63285 * tfactors.T913 + + -1.16636 * tfactors.T9 + 0.0508619 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 85.4551 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -37.17 * tfactors.T943i + (1.0/3.0) * 1.63285 * tfactors.T923i + + -1.16636 + (5.0/3.0) * 0.0508619 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co59_to_p_Fe58_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co59_to_p_Fe58_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co59_to_He4_Mn55_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Co59 --> He4 + Mn55 + + amrex::Real rate{}, drate_dT{}; + 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 = 84.7829 + -80.5671 * tfactors.T9i + -89.432 * tfactors.T913i + 5.33428 * tfactors.T913 + + -5.11461 * tfactors.T9 + 0.613808 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 80.5671 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -89.432 * tfactors.T943i + (1.0/3.0) * 5.33428 * tfactors.T923i + + -5.11461 + (5.0/3.0) * 0.613808 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co59_to_He4_Mn55_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co59_to_He4_Mn55_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni56_to_p_Co55_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ni56 --> p + Co55 + + amrex::Real rate{}, drate_dT{}; + 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 = 63.1318 + -83.1473 * tfactors.T9i + -38.1053 * tfactors.T913i + -0.210947 * tfactors.T913 + + -2.68377 * tfactors.T9 + 0.355814 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 83.1473 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ni56_to_p_Co55_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni56_to_p_Co55_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni56_to_He4_Fe52_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ni56 --> He4 + Fe52 + + amrex::Real rate{}, drate_dT{}; + 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 = 91.6226 + -92.801 * tfactors.T9i + -91.6819 * tfactors.T913i + -9.51885 * tfactors.T913 + + -0.533014 * tfactors.T9 + 0.0892607 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 92.801 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ni56_to_He4_Fe52_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni56_to_He4_Fe52_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni58_to_p_Co57_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ni58 --> p + Co57 + + amrex::Real rate{}, drate_dT{}; + 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.775 + -94.8373 * tfactors.T9i + -38.1133 * tfactors.T913i + 1.77414 * tfactors.T913 + + -1.48268 * tfactors.T9 + 0.121073 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 94.8373 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ni58_to_p_Co57_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni58_to_p_Co57_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni58_to_He4_Fe54_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ni58 --> He4 + Fe54 + + amrex::Real rate{}, drate_dT{}; + 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 = 85.2327 + -74.2705 * tfactors.T9i + -91.7628 * tfactors.T913i + 4.23027 * tfactors.T913 + + -3.31305 * tfactors.T9 + 0.271293 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 74.2705 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ni58_to_He4_Fe54_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni58_to_He4_Fe54_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni60_to_p_Co59_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ni60 --> p + Co59 + + amrex::Real rate{}, drate_dT{}; + 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.717 + -110.622 * tfactors.T9i + -38.1208 * tfactors.T913i + 2.42609 * tfactors.T913 + + -1.5885 * tfactors.T9 + 0.110313 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 110.622 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -38.1208 * tfactors.T943i + (1.0/3.0) * 2.42609 * tfactors.T923i + + -1.5885 + (5.0/3.0) * 0.110313 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ni60_to_p_Co59_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni60_to_p_Co59_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni60_to_He4_Fe56_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ni60 --> He4 + Fe56 + + amrex::Real rate{}, drate_dT{}; + 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 = 85.6559 + -73.0113 * tfactors.T9i + -91.8383 * tfactors.T913i + 3.63237 * tfactors.T913 + + -2.73367 * tfactors.T9 + 0.179684 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 73.0113 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -91.8383 * tfactors.T943i + (1.0/3.0) * 3.63237 * tfactors.T923i + + -2.73367 + (5.0/3.0) * 0.179684 * tfactors.T923 + 0.833333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ni60_to_He4_Fe56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni60_to_He4_Fe56_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cu59_to_p_Ni58_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cu59 --> p + Ni58 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // si13n + ln_set_rate = 58.96 + -39.67 * tfactors.T9i + -39.0526 * tfactors.T913i + 1.0436 * tfactors.T913 + + -2.10834 * tfactors.T9 + 0.239559 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 39.67 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cu59_to_p_Ni58_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cu59_to_p_Ni58_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cu59_to_He4_Co55_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cu59 --> He4 + Co55 + + amrex::Real rate{}, drate_dT{}; + 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 = 90.972 + -55.1745 * tfactors.T9i + -94.1404 * tfactors.T913i + -2.62786 * tfactors.T913 + + -2.12066 * tfactors.T9 + 0.237999 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 55.1745 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cu59_to_He4_Co55_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cu59_to_He4_Co55_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Zn60_to_p_Cu59_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Zn60 --> p + Cu59 + + amrex::Real rate{}, drate_dT{}; + 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 = 62.2929 + -59.4094 * tfactors.T9i + -39.9808 * tfactors.T913i + 1.17311 * tfactors.T913 + + -2.90486 * tfactors.T9 + 0.339644 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 59.4094 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Zn60_to_p_Cu59_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Zn60_to_p_Cu59_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Zn60_to_He4_Ni56_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Zn60 --> He4 + Ni56 + + amrex::Real rate{}, drate_dT{}; + 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 = 86.0619 + -31.4367 * tfactors.T9i + -96.4898 * tfactors.T913i + 6.47209 * tfactors.T913 + + -5.2029 * tfactors.T9 + 0.533391 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 31.4367 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Zn60_to_He4_Ni56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Zn60_to_He4_Ni56_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_C12_to_3He4_reaclib(T& rate_eval, const tf_t& tfactors) { + + // C12 --> 3 He4 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // fy05r + ln_set_rate = 22.394 + -88.5493 * tfactors.T9i + -13.49 * tfactors.T913i + 21.4259 * tfactors.T913 + + -1.34769 * tfactors.T9 + 0.0879816 * tfactors.T953 + -10.1653 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 88.5493 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // fy05r + ln_set_rate = 34.9561 + -85.4472 * tfactors.T9i + -23.57 * tfactors.T913i + 20.4886 * tfactors.T913 + + -12.9882 * tfactors.T9 + -20.0 * tfactors.T953 + 0.83333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 85.4472 * 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.83333 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // fy05n + ln_set_rate = 45.7734 + -84.4227 * tfactors.T9i + -37.06 * tfactors.T913i + 29.3493 * tfactors.T913 + + -115.507 * tfactors.T9 + -10.0 * tfactors.T953 + 1.66667 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 84.4227 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_C12_to_3He4_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_C12_to_3He4_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_C12_He4_to_O16_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // C12 + He4 --> O16 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // nac2 + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // nac2 + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_C12_He4_to_O16_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_C12_He4_to_O16_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_O16_He4_to_Ne20_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // O16 + He4 --> Ne20 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // co10r + ln_set_rate = 3.88571 + -10.3585 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // co10n + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // co10r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_O16_He4_to_Ne20_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_O16_He4_to_Ne20_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mg23_n_to_Mg24_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Mg23 + n --> Mg24 + + amrex::Real rate{}, drate_dT{}; + 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 = 7.00613 + 2.66964 * tfactors.T913 + + -0.448904 * tfactors.T9 + 0.0326505 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * 2.66964 * tfactors.T923i + + -0.448904 + (5.0/3.0) * 0.0326505 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mg23_n_to_Mg24_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mg23_n_to_Mg24_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mg23_He4_to_Si27_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Mg23 + He4 --> Si27 + + amrex::Real rate{}, drate_dT{}; + 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 = 43.7008 + -53.203 * tfactors.T913i + -4.6318 * tfactors.T913 + + -0.130951 * tfactors.T9 + 0.014691 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -53.203 * tfactors.T943i + (1.0/3.0) * -4.6318 * tfactors.T923i + + -0.130951 + (5.0/3.0) * 0.014691 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mg23_He4_to_Si27_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mg23_He4_to_Si27_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mg24_He4_to_Si28_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Mg24 + He4 --> Si28 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // st08r + ln_set_rate = 8.03977 + -15.629 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // st08r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mg24_He4_to_Si28_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mg24_He4_to_Si28_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Al27_p_to_Si28_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Al27 + p --> Si28 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10n + ln_set_rate = 21.1065 + -23.2205 * tfactors.T913i + + -2.0 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Al27_p_to_Si28_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Al27_p_to_Si28_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Al27_He4_to_P31_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Al27 + He4 --> P31 + + amrex::Real rate{}, drate_dT{}; + 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 = 47.2333 + -56.5351 * tfactors.T913i + -0.896208 * tfactors.T913 + + -1.72024 * tfactors.T9 + 0.185409 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -56.5351 * tfactors.T943i + (1.0/3.0) * -0.896208 * tfactors.T923i + + -1.72024 + (5.0/3.0) * 0.185409 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Al27_He4_to_P31_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Al27_He4_to_P31_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si27_n_to_Si28_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Si27 + n --> Si28 + + amrex::Real rate{}, drate_dT{}; + 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 = 9.14054 + 0.559804 * tfactors.T913 + + -0.0233808 * tfactors.T9 + -0.00121313 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * 0.559804 * tfactors.T923i + + -0.0233808 + (5.0/3.0) * -0.00121313 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si27_n_to_Si28_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si27_n_to_Si28_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si28_n_to_Si29_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Si28 + n --> Si29 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ka02r + ln_set_rate = 6.9158 + -0.38 * tfactors.T9i + 7.68863 * tfactors.T913 + + -1.7991 * tfactors.T9 + -1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 0.38 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 7.68863 * tfactors.T923i + + -1.7991 + -1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // ka02 + ln_set_rate = 8.77553; + amrex::ignore_unused(tfactors); + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 0.0; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si28_n_to_Si29_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si28_n_to_Si29_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si28_p_to_P29_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Si28 + p --> P29 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10n + ln_set_rate = 16.1779 + -23.8173 * tfactors.T913i + 7.08203 * tfactors.T913 + + -1.44753 * tfactors.T9 + 0.0804296 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -23.8173 * tfactors.T943i + (1.0/3.0) * 7.08203 * tfactors.T923i + + -1.44753 + (5.0/3.0) * 0.0804296 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = 5.73975 + -4.14232 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 4.14232 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si28_p_to_P29_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si28_p_to_P29_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si28_He4_to_S32_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Si28 + He4 --> S32 + + amrex::Real rate{}, drate_dT{}; + 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 = 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si28_He4_to_S32_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si28_He4_to_S32_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si29_n_to_Si30_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Si29 + n --> Si30 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ka02r + ln_set_rate = 9.60115 + -0.179366 * tfactors.T9i + 5.50678 * tfactors.T913 + + -2.85656 * tfactors.T9 + -1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 0.179366 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 5.50678 * tfactors.T923i + + -2.85656 + -1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // ka02n + ln_set_rate = 11.8023 + 0.650904 * tfactors.T913; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * 0.650904 * tfactors.T923i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si29_n_to_Si30_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si29_n_to_Si30_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si29_He4_to_S33_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Si29 + He4 --> S33 + + amrex::Real rate{}, drate_dT{}; + 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 = 49.5657 + -59.5755 * tfactors.T913i + 1.06274 * tfactors.T913 + + -3.07529 * tfactors.T9 + 0.372011 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -59.5755 * tfactors.T943i + (1.0/3.0) * 1.06274 * tfactors.T923i + + -3.07529 + (5.0/3.0) * 0.372011 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si29_He4_to_S33_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si29_He4_to_S33_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si30_n_to_Si31_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Si30 + n --> Si31 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = -9.19438 + 0.0685821 * tfactors.T9i + -12.3502 * tfactors.T913i + 34.6486 * tfactors.T913 + + -1.89409 * tfactors.T9 + 0.0781979 * tfactors.T953 + -14.4601 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = -0.0685821 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -12.3502 * tfactors.T943i + (1.0/3.0) * 34.6486 * tfactors.T923i + + -1.89409 + (5.0/3.0) * 0.0781979 * tfactors.T923 + -14.4601 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si30_n_to_Si31_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si30_n_to_Si31_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si30_p_to_P31_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Si30 + p --> P31 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // de20r + ln_set_rate = 12.3695 + -6.64105 * tfactors.T9i + + -1.1191 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 6.64105 * tfactors.T9i * tfactors.T9i + + -1.1191 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // de20r + ln_set_rate = 8.79766 + -5.18231 * tfactors.T9i + + 1.2883 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 5.18231 * tfactors.T9i * tfactors.T9i + + 1.2883 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // de20r + ln_set_rate = -334.266 + -1.13327 * tfactors.T9i + + -78.547 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 1.13327 * tfactors.T9i * tfactors.T9i + + -78.547 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // de20r + ln_set_rate = -4.24208 + -1.25174 * tfactors.T9i + + 4.99034 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 1.25174 * tfactors.T9i * tfactors.T9i + + 4.99034 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // de20r + ln_set_rate = -18.9198 + -0.945261 * tfactors.T9i + + 1.30331 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 0.945261 * tfactors.T9i * tfactors.T9i + + 1.30331 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // de20r + ln_set_rate = -1138.34 + -95.8769 * tfactors.T9i + + -896.758 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 95.8769 * tfactors.T9i * tfactors.T9i + + -896.758 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // de20r + ln_set_rate = 9.96544 + -5.58963 * tfactors.T9i + + -1.57082 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 5.58963 * tfactors.T9i * tfactors.T9i + + -1.57082 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // de20r + ln_set_rate = -34.8594 + -0.592934 * tfactors.T9i + + -1.62839 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 0.592934 * tfactors.T9i * tfactors.T9i + + -1.62839 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si30_p_to_P31_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si30_p_to_P31_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si30_He4_to_S34_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Si30 + He4 --> S34 + + amrex::Real rate{}, drate_dT{}; + 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 = 47.5008 + -59.6559 * tfactors.T913i + 3.70141 * tfactors.T913 + + -3.12537 * tfactors.T9 + 0.307626 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -59.6559 * tfactors.T943i + (1.0/3.0) * 3.70141 * tfactors.T923i + + -3.12537 + (5.0/3.0) * 0.307626 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si30_He4_to_S34_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si30_He4_to_S34_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si31_He4_to_S35_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Si31 + He4 --> S35 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // rath + ln_set_rate = -73.2581 + -1.94072 * tfactors.T9i + -98.5176 * tfactors.T913i + 171.207 * tfactors.T913 + + -14.3839 * tfactors.T9 + 0.960708 * tfactors.T953 + -61.9936 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 1.94072 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -98.5176 * tfactors.T943i + (1.0/3.0) * 171.207 * tfactors.T923i + + -14.3839 + (5.0/3.0) * 0.960708 * tfactors.T923 + -61.9936 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si31_He4_to_S35_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si31_He4_to_S35_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_P29_He4_to_Cl33_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // P29 + He4 --> Cl33 + + amrex::Real rate{}, drate_dT{}; + 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 = 41.9979 + -62.3802 * tfactors.T913i + 0.593062 * tfactors.T913 + + -1.14226 * tfactors.T9 + 0.0934776 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -62.3802 * tfactors.T943i + (1.0/3.0) * 0.593062 * tfactors.T923i + + -1.14226 + (5.0/3.0) * 0.0934776 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_P29_He4_to_Cl33_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_P29_He4_to_Cl33_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_P31_p_to_S32_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // P31 + p --> S32 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = -2.66839 + -2.25958 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10n + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_P31_p_to_S32_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_P31_p_to_S32_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_P31_He4_to_Cl35_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // P31 + He4 --> Cl35 + + amrex::Real rate{}, drate_dT{}; + 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 = 50.451 + -62.5433 * tfactors.T913i + -2.95026 * tfactors.T913 + + -0.89652 * tfactors.T9 + 0.0774126 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -62.5433 * tfactors.T943i + (1.0/3.0) * -2.95026 * tfactors.T923i + + -0.89652 + (5.0/3.0) * 0.0774126 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_P31_He4_to_Cl35_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_P31_He4_to_Cl35_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_P33_p_to_S34_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // P33 + p --> S34 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // rath + ln_set_rate = 173.854 + -3.84298 * tfactors.T9i + 161.691 * tfactors.T913i + -350.015 * tfactors.T913 + + 24.3597 * tfactors.T9 + -1.56396 * tfactors.T953 + 149.963 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 3.84298 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 161.691 * tfactors.T943i + (1.0/3.0) * -350.015 * tfactors.T923i + + 24.3597 + (5.0/3.0) * -1.56396 * tfactors.T923 + 149.963 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_P33_p_to_S34_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_P33_p_to_S34_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_P33_He4_to_Cl37_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // P33 + He4 --> Cl37 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // rath + ln_set_rate = 50.9267 + -3.38505 * tfactors.T9i + 21.2001 * tfactors.T913i + -84.0086 * tfactors.T913 + + 1.39426 * tfactors.T9 + 0.0896178 * tfactors.T953 + 47.8178 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 3.38505 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 21.2001 * tfactors.T943i + (1.0/3.0) * -84.0086 * tfactors.T923i + + 1.39426 + (5.0/3.0) * 0.0896178 * tfactors.T923 + 47.8178 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_P33_He4_to_Cl37_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_P33_He4_to_Cl37_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S32_n_to_S33_reaclib(T& rate_eval, const tf_t& tfactors) { + + // S32 + n --> S33 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 12.4466 + 0.198828 * tfactors.T9i + -15.0178 * tfactors.T913i + 16.3567 * tfactors.T913 + + -0.436839 * tfactors.T9 + -0.00574462 * tfactors.T953 + -9.78034 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = -0.198828 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -15.0178 * tfactors.T943i + (1.0/3.0) * 16.3567 * tfactors.T923i + + -0.436839 + (5.0/3.0) * -0.00574462 * tfactors.T923 + -9.78034 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S32_n_to_S33_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S32_n_to_S33_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S32_p_to_Cl33_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // S32 + p --> Cl33 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10n + ln_set_rate = 52.47 + -29.7741 * tfactors.T913i + -87.4473 * tfactors.T913 + + 182.189 * tfactors.T9 + -128.625 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -29.7741 * tfactors.T943i + (1.0/3.0) * -87.4473 * tfactors.T923i + + 182.189 + (5.0/3.0) * -128.625 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = 69.3346 + -3.00371 * tfactors.T9i + -33.7204 * tfactors.T913i + -32.7355 * tfactors.T913 + + 3.92526 * tfactors.T9 + -0.250479 * tfactors.T953 + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 3.00371 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -33.7204 * tfactors.T943i + (1.0/3.0) * -32.7355 * tfactors.T923i + + 3.92526 + (5.0/3.0) * -0.250479 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = -27.2382 + -0.874107 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 0.874107 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S32_p_to_Cl33_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S32_p_to_Cl33_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S32_He4_to_Ar36_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // S32 + He4 --> Ar36 + + amrex::Real rate{}, drate_dT{}; + 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 = 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S32_He4_to_Ar36_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S32_He4_to_Ar36_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S33_n_to_S34_reaclib(T& rate_eval, const tf_t& tfactors) { + + // S33 + n --> S34 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = -4.17932 + 0.24641 * tfactors.T9i + -23.1351 * tfactors.T913i + 43.3623 * tfactors.T913 + + -2.74733 * tfactors.T9 + 0.159045 * tfactors.T953 + -19.6332 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = -0.24641 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -23.1351 * tfactors.T943i + (1.0/3.0) * 43.3623 * tfactors.T923i + + -2.74733 + (5.0/3.0) * 0.159045 * tfactors.T923 + -19.6332 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S33_n_to_S34_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S33_n_to_S34_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S33_He4_to_Ar37_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // S33 + He4 --> Ar37 + + amrex::Real rate{}, drate_dT{}; + 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 = 49.9315 + -65.4446 * tfactors.T913i + 3.59607 * tfactors.T913 + + -3.40501 * tfactors.T9 + 0.363961 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -65.4446 * tfactors.T943i + (1.0/3.0) * 3.59607 * tfactors.T923i + + -3.40501 + (5.0/3.0) * 0.363961 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S33_He4_to_Ar37_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S33_He4_to_Ar37_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S34_n_to_S35_reaclib(T& rate_eval, const tf_t& tfactors) { + + // S34 + n --> S35 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 41.4131 + -0.229262 * tfactors.T9i + 25.2182 * tfactors.T913i + -59.2704 * tfactors.T913 + + 4.22256 * tfactors.T9 + -0.274247 * tfactors.T953 + 24.532 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 0.229262 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 25.2182 * tfactors.T943i + (1.0/3.0) * -59.2704 * tfactors.T923i + + 4.22256 + (5.0/3.0) * -0.274247 * tfactors.T923 + 24.532 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S34_n_to_S35_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S34_n_to_S35_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S34_p_to_Cl35_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // S34 + p --> Cl35 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // se19r + ln_set_rate = -7.70046 + -2.02615 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 2.02615 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // se19r + ln_set_rate = 8.25443 + -5.75583 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 5.75583 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // se19r + ln_set_rate = -14.8781 + -1.40414 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 1.40414 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // se19r + ln_set_rate = 7.00142 + -5.10598 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 5.10598 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // se19r + ln_set_rate = -17.9366 + -1.17205 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 1.17205 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // se19r + ln_set_rate = 5.80604 + -4.6418 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 4.6418 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // se19r + ln_set_rate = 0.43449 + -3.16803 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 3.16803 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // se19r + ln_set_rate = -60.0247 + -27.689 * tfactors.T9i + 454.53 * tfactors.T913i + -375.557 * tfactors.T913 + + 12.6533 * tfactors.T9 + -0.408677 * tfactors.T953 + 245.118 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 27.689 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 454.53 * tfactors.T943i + (1.0/3.0) * -375.557 * tfactors.T923i + + 12.6533 + (5.0/3.0) * -0.408677 * tfactors.T923 + 245.118 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S34_p_to_Cl35_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S34_p_to_Cl35_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S34_He4_to_Ar38_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // S34 + He4 --> Ar38 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // cn18 + ln_set_rate = 228.729 + -17.9675 * tfactors.T9i + 635.332 * tfactors.T913i + -902.05 * tfactors.T913 + + 42.5623 * tfactors.T9 + -2.08434 * tfactors.T953 + 477.35 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 17.9675 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 635.332 * tfactors.T943i + (1.0/3.0) * -902.05 * tfactors.T923i + + 42.5623 + (5.0/3.0) * -2.08434 * tfactors.T923 + 477.35 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S34_He4_to_Ar38_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S34_He4_to_Ar38_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cl33_He4_to_K37_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cl33 + He4 --> K37 + + amrex::Real rate{}, drate_dT{}; + 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 = 46.6859 + -68.1442 * tfactors.T913i + -2.72746 * tfactors.T913 + + -0.317537 * tfactors.T9 + 0.0162782 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -68.1442 * tfactors.T943i + (1.0/3.0) * -2.72746 * tfactors.T923i + + -0.317537 + (5.0/3.0) * 0.0162782 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cl33_He4_to_K37_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cl33_He4_to_K37_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cl35_p_to_Ar36_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cl35 + p --> Ar36 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10r + ln_set_rate = -42.5249 + -0.564651 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10n + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = -9.03294 + -2.00996 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cl35_p_to_Ar36_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cl35_p_to_Ar36_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cl35_He4_to_K39_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cl35 + He4 --> K39 + + amrex::Real rate{}, drate_dT{}; + 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 = 52.718 + -68.2848 * tfactors.T913i + 0.0178545 * tfactors.T913 + + -2.06783 * tfactors.T9 + 0.199659 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -68.2848 * tfactors.T943i + (1.0/3.0) * 0.0178545 * tfactors.T923i + + -2.06783 + (5.0/3.0) * 0.199659 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cl35_He4_to_K39_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cl35_He4_to_K39_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cl37_p_to_Ar38_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cl37 + p --> Ar38 + + amrex::Real rate{}, drate_dT{}; + 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 = 34.0095 + -27.9113 * tfactors.T913i + 0.282028 * tfactors.T913 + + -1.80122 * tfactors.T9 + 0.21751 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -27.9113 * tfactors.T943i + (1.0/3.0) * 0.282028 * tfactors.T923i + + -1.80122 + (5.0/3.0) * 0.21751 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cl37_p_to_Ar38_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cl37_p_to_Ar38_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar36_n_to_Ar37_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ar36 + n --> Ar37 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 12.0149 + 0.0317044 * tfactors.T9i + -3.1764 * tfactors.T913i + 5.13191 * tfactors.T913 + + -0.00639688 * tfactors.T9 + -0.0292833 * tfactors.T953 + -2.74683 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = -0.0317044 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -3.1764 * tfactors.T943i + (1.0/3.0) * 5.13191 * tfactors.T923i + + -0.00639688 + (5.0/3.0) * -0.0292833 * tfactors.T923 + -2.74683 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ar36_n_to_Ar37_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar36_n_to_Ar37_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar36_p_to_K37_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ar36 + p --> K37 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10r + ln_set_rate = 3.18278 + -8.98031 * tfactors.T9i + 7.50962 * tfactors.T913 + + -1.68675 * tfactors.T9 + 0.189725 * tfactors.T953 + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 8.98031 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 7.50962 * tfactors.T923i + + -1.68675 + (5.0/3.0) * 0.189725 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = 4.69769 + -3.6251 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 3.6251 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10n + ln_set_rate = 21.4923 + -28.9682 * tfactors.T913i + + -1.0 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -28.9682 * tfactors.T943i + + (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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ar36_p_to_K37_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar36_p_to_K37_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar36_He4_to_Ca40_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ar36 + He4 --> Ca40 + + amrex::Real rate{}, drate_dT{}; + 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 = 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ar36_He4_to_Ca40_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar36_He4_to_Ca40_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar37_n_to_Ar38_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ar37 + n --> Ar38 + + amrex::Real rate{}, drate_dT{}; + 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 = 14.7933 + -0.825362 * tfactors.T913 + + 0.336634 * tfactors.T9 + -0.0509617 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -0.825362 * tfactors.T923i + + 0.336634 + (5.0/3.0) * -0.0509617 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ar37_n_to_Ar38_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar37_n_to_Ar38_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar38_p_to_K39_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ar38 + p --> K39 + + amrex::Real rate{}, drate_dT{}; + 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 = 35.2834 + -29.0021 * tfactors.T913i + -0.525968 * tfactors.T913 + + -1.94216 * tfactors.T9 + 0.267346 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -29.0021 * tfactors.T943i + (1.0/3.0) * -0.525968 * tfactors.T923i + + -1.94216 + (5.0/3.0) * 0.267346 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ar38_p_to_K39_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar38_p_to_K39_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar38_He4_to_Ca42_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ar38 + He4 --> Ca42 + + amrex::Real rate{}, drate_dT{}; + 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 = 52.6394 + -71.1296 * tfactors.T913i + 2.75299 * tfactors.T913 + + -2.43406 * tfactors.T9 + 0.199511 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -71.1296 * tfactors.T943i + (1.0/3.0) * 2.75299 * tfactors.T923i + + -2.43406 + (5.0/3.0) * 0.199511 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ar38_He4_to_Ca42_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar38_He4_to_Ca42_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_K37_He4_to_Sc41_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // K37 + He4 --> Sc41 + + amrex::Real rate{}, drate_dT{}; + 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 = 50.601 + -73.6776 * tfactors.T913i + -5.3733 * tfactors.T913 + + 0.685776 * tfactors.T9 + -0.123735 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -73.6776 * tfactors.T943i + (1.0/3.0) * -5.3733 * tfactors.T923i + + 0.685776 + (5.0/3.0) * -0.123735 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_K37_He4_to_Sc41_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_K37_He4_to_Sc41_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_K39_p_to_Ca40_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // K39 + p --> Ca40 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // lo18r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // lo18r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // lo18r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_K39_p_to_Ca40_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_K39_p_to_Ca40_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_K39_He4_to_Sc43_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // K39 + He4 --> Sc43 + + amrex::Real rate{}, drate_dT{}; + 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 = 54.1202 + -73.8006 * tfactors.T913i + 1.87885 * tfactors.T913 + + -2.75862 * tfactors.T9 + 0.279678 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -73.8006 * tfactors.T943i + (1.0/3.0) * 1.87885 * tfactors.T923i + + -2.75862 + (5.0/3.0) * 0.279678 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_K39_He4_to_Sc43_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_K39_He4_to_Sc43_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ca40_p_to_Sc41_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ca40 + p --> Sc41 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10n + ln_set_rate = 20.0077 + -31.1711 * tfactors.T913i + + -1.0 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -31.1711 * tfactors.T943i + + (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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = 50.687 + -33.5123 * tfactors.T9i + -33.7287 * tfactors.T913 + + 5.22449 * tfactors.T9 + -0.357104 * tfactors.T953 + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 33.5123 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -33.7287 * tfactors.T923i + + 5.22449 + (5.0/3.0) * -0.357104 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = 5.62969 + -7.32236 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 7.32236 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ca40_p_to_Sc41_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ca40_p_to_Sc41_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ca40_He4_to_Ti44_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ca40 + He4 --> Ti44 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // chw0 + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ca40_He4_to_Ti44_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ca40_He4_to_Ti44_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ca42_p_to_Sc43_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ca42 + p --> Sc43 + + amrex::Real rate{}, drate_dT{}; + 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 = 35.8192 + -31.1381 * tfactors.T913i + -0.151667 * tfactors.T913 + + -1.76926 * tfactors.T9 + 0.219569 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -31.1381 * tfactors.T943i + (1.0/3.0) * -0.151667 * tfactors.T923i + + -1.76926 + (5.0/3.0) * 0.219569 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ca42_p_to_Sc43_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ca42_p_to_Sc43_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ca42_He4_to_Ti46_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ca42 + He4 --> Ti46 + + amrex::Real rate{}, drate_dT{}; + 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 = 54.833 + -76.5379 * tfactors.T913i + 2.80099 * tfactors.T913 + + -2.34788 * tfactors.T9 + 0.150014 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -76.5379 * tfactors.T943i + (1.0/3.0) * 2.80099 * tfactors.T923i + + -2.34788 + (5.0/3.0) * 0.150014 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ca42_He4_to_Ti46_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ca42_He4_to_Ti46_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc43_p_to_Ti44_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Sc43 + p --> Ti44 + + amrex::Real rate{}, drate_dT{}; + 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 = 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Sc43_p_to_Ti44_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc43_p_to_Ti44_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc43_He4_to_V47_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Sc43 + He4 --> V47 + + amrex::Real rate{}, drate_dT{}; + 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 = 59.0195 + -79.122 * tfactors.T913i + -7.07006 * tfactors.T913 + + 0.424183 * tfactors.T9 + -0.0665231 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -79.122 * tfactors.T943i + (1.0/3.0) * -7.07006 * tfactors.T923i + + 0.424183 + (5.0/3.0) * -0.0665231 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Sc43_He4_to_V47_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc43_He4_to_V47_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc45_p_to_Ti46_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Sc45 + p --> Ti46 + + amrex::Real rate{}, drate_dT{}; + 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 = 34.8383 + -32.1843 * tfactors.T913i + 1.38642 * tfactors.T913 + + -1.64811 * tfactors.T9 + 0.157323 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -32.1843 * tfactors.T943i + (1.0/3.0) * 1.38642 * tfactors.T923i + + -1.64811 + (5.0/3.0) * 0.157323 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Sc45_p_to_Ti46_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc45_p_to_Ti46_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc45_He4_to_V49_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Sc45 + He4 --> V49 + + amrex::Real rate{}, drate_dT{}; + 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 = 60.1427 + -79.222 * tfactors.T913i + -5.31022 * tfactors.T913 + + -1.37323 * tfactors.T9 + 0.21679 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -79.222 * tfactors.T943i + (1.0/3.0) * -5.31022 * tfactors.T923i + + -1.37323 + (5.0/3.0) * 0.21679 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Sc45_He4_to_V49_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc45_He4_to_V49_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti44_He4_to_Cr48_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ti44 + He4 --> Cr48 + + amrex::Real rate{}, drate_dT{}; + 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 = 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ti44_He4_to_Cr48_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti44_He4_to_Cr48_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti46_p_to_V47_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ti46 + p --> V47 + + amrex::Real rate{}, drate_dT{}; + 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 = 35.7683 + -33.2034 * tfactors.T913i + 0.505619 * tfactors.T913 + + -1.73654 * tfactors.T9 + 0.207342 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -33.2034 * tfactors.T943i + (1.0/3.0) * 0.505619 * tfactors.T923i + + -1.73654 + (5.0/3.0) * 0.207342 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ti46_p_to_V47_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti46_p_to_V47_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti46_He4_to_Cr50_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ti46 + He4 --> Cr50 + + amrex::Real rate{}, drate_dT{}; + 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 = 57.0372 + -81.7658 * tfactors.T913i + 3.48637 * tfactors.T913 + + -3.9188 * tfactors.T9 + 0.440356 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -81.7658 * tfactors.T943i + (1.0/3.0) * 3.48637 * tfactors.T923i + + -3.9188 + (5.0/3.0) * 0.440356 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ti46_He4_to_Cr50_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti46_He4_to_Cr50_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti48_p_to_V49_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ti48 + p --> V49 + + amrex::Real rate{}, drate_dT{}; + 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 = 35.2907 + -33.2133 * tfactors.T913i + 0.564373 * tfactors.T913 + + -1.18789 * tfactors.T9 + 0.110892 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -33.2133 * tfactors.T943i + (1.0/3.0) * 0.564373 * tfactors.T923i + + -1.18789 + (5.0/3.0) * 0.110892 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ti48_p_to_V49_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti48_p_to_V49_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti48_He4_to_Cr52_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ti48 + He4 --> Cr52 + + amrex::Real rate{}, drate_dT{}; + 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 = 56.6787 + -81.8569 * tfactors.T913i + 4.92305 * tfactors.T913 + + -5.04112 * tfactors.T9 + 0.6175 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -81.8569 * tfactors.T943i + (1.0/3.0) * 4.92305 * tfactors.T923i + + -5.04112 + (5.0/3.0) * 0.6175 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ti48_He4_to_Cr52_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti48_He4_to_Cr52_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V47_p_to_Cr48_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // V47 + p --> Cr48 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // nfisn + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // nfisn + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // nfisn + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // nfisn + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V47_p_to_Cr48_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V47_p_to_Cr48_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V47_He4_to_Mn51_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // V47 + He4 --> Mn51 + + amrex::Real rate{}, drate_dT{}; + 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 = 56.8618 + -84.2732 * tfactors.T913i + -2.98061 * tfactors.T913 + + -0.531361 * tfactors.T9 + 0.023612 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -84.2732 * tfactors.T943i + (1.0/3.0) * -2.98061 * tfactors.T923i + + -0.531361 + (5.0/3.0) * 0.023612 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V47_He4_to_Mn51_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V47_He4_to_Mn51_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V49_p_to_Cr50_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // V49 + p --> Cr50 + + amrex::Real rate{}, drate_dT{}; + 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 = 35.2335 + -34.217 * tfactors.T913i + 1.28258 * tfactors.T913 + + -1.5098 * tfactors.T9 + 0.142011 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -34.217 * tfactors.T943i + (1.0/3.0) * 1.28258 * tfactors.T923i + + -1.5098 + (5.0/3.0) * 0.142011 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V49_p_to_Cr50_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V49_p_to_Cr50_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V49_He4_to_Mn53_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // V49 + He4 --> Mn53 + + amrex::Real rate{}, drate_dT{}; + 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 = 62.4555 + -84.3633 * tfactors.T913i + -5.28933 * tfactors.T913 + + -1.3103 * tfactors.T9 + 0.187088 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -84.3633 * tfactors.T943i + (1.0/3.0) * -5.28933 * tfactors.T923i + + -1.3103 + (5.0/3.0) * 0.187088 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V49_He4_to_Mn53_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V49_He4_to_Mn53_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V51_p_to_Cr52_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // V51 + p --> Cr52 + + amrex::Real rate{}, drate_dT{}; + 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 = 34.1505 + -34.2261 * tfactors.T913i + 3.30454 * tfactors.T913 + + -2.61654 * tfactors.T9 + 0.283602 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -34.2261 * tfactors.T943i + (1.0/3.0) * 3.30454 * tfactors.T923i + + -2.61654 + (5.0/3.0) * 0.283602 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V51_p_to_Cr52_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V51_p_to_Cr52_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V51_He4_to_Mn55_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // V51 + He4 --> Mn55 + + amrex::Real rate{}, drate_dT{}; + 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.6131 + -84.4467 * tfactors.T913i + -1.29542 * tfactors.T913 + + -3.56909 * tfactors.T9 + 0.513926 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -84.4467 * tfactors.T943i + (1.0/3.0) * -1.29542 * tfactors.T923i + + -3.56909 + (5.0/3.0) * 0.513926 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V51_He4_to_Mn55_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V51_He4_to_Mn55_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr48_He4_to_Fe52_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cr48 + He4 --> Fe52 + + amrex::Real rate{}, drate_dT{}; + 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.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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr48_He4_to_Fe52_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr48_He4_to_Fe52_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr50_p_to_Mn51_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cr50 + p --> Mn51 + + amrex::Real rate{}, drate_dT{}; + 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 = 35.8532 + -35.2065 * tfactors.T913i + 0.884621 * tfactors.T913 + + -1.76421 * tfactors.T9 + 0.202494 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -35.2065 * tfactors.T943i + (1.0/3.0) * 0.884621 * tfactors.T923i + + -1.76421 + (5.0/3.0) * 0.202494 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr50_p_to_Mn51_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr50_p_to_Mn51_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr50_He4_to_Fe54_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cr50 + He4 --> Fe54 + + amrex::Real rate{}, drate_dT{}; + 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 = 59.7193 + -86.8349 * tfactors.T913i + 2.37343 * tfactors.T913 + + -3.65677 * tfactors.T9 + 0.412128 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -86.8349 * tfactors.T943i + (1.0/3.0) * 2.37343 * tfactors.T923i + + -3.65677 + (5.0/3.0) * 0.412128 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr50_He4_to_Fe54_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr50_He4_to_Fe54_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr52_p_to_Mn53_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cr52 + p --> Mn53 + + amrex::Real rate{}, drate_dT{}; + 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 = 35.6954 + -35.2154 * tfactors.T913i + 0.73019 * tfactors.T913 + + -1.26018 * tfactors.T9 + 0.121141 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -35.2154 * tfactors.T943i + (1.0/3.0) * 0.73019 * tfactors.T923i + + -1.26018 + (5.0/3.0) * 0.121141 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr52_p_to_Mn53_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr52_p_to_Mn53_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr52_He4_to_Fe56_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cr52 + He4 --> Fe56 + + amrex::Real rate{}, drate_dT{}; + 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 = 58.0146 + -86.9175 * tfactors.T913i + 5.655 * tfactors.T913 + + -4.53625 * tfactors.T9 + 0.479806 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -86.9175 * tfactors.T943i + (1.0/3.0) * 5.655 * tfactors.T923i + + -4.53625 + (5.0/3.0) * 0.479806 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr52_He4_to_Fe56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr52_He4_to_Fe56_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr54_p_to_Mn55_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cr54 + p --> Mn55 + + amrex::Real rate{}, drate_dT{}; + 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 = 34.9354 + -35.2237 * tfactors.T913i + 2.60768 * tfactors.T913 + + -1.7864 * tfactors.T9 + 0.134189 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -35.2237 * tfactors.T943i + (1.0/3.0) * 2.60768 * tfactors.T923i + + -1.7864 + (5.0/3.0) * 0.134189 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr54_p_to_Mn55_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr54_p_to_Mn55_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr54_He4_to_Fe58_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cr54 + He4 --> Fe58 + + amrex::Real rate{}, drate_dT{}; + 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 = 63.2926 + -86.9945 * tfactors.T913i + -1.05674 * tfactors.T913 + + -4.13443 * tfactors.T9 + 0.599141 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -86.9945 * tfactors.T943i + (1.0/3.0) * -1.05674 * tfactors.T923i + + -4.13443 + (5.0/3.0) * 0.599141 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr54_He4_to_Fe58_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr54_He4_to_Fe58_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn51_p_to_Fe52_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Mn51 + p --> Fe52 + + amrex::Real rate{}, drate_dT{}; + 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 = 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn51_p_to_Fe52_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn51_p_to_Fe52_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn51_He4_to_Co55_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Mn51 + He4 --> Co55 + + amrex::Real rate{}, drate_dT{}; + 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.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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn51_He4_to_Co55_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn51_He4_to_Co55_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn53_p_to_Fe54_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Mn53 + p --> Fe54 + + amrex::Real rate{}, drate_dT{}; + 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 = 35.586 + -36.1913 * tfactors.T913i + 1.44056 * tfactors.T913 + + -1.50734 * tfactors.T9 + 0.142124 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -36.1913 * tfactors.T943i + (1.0/3.0) * 1.44056 * tfactors.T923i + + -1.50734 + (5.0/3.0) * 0.142124 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn53_p_to_Fe54_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn53_p_to_Fe54_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn53_He4_to_Co57_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Mn53 + He4 --> Co57 + + amrex::Real rate{}, drate_dT{}; + 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 = 62.0252 + -89.3558 * tfactors.T913i + 0.000882861 * tfactors.T913 + + -2.79327 * tfactors.T9 + 0.309057 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -89.3558 * tfactors.T943i + (1.0/3.0) * 0.000882861 * tfactors.T923i + + -2.79327 + (5.0/3.0) * 0.309057 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn53_He4_to_Co57_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn53_He4_to_Co57_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn55_p_to_Fe56_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Mn55 + p --> Fe56 + + amrex::Real rate{}, drate_dT{}; + 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 = 36.1888 + -36.1995 * tfactors.T913i + 1.15346 * tfactors.T913 + + -1.94437 * tfactors.T9 + 0.218429 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -36.1995 * tfactors.T943i + (1.0/3.0) * 1.15346 * tfactors.T923i + + -1.94437 + (5.0/3.0) * 0.218429 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn55_p_to_Fe56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn55_p_to_Fe56_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn55_He4_to_Co59_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Mn55 + He4 --> Co59 + + amrex::Real rate{}, drate_dT{}; + 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 = 60.0838 + -89.432 * tfactors.T913i + 5.33428 * tfactors.T913 + + -5.11461 * tfactors.T9 + 0.613808 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -89.432 * tfactors.T943i + (1.0/3.0) * 5.33428 * tfactors.T923i + + -5.11461 + (5.0/3.0) * 0.613808 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn55_He4_to_Co59_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn55_He4_to_Co59_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe52_He4_to_Ni56_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Fe52 + He4 --> Ni56 + + amrex::Real rate{}, drate_dT{}; + 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 = 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe52_He4_to_Ni56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe52_He4_to_Ni56_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe54_p_to_Co55_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Fe54 + p --> Co55 + + amrex::Real rate{}, drate_dT{}; + 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 = 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe54_p_to_Co55_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe54_p_to_Co55_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe54_He4_to_Ni58_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Fe54 + He4 --> Ni58 + + amrex::Real rate{}, drate_dT{}; + 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 = 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe54_He4_to_Ni58_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe54_He4_to_Ni58_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe56_p_to_Co57_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Fe56 + p --> Co57 + + amrex::Real rate{}, drate_dT{}; + 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 = 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe56_p_to_Co57_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe56_p_to_Co57_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe56_He4_to_Ni60_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Fe56 + He4 --> Ni60 + + amrex::Real rate{}, drate_dT{}; + 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 = 60.6673 + -91.8383 * tfactors.T913i + 3.63237 * tfactors.T913 + + -2.73367 * tfactors.T9 + 0.179684 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -91.8383 * tfactors.T943i + (1.0/3.0) * 3.63237 * tfactors.T923i + + -2.73367 + (5.0/3.0) * 0.179684 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe56_He4_to_Ni60_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe56_He4_to_Ni60_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe58_p_to_Co59_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Fe58 + p --> Co59 + + amrex::Real rate{}, drate_dT{}; + 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 = 36.2182 + -37.17 * tfactors.T913i + 1.63285 * tfactors.T913 + + -1.16636 * tfactors.T9 + 0.0508619 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -37.17 * tfactors.T943i + (1.0/3.0) * 1.63285 * tfactors.T923i + + -1.16636 + (5.0/3.0) * 0.0508619 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe58_p_to_Co59_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe58_p_to_Co59_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co55_n_to_Co56_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Co55 + n --> Co56 + + amrex::Real rate{}, drate_dT{}; + 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 = 17.065 + -1.86357 * tfactors.T913 + + 0.616591 * tfactors.T9 + -0.0839313 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -1.86357 * tfactors.T923i + + 0.616591 + (5.0/3.0) * -0.0839313 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co55_n_to_Co56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co55_n_to_Co56_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co55_p_to_Ni56_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Co55 + p --> Ni56 + + amrex::Real rate{}, drate_dT{}; + 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.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 (std::is_same_v) { + 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co55_p_to_Ni56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co55_p_to_Ni56_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co55_He4_to_Cu59_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Co55 + He4 --> Cu59 + + amrex::Real rate{}, drate_dT{}; + 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 (std::is_same_v) { + 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co55_He4_to_Cu59_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co55_He4_to_Cu59_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co56_n_to_Co57_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Co56 + n --> Co57 + + amrex::Real rate{}, drate_dT{}; + 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 = 17.3552 + -1.37855 * tfactors.T913 + + 0.299896 * tfactors.T9 + -0.04382 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -1.37855 * tfactors.T923i + + 0.299896 + (5.0/3.0) * -0.04382 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co56_n_to_Co57_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co56_n_to_Co57_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co57_p_to_Ni58_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Co57 + p --> Ni58 + + amrex::Real rate{}, drate_dT{}; + 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 = 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co57_p_to_Ni58_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co57_p_to_Ni58_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co59_p_to_Ni60_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Co59 + p --> Ni60 + + amrex::Real rate{}, drate_dT{}; + 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 = 35.957 + -38.1208 * tfactors.T913i + 2.42609 * tfactors.T913 + + -1.5885 * tfactors.T9 + 0.110313 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -38.1208 * tfactors.T943i + (1.0/3.0) * 2.42609 * tfactors.T923i + + -1.5885 + (5.0/3.0) * 0.110313 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co59_p_to_Ni60_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co59_p_to_Ni60_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni56_He4_to_Zn60_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ni56 + He4 --> Zn60 + + amrex::Real rate{}, drate_dT{}; + 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 (std::is_same_v) { + 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ni56_He4_to_Zn60_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni56_He4_to_Zn60_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni58_p_to_Cu59_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ni58 + p --> Cu59 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ni58_p_to_Cu59_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni58_p_to_Cu59_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cu59_p_to_Zn60_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cu59 + p --> Zn60 + + amrex::Real rate{}, drate_dT{}; + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cu59_p_to_Zn60_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cu59_p_to_Zn60_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_C12_C12_to_n_Mg23_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // C12 + C12 --> n + Mg23 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // cf88r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + 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; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_O16_C12_to_n_Si27_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // O16 + C12 --> n + Si27 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // cf88r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_O16_C12_to_n_Si27_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_O16_C12_to_n_Si27_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_O16_C12_to_p_Al27_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // O16 + C12 --> p + Al27 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // cf88r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_O16_C12_to_p_Al27_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_O16_C12_to_p_Al27_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_O16_C12_to_He4_Mg24_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // O16 + C12 --> He4 + Mg24 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // cf88r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_O16_C12_to_He4_Mg24_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_O16_C12_to_He4_Mg24_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_O16_O16_to_p_P31_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // O16 + O16 --> p + P31 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // cf88r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + 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; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_O16_O16_to_He4_Si28_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // O16 + O16 --> He4 + Si28 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // cf88r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + 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; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ne20_He4_to_n_Mg23_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ne20 + He4 --> n + Mg23 + + amrex::Real rate{}, drate_dT{}; + 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 = 17.9544 + -83.7215 * tfactors.T9i + 1.83199 * tfactors.T913 + + -0.290485 * tfactors.T9 + 0.0242929 * tfactors.T953; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 83.7215 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 1.83199 * tfactors.T923i + + -0.290485 + (5.0/3.0) * 0.0242929 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ne20_He4_to_n_Mg23_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ne20_He4_to_n_Mg23_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ne20_C12_to_p_P31_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ne20 + C12 --> p + P31 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // rolfr + ln_set_rate = -268.136 + -38.7624 * tfactors.T9i + 361.154 * tfactors.T913i + -92.643 * tfactors.T913 + + -9.98738 * tfactors.T9 + 0.892737 * tfactors.T953 + 161.042 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 38.7624 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 361.154 * tfactors.T943i + (1.0/3.0) * -92.643 * tfactors.T923i + + -9.98738 + (5.0/3.0) * 0.892737 * tfactors.T923 + 161.042 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ne20_C12_to_p_P31_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ne20_C12_to_p_P31_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ne20_C12_to_He4_Si28_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ne20 + C12 --> He4 + Si28 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // rolfr + ln_set_rate = -308.905 + -47.2175 * tfactors.T9i + 514.197 * tfactors.T913i + -200.896 * tfactors.T913 + + -6.42713 * tfactors.T9 + 0.758256 * tfactors.T953 + 236.359 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 47.2175 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 514.197 * tfactors.T943i + (1.0/3.0) * -200.896 * tfactors.T923i + + -6.42713 + (5.0/3.0) * 0.758256 * tfactors.T923 + 236.359 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ne20_C12_to_He4_Si28_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ne20_C12_to_He4_Si28_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mg23_n_to_He4_Ne20_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Mg23 + n --> He4 + Ne20 + + amrex::Real rate{}, drate_dT{}; + 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 = 17.7448 + 1.83199 * tfactors.T913 + + -0.290485 * tfactors.T9 + 0.0242929 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * 1.83199 * tfactors.T923i + + -0.290485 + (5.0/3.0) * 0.0242929 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mg23_n_to_He4_Ne20_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mg23_n_to_He4_Ne20_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mg23_n_to_C12_C12_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Mg23 + n --> C12 + C12 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // cf88r + ln_set_rate = -12.8267 + 11.4826 * tfactors.T913 + + 1.82849 * tfactors.T9 + -0.34844 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * 11.4826 * tfactors.T923i + + 1.82849 + (5.0/3.0) * -0.34844 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mg23_n_to_C12_C12_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mg23_n_to_C12_C12_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mg24_He4_to_n_Si27_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Mg24 + He4 --> n + Si27 + + amrex::Real rate{}, drate_dT{}; + 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 = 18.6606 + -83.5022 * tfactors.T9i + 0.942981 * tfactors.T913 + + -0.104624 * tfactors.T9 + 0.00723421 * tfactors.T953; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 83.5022 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 0.942981 * tfactors.T923i + + -0.104624 + (5.0/3.0) * 0.00723421 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mg24_He4_to_n_Si27_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mg24_He4_to_n_Si27_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mg24_He4_to_p_Al27_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Mg24 + He4 --> p + Al27 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10r + ln_set_rate = -26.2862 + -19.5422 * 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 (std::is_same_v) { + dln_set_rate_dT9 = 19.5422 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = -6.44575 + -22.8216 * 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 (std::is_same_v) { + dln_set_rate_dT9 = 22.8216 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10n + ln_set_rate = 30.0397 + -18.5791 * tfactors.T9i + -26.4162 * tfactors.T913i + + -2.0 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 18.5791 * 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 += 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mg24_He4_to_p_Al27_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mg24_He4_to_p_Al27_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mg24_He4_to_C12_O16_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Mg24 + He4 --> C12 + O16 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // cf88r + ln_set_rate = 49.5738 + -78.202 * 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 (std::is_same_v) { + dln_set_rate_dT9 = 78.202 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mg24_He4_to_C12_O16_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mg24_He4_to_C12_O16_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Al27_p_to_n_Si27_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Al27 + p --> n + Si27 + + amrex::Real rate{}, drate_dT{}; + 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 = 17.84 + -64.9237 * tfactors.T9i + 2.10552 * tfactors.T913 + + -0.318695 * tfactors.T9 + 0.0257496 * tfactors.T953; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 64.9237 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 2.10552 * tfactors.T923i + + -0.318695 + (5.0/3.0) * 0.0257496 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Al27_p_to_n_Si27_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Al27_p_to_n_Si27_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Al27_p_to_He4_Mg24_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Al27 + p --> He4 + Mg24 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10n + ln_set_rate = 29.4576 + -26.4162 * tfactors.T913i + + -2.0 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Al27_p_to_He4_Mg24_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Al27_p_to_He4_Mg24_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Al27_p_to_C12_O16_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Al27 + p --> C12 + O16 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // cf88r + ln_set_rate = 68.9829 + -59.8017 * 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 (std::is_same_v) { + dln_set_rate_dT9 = 59.8017 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Al27_p_to_C12_O16_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Al27_p_to_C12_O16_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Al27_He4_to_p_Si30_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Al27 + He4 --> p + Si30 + + amrex::Real rate{}, drate_dT{}; + 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 = 47.4856 + -56.5351 * tfactors.T913i + 1.60477 * tfactors.T913 + + -1.40594 * tfactors.T9 + 0.127353 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -56.5351 * tfactors.T943i + (1.0/3.0) * 1.60477 * tfactors.T923i + + -1.40594 + (5.0/3.0) * 0.127353 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Al27_He4_to_p_Si30_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Al27_He4_to_p_Si30_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si27_n_to_p_Al27_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Si27 + n --> p + Al27 + + amrex::Real rate{}, drate_dT{}; + 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 = 17.84 + 2.10552 * tfactors.T913 + + -0.318695 * tfactors.T9 + 0.0257496 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * 2.10552 * tfactors.T923i + + -0.318695 + (5.0/3.0) * 0.0257496 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si27_n_to_p_Al27_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si27_n_to_p_Al27_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si27_n_to_He4_Mg24_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Si27 + n --> He4 + Mg24 + + amrex::Real rate{}, drate_dT{}; + 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 = 18.0785 + 0.942981 * tfactors.T913 + + -0.104624 * tfactors.T9 + 0.00723421 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * 0.942981 * tfactors.T923i + + -0.104624 + (5.0/3.0) * 0.00723421 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si27_n_to_He4_Mg24_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si27_n_to_He4_Mg24_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si27_n_to_C12_O16_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Si27 + n --> C12 + O16 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // cf88r + ln_set_rate = -131.755 + 3.44391 * tfactors.T9i + -293.089 * tfactors.T913i + 414.404 * tfactors.T913 + + -28.0562 * tfactors.T9 + 1.61807 * tfactors.T953 + -178.28 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = -3.44391 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si27_n_to_C12_O16_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si27_n_to_C12_O16_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si28_He4_to_p_P31_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Si28 + He4 --> p + P31 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10r + ln_set_rate = -13.4595 + -24.112 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 24.112 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = -11.4335 + -25.6606 * 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 (std::is_same_v) { + dln_set_rate_dT9 = 25.6606 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10n + ln_set_rate = 60.3424 + -22.2348 * 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 += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 22.2348 * 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 += 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si28_He4_to_p_P31_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si28_He4_to_p_P31_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si28_He4_to_C12_Ne20_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Si28 + He4 --> C12 + Ne20 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // rolfr + ln_set_rate = -307.762 + -186.722 * tfactors.T9i + 514.197 * tfactors.T913i + -200.896 * tfactors.T913 + + -6.42713 * tfactors.T9 + 0.758256 * tfactors.T953 + 236.359 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 186.722 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 514.197 * tfactors.T943i + (1.0/3.0) * -200.896 * tfactors.T923i + + -6.42713 + (5.0/3.0) * 0.758256 * tfactors.T923 + 236.359 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si28_He4_to_C12_Ne20_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si28_He4_to_C12_Ne20_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si28_He4_to_O16_O16_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Si28 + He4 --> O16 + O16 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // cf88r + ln_set_rate = 97.7904 + -111.595 * 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 (std::is_same_v) { + dln_set_rate_dT9 = 111.595 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si28_He4_to_O16_O16_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si28_He4_to_O16_O16_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si29_p_to_n_P29_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Si29 + p --> n + P29 + + amrex::Real rate{}, drate_dT{}; + 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 = 18.5351 + -66.4331 * tfactors.T9i + 1.48018 * tfactors.T913 + + -0.177129 * tfactors.T9 + 0.0127163 * tfactors.T953; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 66.4331 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 1.48018 * tfactors.T923i + + -0.177129 + (5.0/3.0) * 0.0127163 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si29_p_to_n_P29_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si29_p_to_n_P29_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si29_He4_to_n_S32_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Si29 + He4 --> n + S32 + + amrex::Real rate{}, drate_dT{}; + 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 = -2.87932 + -17.7056 * tfactors.T9i + 9.48125 * tfactors.T913 + + 0.4472 * tfactors.T9 + -0.119237 * tfactors.T953; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 17.7056 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 9.48125 * tfactors.T923i + + 0.4472 + (5.0/3.0) * -0.119237 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si29_He4_to_n_S32_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si29_He4_to_n_S32_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si30_p_to_He4_Al27_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Si30 + p --> He4 + Al27 + + amrex::Real rate{}, drate_dT{}; + 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 = 50.5056 + -27.5284 * tfactors.T9i + -56.5351 * tfactors.T913i + 1.60477 * tfactors.T913 + + -1.40594 * tfactors.T9 + 0.127353 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 27.5284 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -56.5351 * tfactors.T943i + (1.0/3.0) * 1.60477 * tfactors.T923i + + -1.40594 + (5.0/3.0) * 0.127353 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si30_p_to_He4_Al27_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si30_p_to_He4_Al27_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si30_He4_to_n_S33_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Si30 + He4 --> n + S33 + + amrex::Real rate{}, drate_dT{}; + 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 = 17.3228 + -40.5385 * tfactors.T9i + -0.725571 * tfactors.T913 + + 0.430731 * tfactors.T9 + -0.0323663 * tfactors.T953; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 40.5385 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -0.725571 * tfactors.T923i + + 0.430731 + (5.0/3.0) * -0.0323663 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si30_He4_to_n_S33_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si30_He4_to_n_S33_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si30_He4_to_p_P33_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Si30 + He4 --> p + P33 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // rath + ln_set_rate = 81.0152 + -37.7526 * tfactors.T9i + 110.297 * tfactors.T913i + -193.863 * tfactors.T913 + + 11.4977 * tfactors.T9 + -0.687235 * tfactors.T953 + 94.819 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 37.7526 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 110.297 * tfactors.T943i + (1.0/3.0) * -193.863 * tfactors.T923i + + 11.4977 + (5.0/3.0) * -0.687235 * tfactors.T923 + 94.819 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si30_He4_to_p_P33_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si30_He4_to_p_P33_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si31_p_to_n_P31_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Si31 + p --> n + P31 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // rath + ln_set_rate = 80.5195 + -3.3832 * tfactors.T9i + 119.352 * tfactors.T913i + -198.709 * tfactors.T913 + + 10.5994 * tfactors.T9 + -0.583506 * tfactors.T953 + 100.693 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 3.3832 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 119.352 * tfactors.T943i + (1.0/3.0) * -198.709 * tfactors.T923i + + 10.5994 + (5.0/3.0) * -0.583506 * tfactors.T923 + 100.693 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si31_p_to_n_P31_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si31_p_to_n_P31_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si31_He4_to_n_S34_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Si31 + He4 --> n + S34 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // rath + ln_set_rate = -5.10649 + -2.7438 * tfactors.T9i + -22.4045 * tfactors.T913i + 23.4647 * tfactors.T913 + + -4.73922 * tfactors.T9 + 0.371237 * tfactors.T953 + 4.62837 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 2.7438 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -22.4045 * tfactors.T943i + (1.0/3.0) * 23.4647 * tfactors.T923i + + -4.73922 + (5.0/3.0) * 0.371237 * tfactors.T923 + 4.62837 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Si31_He4_to_n_S34_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si31_He4_to_n_S34_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_P29_n_to_p_Si29_reaclib(T& rate_eval, const tf_t& tfactors) { + + // P29 + n --> p + Si29 + + amrex::Real rate{}, drate_dT{}; + 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 = 18.5351 + 1.48018 * tfactors.T913 + + -0.177129 * tfactors.T9 + 0.0127163 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * 1.48018 * tfactors.T923i + + -0.177129 + (5.0/3.0) * 0.0127163 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_P29_n_to_p_Si29_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_P29_n_to_p_Si29_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_P29_He4_to_p_S32_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // P29 + He4 --> p + S32 + + amrex::Real rate{}, drate_dT{}; + 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 = 50.2824 + -62.3802 * tfactors.T913i + 0.459085 * tfactors.T913 + + -0.870169 * tfactors.T9 + 0.0631143 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -62.3802 * tfactors.T943i + (1.0/3.0) * 0.459085 * tfactors.T923i + + -0.870169 + (5.0/3.0) * 0.0631143 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_P29_He4_to_p_S32_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_P29_He4_to_p_S32_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_P31_n_to_p_Si31_reaclib(T& rate_eval, const tf_t& tfactors) { + + // P31 + n --> p + Si31 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // rath + ln_set_rate = 81.2126 + -11.6108 * tfactors.T9i + 119.352 * tfactors.T913i + -198.709 * tfactors.T913 + + 10.5994 * tfactors.T9 + -0.583506 * tfactors.T953 + 100.693 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 11.6108 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 119.352 * tfactors.T943i + (1.0/3.0) * -198.709 * tfactors.T923i + + 10.5994 + (5.0/3.0) * -0.583506 * tfactors.T923 + 100.693 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_P31_n_to_p_Si31_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_P31_n_to_p_Si31_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_P31_p_to_He4_Si28_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // P31 + p --> He4 + Si28 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = -12.919 + -1.87716 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10n + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_P31_p_to_He4_Si28_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_P31_p_to_He4_Si28_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_P31_p_to_C12_Ne20_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // P31 + p --> C12 + Ne20 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // rolfr + ln_set_rate = -266.452 + -156.019 * tfactors.T9i + 361.154 * tfactors.T913i + -92.643 * tfactors.T913 + + -9.98738 * tfactors.T9 + 0.892737 * tfactors.T953 + 161.042 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 156.019 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 361.154 * tfactors.T943i + (1.0/3.0) * -92.643 * tfactors.T923i + + -9.98738 + (5.0/3.0) * 0.892737 * tfactors.T923 + 161.042 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_P31_p_to_C12_Ne20_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_P31_p_to_C12_Ne20_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_P31_p_to_O16_O16_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // P31 + p --> O16 + O16 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // cf88r + ln_set_rate = 86.3501 + -88.8797 * 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 (std::is_same_v) { + dln_set_rate_dT9 = 88.8797 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_P31_p_to_O16_O16_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_P31_p_to_O16_O16_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_P31_He4_to_p_S34_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // P31 + He4 --> p + S34 + + amrex::Real rate{}, drate_dT{}; + 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 = 49.0993 + -62.5433 * tfactors.T913i + 1.69339 * tfactors.T913 + + -1.27872 * tfactors.T9 + 0.106616 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -62.5433 * tfactors.T943i + (1.0/3.0) * 1.69339 * tfactors.T923i + + -1.27872 + (5.0/3.0) * 0.106616 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_P31_He4_to_p_S34_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_P31_He4_to_p_S34_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_P33_p_to_n_S33_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // P33 + p --> n + S33 + + amrex::Real rate{}, drate_dT{}; + 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 = 5.79458 + -6.19492 * tfactors.T9i + 8.02978 * tfactors.T913 + + -0.479244 * tfactors.T9 + 0.0134889 * tfactors.T953; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 6.19492 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 8.02978 * tfactors.T923i + + -0.479244 + (5.0/3.0) * 0.0134889 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_P33_p_to_n_S33_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_P33_p_to_n_S33_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_P33_p_to_He4_Si30_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // P33 + p --> He4 + Si30 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // rath + ln_set_rate = 81.5654 + -3.41491 * tfactors.T9i + 110.297 * tfactors.T913i + -193.863 * tfactors.T913 + + 11.4977 * tfactors.T9 + -0.687235 * tfactors.T953 + 94.819 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 3.41491 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 110.297 * tfactors.T943i + (1.0/3.0) * -193.863 * tfactors.T923i + + 11.4977 + (5.0/3.0) * -0.687235 * tfactors.T923 + 94.819 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_P33_p_to_He4_Si30_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_P33_p_to_He4_Si30_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S32_n_to_He4_Si29_reaclib(T& rate_eval, const tf_t& tfactors) { + + // S32 + n --> He4 + Si29 + + amrex::Real rate{}, drate_dT{}; + 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 = -0.947538 + 9.48125 * tfactors.T913 + + 0.4472 * tfactors.T9 + -0.119237 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * 9.48125 * tfactors.T923i + + 0.4472 + (5.0/3.0) * -0.119237 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S32_n_to_He4_Si29_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S32_n_to_He4_Si29_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S32_p_to_He4_P29_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // S32 + p --> He4 + P29 + + amrex::Real rate{}, drate_dT{}; + 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 = 52.2142 + -48.7275 * tfactors.T9i + -62.3802 * tfactors.T913i + 0.459085 * tfactors.T913 + + -0.870169 * tfactors.T9 + 0.0631143 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 48.7275 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -62.3802 * tfactors.T943i + (1.0/3.0) * 0.459085 * tfactors.T923i + + -0.870169 + (5.0/3.0) * 0.0631143 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S32_p_to_He4_P29_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S32_p_to_He4_P29_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S32_He4_to_p_Cl35_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // S32 + He4 --> p + Cl35 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10r + ln_set_rate = -57.395 + -22.1894 * 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 (std::is_same_v) { + dln_set_rate_dT9 = 22.1894 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10n + ln_set_rate = 32.2544 + -21.6564 * 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 += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 21.6564 * 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 += 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = 2.42563 + -27.6662 * 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 (std::is_same_v) { + dln_set_rate_dT9 = 27.6662 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = -0.877602 + -25.5914 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 25.5914 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S32_He4_to_p_Cl35_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S32_He4_to_p_Cl35_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S33_n_to_p_P33_reaclib(T& rate_eval, const tf_t& tfactors) { + + // S33 + n --> p + P33 + + amrex::Real rate{}, drate_dT{}; + 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 = 5.10143 + 8.02978 * tfactors.T913 + + -0.479244 * tfactors.T9 + 0.0134889 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * 8.02978 * tfactors.T923i + + -0.479244 + (5.0/3.0) * 0.0134889 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S33_n_to_p_P33_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S33_n_to_p_P33_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S33_n_to_He4_Si30_reaclib(T& rate_eval, const tf_t& tfactors) { + + // S33 + n --> He4 + Si30 + + amrex::Real rate{}, drate_dT{}; + 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 = 17.1798 + -0.725571 * tfactors.T913 + + 0.430731 * tfactors.T9 + -0.0323663 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -0.725571 * tfactors.T923i + + 0.430731 + (5.0/3.0) * -0.0323663 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S33_n_to_He4_Si30_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S33_n_to_He4_Si30_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S33_p_to_n_Cl33_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // S33 + p --> n + Cl33 + + amrex::Real rate{}, drate_dT{}; + 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 = 18.5772 + -73.8616 * tfactors.T9i + 1.39633 * tfactors.T913 + + -0.136457 * tfactors.T9 + 0.00585594 * tfactors.T953; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 73.8616 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 1.39633 * tfactors.T923i + + -0.136457 + (5.0/3.0) * 0.00585594 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S33_p_to_n_Cl33_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S33_p_to_n_Cl33_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S33_He4_to_n_Ar36_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // S33 + He4 --> n + Ar36 + + amrex::Real rate{}, drate_dT{}; + 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 = 0.398258 + -23.219 * tfactors.T9i + 5.44923 * tfactors.T913 + + 1.17359 * tfactors.T9 + -0.175811 * tfactors.T953; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 23.219 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 5.44923 * tfactors.T923i + + 1.17359 + (5.0/3.0) * -0.175811 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S33_He4_to_n_Ar36_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S33_He4_to_n_Ar36_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S34_n_to_He4_Si31_reaclib(T& rate_eval, const tf_t& tfactors) { + + // S34 + n --> He4 + Si31 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // rath + ln_set_rate = -2.47246 + -18.2474 * tfactors.T9i + -22.4045 * tfactors.T913i + 23.4647 * tfactors.T913 + + -4.73922 * tfactors.T9 + 0.371237 * tfactors.T953 + 4.62837 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 18.2474 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -22.4045 * tfactors.T943i + (1.0/3.0) * 23.4647 * tfactors.T923i + + -4.73922 + (5.0/3.0) * 0.371237 * tfactors.T923 + 4.62837 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S34_n_to_He4_Si31_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S34_n_to_He4_Si31_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S34_p_to_He4_P31_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // S34 + p --> He4 + P31 + + amrex::Real rate{}, drate_dT{}; + 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 = 51.0402 + -7.27426 * tfactors.T9i + -62.5433 * tfactors.T913i + 1.69339 * tfactors.T913 + + -1.27872 * tfactors.T9 + 0.106616 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 7.27426 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -62.5433 * tfactors.T943i + (1.0/3.0) * 1.69339 * tfactors.T923i + + -1.27872 + (5.0/3.0) * 0.106616 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S34_p_to_He4_P31_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S34_p_to_He4_P31_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S34_He4_to_n_Ar37_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // S34 + He4 --> n + Ar37 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // SM93 + ln_set_rate = 18.5358 + -53.7288 * tfactors.T9i + -1.69894 * tfactors.T913 + + 0.371187 * tfactors.T9 + -0.0457242 * tfactors.T953 + 1.0 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 53.7288 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -1.69894 * tfactors.T923i + + 0.371187 + (5.0/3.0) * -0.0457242 * tfactors.T923 + 1.0 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // SM93 + ln_set_rate = 18.5358 + -53.7288 * tfactors.T9i + 0.522368 * tfactors.T913 + + -1.03944 * tfactors.T9 + 0.142735 * tfactors.T953; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 53.7288 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 0.522368 * tfactors.T923i + + -1.03944 + (5.0/3.0) * 0.142735 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S34_He4_to_n_Ar37_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S34_He4_to_n_Ar37_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S34_He4_to_p_Cl37_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // S34 + He4 --> p + Cl37 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // SM93 + ln_set_rate = 80.8229 + -35.2081 * tfactors.T9i + -47.5185 * tfactors.T913i + -32.046 * tfactors.T913 + + 4.43077 * tfactors.T9 + -0.368628 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 35.2081 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -47.5185 * tfactors.T943i + (1.0/3.0) * -32.046 * tfactors.T923i + + 4.43077 + (5.0/3.0) * -0.368628 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S34_He4_to_p_Cl37_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S34_He4_to_p_Cl37_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S35_p_to_n_Cl35_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // S35 + p --> n + Cl35 + + amrex::Real rate{}, drate_dT{}; + 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 = 7.51079 + -7.13865 * tfactors.T9i + 6.51754 * tfactors.T913 + + -0.295846 * tfactors.T9 + -0.00271436 * tfactors.T953; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 7.13865 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 6.51754 * tfactors.T923i + + -0.295846 + (5.0/3.0) * -0.00271436 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S35_p_to_n_Cl35_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S35_p_to_n_Cl35_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S35_He4_to_n_Ar38_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // S35 + He4 --> n + Ar38 + + amrex::Real rate{}, drate_dT{}; + 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 = 51.1473 + -65.58 * tfactors.T913i + 0.762185 * tfactors.T913 + + -0.938779 * tfactors.T9 + 0.0668864 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -65.58 * tfactors.T943i + (1.0/3.0) * 0.762185 * tfactors.T923i + + -0.938779 + (5.0/3.0) * 0.0668864 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_S35_He4_to_n_Ar38_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S35_He4_to_n_Ar38_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cl33_n_to_p_S33_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cl33 + n --> p + S33 + + amrex::Real rate{}, drate_dT{}; + 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 = 18.5772 + 1.39633 * tfactors.T913 + + -0.136457 * tfactors.T9 + 0.00585594 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * 1.39633 * tfactors.T923i + + -0.136457 + (5.0/3.0) * 0.00585594 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cl33_n_to_p_S33_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cl33_n_to_p_S33_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cl33_He4_to_p_Ar36_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cl33 + He4 --> p + Ar36 + + amrex::Real rate{}, drate_dT{}; + 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 = 52.1588 + -68.1442 * tfactors.T913i + 0.291238 * tfactors.T913 + + -0.791384 * tfactors.T9 + 0.0524823 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -68.1442 * tfactors.T943i + (1.0/3.0) * 0.291238 * tfactors.T923i + + -0.791384 + (5.0/3.0) * 0.0524823 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cl33_He4_to_p_Ar36_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cl33_He4_to_p_Ar36_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cl35_n_to_p_S35_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cl35 + n --> p + S35 + + amrex::Real rate{}, drate_dT{}; + 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 = 7.51079 + 6.51754 * tfactors.T913 + + -0.295846 * tfactors.T9 + -0.00271436 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * 6.51754 * tfactors.T923i + + -0.295846 + (5.0/3.0) * -0.00271436 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cl35_n_to_p_S35_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cl35_n_to_p_S35_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cl35_p_to_He4_S32_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cl35 + p --> He4 + S32 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10r + ln_set_rate = -1.01202 + -3.93495 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10n + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cl35_p_to_He4_S32_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cl35_p_to_He4_S32_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cl35_He4_to_p_Ar38_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cl35 + He4 --> p + Ar38 + + amrex::Real rate{}, drate_dT{}; + 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 = 51.1272 + -68.2848 * tfactors.T913i + 2.5993 * tfactors.T913 + + -1.59144 * tfactors.T9 + 0.137745 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -68.2848 * tfactors.T943i + (1.0/3.0) * 2.5993 * tfactors.T923i + + -1.59144 + (5.0/3.0) * 0.137745 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cl35_He4_to_p_Ar38_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cl35_He4_to_p_Ar38_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cl37_p_to_n_Ar37_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cl37 + p --> n + Ar37 + + amrex::Real rate{}, drate_dT{}; + 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 = 16.2094 + -18.5233 * tfactors.T9i + 1.64495 * tfactors.T913 + + -0.154677 * tfactors.T9 + 0.0083347 * tfactors.T953; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 18.5233 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 1.64495 * tfactors.T923i + + -0.154677 + (5.0/3.0) * 0.0083347 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cl37_p_to_n_Ar37_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cl37_p_to_n_Ar37_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cl37_p_to_He4_S34_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cl37 + p --> He4 + S34 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // SM93 + ln_set_rate = 80.6961 + -47.5185 * tfactors.T913i + -32.046 * tfactors.T913 + + 4.43077 * tfactors.T9 + -0.368628 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -47.5185 * tfactors.T943i + (1.0/3.0) * -32.046 * tfactors.T923i + + 4.43077 + (5.0/3.0) * -0.368628 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cl37_p_to_He4_S34_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cl37_p_to_He4_S34_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar36_n_to_He4_S33_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ar36 + n --> He4 + S33 + + amrex::Real rate{}, drate_dT{}; + 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 = 3.04033 + 5.44923 * tfactors.T913 + + 1.17359 * tfactors.T9 + -0.175811 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * 5.44923 * tfactors.T923i + + 1.17359 + (5.0/3.0) * -0.175811 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ar36_n_to_He4_S33_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar36_n_to_He4_S33_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar36_p_to_He4_Cl33_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ar36 + p --> He4 + Cl33 + + amrex::Real rate{}, drate_dT{}; + 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 = 54.8009 + -50.6426 * tfactors.T9i + -68.1442 * tfactors.T913i + 0.291238 * tfactors.T913 + + -0.791384 * tfactors.T9 + 0.0524823 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 50.6426 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -68.1442 * tfactors.T943i + (1.0/3.0) * 0.291238 * tfactors.T923i + + -0.791384 + (5.0/3.0) * 0.0524823 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ar36_p_to_He4_Cl33_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar36_p_to_He4_Cl33_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar36_He4_to_p_K39_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ar36 + He4 --> p + K39 + + amrex::Real rate{}, drate_dT{}; + 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.6367 + -14.9533 * 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 += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 14.9533 * 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 += 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ar36_He4_to_p_K39_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar36_He4_to_p_K39_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar37_n_to_p_Cl37_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ar37 + n --> p + Cl37 + + amrex::Real rate{}, drate_dT{}; + 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 = 16.2094 + 1.64495 * tfactors.T913 + + -0.154677 * tfactors.T9 + 0.0083347 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * 1.64495 * tfactors.T923i + + -0.154677 + (5.0/3.0) * 0.0083347 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ar37_n_to_p_Cl37_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar37_n_to_p_Cl37_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar37_n_to_He4_S34_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ar37 + n --> He4 + S34 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // SM93 + ln_set_rate = 18.409 + -1.69894 * tfactors.T913 + + 0.371187 * tfactors.T9 + -0.0457242 * tfactors.T953 + 1.0 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -1.69894 * tfactors.T923i + + 0.371187 + (5.0/3.0) * -0.0457242 * tfactors.T923 + 1.0 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // SM93 + ln_set_rate = 18.409 + 0.522368 * tfactors.T913 + + -1.03944 * tfactors.T9 + 0.142735 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * 0.522368 * tfactors.T923i + + -1.03944 + (5.0/3.0) * 0.142735 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ar37_n_to_He4_S34_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar37_n_to_He4_S34_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar37_p_to_n_K37_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ar37 + p --> n + K37 + + amrex::Real rate{}, drate_dT{}; + 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 = 19.3703 + -80.417 * tfactors.T9i + 0.399131 * tfactors.T913 + + 0.0819317 * tfactors.T9 + -0.0133489 * tfactors.T953; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 80.417 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 0.399131 * tfactors.T923i + + 0.0819317 + (5.0/3.0) * -0.0133489 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ar37_p_to_n_K37_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar37_p_to_n_K37_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar37_He4_to_n_Ca40_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ar37 + He4 --> n + Ca40 + + amrex::Real rate{}, drate_dT{}; + 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 = -12.0914 + -20.2822 * tfactors.T9i + 13.8882 * tfactors.T913 + + 0.260223 * tfactors.T9 + -0.108063 * tfactors.T953; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 20.2822 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 13.8882 * tfactors.T923i + + 0.260223 + (5.0/3.0) * -0.108063 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ar37_He4_to_n_Ca40_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar37_He4_to_n_Ca40_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar38_n_to_He4_S35_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ar38 + n --> He4 + S35 + + amrex::Real rate{}, drate_dT{}; + 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 = 53.7965 + -2.57381 * tfactors.T9i + -65.58 * tfactors.T913i + 0.762185 * tfactors.T913 + + -0.938779 * tfactors.T9 + 0.0668864 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 2.57381 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -65.58 * tfactors.T943i + (1.0/3.0) * 0.762185 * tfactors.T923i + + -0.938779 + (5.0/3.0) * 0.0668864 * tfactors.T923 + -0.666667 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ar38_n_to_He4_S35_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar38_n_to_He4_S35_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar38_p_to_He4_Cl35_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ar38 + p --> He4 + Cl35 + + amrex::Real rate{}, drate_dT{}; + 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 = 53.7764 + -9.71246 * tfactors.T9i + -68.2848 * tfactors.T913i + 2.5993 * tfactors.T913 + + -1.59144 * tfactors.T9 + 0.137745 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 9.71246 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -68.2848 * tfactors.T943i + (1.0/3.0) * 2.5993 * tfactors.T923i + + -1.59144 + (5.0/3.0) * 0.137745 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ar38_p_to_He4_Cl35_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar38_p_to_He4_Cl35_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_K37_n_to_p_Ar37_reaclib(T& rate_eval, const tf_t& tfactors) { + + // K37 + n --> p + Ar37 + + amrex::Real rate{}, drate_dT{}; + 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 = 19.3703 + 0.399131 * tfactors.T913 + + 0.0819317 * tfactors.T9 + -0.0133489 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * 0.399131 * tfactors.T923i + + 0.0819317 + (5.0/3.0) * -0.0133489 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_K37_n_to_p_Ar37_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_K37_n_to_p_Ar37_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_K37_He4_to_p_Ca40_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // K37 + He4 --> p + Ca40 + + amrex::Real rate{}, drate_dT{}; + 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 = 54.2966 + -73.6776 * tfactors.T913i + 0.493294 * tfactors.T913 + + -0.902307 * tfactors.T9 + 0.0641391 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -73.6776 * tfactors.T943i + (1.0/3.0) * 0.493294 * tfactors.T923i + + -0.902307 + (5.0/3.0) * 0.0641391 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_K37_He4_to_p_Ca40_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_K37_He4_to_p_Ca40_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_K39_p_to_He4_Ar36_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // K39 + p --> He4 + Ar36 + + amrex::Real rate{}, drate_dT{}; + 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.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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_K39_p_to_He4_Ar36_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_K39_p_to_He4_Ar36_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_K39_He4_to_p_Ca42_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // K39 + He4 --> p + Ca42 + + amrex::Real rate{}, drate_dT{}; + 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 = -80.8734 + -1.43889 * tfactors.T9i + -31.1381 * tfactors.T913i + 117.868 * tfactors.T913 + + -27.0455 * tfactors.T9 + 2.75661 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 1.43889 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -31.1381 * tfactors.T943i + (1.0/3.0) * 117.868 * tfactors.T923i + + -27.0455 + (5.0/3.0) * 2.75661 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_K39_He4_to_p_Ca42_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_K39_He4_to_p_Ca42_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ca40_n_to_He4_Ar37_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ca40 + n --> He4 + Ar37 + + amrex::Real rate{}, drate_dT{}; + 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 = -9.43576 + 13.8882 * tfactors.T913 + + 0.260223 * tfactors.T9 + -0.108063 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * 13.8882 * tfactors.T923i + + 0.260223 + (5.0/3.0) * -0.108063 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ca40_n_to_He4_Ar37_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ca40_n_to_He4_Ar37_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ca40_p_to_He4_K37_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ca40 + p --> He4 + K37 + + amrex::Real rate{}, drate_dT{}; + 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 = 56.9522 + -60.1348 * tfactors.T9i + -73.6776 * tfactors.T913i + 0.493294 * tfactors.T913 + + -0.902307 * tfactors.T9 + 0.0641391 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 60.1348 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -73.6776 * tfactors.T943i + (1.0/3.0) * 0.493294 * tfactors.T923i + + -0.902307 + (5.0/3.0) * 0.0641391 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ca40_p_to_He4_K37_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ca40_p_to_He4_K37_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ca40_He4_to_p_Sc43_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ca40 + He4 --> p + Sc43 + + amrex::Real rate{}, drate_dT{}; + 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 = 35.6575 + -40.8757 * 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 += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 40.8757 * 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 += 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ca40_He4_to_p_Sc43_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ca40_He4_to_p_Sc43_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ca42_p_to_He4_K39_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ca42 + p --> He4 + K39 + + amrex::Real rate{}, drate_dT{}; + 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 = -78.212 + -31.1381 * tfactors.T913i + 117.868 * tfactors.T913 + + -27.0455 * tfactors.T9 + 2.75661 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -31.1381 * tfactors.T943i + (1.0/3.0) * 117.868 * tfactors.T923i + + -27.0455 + (5.0/3.0) * 2.75661 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ca42_p_to_He4_K39_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ca42_p_to_He4_K39_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ca42_He4_to_p_Sc45_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ca42 + He4 --> p + Sc45 + + amrex::Real rate{}, drate_dT{}; + 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 = 18.625 + -27.1933 * tfactors.T9i + -32.1843 * tfactors.T913i + 14.0733 * tfactors.T913 + + -3.38786 * tfactors.T9 + 0.349494 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 27.1933 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -32.1843 * tfactors.T943i + (1.0/3.0) * 14.0733 * tfactors.T923i + + -3.38786 + (5.0/3.0) * 0.349494 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ca42_He4_to_p_Sc45_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ca42_He4_to_p_Sc45_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc41_He4_to_p_Ti44_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Sc41 + He4 --> p + Ti44 + + amrex::Real rate{}, drate_dT{}; + 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 = 57.4853 + -79.013 * tfactors.T913i + -0.989013 * tfactors.T913 + + -0.463943 * tfactors.T9 + 0.00902542 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -79.013 * tfactors.T943i + (1.0/3.0) * -0.989013 * tfactors.T923i + + -0.463943 + (5.0/3.0) * 0.00902542 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Sc41_He4_to_p_Ti44_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc41_He4_to_p_Ti44_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc43_p_to_He4_Ca40_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Sc43 + p --> He4 + Ca40 + + amrex::Real rate{}, drate_dT{}; + 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 = 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Sc43_p_to_He4_Ca40_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc43_p_to_He4_Ca40_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc43_He4_to_p_Ti46_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Sc43 + He4 --> p + Ti46 + + amrex::Real rate{}, drate_dT{}; + 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 = 57.3723 + -79.122 * tfactors.T913i + -0.495539 * tfactors.T913 + + -0.618414 * tfactors.T9 + 0.0175873 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -79.122 * tfactors.T943i + (1.0/3.0) * -0.495539 * tfactors.T923i + + -0.618414 + (5.0/3.0) * 0.0175873 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Sc43_He4_to_p_Ti46_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc43_He4_to_p_Ti46_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc45_p_to_He4_Ca42_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Sc45 + p --> He4 + Ca42 + + amrex::Real rate{}, drate_dT{}; + 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 = 17.8284 + -32.1843 * tfactors.T913i + 14.0733 * tfactors.T913 + + -3.38786 * tfactors.T9 + 0.349494 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -32.1843 * tfactors.T943i + (1.0/3.0) * 14.0733 * tfactors.T923i + + -3.38786 + (5.0/3.0) * 0.349494 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Sc45_p_to_He4_Ca42_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc45_p_to_He4_Ca42_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc45_He4_to_p_Ti48_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Sc45 + He4 --> p + Ti48 + + amrex::Real rate{}, drate_dT{}; + 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 = 57.207 + -79.222 * tfactors.T913i + 0.0710184 * tfactors.T913 + + -1.47173 * tfactors.T9 + 0.15944 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -79.222 * tfactors.T943i + (1.0/3.0) * 0.0710184 * tfactors.T923i + + -1.47173 + (5.0/3.0) * 0.15944 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Sc45_He4_to_p_Ti48_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc45_He4_to_p_Ti48_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti44_p_to_He4_Sc41_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ti44 + p --> He4 + Sc41 + + amrex::Real rate{}, drate_dT{}; + 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 = 60.8451 + -46.9055 * tfactors.T9i + -79.013 * tfactors.T913i + -0.989013 * tfactors.T913 + + -0.463943 * tfactors.T9 + 0.00902542 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 46.9055 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -79.013 * tfactors.T943i + (1.0/3.0) * -0.989013 * tfactors.T923i + + -0.463943 + (5.0/3.0) * 0.00902542 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ti44_p_to_He4_Sc41_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti44_p_to_He4_Sc41_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti44_He4_to_p_V47_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ti44 + He4 --> p + V47 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // chw0r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ti44_He4_to_p_V47_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti44_He4_to_p_V47_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti46_p_to_He4_Sc43_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ti46 + p --> He4 + Sc43 + + amrex::Real rate{}, drate_dT{}; + 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 = 60.7369 + -35.6425 * tfactors.T9i + -79.122 * tfactors.T913i + -0.495539 * tfactors.T913 + + -0.618414 * tfactors.T9 + 0.0175873 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 35.6425 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -79.122 * tfactors.T943i + (1.0/3.0) * -0.495539 * tfactors.T923i + + -0.618414 + (5.0/3.0) * 0.0175873 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ti46_p_to_He4_Sc43_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti46_p_to_He4_Sc43_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti46_He4_to_p_V49_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ti46 + He4 --> p + V49 + + amrex::Real rate{}, drate_dT{}; + 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 = -19.3117 + -11.9588 * tfactors.T9i + -34.217 * tfactors.T913i + 47.2584 * tfactors.T913 + + -9.18871 * tfactors.T9 + 0.87823 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 11.9588 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -34.217 * tfactors.T943i + (1.0/3.0) * 47.2584 * tfactors.T923i + + -9.18871 + (5.0/3.0) * 0.87823 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ti46_He4_to_p_V49_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti46_He4_to_p_V49_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti48_p_to_He4_Sc45_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ti48 + p --> He4 + Sc45 + + amrex::Real rate{}, drate_dT{}; + 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 = 60.5759 + -29.6597 * tfactors.T9i + -79.222 * tfactors.T913i + 0.0710184 * tfactors.T913 + + -1.47173 * tfactors.T9 + 0.15944 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 29.6597 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -79.222 * tfactors.T943i + (1.0/3.0) * 0.0710184 * tfactors.T923i + + -1.47173 + (5.0/3.0) * 0.15944 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ti48_p_to_He4_Sc45_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti48_p_to_He4_Sc45_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti48_He4_to_p_V51_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ti48 + He4 --> p + V51 + + amrex::Real rate{}, drate_dT{}; + 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 = -12.9707 + -13.3498 * tfactors.T9i + -34.2261 * tfactors.T913i + 38.6574 * tfactors.T913 + + -7.18743 * tfactors.T9 + 0.692255 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 13.3498 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -34.2261 * tfactors.T943i + (1.0/3.0) * 38.6574 * tfactors.T923i + + -7.18743 + (5.0/3.0) * 0.692255 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ti48_He4_to_p_V51_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti48_He4_to_p_V51_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V47_p_to_He4_Ti44_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // V47 + p --> He4 + Ti44 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // chw0r + ln_set_rate = -76.6143 + -6.02945 * 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 (std::is_same_v) { + dln_set_rate_dT9 = 6.02945 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V47_p_to_He4_Ti44_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V47_p_to_He4_Ti44_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V47_He4_to_p_Cr50_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // V47 + He4 --> p + Cr50 + + amrex::Real rate{}, drate_dT{}; + 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 = 59.9106 + -84.2732 * tfactors.T913i + -1.10027 * tfactors.T913 + + -0.487084 * tfactors.T9 + 0.00453269 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -84.2732 * tfactors.T943i + (1.0/3.0) * -1.10027 * tfactors.T923i + + -0.487084 + (5.0/3.0) * 0.00453269 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V47_He4_to_p_Cr50_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V47_He4_to_p_Cr50_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V49_p_to_He4_Ti46_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // V49 + p --> He4 + Ti46 + + amrex::Real rate{}, drate_dT{}; + 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.0996 + -34.217 * tfactors.T913i + 47.2584 * tfactors.T913 + + -9.18871 * tfactors.T9 + 0.87823 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -34.217 * tfactors.T943i + (1.0/3.0) * 47.2584 * tfactors.T923i + + -9.18871 + (5.0/3.0) * 0.87823 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V49_p_to_He4_Ti46_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V49_p_to_He4_Ti46_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V49_He4_to_p_Cr52_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // V49 + He4 --> p + Cr52 + + amrex::Real rate{}, drate_dT{}; + 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 = 57.428 + -84.3633 * tfactors.T913i + 2.73419 * tfactors.T913 + + -2.05655 * tfactors.T9 + 0.203834 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -84.3633 * tfactors.T943i + (1.0/3.0) * 2.73419 * tfactors.T923i + + -2.05655 + (5.0/3.0) * 0.203834 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V49_He4_to_p_Cr52_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V49_He4_to_p_Cr52_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V51_p_to_He4_Ti48_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // V51 + p --> He4 + Ti48 + + amrex::Real rate{}, drate_dT{}; + 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 = -13.7548 + -34.2261 * tfactors.T913i + 38.6574 * tfactors.T913 + + -7.18743 * tfactors.T9 + 0.692255 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -34.2261 * tfactors.T943i + (1.0/3.0) * 38.6574 * tfactors.T923i + + -7.18743 + (5.0/3.0) * 0.692255 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V51_p_to_He4_Ti48_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V51_p_to_He4_Ti48_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V51_He4_to_p_Cr54_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // V51 + He4 --> p + Cr54 + + amrex::Real rate{}, drate_dT{}; + 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 = -98.078 + -1.54216 * tfactors.T9i + -35.2237 * tfactors.T913i + 131.726 * tfactors.T913 + + -29.7395 * tfactors.T9 + 3.03809 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 1.54216 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -35.2237 * tfactors.T943i + (1.0/3.0) * 131.726 * tfactors.T923i + + -29.7395 + (5.0/3.0) * 3.03809 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V51_He4_to_p_Cr54_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V51_He4_to_p_Cr54_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr48_He4_to_p_Mn51_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cr48 + He4 --> p + Mn51 + + amrex::Real rate{}, drate_dT{}; + 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 = 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr48_He4_to_p_Mn51_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr48_He4_to_p_Mn51_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr50_p_to_He4_V47_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cr50 + p --> He4 + V47 + + amrex::Real rate{}, drate_dT{}; + 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 = 62.5904 + -39.3786 * tfactors.T9i + -84.2732 * tfactors.T913i + -1.10027 * tfactors.T913 + + -0.487084 * tfactors.T9 + 0.00453269 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 39.3786 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -84.2732 * tfactors.T943i + (1.0/3.0) * -1.10027 * tfactors.T923i + + -0.487084 + (5.0/3.0) * 0.00453269 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr50_p_to_He4_V47_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr50_p_to_He4_V47_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr50_He4_to_p_Mn53_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cr50 + He4 --> p + Mn53 + + amrex::Real rate{}, drate_dT{}; + 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 = -67.5619 + -5.0555 * tfactors.T9i + -36.1913 * tfactors.T913i + 99.0857 * tfactors.T913 + + -20.8943 * tfactors.T9 + 2.06209 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 5.0555 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -36.1913 * tfactors.T943i + (1.0/3.0) * 99.0857 * tfactors.T923i + + -20.8943 + (5.0/3.0) * 2.06209 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr50_He4_to_p_Mn53_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr50_He4_to_p_Mn53_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr52_p_to_He4_V49_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cr52 + p --> He4 + V49 + + amrex::Real rate{}, drate_dT{}; + 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 = 60.8046 + -30.1245 * tfactors.T9i + -84.3633 * tfactors.T913i + 2.73419 * tfactors.T913 + + -2.05655 * tfactors.T9 + 0.203834 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 30.1245 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -84.3633 * tfactors.T943i + (1.0/3.0) * 2.73419 * tfactors.T923i + + -2.05655 + (5.0/3.0) * 0.203834 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr52_p_to_He4_V49_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr52_p_to_He4_V49_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr52_He4_to_p_Mn55_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cr52 + He4 --> p + Mn55 + + amrex::Real rate{}, drate_dT{}; + 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 = 18.2793 + -29.8283 * tfactors.T9i + -36.1995 * tfactors.T913i + 11.023 * tfactors.T913 + + -2.435 * tfactors.T9 + 0.306933 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 29.8283 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -36.1995 * tfactors.T943i + (1.0/3.0) * 11.023 * tfactors.T923i + + -2.435 + (5.0/3.0) * 0.306933 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr52_He4_to_p_Mn55_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr52_He4_to_p_Mn55_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr54_p_to_He4_V51_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cr54 + p --> He4 + V51 + + amrex::Real rate{}, drate_dT{}; + 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 = -94.698 + -35.2237 * tfactors.T913i + 131.726 * tfactors.T913 + + -29.7395 * tfactors.T9 + 3.03809 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -35.2237 * tfactors.T943i + (1.0/3.0) * 131.726 * tfactors.T923i + + -29.7395 + (5.0/3.0) * 3.03809 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr54_p_to_He4_V51_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr54_p_to_He4_V51_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn51_p_to_He4_Cr48_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Mn51 + p --> He4 + Cr48 + + amrex::Real rate{}, drate_dT{}; + 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 = 58.7312 + -6.47654 * 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 += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 6.47654 * 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 += 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn51_p_to_He4_Cr48_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn51_p_to_He4_Cr48_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn51_He4_to_p_Fe54_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Mn51 + He4 --> p + Fe54 + + amrex::Real rate{}, drate_dT{}; + 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 = 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn51_He4_to_p_Fe54_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn51_He4_to_p_Fe54_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn53_p_to_He4_Cr50_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Mn53 + p --> He4 + Cr50 + + amrex::Real rate{}, drate_dT{}; + 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 = -68.3424 + -36.1913 * tfactors.T913i + 99.0857 * tfactors.T913 + + -20.8943 * tfactors.T9 + 2.06209 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -36.1913 * tfactors.T943i + (1.0/3.0) * 99.0857 * tfactors.T923i + + -20.8943 + (5.0/3.0) * 2.06209 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn53_p_to_He4_Cr50_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn53_p_to_He4_Cr50_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn53_He4_to_n_Co56_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Mn53 + He4 --> n + Co56 + + amrex::Real rate{}, drate_dT{}; + 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.3813 + -49.8407 * tfactors.T9i + -2.81854 * tfactors.T913 + + 1.84188 * tfactors.T9 + -0.164509 * tfactors.T953; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 49.8407 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -2.81854 * tfactors.T923i + + 1.84188 + (5.0/3.0) * -0.164509 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn53_He4_to_n_Co56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn53_He4_to_n_Co56_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn53_He4_to_p_Fe56_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Mn53 + He4 --> p + Fe56 + + amrex::Real rate{}, drate_dT{}; + 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 = 54.0176 + -89.3558 * tfactors.T913i + 9.25287 * tfactors.T913 + + -3.70352 * tfactors.T9 + 0.372202 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -89.3558 * tfactors.T943i + (1.0/3.0) * 9.25287 * tfactors.T923i + + -3.70352 + (5.0/3.0) * 0.372202 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn53_He4_to_p_Fe56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn53_He4_to_p_Fe56_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn55_p_to_He4_Cr52_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Mn55 + p --> He4 + Cr52 + + amrex::Real rate{}, drate_dT{}; + 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 = 17.7897 + -36.1995 * tfactors.T913i + 11.023 * tfactors.T913 + + -2.435 * tfactors.T9 + 0.306933 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -36.1995 * tfactors.T943i + (1.0/3.0) * 11.023 * tfactors.T923i + + -2.435 + (5.0/3.0) * 0.306933 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn55_p_to_He4_Cr52_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn55_p_to_He4_Cr52_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn55_He4_to_p_Fe58_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Mn55 + He4 --> p + Fe58 + + amrex::Real rate{}, drate_dT{}; + 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 = -77.6133 + -4.88801 * tfactors.T9i + -37.17 * tfactors.T913i + 110.878 * tfactors.T913 + + -24.5555 * tfactors.T9 + 2.47003 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 4.88801 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -37.17 * tfactors.T943i + (1.0/3.0) * 110.878 * tfactors.T923i + + -24.5555 + (5.0/3.0) * 2.47003 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn55_He4_to_p_Fe58_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn55_He4_to_p_Fe58_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe52_He4_to_p_Co55_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Fe52 + He4 --> p + Co55 + + amrex::Real rate{}, drate_dT{}; + 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 = 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 (std::is_same_v) { + 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe52_He4_to_p_Co55_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe52_He4_to_p_Co55_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe54_p_to_He4_Mn51_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Fe54 + p --> He4 + Mn51 + + amrex::Real rate{}, drate_dT{}; + 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.37 + -36.5201 * 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 += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 36.5201 * 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 += 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe54_p_to_He4_Mn51_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe54_p_to_He4_Mn51_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe54_He4_to_p_Co57_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Fe54 + He4 --> p + Co57 + + amrex::Real rate{}, drate_dT{}; + 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 = -1.42195 + -20.5668 * 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 += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 20.5668 * 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 += 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe54_He4_to_p_Co57_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe54_He4_to_p_Co57_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe56_p_to_n_Co56_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Fe56 + p --> n + Co56 + + amrex::Real rate{}, drate_dT{}; + 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 = 22.6511 + -62.0649 * tfactors.T9i + -1.13331 * tfactors.T913 + + 0.347185 * tfactors.T9 + -0.0328879 * tfactors.T953; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 62.0649 * 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 += 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe56_p_to_n_Co56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe56_p_to_n_Co56_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe56_p_to_He4_Mn53_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Fe56 + p --> He4 + Mn53 + + amrex::Real rate{}, drate_dT{}; + 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 = 57.4007 + -12.2241 * tfactors.T9i + -89.3558 * tfactors.T913i + 9.25287 * tfactors.T913 + + -3.70352 * tfactors.T9 + 0.372202 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 12.2241 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -89.3558 * tfactors.T943i + (1.0/3.0) * 9.25287 * tfactors.T923i + + -3.70352 + (5.0/3.0) * 0.372202 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe56_p_to_He4_Mn53_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe56_p_to_He4_Mn53_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe56_He4_to_p_Co59_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Fe56 + He4 --> p + Co59 + + amrex::Real rate{}, drate_dT{}; + 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.2414 + -37.6102 * tfactors.T9i + -38.1208 * tfactors.T913i + 13.9086 * tfactors.T913 + + -3.45838 * tfactors.T9 + 0.391302 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 37.6102 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -38.1208 * tfactors.T943i + (1.0/3.0) * 13.9086 * tfactors.T923i + + -3.45838 + (5.0/3.0) * 0.391302 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe56_He4_to_p_Co59_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe56_He4_to_p_Co59_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe58_p_to_He4_Mn55_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Fe58 + p --> He4 + Mn55 + + amrex::Real rate{}, drate_dT{}; + 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 = -74.5149 + -37.17 * tfactors.T913i + 110.878 * tfactors.T913 + + -24.5555 * tfactors.T9 + 2.47003 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -37.17 * tfactors.T943i + (1.0/3.0) * 110.878 * tfactors.T923i + + -24.5555 + (5.0/3.0) * 2.47003 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe58_p_to_He4_Mn55_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe58_p_to_He4_Mn55_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co55_p_to_He4_Fe52_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Co55 + p --> He4 + Fe52 + + amrex::Real rate{}, drate_dT{}; + 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.4434 + -9.65363 * 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 += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 9.65363 * 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 += 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co55_p_to_He4_Fe52_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co55_p_to_He4_Fe52_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co55_He4_to_p_Ni58_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Co55 + He4 --> p + Ni58 + + amrex::Real rate{}, drate_dT{}; + 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 = 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 (std::is_same_v) { + 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co55_He4_to_p_Ni58_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co55_He4_to_p_Ni58_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co56_n_to_p_Fe56_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Co56 + n --> p + Fe56 + + amrex::Real rate{}, drate_dT{}; + 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; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -1.13331 * tfactors.T923i + + 0.347185 + (5.0/3.0) * -0.0328879 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co56_n_to_p_Fe56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co56_n_to_p_Fe56_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co56_n_to_He4_Mn53_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Co56 + n --> He4 + Mn53 + + amrex::Real rate{}, drate_dT{}; + 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 = 12.5672 + -2.81854 * tfactors.T913 + + 1.84188 * tfactors.T9 + -0.164509 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -2.81854 * tfactors.T923i + + 1.84188 + (5.0/3.0) * -0.164509 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co56_n_to_He4_Mn53_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co56_n_to_He4_Mn53_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co56_p_to_n_Ni56_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Co56 + p --> n + Ni56 + + amrex::Real rate{}, drate_dT{}; + 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 = 13.3721 + -33.8622 * tfactors.T9i + 1.76846 * tfactors.T913 + + 0.197992 * tfactors.T9 + -0.017494 * tfactors.T953; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 33.8622 * 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 += 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co56_p_to_n_Ni56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co56_p_to_n_Ni56_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co56_He4_to_n_Cu59_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Co56 + He4 --> n + Cu59 + + amrex::Real rate{}, drate_dT{}; + 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 = 8.89185 + -61.8349 * tfactors.T9i + -1.00882 * tfactors.T913 + + 1.88993 * tfactors.T9 + -0.202319 * tfactors.T953; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 61.8349 * 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 += 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co56_He4_to_n_Cu59_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co56_He4_to_n_Cu59_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co57_p_to_He4_Fe54_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Co57 + p --> He4 + Fe54 + + amrex::Real rate{}, drate_dT{}; + 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 = -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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co57_p_to_He4_Fe54_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co57_p_to_He4_Fe54_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co57_He4_to_p_Ni60_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Co57 + He4 --> p + Ni60 + + amrex::Real rate{}, drate_dT{}; + 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 = 49.6113 + -94.2152 * tfactors.T913i + 16.1097 * tfactors.T913 + + -4.84624 * tfactors.T9 + 0.441487 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -94.2152 * tfactors.T943i + (1.0/3.0) * 16.1097 * tfactors.T923i + + -4.84624 + (5.0/3.0) * 0.441487 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co57_He4_to_p_Ni60_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co57_He4_to_p_Ni60_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co59_p_to_He4_Fe56_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Co59 + p --> He4 + Fe56 + + amrex::Real rate{}, drate_dT{}; + 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 = 19.47 + -38.1208 * tfactors.T913i + 13.9086 * tfactors.T913 + + -3.45838 * tfactors.T9 + 0.391302 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + -(1.0/3.0) * -38.1208 * tfactors.T943i + (1.0/3.0) * 13.9086 * tfactors.T923i + + -3.45838 + (5.0/3.0) * 0.391302 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co59_p_to_He4_Fe56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co59_p_to_He4_Fe56_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni56_n_to_p_Co56_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ni56 + n --> p + Co56 + + amrex::Real rate{}, drate_dT{}; + 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 = 15.5693 + 1.76846 * tfactors.T913 + + 0.197992 * tfactors.T9 + -0.017494 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * 1.76846 * tfactors.T923i + + 0.197992 + (5.0/3.0) * -0.017494 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ni56_n_to_p_Co56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni56_n_to_p_Co56_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni56_He4_to_p_Cu59_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ni56 + He4 --> p + Cu59 + + amrex::Real rate{}, drate_dT{}; + 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.8471 + -27.9728 * 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 += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 27.9728 * 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 += 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ni56_He4_to_p_Cu59_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni56_He4_to_p_Cu59_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni58_p_to_He4_Co55_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ni58 + p --> He4 + Co55 + + amrex::Real rate{}, drate_dT{}; + 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 = 63.6142 + -15.5045 * 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 += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 15.5045 * 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 += 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ni58_p_to_He4_Co55_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni58_p_to_He4_Co55_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni60_p_to_He4_Co57_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ni60 + p --> He4 + Co57 + + amrex::Real rate{}, drate_dT{}; + 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 = 53.0001 + -3.0615 * tfactors.T9i + -94.2152 * tfactors.T913i + 16.1097 * tfactors.T913 + + -4.84624 * tfactors.T9 + 0.441487 * tfactors.T953 + -0.666667 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 3.0615 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -94.2152 * tfactors.T943i + (1.0/3.0) * 16.1097 * tfactors.T923i + + -4.84624 + (5.0/3.0) * 0.441487 * 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ni60_p_to_He4_Co57_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni60_p_to_He4_Co57_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cu59_n_to_He4_Co56_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cu59 + n --> He4 + Co56 + + amrex::Real rate{}, drate_dT{}; + 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; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -1.00882 * tfactors.T923i + + 1.88993 + (5.0/3.0) * -0.202319 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cu59_n_to_He4_Co56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cu59_n_to_He4_Co56_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cu59_p_to_He4_Ni56_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Cu59 + p --> He4 + Ni56 + + amrex::Real rate{}, drate_dT{}; + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cu59_p_to_He4_Ni56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cu59_p_to_He4_Ni56_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_He4_He4_He4_to_C12_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // 3 He4 --> C12 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // fy05r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // fy05n + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // fy05r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + 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; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni56_n_to_Ni57_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ni56 + n --> Ni57 + + amrex::Real rate{}, drate_dT{}; + 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 = 16.0765 + -1.19665 * tfactors.T913 + + 0.507179 * tfactors.T9 + -0.074604 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -1.19665 * tfactors.T923i + + 0.507179 + (5.0/3.0) * -0.074604 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ni56_n_to_Ni57_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni56_n_to_Ni57_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni57_to_n_Ni56_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ni57 --> n + Ni56 + + amrex::Real rate{}, drate_dT{}; + 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 = 38.3694 + -118.941 * tfactors.T9i + -1.19665 * tfactors.T913 + + 0.507179 * tfactors.T9 + -0.074604 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 118.941 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ni57_to_n_Ni56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni57_to_n_Ni56_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni57_n_to_Ni58_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ni57 + n --> Ni58 + + amrex::Real rate{}, drate_dT{}; + 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 = 17.2731 + -1.90814 * tfactors.T913 + + 0.493188 * tfactors.T9 + -0.0684633 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -1.90814 * tfactors.T923i + + 0.493188 + (5.0/3.0) * -0.0684633 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ni57_n_to_Ni58_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni57_n_to_Ni58_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni58_to_n_Ni57_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ni58 --> n + Ni57 + + amrex::Real rate{}, drate_dT{}; + 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 = 42.3391 + -141.772 * tfactors.T9i + -1.90814 * tfactors.T913 + + 0.493188 * tfactors.T9 + -0.0684633 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 141.772 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ni58_to_n_Ni57_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni58_to_n_Ni57_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni58_n_to_Ni59_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ni58 + n --> Ni59 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 8.63197 + 0.13279 * tfactors.T9i + -11.785 * tfactors.T913i + 19.5347 * tfactors.T913 + + -0.857179 * tfactors.T9 + 0.00111653 * tfactors.T953 + -9.35642 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = -0.13279 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -11.785 * tfactors.T943i + (1.0/3.0) * 19.5347 * tfactors.T923i + + -0.857179 + (5.0/3.0) * 0.00111653 * tfactors.T923 + -9.35642 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ni58_n_to_Ni59_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni58_n_to_Ni59_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni59_to_n_Ni58_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ni59 --> n + Ni58 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 30.9258 + -104.3 * tfactors.T9i + -11.785 * tfactors.T913i + 19.5347 * tfactors.T913 + + -0.857179 * tfactors.T9 + 0.00111653 * tfactors.T953 + -7.85642 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 104.3 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -11.785 * tfactors.T943i + (1.0/3.0) * 19.5347 * tfactors.T923i + + -0.857179 + (5.0/3.0) * 0.00111653 * tfactors.T923 + -7.85642 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ni59_to_n_Ni58_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni59_to_n_Ni58_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni59_n_to_Ni60_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ni59 + n --> Ni60 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 25.5762 + -0.110079 * tfactors.T9i + 9.92411 * tfactors.T913i + -20.503 * tfactors.T913 + + 1.39981 * tfactors.T9 + -0.101641 * tfactors.T953 + 8.58204 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 0.110079 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 9.92411 * tfactors.T943i + (1.0/3.0) * -20.503 * tfactors.T923i + + 1.39981 + (5.0/3.0) * -0.101641 * tfactors.T923 + 8.58204 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ni59_n_to_Ni60_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni59_n_to_Ni60_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni60_to_n_Ni59_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ni60 --> n + Ni59 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 50.6431 + -132.266 * tfactors.T9i + 9.92411 * tfactors.T913i + -20.503 * tfactors.T913 + + 1.39981 * tfactors.T9 + -0.101641 * tfactors.T953 + 10.082 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 132.266 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 9.92411 * tfactors.T943i + (1.0/3.0) * -20.503 * tfactors.T923i + + 1.39981 + (5.0/3.0) * -0.101641 * tfactors.T923 + 10.082 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ni60_to_n_Ni59_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni60_to_n_Ni59_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co57_n_to_Co58_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Co57 + n --> Co58 + + amrex::Real rate{}, drate_dT{}; + 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 = 16.9961 + -1.03654 * tfactors.T913 + + 0.342218 * tfactors.T9 + -0.0638367 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -1.03654 * tfactors.T923i + + 0.342218 + (5.0/3.0) * -0.0638367 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co57_n_to_Co58_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co57_n_to_Co58_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co58_to_n_Co57_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Co58 --> n + Co57 + + amrex::Real rate{}, drate_dT{}; + 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 = 41.1458 + -99.4851 * tfactors.T9i + -1.03654 * tfactors.T913 + + 0.342218 * tfactors.T9 + -0.0638367 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 99.4851 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -1.03654 * tfactors.T923i + + 0.342218 + (5.0/3.0) * -0.0638367 * tfactors.T923 + 1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co58_to_n_Co57_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co58_to_n_Co57_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co58_n_to_Co59_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Co58 + n --> Co59 + + amrex::Real rate{}, drate_dT{}; + 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 = 18.1906 + -2.18418 * tfactors.T913 + + 0.328629 * tfactors.T9 + -0.0407234 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -2.18418 * tfactors.T923i + + 0.328629 + (5.0/3.0) * -0.0407234 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co58_n_to_Co59_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co58_n_to_Co59_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co59_to_n_Co58_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Co59 --> n + Co58 + + amrex::Real rate{}, drate_dT{}; + 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 = 41.4007 + -121.312 * tfactors.T9i + -2.18418 * tfactors.T913 + + 0.328629 * tfactors.T9 + -0.0407234 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 121.312 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -2.18418 * tfactors.T923i + + 0.328629 + (5.0/3.0) * -0.0407234 * tfactors.T923 + 1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Co59_to_n_Co58_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co59_to_n_Co58_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe52_n_to_Fe53_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Fe52 + n --> Fe53 + + amrex::Real rate{}, drate_dT{}; + 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 = 15.8885 + -0.344319 * tfactors.T913 + + 0.178277 * tfactors.T9 + -0.0334326 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -0.344319 * tfactors.T923i + + 0.178277 + (5.0/3.0) * -0.0334326 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe52_n_to_Fe53_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe52_n_to_Fe53_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe53_to_n_Fe52_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Fe53 --> n + Fe52 + + amrex::Real rate{}, drate_dT{}; + 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.4863 + -123.994 * tfactors.T9i + -0.344319 * tfactors.T913 + + 0.178277 * tfactors.T9 + -0.0334326 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 123.994 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe53_to_n_Fe52_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe53_to_n_Fe52_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe53_n_to_Fe54_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Fe53 + n --> Fe54 + + amrex::Real rate{}, drate_dT{}; + 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 = 16.4534 + -1.10421 * tfactors.T913 + + 0.379905 * tfactors.T9 + -0.0581878 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -1.10421 * tfactors.T923i + + 0.379905 + (5.0/3.0) * -0.0581878 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe53_n_to_Fe54_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe53_n_to_Fe54_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe54_to_n_Fe53_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Fe54 --> n + Fe53 + + amrex::Real rate{}, drate_dT{}; + 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 = 42.2106 + -155.251 * tfactors.T9i + -1.10421 * tfactors.T913 + + 0.379905 * tfactors.T9 + -0.0581878 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 155.251 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe54_to_n_Fe53_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe54_to_n_Fe53_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe54_n_to_Fe55_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Fe54 + n --> Fe55 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + 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; + + if constexpr (std::is_same_v) { + 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe54_n_to_Fe55_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe54_n_to_Fe55_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe55_to_n_Fe54_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Fe55 --> n + Fe54 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 21.4833 + -107.843 * tfactors.T9i + -8.66617 * tfactors.T913i + 26.4472 * tfactors.T913 + + -1.9222 * tfactors.T9 + 0.0986404 * tfactors.T953 + -8.28317 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 107.843 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe55_to_n_Fe54_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe55_to_n_Fe54_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe55_n_to_Fe56_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Fe55 + n --> Fe56 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + 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; + + if constexpr (std::is_same_v) { + 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe55_n_to_Fe56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe55_n_to_Fe56_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe56_to_n_Fe55_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Fe56 --> n + Fe55 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 46.7852 + -130.023 * tfactors.T9i + 8.06062 * tfactors.T913i + -14.4809 * tfactors.T913 + + 0.94252 * tfactors.T9 + -0.0776007 * tfactors.T953 + 7.97093 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 130.023 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe56_to_n_Fe55_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe56_to_n_Fe55_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe56_n_to_Fe57_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Fe56 + n --> Fe57 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 35.834 + -0.0600873 * tfactors.T9i + 9.79414 * tfactors.T913i + -33.7366 * tfactors.T913 + + 2.97173 * tfactors.T9 + -0.236498 * tfactors.T953 + 11.8711 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 0.0600873 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 9.79414 * tfactors.T943i + (1.0/3.0) * -33.7366 * tfactors.T923i + + 2.97173 + (5.0/3.0) * -0.236498 * tfactors.T923 + 11.8711 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe56_n_to_Fe57_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe56_n_to_Fe57_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe57_to_n_Fe56_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Fe57 --> n + Fe56 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 58.8201 + -88.7916 * tfactors.T9i + 9.79414 * tfactors.T913i + -33.7366 * tfactors.T913 + + 2.97173 * tfactors.T9 + -0.236498 * tfactors.T953 + 13.3711 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 88.7916 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 9.79414 * tfactors.T943i + (1.0/3.0) * -33.7366 * tfactors.T923i + + 2.97173 + (5.0/3.0) * -0.236498 * tfactors.T923 + 13.3711 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe57_to_n_Fe56_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe57_to_n_Fe56_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe57_n_to_Fe58_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Fe57 + n --> Fe58 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 20.2493 + -0.0214497 * tfactors.T9i + 2.1643 * tfactors.T913i + -7.49584 * tfactors.T913 + + 0.656354 * tfactors.T9 + -0.0549855 * tfactors.T953 + 2.38149 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 0.0214497 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 2.1643 * tfactors.T943i + (1.0/3.0) * -7.49584 * tfactors.T923i + + 0.656354 + (5.0/3.0) * -0.0549855 * tfactors.T923 + 2.38149 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe57_n_to_Fe58_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe57_n_to_Fe58_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe58_to_n_Fe57_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Fe58 --> n + Fe57 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 44.6221 + -116.581 * tfactors.T9i + 2.1643 * tfactors.T913i + -7.49584 * tfactors.T913 + + 0.656354 * tfactors.T9 + -0.0549855 * tfactors.T953 + 3.88149 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 116.581 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 2.1643 * tfactors.T943i + (1.0/3.0) * -7.49584 * tfactors.T923i + + 0.656354 + (5.0/3.0) * -0.0549855 * tfactors.T923 + 3.88149 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Fe58_to_n_Fe57_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe58_to_n_Fe57_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn51_n_to_Mn52_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Mn51 + n --> Mn52 + + amrex::Real rate{}, drate_dT{}; + 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 = 17.2055 + -1.83611 * tfactors.T913 + + 0.460384 * tfactors.T9 + -0.0584947 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -1.83611 * tfactors.T923i + + 0.460384 + (5.0/3.0) * -0.0584947 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn51_n_to_Mn52_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn51_n_to_Mn52_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn52_to_n_Mn51_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Mn52 --> n + Mn51 + + amrex::Real rate{}, drate_dT{}; + 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 = 40.109 + -122.258 * tfactors.T9i + -1.83611 * tfactors.T913 + + 0.460384 * tfactors.T9 + -0.0584947 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 122.258 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -1.83611 * tfactors.T923i + + 0.460384 + (5.0/3.0) * -0.0584947 * tfactors.T923 + 1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn52_to_n_Mn51_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn52_to_n_Mn51_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn52_n_to_Mn53_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Mn52 + n --> Mn53 + + amrex::Real rate{}, drate_dT{}; + 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 = 17.0941 + -0.91084 * tfactors.T913 + + 0.162511 * tfactors.T9 + -0.0279619 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -0.91084 * tfactors.T923i + + 0.162511 + (5.0/3.0) * -0.0279619 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn52_n_to_Mn53_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn52_n_to_Mn53_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn53_to_n_Mn52_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Mn53 --> n + Mn52 + + amrex::Real rate{}, drate_dT{}; + 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 = 41.2568 + -139.878 * tfactors.T9i + -0.91084 * tfactors.T913 + + 0.162511 * tfactors.T9 + -0.0279619 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 139.878 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -0.91084 * tfactors.T923i + + 0.162511 + (5.0/3.0) * -0.0279619 * tfactors.T923 + 1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn53_to_n_Mn52_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn53_to_n_Mn52_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn53_n_to_Mn54_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Mn53 + n --> Mn54 + + amrex::Real rate{}, drate_dT{}; + 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 = 17.3501 + -1.70171 * tfactors.T913 + + 0.386422 * tfactors.T9 + -0.0536858 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -1.70171 * tfactors.T923i + + 0.386422 + (5.0/3.0) * -0.0536858 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn53_n_to_Mn54_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn53_n_to_Mn54_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn54_to_n_Mn53_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Mn54 --> n + Mn53 + + amrex::Real rate{}, drate_dT{}; + 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 = 41.1614 + -103.73 * tfactors.T9i + -1.70171 * tfactors.T913 + + 0.386422 * tfactors.T9 + -0.0536858 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 103.73 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -1.70171 * tfactors.T923i + + 0.386422 + (5.0/3.0) * -0.0536858 * tfactors.T923 + 1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn54_to_n_Mn53_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn54_to_n_Mn53_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn54_n_to_Mn55_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Mn54 + n --> Mn55 + + amrex::Real rate{}, drate_dT{}; + 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 = 18.4705 + -2.56572 * tfactors.T913 + + 0.352447 * tfactors.T9 + -0.0375878 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -2.56572 * tfactors.T923i + + 0.352447 + (5.0/3.0) * -0.0375878 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn54_n_to_Mn55_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn54_n_to_Mn55_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mn55_to_n_Mn54_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Mn55 --> n + Mn54 + + amrex::Real rate{}, drate_dT{}; + 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 = 42.3029 + -118.673 * tfactors.T9i + -2.56572 * tfactors.T913 + + 0.352447 * tfactors.T9 + -0.0375878 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 118.673 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -2.56572 * tfactors.T923i + + 0.352447 + (5.0/3.0) * -0.0375878 * tfactors.T923 + 1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mn55_to_n_Mn54_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mn55_to_n_Mn54_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr48_n_to_Cr49_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cr48 + n --> Cr49 + + amrex::Real rate{}, drate_dT{}; + 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 = 15.8544 + -0.000452357 * tfactors.T913 + + 0.0412838 * tfactors.T9 + -0.0160865 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -0.000452357 * tfactors.T923i + + 0.0412838 + (5.0/3.0) * -0.0160865 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr48_n_to_Cr49_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr48_n_to_Cr49_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr49_to_n_Cr48_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cr49 --> n + Cr48 + + amrex::Real rate{}, drate_dT{}; + 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.7375 + -122.806 * tfactors.T9i + -0.000452357 * tfactors.T913 + + 0.0412838 * tfactors.T9 + -0.0160865 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 122.806 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -0.000452357 * tfactors.T923i + + 0.0412838 + (5.0/3.0) * -0.0160865 * tfactors.T923 + 1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr49_to_n_Cr48_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr49_to_n_Cr48_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr49_n_to_Cr50_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cr49 + n --> Cr50 + + amrex::Real rate{}, drate_dT{}; + 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 = 17.8355 + -1.98927 * tfactors.T913 + + 0.465124 * tfactors.T9 + -0.0582249 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -1.98927 * tfactors.T923i + + 0.465124 + (5.0/3.0) * -0.0582249 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr49_n_to_Cr50_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr49_n_to_Cr50_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr50_to_n_Cr49_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cr50 --> n + Cr49 + + amrex::Real rate{}, drate_dT{}; + 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 = 43.3027 + -150.862 * tfactors.T9i + -1.98927 * tfactors.T913 + + 0.465124 * tfactors.T9 + -0.0582249 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 150.862 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -1.98927 * tfactors.T923i + + 0.465124 + (5.0/3.0) * -0.0582249 * tfactors.T923 + 1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr50_to_n_Cr49_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr50_to_n_Cr49_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr50_n_to_Cr51_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cr50 + n --> Cr51 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 15.1066 + -0.0225613 * tfactors.T9i + 0.815037 * tfactors.T913i + -0.708732 * tfactors.T913 + + 0.386295 * tfactors.T9 + -0.0615661 * tfactors.T953 + 0.0454627 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 0.0225613 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 0.815037 * tfactors.T943i + (1.0/3.0) * -0.708732 * tfactors.T923i + + 0.386295 + (5.0/3.0) * -0.0615661 * tfactors.T923 + 0.0454627 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr50_n_to_Cr51_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr50_n_to_Cr51_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr51_to_n_Cr50_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cr51 --> n + Cr50 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 36.7032 + -107.484 * tfactors.T9i + 0.815037 * tfactors.T913i + -0.708732 * tfactors.T913 + + 0.386295 * tfactors.T9 + -0.0615661 * tfactors.T953 + 1.54546 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 107.484 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 0.815037 * tfactors.T943i + (1.0/3.0) * -0.708732 * tfactors.T923i + + 0.386295 + (5.0/3.0) * -0.0615661 * tfactors.T923 + 1.54546 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr51_to_n_Cr50_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr51_to_n_Cr50_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr51_n_to_Cr52_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cr51 + n --> Cr52 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 20.1253 + -0.0860167 * tfactors.T9i + 6.95563 * tfactors.T913i + -11.4485 * tfactors.T913 + + 0.736956 * tfactors.T9 + -0.0695323 * tfactors.T953 + 5.31244 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 0.0860167 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 6.95563 * tfactors.T943i + (1.0/3.0) * -11.4485 * tfactors.T923i + + 0.736956 + (5.0/3.0) * -0.0695323 * tfactors.T923 + 5.31244 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr51_n_to_Cr52_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr51_n_to_Cr52_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr52_to_n_Cr51_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cr52 --> n + Cr51 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 45.8814 + -139.784 * tfactors.T9i + 6.95563 * tfactors.T913i + -11.4485 * tfactors.T913 + + 0.736956 * tfactors.T9 + -0.0695323 * tfactors.T953 + 6.81244 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 139.784 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 6.95563 * tfactors.T943i + (1.0/3.0) * -11.4485 * tfactors.T923i + + 0.736956 + (5.0/3.0) * -0.0695323 * tfactors.T923 + 6.81244 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr52_to_n_Cr51_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr52_to_n_Cr51_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr52_n_to_Cr53_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cr52 + n --> Cr53 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 27.3183 + -0.0314027 * tfactors.T9i + 5.71728 * tfactors.T913i + -20.4149 * tfactors.T913 + + 1.95304 * tfactors.T9 + -0.175538 * tfactors.T953 + 7.18293 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 0.0314027 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 5.71728 * tfactors.T943i + (1.0/3.0) * -20.4149 * tfactors.T923i + + 1.95304 + (5.0/3.0) * -0.175538 * tfactors.T923 + 7.18293 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr52_n_to_Cr53_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr52_n_to_Cr53_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr53_to_n_Cr52_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cr53 --> n + Cr52 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 49.6092 + -92.163 * tfactors.T9i + 5.71728 * tfactors.T913i + -20.4149 * tfactors.T913 + + 1.95304 * tfactors.T9 + -0.175538 * tfactors.T953 + 8.68293 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 92.163 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 5.71728 * tfactors.T943i + (1.0/3.0) * -20.4149 * tfactors.T923i + + 1.95304 + (5.0/3.0) * -0.175538 * tfactors.T923 + 8.68293 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr53_to_n_Cr52_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr53_to_n_Cr52_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr53_n_to_Cr54_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cr53 + n --> Cr54 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 10.8793 + -0.00984544 * tfactors.T9i + -1.26805 * tfactors.T913i + 6.34126 * tfactors.T913 + + -0.39287 * tfactors.T9 + 0.000487041 * tfactors.T953 + -2.46456 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 0.00984544 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -1.26805 * tfactors.T943i + (1.0/3.0) * 6.34126 * tfactors.T923i + + -0.39287 + (5.0/3.0) * 0.000487041 * tfactors.T923 + -2.46456 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr53_n_to_Cr54_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr53_n_to_Cr54_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cr54_to_n_Cr53_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Cr54 --> n + Cr53 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 35.9433 + -112.797 * tfactors.T9i + -1.26805 * tfactors.T913i + 6.34126 * tfactors.T913 + + -0.39287 * tfactors.T9 + 0.000487041 * tfactors.T953 + -0.96456 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 112.797 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -1.26805 * tfactors.T943i + (1.0/3.0) * 6.34126 * tfactors.T923i + + -0.39287 + (5.0/3.0) * 0.000487041 * tfactors.T923 + -0.96456 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Cr54_to_n_Cr53_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cr54_to_n_Cr53_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V47_n_to_V48_reaclib(T& rate_eval, const tf_t& tfactors) { + + // V47 + n --> V48 + + amrex::Real rate{}, drate_dT{}; + 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 = 17.5513 + -2.40159 * tfactors.T913 + + 0.594573 * tfactors.T9 + -0.0682896 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -2.40159 * tfactors.T923i + + 0.594573 + (5.0/3.0) * -0.0682896 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V47_n_to_V48_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V47_n_to_V48_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V48_to_n_V47_reaclib(T& rate_eval, const tf_t& tfactors) { + + // V48 --> n + V47 + + amrex::Real rate{}, drate_dT{}; + 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 = 40.4146 + -122.366 * tfactors.T9i + -2.40159 * tfactors.T913 + + 0.594573 * tfactors.T9 + -0.0682896 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 122.366 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -2.40159 * tfactors.T923i + + 0.594573 + (5.0/3.0) * -0.0682896 * tfactors.T923 + 1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V48_to_n_V47_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V48_to_n_V47_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V48_n_to_V49_reaclib(T& rate_eval, const tf_t& tfactors) { + + // V48 + n --> V49 + + amrex::Real rate{}, drate_dT{}; + 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 = 17.8835 + -0.917026 * tfactors.T913 + + -0.109162 * tfactors.T9 + 0.0127488 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -0.917026 * tfactors.T923i + + -0.109162 + (5.0/3.0) * 0.0127488 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V48_n_to_V49_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V48_n_to_V49_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V49_to_n_V48_reaclib(T& rate_eval, const tf_t& tfactors) { + + // V49 --> n + V48 + + amrex::Real rate{}, drate_dT{}; + 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 = 41.6761 + -134.066 * tfactors.T9i + -0.917026 * tfactors.T913 + + -0.109162 * tfactors.T9 + 0.0127488 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 134.066 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -0.917026 * tfactors.T923i + + -0.109162 + (5.0/3.0) * 0.0127488 * tfactors.T923 + 1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V49_to_n_V48_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V49_to_n_V48_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V49_n_to_V50_reaclib(T& rate_eval, const tf_t& tfactors) { + + // V49 + n --> V50 + + amrex::Real rate{}, drate_dT{}; + 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 = 17.5445 + -1.8725 * tfactors.T913 + + 0.291609 * tfactors.T9 + -0.0370216 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -1.8725 * tfactors.T923i + + 0.291609 + (5.0/3.0) * -0.0370216 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V49_n_to_V50_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V49_n_to_V50_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V50_to_n_V49_reaclib(T& rate_eval, const tf_t& tfactors) { + + // V50 --> n + V49 + + amrex::Real rate{}, drate_dT{}; + 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 = 40.7345 + -108.339 * tfactors.T9i + -1.8725 * tfactors.T913 + + 0.291609 * tfactors.T9 + -0.0370216 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 108.339 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -1.8725 * tfactors.T923i + + 0.291609 + (5.0/3.0) * -0.0370216 * tfactors.T923 + 1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V50_to_n_V49_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V50_to_n_V49_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V50_n_to_V51_reaclib(T& rate_eval, const tf_t& tfactors) { + + // V50 + n --> V51 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 26.4771 + -0.118554 * tfactors.T9i + 10.9535 * tfactors.T913i + -23.1254 * tfactors.T913 + + 1.53091 * tfactors.T9 + -0.0992995 * tfactors.T953 + 9.62203 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 0.118554 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 10.9535 * tfactors.T943i + (1.0/3.0) * -23.1254 * tfactors.T923i + + 1.53091 + (5.0/3.0) * -0.0992995 * tfactors.T923 + 9.62203 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V50_n_to_V51_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V50_n_to_V51_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_V51_to_n_V50_reaclib(T& rate_eval, const tf_t& tfactors) { + + // V51 --> n + V50 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 50.6387 + -128.363 * tfactors.T9i + 10.9535 * tfactors.T913i + -23.1254 * tfactors.T913 + + 1.53091 * tfactors.T9 + -0.0992995 * tfactors.T953 + 11.122 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 128.363 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 10.9535 * tfactors.T943i + (1.0/3.0) * -23.1254 * tfactors.T923i + + 1.53091 + (5.0/3.0) * -0.0992995 * tfactors.T923 + 11.122 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_V51_to_n_V50_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_V51_to_n_V50_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti44_n_to_Ti45_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ti44 + n --> Ti45 + + amrex::Real rate{}, drate_dT{}; + 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 = 15.2506 + 1.01203 * tfactors.T913 + + -0.201174 * tfactors.T9 + 0.00360954 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * 1.01203 * tfactors.T923i + + -0.201174 + (5.0/3.0) * 0.00360954 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ti44_n_to_Ti45_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti44_n_to_Ti45_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti45_to_n_Ti44_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ti45 --> n + Ti44 + + amrex::Real rate{}, drate_dT{}; + 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 = 36.8432 + -110.575 * tfactors.T9i + 1.01203 * tfactors.T913 + + -0.201174 * tfactors.T9 + 0.00360954 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 110.575 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 1.01203 * tfactors.T923i + + -0.201174 + (5.0/3.0) * 0.00360954 * tfactors.T923 + 1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ti45_to_n_Ti44_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti45_to_n_Ti44_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti45_n_to_Ti46_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ti45 + n --> Ti46 + + amrex::Real rate{}, drate_dT{}; + 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 = 17.133 + -1.55633 * tfactors.T913 + + 0.300783 * tfactors.T9 + -0.0373696 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -1.55633 * tfactors.T923i + + 0.300783 + (5.0/3.0) * -0.0373696 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ti45_n_to_Ti46_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti45_n_to_Ti46_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti46_to_n_Ti45_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ti46 --> n + Ti45 + + amrex::Real rate{}, drate_dT{}; + 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 = 42.8852 + -153.052 * tfactors.T9i + -1.55633 * tfactors.T913 + + 0.300783 * tfactors.T9 + -0.0373696 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 153.052 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -1.55633 * tfactors.T923i + + 0.300783 + (5.0/3.0) * -0.0373696 * tfactors.T923 + 1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ti46_to_n_Ti45_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti46_to_n_Ti45_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti46_n_to_Ti47_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ti46 + n --> Ti47 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 12.2761 + 0.0882347 * tfactors.T9i + -7.30817 * tfactors.T913i + 10.713 * tfactors.T913 + + -0.537251 * tfactors.T9 + 0.0187304 * tfactors.T953 + -5.38893 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = -0.0882347 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -7.30817 * tfactors.T943i + (1.0/3.0) * 10.713 * tfactors.T923i + + -0.537251 + (5.0/3.0) * 0.0187304 * tfactors.T923 + -5.38893 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ti46_n_to_Ti47_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti46_n_to_Ti47_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti47_to_n_Ti46_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ti47 --> n + Ti46 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 34.1579 + -102.963 * tfactors.T9i + -7.30817 * tfactors.T913i + 10.713 * tfactors.T913 + + -0.537251 * tfactors.T9 + 0.0187304 * tfactors.T953 + -3.88893 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 102.963 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -7.30817 * tfactors.T943i + (1.0/3.0) * 10.713 * tfactors.T923i + + -0.537251 + (5.0/3.0) * 0.0187304 * tfactors.T923 + -3.88893 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ti47_to_n_Ti46_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti47_to_n_Ti46_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti47_n_to_Ti48_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ti47 + n --> Ti48 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 14.8734 + 0.0181751 * tfactors.T9i + -2.34945 * tfactors.T913i + 3.2238 * tfactors.T913 + + -0.0455487 * tfactors.T9 + -0.0153771 * tfactors.T953 + -2.10785 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = -0.0181751 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -2.34945 * tfactors.T943i + (1.0/3.0) * 3.2238 * tfactors.T923i + + -0.0455487 + (5.0/3.0) * -0.0153771 * tfactors.T923 + -2.10785 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ti47_n_to_Ti48_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti47_n_to_Ti48_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ti48_to_n_Ti47_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ti48 --> n + Ti47 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 40.3394 + -134.911 * tfactors.T9i + -2.34945 * tfactors.T913i + 3.2238 * tfactors.T913 + + -0.0455487 * tfactors.T9 + -0.0153771 * tfactors.T953 + -0.60785 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 134.911 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -2.34945 * tfactors.T943i + (1.0/3.0) * 3.2238 * tfactors.T923i + + -0.0455487 + (5.0/3.0) * -0.0153771 * tfactors.T923 + -0.60785 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ti48_to_n_Ti47_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ti48_to_n_Ti47_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc41_n_to_Sc42_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Sc41 + n --> Sc42 + + amrex::Real rate{}, drate_dT{}; + 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 = 10.6014 + -1.01509 * tfactors.T913 + + 0.362316 * tfactors.T9 + -0.0412181 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -1.01509 * tfactors.T923i + + 0.362316 + (5.0/3.0) * -0.0412181 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Sc41_n_to_Sc42_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc41_n_to_Sc42_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc42_to_n_Sc41_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Sc42 --> n + Sc41 + + amrex::Real rate{}, drate_dT{}; + 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 = 36.3505 + -134.034 * tfactors.T9i + -1.01509 * tfactors.T913 + + 0.362316 * tfactors.T9 + -0.0412181 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 134.034 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -1.01509 * tfactors.T923i + + 0.362316 + (5.0/3.0) * -0.0412181 * tfactors.T923 + 1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Sc42_to_n_Sc41_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc42_to_n_Sc41_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc42_n_to_Sc43_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Sc42 + n --> Sc43 + + amrex::Real rate{}, drate_dT{}; + 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 = 14.9443 + -0.921604 * tfactors.T913 + + 0.333782 * tfactors.T9 + -0.0404241 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -0.921604 * tfactors.T923i + + 0.333782 + (5.0/3.0) * -0.0404241 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Sc42_n_to_Sc43_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc42_n_to_Sc43_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc43_to_n_Sc42_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Sc43 --> n + Sc42 + + amrex::Real rate{}, drate_dT{}; + 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 = 36.5353 + -140.855 * tfactors.T9i + -0.921604 * tfactors.T913 + + 0.333782 * tfactors.T9 + -0.0404241 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 140.855 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -0.921604 * tfactors.T923i + + 0.333782 + (5.0/3.0) * -0.0404241 * tfactors.T923 + 1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Sc43_to_n_Sc42_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc43_to_n_Sc42_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc43_n_to_Sc44_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Sc43 + n --> Sc44 + + amrex::Real rate{}, drate_dT{}; + 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 = 15.7633 + -0.575865 * tfactors.T913 + + 0.0565199 * tfactors.T9 + -0.0129886 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -0.575865 * tfactors.T923i + + 0.0565199 + (5.0/3.0) * -0.0129886 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Sc43_n_to_Sc44_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc43_n_to_Sc44_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc44_to_n_Sc43_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Sc44 --> n + Sc43 + + amrex::Real rate{}, drate_dT{}; + 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 = 39.9046 + -112.558 * tfactors.T9i + -0.575865 * tfactors.T913 + + 0.0565199 * tfactors.T9 + -0.0129886 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 112.558 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -0.575865 * tfactors.T923i + + 0.0565199 + (5.0/3.0) * -0.0129886 * tfactors.T923 + 1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Sc44_to_n_Sc43_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc44_to_n_Sc43_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc44_n_to_Sc45_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Sc44 + n --> Sc45 + + amrex::Real rate{}, drate_dT{}; + 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 = 17.0705 + -1.31922 * tfactors.T913 + + 0.167096 * tfactors.T9 + -0.0191676 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = + (1.0/3.0) * -1.31922 * tfactors.T923i + + 0.167096 + (5.0/3.0) * -0.0191676 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Sc44_n_to_Sc45_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc44_n_to_Sc45_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Sc45_to_n_Sc44_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Sc45 --> n + Sc44 + + amrex::Real rate{}, drate_dT{}; + 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 = 40.2726 + -131.398 * tfactors.T9i + -1.31922 * tfactors.T913 + + 0.167096 * tfactors.T9 + -0.0191676 * tfactors.T953 + 1.5 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 131.398 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -1.31922 * tfactors.T923i + + 0.167096 + (5.0/3.0) * -0.0191676 * tfactors.T923 + 1.5 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Sc45_to_n_Sc44_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Sc45_to_n_Sc44_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ca40_n_to_Ca41_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ca40 + n --> Ca41 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 3.04601 + 0.0855375 * tfactors.T9i + -9.18636 * tfactors.T913i + 21.0095 * tfactors.T913 + + -1.33326 * tfactors.T9 + 0.0769347 * tfactors.T953 + -8.66245 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = -0.0855375 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -9.18636 * tfactors.T943i + (1.0/3.0) * 21.0095 * tfactors.T923i + + -1.33326 + (5.0/3.0) * 0.0769347 * tfactors.T923 + -8.66245 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ca40_n_to_Ca41_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ca40_n_to_Ca41_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ca41_to_n_Ca40_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ca41 --> n + Ca40 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 24.6353 + -96.9664 * tfactors.T9i + -9.18636 * tfactors.T913i + 21.0095 * tfactors.T913 + + -1.33326 * tfactors.T9 + 0.0769347 * tfactors.T953 + -7.16245 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 96.9664 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * -9.18636 * tfactors.T943i + (1.0/3.0) * 21.0095 * tfactors.T923i + + -1.33326 + (5.0/3.0) * 0.0769347 * tfactors.T923 + -7.16245 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ca41_to_n_Ca40_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ca41_to_n_Ca40_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ca41_n_to_Ca42_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ca41 + n --> Ca42 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 20.4461 + -0.0409481 * tfactors.T9i + 3.7037 * tfactors.T913i + -9.99246 * tfactors.T913 + + 1.05894 * tfactors.T9 + -0.0978564 * tfactors.T953 + 3.43604 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 0.0409481 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 3.7037 * tfactors.T943i + (1.0/3.0) * -9.99246 * tfactors.T923i + + 1.05894 + (5.0/3.0) * -0.0978564 * tfactors.T923 + 3.43604 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ca41_n_to_Ca42_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ca41_n_to_Ca42_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ca42_to_n_Ca41_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Ca42 --> n + Ca41 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // ks03 + ln_set_rate = 46.1952 + -133.264 * tfactors.T9i + 3.7037 * tfactors.T913i + -9.99246 * tfactors.T913 + + 1.05894 * tfactors.T9 + -0.0978564 * tfactors.T953 + 4.93604 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 133.264 * tfactors.T9i * tfactors.T9i + -(1.0/3.0) * 3.7037 * tfactors.T943i + (1.0/3.0) * -9.99246 * tfactors.T923i + + 1.05894 + (5.0/3.0) * -0.0978564 * tfactors.T923 + 4.93604 * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ca42_to_n_Ca41_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ca42_to_n_Ca41_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_C12_C12_to_p_Na23_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // C12 + C12 --> p + Na23 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // cf88r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + 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; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Na23_p_to_C12_C12_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Na23 + p --> C12 + C12 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // cf88r + ln_set_rate = 60.9438 + -26.0184 * 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 += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 26.0184 * 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 += 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Na23_p_to_C12_C12_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Na23_p_to_C12_C12_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Na23_p_to_He4_Ne20_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Na23 + p --> He4 + Ne20 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = 0.0178295 + -1.86103 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10n + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Na23_p_to_He4_Ne20_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Na23_p_to_He4_Ne20_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Na23_p_to_Mg24_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Na23 + p --> Mg24 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = -5.02585 + -1.61219 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10n + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Na23_p_to_Mg24_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Na23_p_to_Mg24_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mg24_to_p_Na23_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Mg24 --> p + Na23 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10r + ln_set_rate = 34.0876 + -138.968 * tfactors.T9i + -0.360588 * tfactors.T913 + + 1.4187 * tfactors.T9 + -0.184061 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 138.968 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * -0.360588 * tfactors.T923i + + 1.4187 + (5.0/3.0) * -0.184061 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = 20.0024 + -137.3 * tfactors.T9i; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 137.3 * tfactors.T9i * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10n + ln_set_rate = 43.9357 + -135.688 * tfactors.T9i + -20.6428 * tfactors.T913i + 1.52954 * tfactors.T913 + + 2.7487 * tfactors.T9 + -1.0 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 135.688 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mg24_to_p_Na23_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mg24_to_p_Na23_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_C12_C12_to_He4_Ne20_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // C12 + C12 --> He4 + Ne20 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // cf88r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + 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; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ne20_He4_to_C12_C12_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ne20 + He4 --> C12 + C12 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // cf88r + ln_set_rate = 61.4748 + -53.6267 * 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 += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 53.6267 * 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 += 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ne20_He4_to_C12_C12_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ne20_He4_to_C12_C12_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ne20_He4_to_p_Na23_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ne20 + He4 --> p + Na23 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10r + ln_set_rate = -6.37772 + -29.8896 * 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 (std::is_same_v) { + dln_set_rate_dT9 = 29.8896 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = 0.227472 + -29.4348 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 29.4348 * 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10n + ln_set_rate = 19.1852 + -27.5738 * 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 += log_scor; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 27.5738 * 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 += 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_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ne20_He4_to_p_Na23_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ne20_He4_to_p_Na23_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ne20_He4_to_Mg24_reaclib(T& rate_eval, const tf_t& tfactors, const amrex::Real log_scor, const amrex::Real dlog_scor_dT) { + + // Ne20 + He4 --> Mg24 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10r + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = 1.98307 + -9.22026 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = -38.7055 + -2.50605 * tfactors.T9i + + -1.5 * tfactors.lnT9; + + ln_set_rate += log_scor; + + if constexpr (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10n + 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 (std::is_same_v) { + 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] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Ne20_He4_to_Mg24_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ne20_He4_to_Mg24_reaclib) = drate_dT; + } + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Mg24_to_He4_Ne20_reaclib(T& rate_eval, const tf_t& tfactors) { + + // Mg24 --> He4 + Ne20 + + amrex::Real rate{}, drate_dT{}; + amrex::Real ln_set_rate{0.0}; + amrex::Real dln_set_rate_dT9{0.0}; + amrex::Real set_rate{0.0}; + + // il10r + ln_set_rate = 16.0203 + -120.895 * tfactors.T9i + 16.9229 * tfactors.T913 + + -2.57325 * tfactors.T9 + 0.208997 * tfactors.T953; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 120.895 * tfactors.T9i * tfactors.T9i + (1.0/3.0) * 16.9229 * tfactors.T923i + + -2.57325 + (5.0/3.0) * 0.208997 * tfactors.T923; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = 26.8017 + -117.334 * tfactors.T9i; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 117.334 * tfactors.T9i * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10r + ln_set_rate = -13.8869 + -110.62 * tfactors.T9i; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 110.62 * tfactors.T9i * tfactors.T9i; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + // il10n + ln_set_rate = 49.3244 + -108.114 * tfactors.T9i + -46.2525 * tfactors.T913i + 5.58901 * tfactors.T913 + + 7.61843 * tfactors.T9 + -3.683 * tfactors.T953 + 0.833333 * tfactors.lnT9; + + if constexpr (std::is_same_v) { + dln_set_rate_dT9 = 108.114 * 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; + + } + + // avoid underflows by zeroing rates in [0.0, 1.e-100] + ln_set_rate = std::max(ln_set_rate, -230.0_rt); + set_rate = std::exp(ln_set_rate); + rate += set_rate; + if constexpr (std::is_same_v) { + if (ln_set_rate > -230.0_rt) { + drate_dT += set_rate * dln_set_rate_dT9 * 1.0e-9; + } + } + + rate_eval.screened_rates(k_Mg24_to_He4_Ne20_reaclib) = rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Mg24_to_He4_Ne20_reaclib) = drate_dT; + } + } + + +} +#endif diff --git a/networks/massive-star-medium/table_rates.H b/networks/massive-star-medium/table_rates.H new file mode 100644 index 0000000000..5cdcbb1432 --- /dev/null +++ b/networks/massive-star-medium/table_rates.H @@ -0,0 +1,1226 @@ +#ifndef TABLE_RATES_H +#define TABLE_RATES_H + +#include +#include +#include +#include + +#include +#include +#include + +using namespace amrex::literals; + + +// Table is expected to be in terms of dens*ye and temp (logarithmic, cgs units) +// Table energy units are expected in terms of ergs + +// all tables are expected to have columns: +// Log(rhoY) Log(T) mu dQ Vs Log(e-cap-rate) Log(nu-energy-loss) Log(gamma-energy) +// Log(g/cm^3) Log(K) erg erg erg Log(1/s) Log(erg/s) Log(erg/s) +// + +constexpr int num_tables = 22; + +enum TableVars : std::uint8_t +{ + jtab_rate = 1, + jtab_nuloss = 2, + jtab_gamma = 3, + num_vars = jtab_gamma +}; + + +struct table_t +{ + int ntemp; + int nrhoy; + int nvars; + int nheader; +}; + + +struct weak_rate_t +{ + amrex::Real rate; + amrex::Real drate_dT; + amrex::Real drate_drhoye; + amrex::Real enu; + amrex::Real denu_dT; + amrex::Real denu_drhoye; + amrex::Real gamma; +}; + + +namespace rate_tables +{ + // Al27 --> Si27 + inline AMREX_GPU_DEVICE table_t j_Al27_Si27_meta{.ntemp=12, .nrhoy=11, .nvars=3, .nheader=5}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Al27_Si27_rhoy{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Al27_Si27_temp{7.0, 8.0, 8.30103, 8.60206, 8.845098, 9.0, 9.176091, 9.30103, 9.477121, 9.69897, 10.0, 10.477121}; + // Array3D is column-major (Fortran-ordering). T varies fastest, then rho Ye, then the component + inline AMREX_GPU_DEVICE amrex::Array3D + j_Al27_Si27_data{ +-99.69897, -99.69897, -99.69897, -61.995, -35.506, -25.682, -17.898998, -13.883991, -9.686922, -6.021425, -2.705328, 0.910706, // RATE +-99.69897, -99.69897, -99.69897, -62.995, -35.919, -25.703, -17.900998, -13.883991, -9.686922, -6.021425, -2.705328, 0.910706, +-99.69897, -99.69897, -99.69897, -63.997, -36.867, -25.91, -17.914998, -13.886991, -9.686922, -6.021425, -2.705328, 0.910706, +-99.69897, -99.69897, -99.69897, -65.015, -37.872999, -26.730999, -18.056997, -13.91899, -9.692921, -6.022424, -2.705328, 0.910706, +-99.69897, -99.69897, -99.69897, -66.186, -38.939994, -27.762987, -18.789985, -14.207981, -9.745911, -6.031412, -2.706319, 0.910706, +-99.69897, -99.69897, -99.69897, -68.45898, -40.488901, -29.065856, -19.926855, -15.173851, -10.188766, -6.113298, -2.715242, 0.90971, +-99.69897, -99.69897, -99.69897, -74.774333, -44.171644, -31.727792, -21.836672, -16.73831, -11.400609, -6.723542, -2.803466, 0.906722, +-99.69897, -99.69897, -99.69897, -90.193286, -52.993446, -37.920336, -26.003213, -19.908928, -13.610819, -8.20818, -3.444758, 0.875823, +-99.69897, -99.69897, -99.69897, -99.69897, -72.488698, -51.522271, -35.028974, -26.654611, -18.090052, -10.907269, -4.938843, 0.584029, +-99.69897, -99.69897, -99.69897, -99.69897, -99.69897, -80.819053, -54.316566, -40.949517, -27.424494, -16.407288, -7.75366, -0.614492, +-99.69897, -99.69897, -99.69897, -99.69897, -99.69897, -99.69897, -97.383566, -73.254635, -48.960085, -29.32845, -14.239564, -2.937852, +-105.79529, -105.79529, -105.79529, -68.76829, -42.03029, -32.04629, -24.07929, -19.93129, -15.54329, -11.63229, -7.97029, -3.81429, // NU +-105.79529, -105.79529, -105.79529, -69.76829, -42.44429, -32.06829, -24.08129, -19.93229, -15.54329, -11.63229, -7.97029, -3.81429, +-105.79529, -105.79529, -105.79529, -70.77029, -43.39229, -32.27429, -24.09529, -19.93529, -15.54429, -11.63229, -7.97029, -3.81429, +-105.79529, -105.79529, -105.79529, -71.78829, -44.39829, -33.09629, -24.23729, -19.96629, -15.54929, -11.63329, -7.97029, -3.81429, +-105.79529, -105.79529, -105.79529, -72.95829, -45.46429, -34.12729, -24.97129, -20.25529, -15.60329, -11.64129, -7.97129, -3.81429, +-105.79529, -105.79529, -105.79529, -75.23229, -47.01429, -35.43129, -26.10829, -21.22229, -16.04529, -11.72429, -7.97929, -3.81429, +-105.79529, -105.79529, -105.79529, -81.54729, -50.69729, -38.09329, -28.01729, -22.78529, -17.25729, -12.33329, -8.06729, -3.81729, +-105.79529, -105.79529, -105.79529, -96.96529, -59.51629, -44.28329, -32.18329, -25.95829, -19.47129, -13.82229, -8.71129, -3.84929, +-105.79529, -105.79529, -105.79529, -105.79529, -79.01529, -57.88829, -41.21429, -32.70929, -23.95429, -16.53129, -10.23729, -4.14329, +-105.79529, -105.79529, -105.79529, -105.79529, -105.79529, -87.20929, -60.53429, -47.04529, -33.34729, -22.11429, -13.14629, -5.34729, +-105.79529, -105.79529, -105.79529, -105.79529, -105.79529, -105.79529, -103.60129, -79.35129, -54.88629, -35.04229, -19.64429, -7.67329, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, // GAMMA +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, + }; + + // Si27 --> Al27 + inline AMREX_GPU_DEVICE table_t j_Si27_Al27_meta{.ntemp=12, .nrhoy=11, .nvars=3, .nheader=5}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Si27_Al27_rhoy{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Si27_Al27_temp{7.0, 8.0, 8.30103, 8.60206, 8.845098, 9.0, 9.176091, 9.30103, 9.477121, 9.69897, 10.0, 10.477121}; + // Array3D is column-major (Fortran-ordering). T varies fastest, then rho Ye, then the component + inline AMREX_GPU_DEVICE amrex::Array3D + j_Si27_Al27_data{ +-0.793998, -0.793999, -0.794, -0.794, -0.793999, -0.793974, -0.793627, -0.792294, -0.783492, -0.718414, -0.17846, 1.873489, // RATE +-0.793982, -0.793994, -0.793995, -0.793996, -0.793996, -0.793972, -0.793625, -0.792294, -0.783492, -0.718414, -0.17846, 1.873489, +-0.793866, -0.793938, -0.793953, -0.793963, -0.793969, -0.793956, -0.793613, -0.792282, -0.783468, -0.718414, -0.17846, 1.873489, +-0.793304, -0.793449, -0.793552, -0.793639, -0.793688, -0.793708, -0.793465, -0.792156, -0.783348, -0.718254, -0.17846, 1.873489, +-0.790199, -0.790251, -0.790386, -0.790688, -0.790985, -0.791147, -0.791218, -0.790476, -0.782011, -0.716963, -0.177744, 1.873489, +-0.767605, -0.767605, -0.767605, -0.767664, -0.767781, -0.767898, -0.767957, -0.767664, -0.762422, -0.702481, -0.171723, 1.873489, +-0.58692, -0.586541, -0.586541, -0.586541, -0.58578, -0.584635, -0.58233, -0.578836, -0.567704, -0.529194, -0.108264, 1.877404, +0.167281, 0.167281, 0.167281, 0.168172, 0.168172, 0.169954, 0.172629, 0.177092, 0.190721, 0.228207, 0.392078, 1.906666, +1.394821, 1.394821, 1.394821, 1.394821, 1.394821, 1.395814, 1.396808, 1.399789, 1.405763, 1.427663, 1.510757, 2.181539, +2.850099, 2.850099, 2.850099, 2.850099, 2.850099, 2.851098, 2.851098, 2.852098, 2.855098, 2.865097, 2.903111, 3.20366, +4.494002, 4.494002, 4.494002, 4.494002, 4.494002, 4.494002, 4.494002, 4.495002, 4.495002, 4.497002, 4.506003, 4.589027, +-6.27429, -6.27429, -6.27429, -6.27429, -6.27429, -6.27429, -6.27329, -6.27029, -6.24929, -6.09229, -5.19829, -2.73729, // NU +-6.27429, -6.27429, -6.27429, -6.27429, -6.27429, -6.27429, -6.27329, -6.27029, -6.24929, -6.09229, -5.19829, -2.73729, +-6.27429, -6.27429, -6.27429, -6.27429, -6.27429, -6.27429, -6.27329, -6.27029, -6.24929, -6.09229, -5.19829, -2.73729, +-6.27229, -6.27329, -6.27329, -6.27329, -6.27329, -6.27329, -6.27329, -6.27029, -6.24929, -6.09129, -5.19829, -2.73729, +-6.26629, -6.26629, -6.26629, -6.26729, -6.26729, -6.26829, -6.26729, -6.26529, -6.24529, -6.08829, -5.19729, -2.73729, +-6.21529, -6.21529, -6.21529, -6.21529, -6.21529, -6.21529, -6.21429, -6.21229, -6.20029, -6.05829, -5.19029, -2.73729, +-5.87529, -5.87529, -5.87529, -5.87529, -5.87329, -5.87029, -5.86429, -5.85529, -5.83229, -5.75029, -5.11329, -2.73329, +-4.88729, -4.88729, -4.88729, -4.88729, -4.88629, -4.88429, -4.87929, -4.87229, -4.85129, -4.79129, -4.54529, -2.70329, +-3.50929, -3.50929, -3.50929, -3.50829, -3.50829, -3.50729, -3.50529, -3.50229, -3.49229, -3.46229, -3.33729, -2.42029, +-1.87629, -1.87629, -1.87629, -1.87629, -1.87629, -1.87629, -1.87529, -1.87429, -1.86929, -1.85629, -1.80129, -1.34829, +-0.00229, -0.00229, -0.00229, -0.00229, -0.00229, -0.00129, -0.00129, -0.00129, 0.00071, 0.00471, 0.02171, 0.18871, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, // GAMMA +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, + }; + + // P29 --> Si29 + inline AMREX_GPU_DEVICE table_t j_P29_Si29_meta{.ntemp=12, .nrhoy=11, .nvars=3, .nheader=5}; + inline AMREX_GPU_DEVICE amrex::Array1D j_P29_Si29_rhoy{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}; + inline AMREX_GPU_DEVICE amrex::Array1D j_P29_Si29_temp{7.0, 8.0, 8.30103, 8.60206, 8.845098, 9.0, 9.176091, 9.30103, 9.477121, 9.69897, 10.0, 10.477121}; + // Array3D is column-major (Fortran-ordering). T varies fastest, then rho Ye, then the component + inline AMREX_GPU_DEVICE amrex::Array3D + j_P29_Si29_data{ +-0.791998, -0.791999, -0.792, -0.792, -0.791999, -0.791974, -0.791628, -0.79031, -0.781658, -0.712394, -0.180504, 1.881862, // RATE +-0.791981, -0.791994, -0.791995, -0.791996, -0.791996, -0.791972, -0.791626, -0.79031, -0.781658, -0.712394, -0.180504, 1.881862, +-0.791861, -0.791936, -0.791952, -0.791963, -0.791968, -0.791955, -0.791614, -0.790298, -0.781658, -0.712394, -0.180504, 1.881862, +-0.791282, -0.791432, -0.79154, -0.791633, -0.791686, -0.791706, -0.791466, -0.790168, -0.78154, -0.712239, -0.180504, 1.881862, +-0.788129, -0.788182, -0.788328, -0.78865, -0.788964, -0.78914, -0.789224, -0.7885, -0.780227, -0.710996, -0.179805, 1.881862, +-0.765605, -0.765605, -0.765605, -0.765664, -0.76584, -0.766015, -0.766131, -0.765898, -0.760895, -0.696174, -0.173896, 1.881862, +-0.58681, -0.58681, -0.58681, -0.586433, -0.585677, -0.58492, -0.582635, -0.579557, -0.570312, -0.528059, -0.111904, 1.884768, +0.161274, 0.161274, 0.161274, 0.162163, 0.163052, 0.163941, 0.16661, 0.170172, 0.181878, 0.219184, 0.382874, 1.913951, +1.38788, 1.38788, 1.38788, 1.38788, 1.388873, 1.388873, 1.389866, 1.391853, 1.397821, 1.415795, 1.498967, 2.188247, +2.863096, 2.863096, 2.863096, 2.863096, 2.863096, 2.863096, 2.864096, 2.865096, 2.867095, 2.873097, 2.903117, 3.20973, +4.529002, 4.529002, 4.529002, 4.529002, 4.529002, 4.529002, 4.529002, 4.529002, 4.530002, 4.529002, 4.526003, 4.59503, +-6.26029, -6.26029, -6.26029, -6.26029, -6.26029, -6.26029, -6.26029, -6.25729, -6.23629, -6.07629, -5.19929, -2.72829, // NU +-6.26029, -6.26029, -6.26029, -6.26029, -6.26029, -6.26029, -6.26029, -6.25729, -6.23629, -6.07629, -5.19929, -2.72829, +-6.26029, -6.26029, -6.26029, -6.26029, -6.26029, -6.26029, -6.26029, -6.25729, -6.23629, -6.07629, -5.19929, -2.72829, +-6.25929, -6.25929, -6.25929, -6.25929, -6.26029, -6.26029, -6.25929, -6.25629, -6.23529, -6.07629, -5.19929, -2.72829, +-6.25229, -6.25229, -6.25229, -6.25329, -6.25429, -6.25429, -6.25429, -6.25229, -6.23229, -6.07329, -5.19929, -2.72829, +-6.20229, -6.20229, -6.20229, -6.20229, -6.20229, -6.20229, -6.20229, -6.20029, -6.18829, -6.04429, -5.19129, -2.72829, +-5.86829, -5.86829, -5.86829, -5.86829, -5.86629, -5.86429, -5.85829, -5.85029, -5.82829, -5.74529, -5.11529, -2.72529, +-4.88929, -4.88929, -4.88929, -4.88929, -4.88729, -4.88529, -4.88129, -4.87429, -4.85629, -4.79729, -4.55129, -2.69429, +-3.51529, -3.51529, -3.51529, -3.51429, -3.51429, -3.51329, -3.51129, -3.50829, -3.50029, -3.47229, -3.34729, -2.41229, +-1.87429, -1.87429, -1.87429, -1.87429, -1.87429, -1.87429, -1.87329, -1.87229, -1.86929, -1.85929, -1.80829, -1.34129, +0.02371, 0.02371, 0.02371, 0.02371, 0.02371, 0.02371, 0.02371, 0.02371, 0.02471, 0.02571, 0.03271, 0.19371, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, // GAMMA +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, + }; + + // Si29 --> P29 + inline AMREX_GPU_DEVICE table_t j_Si29_P29_meta{.ntemp=12, .nrhoy=11, .nvars=3, .nheader=5}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Si29_P29_rhoy{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Si29_P29_temp{7.0, 8.0, 8.30103, 8.60206, 8.845098, 9.0, 9.176091, 9.30103, 9.477121, 9.69897, 10.0, 10.477121}; + // Array3D is column-major (Fortran-ordering). T varies fastest, then rho Ye, then the component + inline AMREX_GPU_DEVICE amrex::Array3D + j_Si29_P29_data{ +-99.69897, -99.69897, -99.69897, -63.692, -36.485, -26.375, -18.37, -14.244996, -9.942912, -6.20016, -2.819833, 0.874967, // RATE +-99.69897, -99.69897, -99.69897, -64.692, -36.899, -26.396, -18.371, -14.244996, -9.942912, -6.20016, -2.819833, 0.874967, +-99.69897, -99.69897, -99.69897, -65.694, -37.847, -26.602, -18.386, -14.247996, -9.942912, -6.20016, -2.819833, 0.874967, +-99.69897, -99.69897, -99.69897, -66.712, -38.853, -27.424, -18.527, -14.279995, -9.947911, -6.201158, -2.819833, 0.874967, +-99.69897, -99.69897, -99.69897, -67.883, -39.919, -28.456, -19.260998, -14.567991, -10.0019, -6.209144, -2.820822, 0.874967, +-99.69897, -99.69897, -99.69897, -70.157, -41.469, -29.758999, -20.397981, -15.534921, -10.443732, -6.291974, -2.829726, 0.874967, +-99.69897, -99.69897, -99.69897, -76.472999, -45.152978, -32.421856, -22.308272, -17.099375, -11.655013, -6.900378, -2.917638, 0.870981, +-99.69897, -99.69897, -99.69897, -91.860395, -53.950241, -38.597517, -26.46444, -20.262502, -13.856969, -8.373892, -3.554586, 0.840098, +-99.69897, -99.69897, -99.69897, -99.69897, -73.321052, -52.077446, -35.37327, -26.898212, -18.242469, -11.011855, -5.02222, 0.548484, +-99.69897, -99.69897, -99.69897, -99.69897, -99.69897, -81.391617, -54.745046, -41.314044, -27.643487, -16.511314, -7.808387, -0.648093, +-99.69897, -99.69897, -99.69897, -99.69897, -99.69897, -99.69897, -97.811046, -73.619163, -49.189601, -29.431653, -14.287744, -2.971049, +-105.79529, -105.79529, -105.79529, -70.46529, -43.01029, -32.74029, -24.55129, -20.29329, -15.80029, -11.81129, -8.08529, -3.84929, // NU +-105.79529, -105.79529, -105.79529, -71.46629, -43.42429, -32.76129, -24.55229, -20.29329, -15.80029, -11.81129, -8.08529, -3.84929, +-105.79529, -105.79529, -105.79529, -72.46729, -44.37229, -32.96729, -24.56629, -20.29729, -15.80129, -11.81129, -8.08529, -3.84929, +-105.79529, -105.79529, -105.79529, -73.48529, -45.37829, -33.78929, -24.70829, -20.32829, -15.80629, -11.81229, -8.08529, -3.84929, +-105.79529, -105.79529, -105.79529, -74.65629, -46.44429, -34.82129, -25.44229, -20.61729, -15.86029, -11.82029, -8.08629, -3.84929, +-105.79529, -105.79529, -105.79529, -76.93029, -47.99429, -36.12429, -26.57929, -21.58329, -16.30229, -11.90229, -8.09529, -3.85029, +-105.79529, -105.79529, -105.79529, -83.24629, -51.67829, -38.78729, -28.48929, -23.14629, -17.51329, -12.51129, -8.18229, -3.85329, +-105.79529, -105.79529, -105.79529, -98.63129, -60.47629, -44.96529, -32.64929, -26.31429, -19.71729, -13.98829, -8.82329, -3.88429, +-105.79529, -105.79529, -105.79529, -105.79529, -79.85429, -58.45229, -41.56829, -32.96329, -24.11929, -16.65129, -10.33129, -4.17829, +-105.79529, -105.79529, -105.79529, -105.79529, -105.79529, -87.78329, -60.96429, -47.41229, -33.57229, -22.22229, -13.21229, -5.38229, +-105.79529, -105.79529, -105.79529, -105.79529, -105.79529, -105.79529, -104.03029, -79.71729, -55.11829, -35.15029, -19.70429, -7.70829, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, // GAMMA +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, + }; + + // P31 --> Si31 + inline AMREX_GPU_DEVICE table_t j_P31_Si31_meta{.ntemp=12, .nrhoy=11, .nvars=3, .nheader=5}; + inline AMREX_GPU_DEVICE amrex::Array1D j_P31_Si31_rhoy{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}; + inline AMREX_GPU_DEVICE amrex::Array1D j_P31_Si31_temp{7.0, 8.0, 8.30103, 8.60206, 8.845098, 9.0, 9.176091, 9.30103, 9.477121, 9.69897, 10.0, 10.477121}; + // Array3D is column-major (Fortran-ordering). T varies fastest, then rho Ye, then the component + inline AMREX_GPU_DEVICE amrex::Array3D + j_P31_Si31_data{ +-99.69897, -87.063, -49.053, -29.822, -20.767, -15.992997, -12.006913, -9.810671, -7.300843, -4.849515, -2.263034, 1.267298, // RATE +-99.69897, -86.061, -48.052, -28.821, -20.354, -15.970997, -12.004913, -9.810671, -7.300843, -4.849515, -2.263034, 1.267298, +-99.69897, -85.045, -47.047, -27.82, -19.406, -15.764998, -11.990916, -9.807673, -7.300843, -4.849515, -2.263034, 1.267298, +-99.69897, -83.884, -45.992, -26.802, -18.4, -14.943, -11.848939, -9.775696, -7.294859, -4.848537, -2.263034, 1.267298, +-99.69897, -81.536, -44.489, -25.631, -17.334, -13.912, -11.116989, -9.488842, -7.241988, -4.840708, -2.262128, 1.268286, +-99.69897, -73.343, -40.308, -23.359, -15.786, -12.612, -9.987999, -8.532982, -6.806623, -4.761222, -2.253874, 1.268286, +-99.69897, -48.334, -27.802, -17.085, -12.148, -9.992, -8.124, -7.030999, -5.650973, -4.173969, -2.174759, 1.271262, +-4.58, -4.578, -4.573, -4.552, -4.5, -4.427, -4.269, -4.076, -3.64, -2.823909, -1.580875, 1.300958, +-0.962, -0.962, -0.962, -0.961, -0.959, -0.956, -0.947, -0.936, -0.905, -0.788999, -0.237584, 1.581795, +1.512, 1.512, 1.512, 1.512, 1.512, 1.513, 1.515, 1.518, 1.523, 1.537, 1.683005, 2.635268, +3.853, 3.853, 3.853, 3.853, 3.853, 3.853, 3.853, 3.854, 3.853, 3.847, 3.845, 4.111009, +-105.79529, -94.44129, -56.12529, -36.58529, -27.27629, -22.32929, -18.11829, -15.75329, -13.02829, -10.33229, -7.39329, -3.37329, // NU +-105.79529, -93.43929, -55.12529, -35.58529, -26.86229, -22.30729, -18.11729, -15.75329, -13.02829, -10.33229, -7.39329, -3.37329, +-105.79529, -92.42329, -54.11929, -34.58329, -25.91429, -22.10129, -18.10229, -15.74929, -13.02829, -10.33229, -7.39329, -3.37329, +-105.79529, -91.26329, -53.06429, -33.56529, -24.90829, -21.27929, -17.96029, -15.71829, -13.02229, -10.33129, -7.39329, -3.37329, +-105.79529, -88.91429, -51.56129, -32.39429, -23.84229, -20.24929, -17.22929, -15.43129, -12.96929, -10.32329, -7.39229, -3.37329, +-105.79529, -80.72129, -47.38029, -30.12129, -22.29429, -18.95029, -16.10629, -14.47829, -12.53329, -10.24329, -7.38429, -3.37329, +-105.79529, -55.71229, -34.87629, -23.85129, -18.65729, -16.33029, -14.25929, -12.99729, -11.37629, -9.65129, -7.30129, -3.37029, +-10.84329, -10.83929, -10.82929, -10.79029, -10.69229, -10.56329, -10.30729, -10.02029, -9.38929, -8.28229, -6.69129, -3.33929, +-6.43829, -6.43829, -6.43829, -6.43729, -6.43329, -6.42729, -6.41329, -6.39329, -6.33829, -6.12629, -5.31229, -3.05329, +-3.56729, -3.56729, -3.56729, -3.56729, -3.56629, -3.56529, -3.56229, -3.55929, -3.55129, -3.52529, -3.28929, -1.96129, +-0.81829, -0.81829, -0.81829, -0.81829, -0.81829, -0.81829, -0.81729, -0.81729, -0.81729, -0.82129, -0.80429, -0.34629, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, // GAMMA +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, + }; + + // Si31 --> P31 + inline AMREX_GPU_DEVICE table_t j_Si31_P31_meta{.ntemp=12, .nrhoy=11, .nvars=3, .nheader=5}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Si31_P31_rhoy{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Si31_P31_temp{7.0, 8.0, 8.30103, 8.60206, 8.845098, 9.0, 9.176091, 9.30103, 9.477121, 9.69897, 10.0, 10.477121}; + // Array3D is column-major (Fortran-ordering). T varies fastest, then rho Ye, then the component + inline AMREX_GPU_DEVICE amrex::Array3D + j_Si31_P31_data{ +-4.149, -4.149, -4.149, -4.149, -4.148997, -4.146899, -4.118047, -4.026141, -3.740446, -3.138002, -1.615516, 1.326456, // RATE +-4.149, -4.149, -4.149, -4.149, -4.148999, -4.146904, -4.118055, -4.026163, -3.740446, -3.138002, -1.615516, 1.326456, +-4.149, -4.149, -4.149, -4.149, -4.149, -4.14694, -4.118117, -4.02623, -3.740566, -3.138002, -1.615516, 1.326456, +-4.151, -4.15, -4.15, -4.15, -4.15, -4.147991, -4.118641, -4.026896, -3.741163, -3.138469, -1.615516, 1.326456, +-4.159, -4.159, -4.158, -4.157, -4.156, -4.152999, -4.123746, -4.033253, -3.748015, -3.142717, -1.616189, 1.326456, +-4.21, -4.21, -4.21, -4.208, -4.205, -4.2, -4.16298, -4.067446, -3.791893, -3.180611, -1.622228, 1.326456, +-4.591, -4.59, -4.589, -4.585, -4.572, -4.552, -4.470999, -4.314973, -3.965286, -3.398116, -1.680311, 1.323535, +-99.69897, -31.826, -19.708, -13.154, -9.708, -8.087, -6.69, -5.910999, -5.008891, -3.992686, -2.014776, 1.293209, +-99.69897, -99.69897, -87.267, -46.32, -28.436, -21.103, -15.188, -12.049, -8.63499, -5.561563, -2.637387, 1.00935, +-99.69897, -99.69897, -99.69897, -99.69897, -69.353, -49.193, -33.349, -25.321, -17.148, -10.377974, -4.902126, -0.143464, +-99.69897, -99.69897, -99.69897, -99.69897, -99.69897, -99.69897, -76.329, -57.54, -38.605, -23.235979, -11.339444, -2.445676, +-9.99229, -9.99229, -9.99229, -9.99229, -9.99229, -9.98929, -9.94629, -9.81729, -9.43729, -8.60629, -6.77029, -3.36529, // NU +-9.99229, -9.99229, -9.99229, -9.99229, -9.99229, -9.98929, -9.94629, -9.81729, -9.43729, -8.60629, -6.77029, -3.36529, +-9.99329, -9.99229, -9.99229, -9.99229, -9.99229, -9.99029, -9.94629, -9.81729, -9.43729, -8.60629, -6.77029, -3.36529, +-9.99529, -9.99529, -9.99429, -9.99329, -9.99329, -9.99129, -9.94829, -9.81929, -9.43829, -8.60729, -6.77129, -3.36529, +-10.00829, -10.00829, -10.00729, -10.00529, -10.00329, -9.99929, -9.95629, -9.83029, -9.45029, -8.61229, -6.77129, -3.36529, +-10.08929, -10.08929, -10.08829, -10.08629, -10.07929, -10.06929, -10.01229, -9.87929, -9.52229, -8.66529, -6.77829, -3.36529, +-10.64629, -10.64529, -10.64229, -10.63329, -10.60829, -10.56929, -10.42929, -10.19729, -9.75129, -8.97729, -6.84329, -3.36829, +-105.79529, -39.21229, -26.79729, -19.87829, -16.11529, -14.37429, -12.85429, -11.98329, -10.93729, -9.63929, -7.23729, -3.39929, +-105.79529, -105.79529, -94.35329, -53.10929, -34.98729, -27.48829, -21.35829, -18.04829, -14.42829, -11.15029, -7.97129, -3.69029, +-105.79529, -105.79529, -105.79529, -105.79529, -75.88729, -55.57529, -39.56029, -31.41129, -23.07029, -16.09529, -10.36429, -4.87929, +-105.79529, -105.79529, -105.79529, -105.79529, -105.79529, -105.79529, -82.54829, -63.63829, -44.53629, -28.96329, -16.81829, -7.19929, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, // GAMMA +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, + }; + + // Cl33 --> S33 + inline AMREX_GPU_DEVICE table_t j_Cl33_S33_meta{.ntemp=12, .nrhoy=11, .nvars=3, .nheader=5}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Cl33_S33_rhoy{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Cl33_S33_temp{7.0, 8.0, 8.30103, 8.60206, 8.845098, 9.0, 9.176091, 9.30103, 9.477121, 9.69897, 10.0, 10.477121}; + // Array3D is column-major (Fortran-ordering). T varies fastest, then rho Ye, then the component + inline AMREX_GPU_DEVICE amrex::Array3D + j_Cl33_S33_data{ +-0.574998, -0.574999, -0.575, -0.575, -0.574999, -0.574981, -0.574729, -0.573778, -0.565619, -0.512715, -0.054541, 1.992142, // RATE +-0.574985, -0.574995, -0.574996, -0.574997, -0.574997, -0.57498, -0.574728, -0.573778, -0.565619, -0.512715, -0.054541, 1.992142, +-0.574891, -0.574951, -0.574963, -0.574972, -0.574977, -0.574967, -0.574719, -0.573769, -0.565603, -0.512715, -0.05392, 1.992142, +-0.574441, -0.574561, -0.574649, -0.574723, -0.574766, -0.574784, -0.574611, -0.573678, -0.565518, -0.512601, -0.05392, 1.992142, +-0.57206, -0.572107, -0.572224, -0.572485, -0.572748, -0.572893, -0.572978, -0.572473, -0.564575, -0.511684, -0.05392, 1.992142, +-0.555502, -0.555502, -0.555502, -0.555545, -0.55572, -0.555936, -0.556149, -0.556064, -0.550425, -0.501059, -0.048311, 1.992142, +-0.419805, -0.419805, -0.419805, -0.419504, -0.418901, -0.418296, -0.41647, -0.414317, -0.405352, -0.370151, 0.007768, 1.99502, +0.240993, 0.240993, 0.240993, 0.240993, 0.24184, 0.243536, 0.246082, 0.250331, 0.26185, 0.299718, 0.472075, 2.023993, +1.444175, 1.444175, 1.444175, 1.444175, 1.444175, 1.445166, 1.446156, 1.448137, 1.4551, 1.476025, 1.572175, 2.296485, +2.914141, 2.914141, 2.914141, 2.914141, 2.914141, 2.915141, 2.915141, 2.91614, 2.91914, 2.928141, 2.972165, 3.311964, +4.558003, 4.558003, 4.558003, 4.558003, 4.558003, 4.558003, 4.558003, 4.558003, 4.559003, 4.560003, 4.571004, 4.690041, +-5.98129, -5.98129, -5.98129, -5.98129, -5.98129, -5.98129, -5.98129, -5.97829, -5.96229, -5.84929, -5.08029, -2.61229, // NU +-5.98129, -5.98129, -5.98129, -5.98129, -5.98129, -5.98129, -5.98129, -5.97829, -5.96229, -5.84929, -5.08029, -2.61229, +-5.98129, -5.98129, -5.98129, -5.98129, -5.98129, -5.98129, -5.98129, -5.97829, -5.96229, -5.84929, -5.08029, -2.61229, +-5.98029, -5.98029, -5.98129, -5.98129, -5.98129, -5.98129, -5.98029, -5.97829, -5.96229, -5.84929, -5.08029, -2.61229, +-5.97529, -5.97529, -5.97529, -5.97629, -5.97629, -5.97729, -5.97729, -5.97529, -5.96029, -5.84729, -5.07929, -2.61229, +-5.94029, -5.94029, -5.94029, -5.94029, -5.94029, -5.94029, -5.94029, -5.93929, -5.92929, -5.82529, -5.07229, -2.61229, +-5.68229, -5.68229, -5.68229, -5.68229, -5.68129, -5.67929, -5.67429, -5.66829, -5.65029, -5.58329, -5.00029, -2.60929, +-4.79129, -4.79129, -4.79129, -4.79029, -4.78929, -4.78729, -4.78329, -4.77729, -4.75929, -4.70229, -4.45529, -2.57929, +-3.44729, -3.44729, -3.44729, -3.44729, -3.44629, -3.44629, -3.44429, -3.44129, -3.43129, -3.40129, -3.26529, -2.29729, +-1.82029, -1.82029, -1.82029, -1.82029, -1.82029, -1.81929, -1.81929, -1.81729, -1.81329, -1.80029, -1.73629, -1.23229, +0.05971, 0.05971, 0.05971, 0.05971, 0.05971, 0.05971, 0.06071, 0.06071, 0.06171, 0.06571, 0.08571, 0.29171, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, // GAMMA +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, + }; + + // P33 --> S33 + inline AMREX_GPU_DEVICE table_t j_P33_S33_meta{.ntemp=12, .nrhoy=11, .nvars=3, .nheader=5}; + inline AMREX_GPU_DEVICE amrex::Array1D j_P33_S33_rhoy{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}; + inline AMREX_GPU_DEVICE amrex::Array1D j_P33_S33_temp{7.0, 8.0, 8.30103, 8.60206, 8.845098, 9.0, 9.176091, 9.30103, 9.477121, 9.69897, 10.0, 10.477121}; + // Array3D is column-major (Fortran-ordering). T varies fastest, then rho Ye, then the component + inline AMREX_GPU_DEVICE amrex::Array3D + j_P33_S33_data{ +-6.502, -6.502, -6.502, -6.502, -6.50145, -6.483735, -6.225068, -5.681037, -4.738871, -3.57745, -1.737698, 1.366199, // RATE +-6.503, -6.502, -6.502, -6.502, -6.501787, -6.484619, -6.225536, -5.681037, -4.738871, -3.57745, -1.737698, 1.366199, +-6.51, -6.505, -6.504, -6.503, -6.502976, -6.492078, -6.23248, -5.683452, -4.738871, -3.57745, -1.737698, 1.366199, +-6.543, -6.533, -6.524, -6.517, -6.510998, -6.506318, -6.29278, -5.70921, -4.743241, -3.578288, -1.737698, 1.366199, +-6.721, -6.712, -6.688, -6.639, -6.591, -6.562822, -6.480155, -5.92222, -4.789306, -3.585147, -1.738387, 1.366199, +-8.797, -8.588, -8.251, -7.732, -7.287, -7.044973, -6.808619, -6.429693, -5.139704, -3.652346, -1.7442, 1.366199, +-99.69897, -33.123, -20.579, -13.908, -10.817, -9.491984, -8.180878, -7.144462, -5.77379, -4.085221, -1.804017, 1.362301, +-99.69897, -93.845, -50.426, -28.179, -18.252, -14.121, -10.76195, -8.979393, -6.979483, -4.775928, -2.149074, 1.332934, +-99.69897, -99.69897, -99.69897, -61.41, -36.813, -26.761, -18.657998, -14.43898, -10.029824, -6.15588, -2.798755, 1.047897, +-99.69897, -99.69897, -99.69897, -99.69897, -77.747, -54.912, -36.988, -27.917999, -18.700992, -11.122907, -5.192179, -0.105709, +-99.69897, -99.69897, -99.69897, -99.69897, -99.69897, -99.69897, -79.982, -60.144999, -40.163993, -23.987923, -11.628663, -2.407256, +-13.06129, -13.06129, -13.06129, -13.06129, -13.05729, -12.95029, -12.17729, -11.39529, -10.32329, -8.99429, -6.90629, -3.32629, // NU +-13.06329, -13.06129, -13.06129, -13.06129, -13.06029, -12.95529, -12.17829, -11.39529, -10.32329, -8.99429, -6.90629, -3.32629, +-13.07329, -13.06629, -13.06429, -13.06329, -13.06229, -12.99229, -12.19029, -11.39829, -10.32329, -8.99429, -6.90629, -3.32629, +-13.12029, -13.10429, -13.09129, -13.08029, -13.07229, -13.05729, -12.30829, -11.42829, -10.32829, -8.99529, -6.90629, -3.32629, +-13.37329, -13.35529, -13.31429, -13.23529, -13.16629, -13.12929, -12.79129, -11.68929, -10.37729, -9.00229, -6.90729, -3.32629, +-16.19029, -15.81029, -15.27429, -14.53129, -13.95629, -13.66429, -13.28729, -12.40129, -10.76029, -9.07429, -6.91429, -3.32729, +-105.79529, -40.51829, -27.68829, -20.76129, -17.52829, -16.09829, -14.34229, -13.07629, -11.53229, -9.54929, -6.98029, -3.33029, +-105.79529, -101.23229, -57.50529, -34.92129, -24.76829, -20.50129, -16.98629, -15.08429, -12.84129, -10.30429, -7.38229, -3.36029, +-105.79529, -105.79529, -105.79529, -68.19829, -43.35329, -33.10229, -24.77429, -20.43129, -15.85229, -11.73929, -8.15229, -3.65129, +-105.79529, -105.79529, -105.79529, -105.79529, -84.29029, -61.30329, -43.20729, -34.01629, -24.63129, -16.85029, -10.66629, -4.84129, +-105.79529, -105.79529, -105.79529, -105.79529, -105.79529, -105.79529, -86.20229, -66.24429, -46.09729, -29.71829, -17.11229, -7.16029, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, // GAMMA +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, + }; + + // S33 --> Cl33 + inline AMREX_GPU_DEVICE table_t j_S33_Cl33_meta{.ntemp=12, .nrhoy=11, .nvars=3, .nheader=5}; + inline AMREX_GPU_DEVICE amrex::Array1D j_S33_Cl33_rhoy{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}; + inline AMREX_GPU_DEVICE amrex::Array1D j_S33_Cl33_temp{7.0, 8.0, 8.30103, 8.60206, 8.845098, 9.0, 9.176091, 9.30103, 9.477121, 9.69897, 10.0, 10.477121}; + // Array3D is column-major (Fortran-ordering). T varies fastest, then rho Ye, then the component + inline AMREX_GPU_DEVICE amrex::Array3D + j_S33_Cl33_data{ +-99.69897, -99.69897, -99.69897, -71.696, -41.046, -29.557999, -20.481992, -15.821964, -10.982806, -6.808124, -3.095927, 0.841574, // RATE +-99.69897, -99.69897, -99.69897, -72.697, -41.459, -29.578999, -20.483992, -15.822964, -10.982806, -6.808124, -3.095927, 0.841574, +-99.69897, -99.69897, -99.69897, -73.698, -42.407, -29.784999, -20.497992, -15.825964, -10.983806, -6.808124, -3.095927, 0.841574, +-99.69897, -99.69897, -99.69897, -74.716, -43.412996, -30.606994, -20.639989, -15.856961, -10.988804, -6.809122, -3.095927, 0.841574, +-99.69897, -99.69897, -99.69897, -75.886995, -44.479956, -31.638942, -21.373943, -16.145926, -11.042779, -6.817106, -3.096916, 0.841574, +-99.69897, -99.69897, -99.69897, -78.160727, -46.028417, -32.941434, -22.51046, -17.11243, -11.484427, -6.899933, -3.105822, 0.840578, +-99.69897, -99.69897, -99.69897, -84.474199, -49.70903, -35.599641, -24.415866, -18.67206, -12.694165, -7.508369, -3.193767, 0.837585, +-99.69897, -99.69897, -99.69897, -99.69897, -58.51861, -41.788411, -28.583128, -21.844507, -14.901511, -8.984657, -3.83123, 0.806675, +-99.69897, -99.69897, -99.69897, -99.69897, -77.912744, -55.279933, -37.489675, -28.471183, -19.27548, -11.614941, -5.314081, 0.513744, +-99.69897, -99.69897, -99.69897, -99.69897, -99.69897, -84.70373, -56.924988, -42.920114, -28.791588, -17.264073, -8.219398, -0.6854, +-99.69897, -99.69897, -99.69897, -99.69897, -99.69897, -99.69897, -99.69897, -75.224241, -50.322166, -30.184726, -14.713314, -3.009852, +-105.79529, -105.79529, -105.79529, -78.47029, -47.57129, -35.92429, -26.66529, -21.87329, -16.84329, -12.42129, -8.36229, -3.88629, // NU +-105.79529, -105.79529, -105.79529, -79.47029, -47.98529, -35.94629, -26.66629, -21.87329, -16.84329, -12.42129, -8.36229, -3.88629, +-105.79529, -105.79529, -105.79529, -80.47229, -48.93329, -36.15229, -26.68129, -21.87629, -16.84429, -12.42129, -8.36229, -3.88629, +-105.79529, -105.79529, -105.79529, -81.49029, -49.93929, -36.97429, -26.82229, -21.90829, -16.84929, -12.42229, -8.36229, -3.88629, +-105.79529, -105.79529, -105.79529, -82.66129, -51.00529, -38.00529, -27.55629, -22.19629, -16.90329, -12.43029, -8.36329, -3.88629, +-105.79529, -105.79529, -105.79529, -84.93429, -52.55529, -39.30829, -28.69329, -23.16229, -17.34529, -12.51329, -8.37229, -3.88629, +-105.79529, -105.79529, -105.79529, -91.24929, -56.23429, -41.96529, -30.59829, -24.72329, -18.55529, -13.12229, -8.46029, -3.88929, +-105.79529, -105.79529, -105.79529, -105.79529, -65.04829, -48.15829, -34.76929, -27.89829, -20.76529, -14.60129, -9.10129, -3.92029, +-105.79529, -105.79529, -105.79529, -105.79529, -84.43929, -61.64529, -43.67529, -34.53029, -25.15229, -17.25729, -10.62729, -4.21429, +-105.79529, -105.79529, -105.79529, -105.79529, -105.79529, -91.09529, -63.14429, -49.01829, -34.71729, -22.97629, -13.60729, -5.41929, +-105.79529, -105.79529, -105.79529, -105.79529, -105.79529, -105.79529, -105.79529, -81.32329, -56.25129, -35.90029, -20.10929, -7.74529, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, // GAMMA +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, + }; + + // S33 --> P33 + inline AMREX_GPU_DEVICE table_t j_S33_P33_meta{.ntemp=12, .nrhoy=11, .nvars=3, .nheader=5}; + inline AMREX_GPU_DEVICE amrex::Array1D j_S33_P33_rhoy{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}; + inline AMREX_GPU_DEVICE amrex::Array1D j_S33_P33_temp{7.0, 8.0, 8.30103, 8.60206, 8.845098, 9.0, 9.176091, 9.30103, 9.477121, 9.69897, 10.0, 10.477121}; + // Array3D is column-major (Fortran-ordering). T varies fastest, then rho Ye, then the component + inline AMREX_GPU_DEVICE amrex::Array3D + j_S33_P33_data{ +-99.69897, -25.466, -18.733, -15.112, -12.713, -10.57, -8.59599, -7.412945, -5.96161, -4.357418, -2.146948, 1.318614, // RATE +-99.69897, -24.465, -17.732, -14.112, -12.3, -10.548, -8.59399, -7.411945, -5.96161, -4.357418, -2.146948, 1.318614, +-99.69897, -23.448, -16.726, -13.11, -11.352, -10.342, -8.579991, -7.408945, -5.96161, -4.357418, -2.146948, 1.318614, +-99.69897, -22.288, -15.671, -12.092, -10.346, -9.521, -8.437993, -7.377949, -5.955615, -4.356448, -2.146948, 1.318614, +-99.69897, -19.939, -14.169, -10.921, -9.28, -8.491, -7.706999, -7.090974, -5.902658, -4.348692, -2.146059, 1.318614, +-30.011, -11.746, -9.992, -8.66, -7.746, -7.206, -6.592, -6.142997, -5.468873, -4.269877, -2.137937, 1.318614, +-5.273, -5.272, -5.266, -5.245, -5.192, -5.119, -4.959, -4.758, -4.34599, -3.689074, -2.060058, 1.321569, +-3.035, -3.035, -3.034, -3.032, -3.026, -3.017, -2.99, -2.941, -2.781, -2.414844, -1.474953, 1.35219, +-0.98, -0.98, -0.98, -0.98, -0.978, -0.976, -0.968, -0.953, -0.895, -0.722997, -0.159465, 1.632468, +1.478, 1.478, 1.478, 1.479, 1.479, 1.48, 1.483, 1.487, 1.502, 1.549, 1.740007, 2.684332, +3.844, 3.844, 3.844, 3.844, 3.844, 3.844, 3.844, 3.845, 3.845, 3.847, 3.858, 4.155011, +-105.79529, -32.83829, -25.79229, -21.85329, -19.18729, -16.85629, -14.65329, -13.31729, -11.66929, -9.82929, -7.26029, -3.32229, // NU +-105.79529, -31.83629, -24.79229, -20.85329, -18.77429, -16.83429, -14.65229, -13.31629, -11.66929, -9.82929, -7.26029, -3.32229, +-105.79529, -30.81929, -23.78629, -19.85129, -17.82629, -16.62829, -14.63729, -13.31329, -11.66929, -9.82929, -7.26029, -3.32229, +-105.79529, -29.65929, -22.73129, -18.83329, -16.81929, -15.80729, -14.49629, -13.28129, -11.66329, -9.82829, -7.26029, -3.32229, +-105.79529, -27.31029, -21.22829, -17.66229, -15.75429, -14.77829, -13.76529, -12.99429, -11.61029, -9.82029, -7.25929, -3.32229, +-38.39429, -19.11729, -17.04929, -15.39529, -14.21329, -13.49229, -12.65029, -12.04429, -11.17429, -9.74129, -7.25129, -3.32129, +-11.50929, -11.50629, -11.49529, -11.45629, -11.35729, -11.22429, -10.94429, -10.61929, -10.02429, -9.15229, -7.16929, -3.31829, +-8.69729, -8.69729, -8.69629, -8.69229, -8.68229, -8.66729, -8.62429, -8.54629, -8.31129, -7.81129, -6.56429, -3.28829, +-6.28429, -6.28429, -6.28429, -6.28329, -6.28129, -6.27729, -6.26729, -6.24529, -6.16529, -5.94229, -5.20929, -3.00229, +-3.63529, -3.63529, -3.63529, -3.63529, -3.63429, -3.63229, -3.62929, -3.62229, -3.59829, -3.52229, -3.22629, -1.91129, +-0.82429, -0.82429, -0.82429, -0.82429, -0.82429, -0.82429, -0.82329, -0.82329, -0.82129, -0.81429, -0.78029, -0.30129, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, // GAMMA +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, + }; + + // Cl35 --> S35 + inline AMREX_GPU_DEVICE table_t j_Cl35_S35_meta{.ntemp=12, .nrhoy=11, .nvars=3, .nheader=5}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Cl35_S35_rhoy{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Cl35_S35_temp{7.0, 8.0, 8.30103, 8.60206, 8.845098, 9.0, 9.176091, 9.30103, 9.477121, 9.69897, 10.0, 10.477121}; + // Array3D is column-major (Fortran-ordering). T varies fastest, then rho Ye, then the component + inline AMREX_GPU_DEVICE amrex::Array3D + j_Cl35_S35_data{ +-98.334515, -21.148, -16.466, -13.864, -11.896, -9.930991, -8.134864, -7.075497, -5.773792, -4.274817, -2.090245, 1.356072, // RATE +-97.289154, -20.147, -15.466, -12.864, -11.482, -9.908992, -8.133864, -7.075497, -5.773792, -4.274817, -2.090245, 1.356072, +-95.777974, -19.13, -14.46, -11.862, -10.534, -9.703995, -8.118869, -7.072501, -5.773792, -4.274817, -2.090245, 1.356072, +-90.959, -17.97, -13.405, -10.844, -9.528, -8.881999, -7.977905, -7.040536, -5.767836, -4.273858, -2.090245, 1.356072, +-70.115, -15.621, -11.902, -9.674, -8.463, -7.852, -7.244982, -6.75276, -5.715186, -4.266183, -2.08937, 1.356072, +-8.345, -8.223, -7.975, -7.494, -6.959, -6.577, -6.123999, -5.795973, -5.278959, -4.187096, -2.081478, 1.356072, +-4.759, -4.758, -4.754, -4.738, -4.698, -4.641, -4.523, -4.392999, -4.129926, -3.606048, -2.004591, 1.359022, +-2.665, -2.665, -2.664, -2.663, -2.658, -2.65, -2.632, -2.607, -2.538998, -2.314797, -1.423539, 1.389366, +-0.731, -0.731, -0.731, -0.73, -0.729, -0.726, -0.72, -0.711, -0.685, -0.587996, -0.1074, 1.666793, +1.544, 1.544, 1.545, 1.545, 1.545, 1.546, 1.547, 1.549, 1.555, 1.576, 1.719009, 2.706564, +3.702, 3.702, 3.702, 3.702, 3.702, 3.702, 3.702, 3.702, 3.703, 3.703, 3.723, 4.15002, +-105.79529, -28.51729, -23.52229, -20.59929, -18.36529, -16.22829, -14.23329, -13.03129, -11.52229, -9.74729, -7.20429, -3.27029, // NU +-105.67129, -27.51629, -22.52229, -19.59929, -17.95229, -16.20629, -14.23229, -13.03129, -11.52229, -9.74729, -7.20429, -3.27029, +-104.15929, -26.49929, -21.51629, -18.59729, -17.00429, -16.00029, -14.21829, -13.02729, -11.52129, -9.74729, -7.20429, -3.27029, +-99.34029, -25.33929, -20.46129, -17.57929, -15.99729, -15.17929, -14.07629, -12.99629, -11.51629, -9.74629, -7.20429, -3.27029, +-78.49629, -22.99029, -18.95829, -16.40929, -14.93229, -14.14829, -13.34329, -12.70829, -11.46329, -9.73829, -7.20329, -3.27029, +-15.57929, -15.34929, -14.92729, -14.18529, -13.40529, -12.85829, -12.21429, -11.74729, -11.02429, -9.65929, -7.19529, -3.27029, +-10.92129, -10.91929, -10.91129, -10.88129, -10.80529, -10.70129, -10.49529, -10.27529, -9.85029, -9.07129, -7.11429, -3.26729, +-8.30429, -8.30429, -8.30329, -8.29929, -8.29129, -8.27729, -8.24529, -8.20129, -8.08229, -7.72229, -6.51229, -3.23629, +-6.01329, -6.01329, -6.01229, -6.01229, -6.01029, -6.00729, -5.99929, -5.98829, -5.95529, -5.82729, -5.15829, -2.95229, +-3.48529, -3.48529, -3.48529, -3.48529, -3.48429, -3.48329, -3.48129, -3.47829, -3.46929, -3.43629, -3.21229, -1.87229, +-0.93629, -0.93629, -0.93629, -0.93629, -0.93629, -0.93529, -0.93529, -0.93529, -0.93429, -0.93129, -0.89129, -0.29029, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, // GAMMA +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, + }; + + // S35 --> Cl35 + inline AMREX_GPU_DEVICE table_t j_S35_Cl35_meta{.ntemp=12, .nrhoy=11, .nvars=3, .nheader=5}; + inline AMREX_GPU_DEVICE amrex::Array1D j_S35_Cl35_rhoy{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}; + inline AMREX_GPU_DEVICE amrex::Array1D j_S35_Cl35_temp{7.0, 8.0, 8.30103, 8.60206, 8.845098, 9.0, 9.176091, 9.30103, 9.477121, 9.69897, 10.0, 10.477121}; + // Array3D is column-major (Fortran-ordering). T varies fastest, then rho Ye, then the component + inline AMREX_GPU_DEVICE amrex::Array3D + j_S35_Cl35_data{ +-7.052, -7.051, -7.051, -7.051, -7.049893, -7.016915, -6.62981, -6.025371, -5.091731, -3.855486, -1.910462, 1.315499, // RATE +-7.053, -7.052, -7.052, -7.052, -7.051572, -7.018583, -6.631055, -6.026263, -5.091731, -3.855486, -1.910462, 1.315499, +-7.065, -7.057, -7.055, -7.054, -7.052952, -7.031857, -6.639716, -6.028937, -5.092657, -3.855486, -1.910462, 1.315499, +-7.124, -7.103, -7.087, -7.073, -7.063995, -7.055703, -6.721792, -6.056569, -5.097285, -3.856274, -1.91122, 1.315499, +-7.45, -7.424, -7.363, -7.256, -7.169999, -7.127639, -7.000293, -6.301666, -5.145345, -3.862562, -1.91122, 1.315499, +-37.07, -12.306, -10.221, -8.815, -8.05, -7.706932, -7.407476, -6.961711, -5.528774, -3.925524, -1.918264, 1.315499, +-99.69897, -37.352, -22.761, -15.109, -11.668, -10.23695, -8.917894, -7.869213, -6.2774, -4.310131, -1.983877, 1.312534, +-99.69897, -98.311999, -52.855, -29.692, -19.455, -15.199997, -11.656792, -9.600726, -7.175466, -4.892702, -2.386052, 1.281976, +-99.69897, -99.69897, -99.69897, -62.356, -37.273, -27.063, -18.952998, -14.781978, -10.443784, -6.649271, -3.15984, 0.994218, +-99.69897, -99.69897, -99.69897, -99.69897, -78.896, -55.883, -37.822, -28.684998, -19.400981, -11.74081, -5.614479, -0.178208, +-99.69897, -99.69897, -99.69897, -99.69897, -99.69897, -99.69897, -80.819, -60.918998, -40.875984, -24.613839, -12.050434, -2.485834, +-13.77429, -13.77429, -13.77429, -13.77429, -13.76129, -13.47629, -12.43029, -11.64729, -10.61429, -9.26129, -7.07929, -3.38729, // NU +-13.77629, -13.77429, -13.77429, -13.77429, -13.76929, -13.48729, -12.43229, -11.64729, -10.61429, -9.26129, -7.07929, -3.38729, +-13.79329, -13.78129, -13.77829, -13.77629, -13.77429, -13.57529, -12.44629, -11.65029, -10.61429, -9.26129, -7.07929, -3.38729, +-13.87529, -13.84329, -13.82029, -13.79929, -13.78729, -13.74529, -12.57929, -11.68129, -10.61929, -9.26229, -7.07929, -3.38729, +-14.32829, -14.27929, -14.17629, -14.01829, -13.90829, -13.85329, -13.20829, -11.96029, -10.67029, -9.26929, -7.08029, -3.38729, +-45.45529, -19.70429, -17.33829, -15.71229, -14.85029, -14.47229, -13.95429, -12.82929, -11.07429, -9.33729, -7.08729, -3.38729, +-105.79529, -44.75129, -29.88029, -22.01529, -18.48229, -16.98129, -15.17129, -13.78829, -11.92829, -9.77229, -7.16029, -3.39029, +-105.79529, -105.70929, -59.94829, -36.50029, -26.03329, -21.61929, -17.80129, -15.52929, -12.92229, -10.47929, -7.62629, -3.42129, +-105.79529, -105.79529, -105.79529, -69.12129, -43.79429, -33.43529, -25.15329, -20.85829, -16.34329, -12.29129, -8.52129, -3.71329, +-105.79529, -105.79529, -105.79529, -105.79529, -85.43729, -62.27329, -44.04029, -34.78329, -25.33429, -17.47229, -11.09329, -4.90929, +-105.79529, -105.79529, -105.79529, -105.79529, -105.79529, -105.79529, -87.03929, -67.01929, -46.81029, -30.34629, -17.53329, -7.23029, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, // GAMMA +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, + }; + + // Ar37 --> Cl37 + inline AMREX_GPU_DEVICE table_t j_Ar37_Cl37_meta{.ntemp=12, .nrhoy=11, .nvars=3, .nheader=5}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Ar37_Cl37_rhoy{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Ar37_Cl37_temp{7.0, 8.0, 8.30103, 8.60206, 8.845098, 9.0, 9.176091, 9.30103, 9.477121, 9.69897, 10.0, 10.477121}; + // Array3D is column-major (Fortran-ordering). T varies fastest, then rho Ye, then the component + inline AMREX_GPU_DEVICE amrex::Array3D + j_Ar37_Cl37_data{ +-9.07, -9.552, -9.678, -9.779, -9.184998, -7.869916, -6.660781, -5.937344, -5.007299, -3.782963, -1.778074, 1.309272, // RATE +-8.091, -8.552, -8.679, -8.779, -8.771999, -7.84892, -6.659783, -5.936353, -5.007299, -3.782963, -1.778074, 1.309272, +-7.22, -7.558, -7.68, -7.779, -7.824, -7.64295, -6.644825, -5.933378, -5.007299, -3.782963, -1.778074, 1.309272, +-6.506, -6.608, -6.697, -6.784, -6.826, -6.823992, -6.50415, -5.902626, -5.00142, -3.782963, -1.778074, 1.309272, +-5.77, -5.774, -5.787, -5.815, -5.834, -5.828999, -5.784838, -5.621234, -4.95058, -3.775988, -1.777272, 1.309272, +-4.866, -4.866, -4.864, -4.858, -4.843, -4.822, -4.775984, -4.718779, -4.530411, -3.704263, -1.770647, 1.310248, +-3.686, -3.685, -3.685, -3.681, -3.673, -3.661, -3.631999, -3.594983, -3.495668, -3.166916, -1.700155, 1.313179, +-2.252, -2.252, -2.252, -2.251, -2.249, -2.245, -2.236, -2.222999, -2.179984, -1.99606, -1.156686, 1.342594, +-0.674, -0.674, -0.674, -0.673, -0.673, -0.672, -0.669, -0.665, -0.646, -0.529968, 0.064328, 1.619396, +1.524, 1.524, 1.524, 1.524, 1.524, 1.525, 1.526, 1.529, 1.537, 1.576, 1.798024, 2.654533, +3.654, 3.654, 3.654, 3.654, 3.654, 3.654, 3.654, 3.654, 3.655, 3.66, 3.71, 4.07502, +-14.95429, -15.43129, -15.55229, -15.63929, -15.02129, -13.67729, -12.41529, -11.63629, -10.59629, -9.17529, -6.84229, -3.31129, // NU +-13.97429, -14.43229, -14.55229, -14.63929, -14.60729, -13.65629, -12.41429, -11.63629, -10.59529, -9.17529, -6.84229, -3.31129, +-13.10429, -13.43829, -13.55429, -13.63929, -13.66029, -13.45029, -12.39929, -11.63329, -10.59529, -9.17529, -6.84229, -3.31129, +-12.38729, -12.48629, -12.57029, -12.64329, -12.66129, -12.63129, -12.25829, -11.60129, -10.59029, -9.17429, -6.84229, -3.31129, +-11.63929, -11.64229, -11.65229, -11.66929, -11.66529, -11.63329, -11.53729, -11.31829, -10.53829, -9.16729, -6.84129, -3.31129, +-10.68529, -10.68429, -10.68129, -10.66829, -10.63829, -10.59629, -10.50829, -10.40229, -10.11129, -9.09329, -6.83329, -3.31129, +-9.35929, -9.35829, -9.35729, -9.35229, -9.33729, -9.31529, -9.26529, -9.19929, -9.03029, -8.53729, -6.75529, -3.30829, +-7.68129, -7.68129, -7.68129, -7.67929, -7.67529, -7.66829, -7.65229, -7.63029, -7.55929, -7.28929, -6.17329, -3.27729, +-5.81529, -5.81529, -5.81529, -5.81529, -5.81429, -5.81229, -5.80829, -5.80129, -5.77529, -5.63629, -4.89629, -2.99329, +-3.53629, -3.53629, -3.53629, -3.53629, -3.53529, -3.53429, -3.53229, -3.52829, -3.51529, -3.44929, -3.09529, -1.91629, +-0.97229, -0.97229, -0.97229, -0.97229, -0.97229, -0.97229, -0.97229, -0.97129, -0.97029, -0.96029, -0.87829, -0.35329, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, // GAMMA +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, + }; + + // Ar37 --> K37 + inline AMREX_GPU_DEVICE table_t j_Ar37_K37_meta{.ntemp=12, .nrhoy=11, .nvars=3, .nheader=5}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Ar37_K37_rhoy{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Ar37_K37_temp{7.0, 8.0, 8.30103, 8.60206, 8.845098, 9.0, 9.176091, 9.30103, 9.477121, 9.69897, 10.0, 10.477121}; + // Array3D is column-major (Fortran-ordering). T varies fastest, then rho Ye, then the component + inline AMREX_GPU_DEVICE amrex::Array3D + j_Ar37_K37_data{ +-99.69897, -99.69897, -99.69897, -78.634, -44.928, -32.219, -22.194999, -17.062995, -11.753954, -7.209689, -3.247385, 0.772645, // RATE +-99.69897, -99.69897, -99.69897, -79.634, -45.341, -32.241, -22.196999, -17.062995, -11.753954, -7.209689, -3.247385, 0.772645, +-99.69897, -99.69897, -99.69897, -80.636, -46.289, -32.447, -22.210999, -17.065995, -11.754954, -7.209689, -3.247385, 0.772645, +-99.69897, -99.69897, -99.69897, -81.653, -47.296, -33.269, -22.352999, -17.097994, -11.759953, -7.210688, -3.247385, 0.772645, +-99.69897, -99.69897, -99.69897, -82.824, -48.362, -34.299998, -23.086994, -17.385989, -11.813947, -7.218683, -3.248379, 0.772645, +-99.69897, -99.69897, -99.69897, -85.098, -49.911991, -35.603967, -24.223935, -18.352912, -12.255862, -7.30162, -3.25733, 0.772643, +-99.69897, -99.69897, -99.69897, -91.41404, -53.595173, -38.266265, -26.134158, -19.917877, -13.468666, -7.911681, -3.345785, 0.769648, +-99.69897, -99.69897, -99.69897, -99.69897, -62.428836, -44.476103, -30.322573, -23.111418, -15.699127, -9.404916, -3.990877, 0.737685, +-99.69897, -99.69897, -99.69897, -99.69897, -81.865711, -58.010831, -39.273855, -29.785597, -20.130655, -12.123915, -5.55315, 0.445092, +-99.69897, -99.69897, -99.69897, -99.69897, -99.69897, -87.747109, -59.070785, -44.6215, -30.016526, -18.07326, -8.620733, -0.758901, +-99.69897, -99.69897, -99.69897, -99.69897, -99.69897, -99.69897, -99.69897, -76.912797, -51.549912, -31.008965, -15.132254, -3.08503, +-105.79529, -105.79529, -105.79529, -85.40829, -51.45529, -38.58729, -28.38029, -23.11629, -17.61829, -12.82929, -8.52629, -3.96129, // NU +-105.79529, -105.79529, -105.79529, -86.40829, -51.86829, -38.60829, -28.38129, -23.11629, -17.61829, -12.82929, -8.52629, -3.96129, +-105.79529, -105.79529, -105.79529, -87.41029, -52.81629, -38.81529, -28.39629, -23.11929, -17.61929, -12.82929, -8.52629, -3.96129, +-105.79529, -105.79529, -105.79529, -88.42829, -53.82229, -39.63629, -28.53829, -23.15129, -17.62429, -12.83029, -8.52629, -3.96129, +-105.79529, -105.79529, -105.79529, -89.59929, -54.88929, -40.66829, -29.27129, -23.43929, -17.67829, -12.83829, -8.52729, -3.96129, +-105.79529, -105.79529, -105.79529, -91.87229, -56.43929, -41.97129, -30.40829, -24.40629, -18.12029, -12.92129, -8.53529, -3.96129, +-105.79529, -105.79529, -105.79529, -98.18829, -60.12229, -44.63329, -32.31829, -25.97029, -19.33329, -13.53129, -8.62429, -3.96429, +-105.79529, -105.79529, -105.79529, -105.79529, -68.95829, -50.84629, -36.51029, -29.16729, -21.56429, -15.02429, -9.27229, -3.99629, +-105.79529, -105.79529, -105.79529, -105.79529, -88.39029, -64.37529, -45.46029, -35.84829, -26.01629, -17.77929, -10.85829, -4.29129, +-105.79529, -105.79529, -105.79529, -105.79529, -105.79529, -94.13429, -65.28329, -50.71029, -35.92829, -23.75629, -13.95029, -5.49629, +-105.79529, -105.79529, -105.79529, -105.79529, -105.79529, -105.79529, -105.79529, -83.00129, -57.46229, -36.69329, -20.46429, -7.82329, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, // GAMMA +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, + }; + + // Cl37 --> Ar37 + inline AMREX_GPU_DEVICE table_t j_Cl37_Ar37_meta{.ntemp=12, .nrhoy=11, .nvars=3, .nheader=5}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Cl37_Ar37_rhoy{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Cl37_Ar37_temp{7.0, 8.0, 8.30103, 8.60206, 8.845098, 9.0, 9.176091, 9.30103, 9.477121, 9.69897, 10.0, 10.477121}; + // Array3D is column-major (Fortran-ordering). T varies fastest, then rho Ye, then the component + inline AMREX_GPU_DEVICE amrex::Array3D + j_Cl37_Ar37_data{ +-99.69897, -58.048, -31.022, -16.871, -10.911, -9.283, -7.841995, -6.965958, -5.848198, -4.462011, -2.174079, 1.282836, // RATE +-99.69897, -59.05, -32.023, -17.872, -11.324, -9.304, -7.842995, -6.965958, -5.848198, -4.462011, -2.174079, 1.282836, +-99.69897, -60.066, -33.028, -18.873, -12.272, -9.511, -7.856995, -6.969958, -5.848198, -4.462011, -2.174079, 1.282836, +-99.69897, -61.227, -34.083, -19.891, -13.278, -10.331998, -7.998993, -7.000955, -5.854186, -4.462984, -2.174079, 1.282836, +-99.69897, -63.575, -35.586, -21.062, -14.344997, -11.363982, -8.731963, -7.288913, -5.907083, -4.470764, -2.174905, 1.282836, +-99.69897, -71.769, -39.768, -23.335999, -15.893915, -12.66672, -9.868576, -8.25326, -6.345542, -4.55033, -2.182324, 1.282836, +-99.69897, -95.48714, -51.813623, -29.532669, -19.544951, -15.315396, -11.77169, -9.804994, -7.530557, -5.118915, -2.254624, 1.279854, +-99.69897, -99.69897, -80.131606, -43.925961, -27.288748, -20.528596, -15.158669, -12.375395, -9.383869, -6.133603, -2.708941, 1.249071, +-99.69897, -99.69897, -99.69897, -76.400695, -46.02065, -33.284378, -22.710622, -17.324018, -11.86294, -7.348385, -3.615208, 0.958554, +-99.69897, -99.69897, -99.69897, -99.69897, -86.182992, -61.055975, -41.352935, -31.396881, -21.299719, -13.006938, -6.421809, -0.233192, +-99.69897, -99.69897, -99.69897, -99.69897, -99.69897, -99.69897, -84.408937, -63.690884, -42.834727, -25.939971, -12.919787, -2.555293, +-105.79529, -64.47829, -37.41329, -23.18829, -17.12029, -15.39729, -13.82029, -12.83529, -11.54929, -9.94529, -7.39029, -3.42529, // NU +-105.79529, -65.47929, -38.41429, -24.18829, -17.53429, -15.41929, -13.82229, -12.83529, -11.54929, -9.94529, -7.39029, -3.42529, +-105.79529, -66.49629, -39.41929, -25.19029, -18.48229, -15.62529, -13.83629, -12.83829, -11.55029, -9.94529, -7.39029, -3.42529, +-105.79529, -67.65629, -40.47429, -26.20829, -19.48829, -16.44629, -13.97829, -12.87029, -11.55529, -9.94629, -7.39029, -3.42529, +-105.79529, -70.00529, -41.97729, -27.37929, -20.55529, -17.47829, -14.71129, -13.15729, -11.60829, -9.95429, -7.39129, -3.42529, +-105.79529, -78.19929, -46.15929, -29.65229, -22.10429, -18.78129, -15.84829, -14.12329, -12.04829, -10.03329, -7.39929, -3.42529, +-105.79529, -102.09229, -58.33429, -35.89229, -25.76829, -21.43529, -17.75129, -15.67129, -13.23529, -10.59729, -7.47529, -3.42829, +-105.79529, -105.79529, -87.22129, -50.34429, -33.58529, -26.75029, -21.26529, -18.37929, -15.17329, -11.57529, -7.97929, -3.45929, +-105.79529, -105.79529, -105.79529, -83.18229, -52.49129, -39.34129, -28.63129, -23.19529, -17.65129, -13.00329, -9.05229, -3.75329, +-105.79529, -105.79529, -105.79529, -105.79529, -92.72829, -67.45029, -47.57729, -37.50329, -27.24329, -18.75729, -11.93029, -4.95529, +-105.79529, -105.79529, -105.79529, -105.79529, -105.79529, -105.79529, -90.63329, -69.79629, -48.77829, -31.69029, -18.42929, -7.28129, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, // GAMMA +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, + }; + + // K37 --> Ar37 + inline AMREX_GPU_DEVICE table_t j_K37_Ar37_meta{.ntemp=12, .nrhoy=11, .nvars=3, .nheader=5}; + inline AMREX_GPU_DEVICE amrex::Array1D j_K37_Ar37_rhoy{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}; + inline AMREX_GPU_DEVICE amrex::Array1D j_K37_Ar37_temp{7.0, 8.0, 8.30103, 8.60206, 8.845098, 9.0, 9.176091, 9.30103, 9.477121, 9.69897, 10.0, 10.477121}; + // Array3D is column-major (Fortran-ordering). T varies fastest, then rho Ye, then the component + inline AMREX_GPU_DEVICE amrex::Array3D + j_K37_Ar37_data{ +-0.263999, -0.264, -0.264, -0.264, -0.263999, -0.263983, -0.263773, -0.262985, -0.257936, -0.215781, 0.167255, 2.050265, // RATE +-0.263987, -0.263996, -0.263997, -0.263998, -0.263998, -0.263983, -0.263772, -0.262985, -0.257936, -0.215781, 0.167255, 2.050265, +-0.263903, -0.263956, -0.263968, -0.263976, -0.26398, -0.263972, -0.263764, -0.262976, -0.257936, -0.215781, 0.167255, 2.050265, +-0.263503, -0.263612, -0.263692, -0.26376, -0.2638, -0.263817, -0.263674, -0.2629, -0.257866, -0.215689, 0.167255, 2.050265, +-0.261438, -0.261479, -0.261587, -0.261829, -0.262078, -0.262214, -0.262306, -0.261902, -0.256108, -0.21494, 0.167255, 2.050265, +-0.247462, -0.247462, -0.247462, -0.247536, -0.247721, -0.247941, -0.248228, -0.2483, -0.245263, -0.206059, 0.172677, 2.051224, +-0.132904, -0.132904, -0.132904, -0.132643, -0.132382, -0.131858, -0.130541, -0.128946, -0.123611, -0.09669, 0.222286, 2.054101, +0.46721, 0.46721, 0.46721, 0.468025, 0.468025, 0.46884, 0.471286, 0.474553, 0.483745, 0.513541, 0.654146, 2.083031, +1.620701, 1.620701, 1.620701, 1.620701, 1.621688, 1.621688, 1.622675, 1.624649, 1.629597, 1.645521, 1.719819, 2.354572, +3.021225, 3.021225, 3.021225, 3.021225, 3.021225, 3.021225, 3.022225, 3.022225, 3.024224, 3.031226, 3.06626, 3.362991, +4.565006, 4.565006, 4.565006, 4.565006, 4.565006, 4.565006, 4.565006, 4.565006, 4.566006, 4.568007, 4.583008, 4.720044, +-5.62429, -5.62429, -5.62429, -5.62429, -5.62429, -5.62429, -5.62329, -5.62129, -5.61029, -5.52229, -4.85629, -2.54529, // NU +-5.62429, -5.62429, -5.62429, -5.62429, -5.62429, -5.62429, -5.62329, -5.62129, -5.61029, -5.52229, -4.85629, -2.54529, +-5.62329, -5.62429, -5.62429, -5.62429, -5.62429, -5.62429, -5.62329, -5.62129, -5.61029, -5.52129, -4.85629, -2.54529, +-5.62229, -5.62329, -5.62329, -5.62329, -5.62329, -5.62329, -5.62329, -5.62129, -5.61029, -5.52129, -4.85629, -2.54529, +-5.61829, -5.61829, -5.61829, -5.61929, -5.61929, -5.62029, -5.62029, -5.61929, -5.60829, -5.52029, -4.85629, -2.54529, +-5.58929, -5.58929, -5.58929, -5.58929, -5.59029, -5.59029, -5.59029, -5.59029, -5.58429, -5.50229, -4.84929, -2.54429, +-5.37329, -5.37329, -5.37329, -5.37229, -5.37129, -5.37029, -5.36729, -5.36229, -5.34929, -5.29529, -4.78129, -2.54129, +-4.54529, -4.54529, -4.54529, -4.54429, -4.54329, -4.54229, -4.53829, -4.53329, -4.51829, -4.46929, -4.25429, -2.51129, +-3.23929, -3.23929, -3.23929, -3.23929, -3.23829, -3.23829, -3.23629, -3.23429, -3.22629, -3.20129, -3.08829, -2.23029, +-1.67229, -1.67229, -1.67229, -1.67229, -1.67229, -1.67229, -1.67129, -1.67029, -1.66829, -1.65729, -1.60629, -1.17129, +0.10771, 0.10771, 0.10771, 0.10771, 0.10771, 0.10771, 0.10771, 0.10771, 0.10871, 0.11271, 0.13371, 0.33271, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, // GAMMA +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, + }; + + // Co56 --> Fe56 + inline AMREX_GPU_DEVICE table_t j_Co56_Fe56_meta{.ntemp=13, .nrhoy=11, .nvars=3, .nheader=5}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Co56_Fe56_rhoy{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Co56_Fe56_temp{7.0, 8.0, 8.30103, 8.60206, 8.845098, 9.0, 9.176091, 9.30103, 9.477121, 9.69897, 10.0, 10.477121, 11.0}; + // Array3D is column-major (Fortran-ordering). T varies fastest, then rho Ye, then the component + inline AMREX_GPU_DEVICE amrex::Array3D + j_Co56_Fe56_data{ +-7.705836, -7.707962, -7.692263, -7.032866, -6.284874, -5.970341, -5.642062, -5.178082, -4.093715, -2.791284, -1.100233, 1.756545, 4.567038, // RATE +-7.679753, -7.698752, -7.685687, -7.03166, -6.284674, -5.970255, -5.642021, -5.178082, -4.093715, -2.791284, -1.100233, 1.756545, 4.567038, +-7.527841, -7.617156, -7.625169, -7.019812, -6.282127, -5.969199, -5.641444, -5.177793, -4.093715, -2.791284, -1.100233, 1.756545, 4.567038, +-7.143978, -7.218464, -7.274399, -6.91746, -6.257215, -5.953899, -5.634532, -5.174694, -4.09303, -2.791062, -1.100233, 1.756545, 4.567038, +-6.531161, -6.535828, -6.547748, -6.451858, -6.068661, -5.819785, -5.540428, -5.135174, -4.086733, -2.789275, -1.099233, 1.756545, 4.567038, +-5.665057, -5.665057, -5.661938, -5.615084, -5.425421, -5.254582, -5.034578, -4.780142, -4.003284, -2.769201, -1.092706, 1.756545, 4.567038, +-4.358806, -4.357806, -4.3558, -4.333132, -4.232138, -4.12281, -3.965142, -3.811776, -3.421915, -2.535933, -1.027814, 1.759514, 4.567038, +-2.446998, -2.445998, -2.444998, -2.437989, -2.402943, -2.360894, -2.288815, -2.213574, -2.025688, -1.520319, -0.491245, 1.790233, 4.568038, +0.248, 0.248, 0.249, 0.25, 0.252, 0.256, 0.266001, 0.281001, 0.324015, 0.456193, 0.881313, 2.077294, 4.576037, +2.669, 2.669, 2.669, 2.669, 2.669, 2.668, 2.668, 2.669, 2.673, 2.688001, 2.759017, 3.178192, 4.659032, +4.604, 4.604, 4.604, 4.604, 4.603, 4.603, 4.603, 4.603, 4.603, 4.605, 4.619, 4.727005, 5.26501, +-13.59829, -13.60129, -13.57029, -12.69229, -11.90729, -11.58929, -11.24329, -10.68229, -9.47729, -8.07929, -6.19029, -2.94129, 0.3947104, // NU +-13.57129, -13.59129, -13.56429, -12.69129, -11.90729, -11.58929, -11.24329, -10.68229, -9.47729, -8.07929, -6.19029, -2.94129, 0.3947104, +-13.41529, -13.50629, -13.50229, -12.68329, -11.90529, -11.58829, -11.24229, -10.68229, -9.47729, -8.07929, -6.19029, -2.94129, 0.3947104, +-13.02429, -13.09829, -13.14829, -12.61229, -11.88529, -11.57529, -11.23529, -10.67929, -9.47629, -8.07929, -6.19029, -2.94129, 0.3947104, +-12.40329, -12.40729, -12.41729, -12.23429, -11.73129, -11.45429, -11.14429, -10.64329, -9.46929, -8.07729, -6.19029, -2.94129, 0.3947104, +-11.51229, -11.51029, -11.50729, -11.42629, -11.13829, -10.91629, -10.64429, -10.31029, -9.38529, -8.05029, -6.18329, -2.94029, 0.3947104, +-10.14129, -10.14029, -10.13829, -10.10029, -9.94129, -9.78429, -9.57229, -9.35929, -8.81329, -7.77029, -6.11129, -2.93729, 0.3947104, +-8.08729, -8.08629, -8.08529, -8.07329, -8.01829, -7.95229, -7.84929, -7.74329, -7.46929, -6.76429, -5.55229, -2.90629, 0.3957104, +-5.23029, -5.23029, -5.22929, -5.22829, -5.22229, -5.21329, -5.19529, -5.17029, -5.09929, -4.87429, -4.20629, -2.61629, 0.4037104, +-2.34029, -2.34029, -2.34029, -2.34029, -2.34029, -2.34029, -2.33929, -2.33729, -2.33029, -2.30229, -2.16929, -1.48329, 0.4867104, +0.02371039, 0.02371039, 0.02371039, 0.02371039, 0.02371039, 0.02271039, 0.02271039, 0.02271039, 0.02371039, 0.02771039, 0.05271039, 0.2397104, 1.10771, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, // GAMMA +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, + }; + + // Co56 --> Ni56 + inline AMREX_GPU_DEVICE table_t j_Co56_Ni56_meta{.ntemp=13, .nrhoy=11, .nvars=3, .nheader=5}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Co56_Ni56_rhoy{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Co56_Ni56_temp{7.0, 8.0, 8.30103, 8.60206, 8.845098, 9.0, 9.176091, 9.30103, 9.477121, 9.69897, 10.0, 10.477121, 11.0}; + // Array3D is column-major (Fortran-ordering). T varies fastest, then rho Ye, then the component + inline AMREX_GPU_DEVICE amrex::Array3D + j_Co56_Ni56_data{ +-99.69797, -99.69797, -69.758981, -37.768387, -23.052703, -17.76895, -13.4835, -11.090722, -8.426201, -6.028675, -3.404715, 0.008204, 2.897241, // RATE +-99.69797, -99.69797, -69.758998, -37.91085, -23.428328, -17.788058, -13.48505, -11.090722, -8.426201, -6.028675, -3.404715, 0.008204, 2.897241, +-99.69797, -99.69797, -69.76, -37.929051, -24.062933, -17.970447, -13.496085, -11.092307, -8.426201, -6.028675, -3.404715, 0.008204, 2.897241, +-99.69797, -99.69797, -69.773, -37.938809, -24.275558, -18.541193, -13.600964, -11.108896, -8.428553, -6.028675, -3.404715, 0.008204, 2.897241, +-99.69797, -99.69797, -69.87, -38.016985, -24.35695, -18.824908, -13.980828, -11.234267, -8.446387, -6.033804, -3.405601, 0.008204, 2.897241, +-99.69797, -99.69797, -70.529, -38.608, -24.815753, -19.175805, -14.229062, -11.447153, -8.563413, -6.077307, -3.4128, 0.008204, 2.897241, +-99.69797, -99.69797, -80.67, -43.872, -27.608968, -20.520799, -14.782228, -11.862087, -8.885633, -6.35384, -3.49073, 0.005223, 2.897241, +-99.69797, -99.69797, -99.69797, -57.166, -34.496, -25.279993, -17.977924, -14.248711, -10.427337, -7.230557, -4.034886, -0.025538, 2.896241, +-99.69797, -99.69797, -99.69797, -91.26, -53.829, -38.713997, -26.825968, -20.800883, -14.679373, -9.649275, -5.349182, -0.314835, 2.888245, +-99.69797, -99.69797, -99.69797, -99.69797, -96.456875, -68.515998, -46.652977, -35.641916, -24.534564, -15.515939, -8.277386, -1.500293, 2.805283, +-99.69797, -99.69797, -99.69797, -99.69797, -99.69797, -99.69797, -89.673979, -67.899925, -46.030612, -28.401609, -14.685801, -3.782003, 2.173693, +-105.7943, -105.7943, -76.12229, -43.95729, -28.97729, -23.66129, -19.31729, -16.89029, -14.16229, -11.51229, -8.55129, -4.67829, -1.27329, // NU +-105.7943, -105.7943, -76.12329, -44.24529, -29.37629, -23.68129, -19.31829, -16.89129, -14.16229, -11.51229, -8.55129, -4.67829, -1.27329, +-105.7943, -105.7943, -76.12429, -44.28929, -30.17529, -23.87829, -19.33129, -16.89329, -14.16329, -11.51229, -8.55129, -4.67829, -1.27329, +-105.7943, -105.7943, -76.14229, -44.30529, -30.58529, -24.58029, -19.44629, -16.91229, -14.16629, -11.51329, -8.55129, -4.67829, -1.27329, +-105.7943, -105.7943, -76.27929, -44.41029, -30.72629, -25.06929, -19.90129, -17.06829, -14.19329, -11.51929, -8.55229, -4.67829, -1.27329, +-105.7943, -105.7943, -77.17829, -45.18429, -31.29129, -25.48729, -20.20929, -17.35229, -14.37729, -11.58329, -8.56029, -4.67929, -1.27329, +-105.7943, -105.7943, -87.74329, -50.66029, -33.96729, -26.67329, -20.84629, -17.87129, -14.80829, -12.00229, -8.64429, -4.68229, -1.27329, +-105.7943, -105.7943, -105.7943, -63.96229, -41.05829, -31.69429, -24.23329, -20.39929, -16.43629, -13.01329, -9.24929, -4.71329, -1.27429, +-105.7943, -105.7943, -105.7943, -98.05129, -60.38529, -45.12229, -33.06929, -26.93229, -20.66129, -15.43829, -10.70929, -5.00529, -1.28329, +-105.7943, -105.7943, -105.7943, -105.7943, -103.0123, -74.92229, -52.89529, -41.77129, -30.51129, -21.29929, -13.69229, -6.20429, -1.36629, +-105.7943, -105.7943, -105.7943, -105.7943, -105.7943, -105.7943, -95.91429, -74.02629, -52.00129, -34.17629, -20.10129, -8.50729, -2.00029, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, // GAMMA +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, + }; + + // Fe56 --> Co56 + inline AMREX_GPU_DEVICE table_t j_Fe56_Co56_meta{.ntemp=13, .nrhoy=11, .nvars=3, .nheader=5}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Fe56_Co56_rhoy{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Fe56_Co56_temp{7.0, 8.0, 8.30103, 8.60206, 8.845098, 9.0, 9.176091, 9.30103, 9.477121, 9.69897, 10.0, 10.477121, 11.0}; + // Array3D is column-major (Fortran-ordering). T varies fastest, then rho Ye, then the component + inline AMREX_GPU_DEVICE amrex::Array3D + j_Fe56_Co56_data{ +-99.69797, -99.69797, -99.69797, -62.854802, -37.268611, -27.644755, -19.855923, -15.693996, -11.062186, -6.68628, -2.996418, 0.330264, 3.050101, // RATE +-99.69797, -99.69797, -99.69797, -63.853019, -37.680995, -27.666587, -19.856877, -15.693996, -11.062186, -6.68628, -2.996418, 0.330264, 3.050101, +-99.69797, -99.69797, -99.69797, -64.836633, -38.621182, -27.870529, -19.871187, -15.697494, -11.062186, -6.68628, -2.996418, 0.330264, 3.050101, +-99.69797, -99.69797, -99.69797, -65.7102, -39.55548, -28.663301, -20.004525, -15.724463, -11.06592, -6.686696, -2.997055, 0.330264, 3.050101, +-99.69797, -99.69797, -99.69797, -66.280944, -40.233201, -29.472432, -20.635643, -15.962004, -11.09846, -6.690003, -2.997418, 0.330264, 3.050101, +-99.69797, -99.69797, -99.69797, -67.639813, -41.062948, -30.122111, -21.260917, -16.518405, -11.315505, -6.724397, -3.003133, 0.330264, 3.050101, +-99.69797, -99.69797, -99.69797, -73.044885, -43.824626, -31.873401, -22.193492, -17.093479, -11.651187, -6.909866, -3.060643, 0.327313, 3.050101, +-99.69797, -99.69797, -99.69797, -87.073958, -51.036924, -36.357882, -24.714784, -18.729642, -12.542089, -7.403073, -3.424626, 0.296708, 3.049101, +-99.69797, -99.69797, -99.69797, -99.69797, -69.154998, -48.719996, -32.644989, -24.496976, -16.231906, -9.513029, -4.483336, 0.010989, 3.041103, +-99.69797, -99.69797, -99.69797, -99.69797, -99.69797, -78.494997, -52.453992, -39.326983, -26.089934, -15.400331, -7.403972, -1.170819, 2.959117, +-99.69797, -99.69797, -99.69797, -99.69797, -99.69797, -99.69797, -95.484987, -71.596985, -47.59994, -28.306391, -13.865952, -3.478059, 2.328257, +-105.7943, -105.7943, -105.7943, -69.58329, -43.73429, -33.92829, -25.92829, -21.62029, -16.78829, -12.21529, -8.20029, -4.32829, -1.10729, // NU +-105.7943, -105.7943, -105.7943, -70.58129, -44.14629, -33.94929, -25.92929, -21.62029, -16.78829, -12.21529, -8.20029, -4.32829, -1.10729, +-105.7943, -105.7943, -105.7943, -71.56029, -45.08829, -34.15429, -25.94329, -21.62329, -16.78929, -12.21629, -8.20029, -4.32829, -1.10729, +-105.7943, -105.7943, -105.7943, -72.39829, -46.03329, -34.95229, -26.07829, -21.65129, -16.79229, -12.21629, -8.20029, -4.32829, -1.10729, +-105.7943, -105.7943, -105.7943, -72.93929, -46.75229, -35.79129, -26.72229, -21.89129, -16.82529, -12.22029, -8.20129, -4.32829, -1.10729, +-105.7943, -105.7943, -105.7943, -74.45329, -47.60029, -36.46829, -27.38129, -22.45629, -17.04429, -12.26129, -8.20829, -4.32829, -1.10729, +-105.7943, -105.7943, -105.7943, -79.85329, -50.39029, -38.21729, -28.28029, -23.02529, -17.39629, -12.48929, -8.28029, -4.33129, -1.10729, +-105.7943, -105.7943, -105.7943, -93.83229, -57.48829, -42.65529, -30.83529, -24.72029, -18.37029, -13.06929, -8.76429, -4.36229, -1.10829, +-105.7943, -105.7943, -105.7943, -105.7943, -75.70329, -55.11629, -38.87129, -30.60529, -22.18229, -15.28229, -9.98429, -4.65329, -1.11629, +-105.7943, -105.7943, -105.7943, -105.7943, -105.7943, -84.89429, -58.68529, -45.44229, -32.04829, -21.17629, -12.92829, -5.85229, -1.19929, +-105.7943, -105.7943, -105.7943, -105.7943, -105.7943, -105.7943, -101.7163, -77.71229, -53.55729, -34.07929, -19.38129, -8.17129, -1.83329, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, // GAMMA +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, + }; + + // Ni56 --> Co56 + inline AMREX_GPU_DEVICE table_t j_Ni56_Co56_meta{.ntemp=13, .nrhoy=11, .nvars=3, .nheader=5}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Ni56_Co56_rhoy{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}; + inline AMREX_GPU_DEVICE amrex::Array1D j_Ni56_Co56_temp{7.0, 8.0, 8.30103, 8.60206, 8.845098, 9.0, 9.176091, 9.30103, 9.477121, 9.69897, 10.0, 10.477121, 11.0}; + // Array3D is column-major (Fortran-ordering). T varies fastest, then rho Ye, then the component + inline AMREX_GPU_DEVICE amrex::Array3D + j_Ni56_Co56_data{ +-8.684, -9.164, -9.291, -9.387, -8.777, -7.439, -6.183988, -5.405627, -4.316341, -2.714602, -0.608944, 2.014581, 4.728024, // RATE +-7.705, -8.165, -8.291, -8.387, -8.364, -7.418, -6.181989, -5.405627, -4.316341, -2.714602, -0.608944, 2.014581, 4.728024, +-6.834, -7.171, -7.293, -7.388, -7.417, -7.212, -6.167989, -5.40263, -4.315361, -2.714602, -0.608944, 2.014581, 4.728024, +-6.118, -6.22, -6.31, -6.392, -6.418, -6.393, -6.026992, -5.371655, -4.310459, -2.713745, -0.608944, 2.014581, 4.728024, +-5.384, -5.388, -5.399, -5.421, -5.423, -5.395, -5.304998, -5.086821, -4.258432, -2.706884, -0.608116, 2.014581, 4.728024, +-4.448, -4.447, -4.444, -4.432, -4.403, -4.363, -4.278, -4.169978, -3.831179, -2.635446, -0.60148, 2.015573, 4.728024, +-3.134, -3.134, -3.132, -3.127, -3.113, -3.091, -3.039, -2.963999, -2.726778, -2.078197, -0.527602, 2.018548, 4.728024, +-1.311, -1.311, -1.31, -1.305, -1.293, -1.275, -1.232, -1.177, -1.038995, -0.718361, 0.045499, 2.049328, 4.729024, +1.069, 1.069, 1.069, 1.07, 1.071, 1.073, 1.078, 1.085, 1.104, 1.159008, 1.38679, 2.334798, 4.737024, +3.035, 3.034, 3.034, 3.034, 3.035, 3.035, 3.036, 3.037, 3.04, 3.048, 3.084016, 3.420155, 4.819021, +4.825, 4.825, 4.825, 4.825, 4.825, 4.825, 4.826, 4.826, 4.826, 4.827, 4.831, 4.926005, 5.424006, +-14.86129, -15.33229, -15.44729, -15.51729, -14.85829, -13.46429, -12.11329, -11.24729, -10.01729, -8.18129, -5.72329, -2.67829, 0.5607104, // NU +-13.88129, -14.33229, -14.44829, -14.51729, -14.44529, -13.44329, -12.11229, -11.24729, -10.01729, -8.18129, -5.72329, -2.67829, 0.5607104, +-13.00929, -13.33829, -13.44929, -13.51729, -13.49729, -13.23729, -12.09729, -11.24429, -10.01729, -8.18129, -5.72329, -2.67829, 0.5607104, +-12.28929, -12.38529, -12.46529, -12.52029, -12.49829, -12.41829, -11.95629, -11.21229, -10.01129, -8.18029, -5.72329, -2.67829, 0.5607104, +-11.53229, -11.53329, -11.53829, -11.53729, -11.49429, -11.41429, -11.23129, -10.92729, -9.96029, -8.17429, -5.72229, -2.67829, 0.5607104, +-10.50329, -10.50129, -10.49429, -10.47129, -10.41229, -10.33429, -10.17529, -9.99429, -9.53129, -8.10529, -5.71429, -2.67729, 0.5607104, +-8.96329, -8.96229, -8.96029, -8.95129, -8.92729, -8.89229, -8.80929, -8.70029, -8.39729, -7.56129, -5.63729, -2.67429, 0.5607104, +-6.96629, -6.96629, -6.96529, -6.96029, -6.94829, -6.92929, -6.88329, -6.81929, -6.64629, -6.19129, -5.04929, -2.64329, 0.5607104, +-4.27729, -4.27729, -4.27729, -4.27629, -4.27429, -4.27029, -4.26229, -4.25029, -4.21729, -4.11729, -3.68129, -2.35329, 0.5697104, +-1.88929, -1.88929, -1.88929, -1.88929, -1.88829, -1.88829, -1.88729, -1.88529, -1.87929, -1.86429, -1.78229, -1.22629, 0.6527104, +0.2827104, 0.2827104, 0.2827104, 0.2827104, 0.2827104, 0.2827104, 0.2827104, 0.2837104, 0.2847104, 0.2867104, 0.2977104, 0.4587104, 1.27271, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, // GAMMA +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, + }; + + // n --> p + inline AMREX_GPU_DEVICE table_t j_n_p_meta{.ntemp=13, .nrhoy=11, .nvars=3, .nheader=5}; + inline AMREX_GPU_DEVICE amrex::Array1D j_n_p_rhoy{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}; + inline AMREX_GPU_DEVICE amrex::Array1D j_n_p_temp{7.0, 8.0, 8.30103, 8.60206, 8.845098, 9.0, 9.176091, 9.30103, 9.477121, 9.69897, 10.0, 10.477121, 11.0}; + // Array3D is column-major (Fortran-ordering). T varies fastest, then rho Ye, then the component + inline AMREX_GPU_DEVICE amrex::Array3D + j_n_p_data{ +-2.959, -2.959, -2.959, -2.959, -2.958959, -2.957841, -2.941107, -2.874417, -2.540055, -1.720786, -0.41411, 1.802004, 4.347, // RATE +-2.959, -2.959, -2.959, -2.959, -2.958984, -2.957898, -2.941192, -2.874417, -2.540055, -1.720786, -0.41411, 1.802004, 4.347, +-2.959, -2.959, -2.959, -2.959, -2.958998, -2.958314, -2.941776, -2.874975, -2.540055, -1.721736, -0.41411, 1.802004, 4.347, +-2.961, -2.961, -2.961, -2.961, -2.96, -2.959896, -2.947722, -2.881381, -2.544233, -1.721736, -0.41411, 1.802004, 4.347, +-2.98, -2.979, -2.979, -2.978, -2.975, -2.97299, -2.967462, -2.925218, -2.577269, -1.729383, -0.415108, 1.802004, 4.347, +-3.14, -3.14, -3.138, -3.131, -3.116, -3.097999, -3.069766, -3.041782, -2.813017, -1.806664, -0.423096, 1.801004, 4.347, +-5.499, -5.442, -5.306, -4.989, -4.592, -4.297, -3.954978, -3.726186, -3.408689, -2.366458, -0.508967, 1.798004, 4.347, +-99.69797, -65.57, -35.616, -20.209, -13.299, -10.394, -8.019984, -6.772438, -5.436532, -3.791028, -1.150873, 1.768005, 4.346, +-99.69797, -99.69797, -99.69797, -54.663, -33.0, -24.198, -17.245984, -13.71544, -10.109646, -6.677964, -2.765936, 1.478006, 4.338, +-99.69797, -99.69797, -99.69797, -99.69797, -75.759, -54.136, -37.214984, -28.70344, -20.122703, -12.726964, -5.885901, 0.27701, 4.255, +-99.69797, -99.69797, -99.69797, -99.69797, -99.69797, -99.69797, -80.281984, -61.00844, -41.669646, -25.673964, -12.403901, -2.04999, 3.625, +-9.07229, -9.07229, -9.07229, -9.07229, -9.07229, -9.06729, -8.99729, -8.76529, -8.08629, -7.02729, -5.49029, -2.85229, 0.1987104, // NU +-9.07229, -9.07229, -9.07229, -9.07229, -9.07229, -9.06729, -8.99729, -8.76529, -8.08629, -7.02729, -5.49029, -2.85229, 0.1987104, +-9.07229, -9.07229, -9.07229, -9.07229, -9.07229, -9.06929, -9.00029, -8.76729, -8.08729, -7.02729, -5.49029, -2.85229, 0.1987104, +-9.07629, -9.07529, -9.07529, -9.07529, -9.07429, -9.07329, -9.02029, -8.78329, -8.09129, -7.02829, -5.49129, -2.85229, 0.1987104, +-9.10529, -9.10429, -9.10329, -9.10029, -9.09629, -9.09229, -9.07629, -8.90629, -8.13929, -7.03629, -5.49129, -2.85229, 0.1987104, +-9.34529, -9.34329, -9.34029, -9.32529, -9.29529, -9.26229, -9.21529, -9.15329, -8.51229, -7.11629, -5.50029, -2.85229, 0.1987104, +-12.57129, -12.46129, -12.21829, -11.70729, -11.12229, -10.71129, -10.25629, -9.96229, -9.42029, -7.71429, -5.58729, -2.85529, 0.1987104, +-105.7943, -72.95929, -42.71029, -27.01829, -19.88929, -16.85929, -14.36829, -13.05429, -11.53729, -9.20529, -6.23429, -2.88629, 0.1977104, +-105.7943, -105.7943, -105.7943, -61.47129, -39.59029, -30.66429, -23.59429, -19.99829, -16.21129, -12.09729, -7.85229, -3.17929, 0.1897104, +-105.7943, -105.7943, -105.7943, -105.7943, -82.34929, -60.60229, -43.56329, -34.98629, -26.22429, -18.14629, -10.97129, -4.38329, 0.1057104, +-105.7943, -105.7943, -105.7943, -105.7943, -105.7943, -105.7943, -86.63029, -67.29129, -47.77129, -31.09329, -17.48929, -6.71029, -0.5272896, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, // GAMMA +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, + }; + + // p --> n + inline AMREX_GPU_DEVICE table_t j_p_n_meta{.ntemp=13, .nrhoy=11, .nvars=3, .nheader=5}; + inline AMREX_GPU_DEVICE amrex::Array1D j_p_n_rhoy{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0}; + inline AMREX_GPU_DEVICE amrex::Array1D j_p_n_temp{7.0, 8.0, 8.30103, 8.60206, 8.845098, 9.0, 9.176091, 9.30103, 9.477121, 9.69897, 10.0, 10.477121, 11.0}; + // Array3D is column-major (Fortran-ordering). T varies fastest, then rho Ye, then the component + inline AMREX_GPU_DEVICE amrex::Array3D + j_p_n_data{ +-99.69797, -49.75, -29.58, -19.262, -14.019, -10.766, -7.99, -6.458, -4.715, -2.968, -1.035, 1.6, 4.293, // RATE +-99.69797, -48.749, -28.58, -18.262, -13.606, -10.744, -7.989, -6.458, -4.715, -2.968, -1.035, 1.6, 4.293, +-99.69797, -47.732, -27.574, -17.26, -12.658, -10.538, -7.974, -6.454, -4.714, -2.968, -1.035, 1.6, 4.293, +-99.69797, -46.572, -26.519, -16.243, -11.652, -9.716, -7.833, -6.423, -4.709, -2.967, -1.035, 1.6, 4.293, +-99.69797, -44.223, -25.017, -15.072, -10.585, -8.685, -7.099, -6.134, -4.656, -2.959, -1.034, 1.6, 4.293, +-99.69797, -36.029, -20.834, -12.798, -9.036, -7.382, -5.962, -5.168, -4.214, -2.876, -1.025, 1.601, 4.293, +-46.082, -10.983, -8.29, -6.487, -5.363, -4.733, -4.066, -3.616, -3.01, -2.27, -0.937, 1.604, 4.293, +-1.35, -1.349, -1.348, -1.345, -1.335, -1.32, -1.285, -1.24, -1.128, -0.875, -0.301, 1.635, 4.294, +0.831, 0.831, 0.832, 0.832, 0.833, 0.835, 0.838, 0.844, 0.859, 0.904, 1.074, 1.922, 4.302, +2.676, 2.676, 2.676, 2.676, 2.676, 2.676, 2.677, 2.678, 2.68, 2.688, 2.725, 3.006, 4.385, +4.416, 4.416, 4.416, 4.416, 4.416, 4.416, 4.416, 4.416, 4.417, 4.419, 4.426, 4.499, 4.989, +-105.7943, -57.12729, -36.65029, -26.02029, -20.51929, -17.09829, -14.12829, -12.45629, -10.51429, -8.51629, -6.24529, -3.09929, 0.1317104, // NU +-105.7943, -56.12529, -35.64929, -25.02029, -20.10629, -17.07729, -14.12729, -12.45629, -10.51429, -8.51629, -6.24529, -3.09929, 0.1317104, +-105.7943, -55.10929, -34.64429, -24.01829, -19.15829, -16.87029, -14.11229, -12.45329, -10.51429, -8.51529, -6.24529, -3.09929, 0.1317104, +-105.7943, -53.94829, -33.58929, -23.00029, -18.15229, -16.04929, -13.97129, -12.42129, -10.50829, -8.51529, -6.24529, -3.09929, 0.1317104, +-105.7943, -51.60029, -32.08629, -21.82929, -17.08529, -15.01729, -13.23729, -12.13329, -10.45529, -8.50629, -6.24429, -3.09929, 0.1317104, +-105.7943, -43.40629, -27.90429, -19.55529, -15.53629, -13.71429, -12.10029, -11.16629, -10.01329, -8.42429, -6.23529, -3.09829, 0.1317104, +-54.46429, -18.35929, -15.35929, -13.24229, -11.85729, -11.05829, -10.19629, -9.60729, -8.80329, -7.81529, -6.14729, -3.09529, 0.1317104, +-7.18529, -7.18529, -7.18329, -7.17629, -7.15829, -7.12929, -7.06529, -6.98329, -6.78729, -6.36929, -5.50229, -3.06429, 0.1327104, +-4.46429, -4.46429, -4.46429, -4.46329, -4.46129, -4.45829, -4.45129, -4.44229, -4.41429, -4.33329, -4.03529, -2.77229, 0.1407104, +-2.21129, -2.21129, -2.21129, -2.21129, -2.21129, -2.21029, -2.20929, -2.20829, -2.20329, -2.18829, -2.12229, -1.63829, 0.2237104, +-0.1062896, -0.1062896, -0.1062896, -0.1062896, -0.1062896, -0.1052896, -0.1052896, -0.1052896, -0.1042896, -0.1012896, -0.08828961, 0.04271039, 0.8437104, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, // GAMMA +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, +-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, + }; + +} + + +AMREX_INLINE AMREX_GPU_DEVICE +amrex::Real +evaluate_linear_1d(const amrex::Real fhi, const amrex::Real flo, const amrex::Real xhi, const amrex::Real xlo, const amrex::Real x) +{ + // This function is a 1-D linear interpolator, that keeps x constant to xlo or xhi, based + // on the side, if x is outside [xlo, xhi] respectively. + + amrex::Real xx = amrex::Clamp(x, xlo, xhi); + amrex::Real f = flo + (fhi - flo) * (xx - xlo) / (xhi - xlo); + + return f; +} + +AMREX_INLINE AMREX_GPU_DEVICE +amrex::Real +evaluate_linear_2d(const amrex::Real fip1jp1, const amrex::Real fip1j, const amrex::Real fijp1, const amrex::Real fij, + const amrex::Real xhi, const amrex::Real xlo, const amrex::Real yhi, const amrex::Real ylo, + const amrex::Real x, const amrex::Real y) +{ + // This is the 2-D linear interpolator, as an extension of evaluate_linear_1d. + + const amrex::Real u = (amrex::Clamp(x, xlo, xhi) - xlo) / (xhi - xlo); + const amrex::Real v = (amrex::Clamp(y, ylo, yhi) - ylo) / (yhi - ylo); + + const amrex::Real E = fij; + const amrex::Real C = fijp1 - fij; + const amrex::Real B = fip1j - fij; + const amrex::Real A = fip1jp1 - fip1j - fijp1 + fij; + + return A * u * v + B * u + C * v + E; +} + + +template +AMREX_INLINE AMREX_GPU_DEVICE +amrex::Real +evaluate_vars(const int irhoy_lo, const int jtemp_lo, + const R& log_rhoy_table, const T& log_temp_table, const D& data, + const amrex::Real log_rhoy, const amrex::Real log_temp, const int component) +{ + // This function evaluates the 2-D interpolator, for several pairs of rho_ye and temperature. + + int irhoy_hi = irhoy_lo + 1; + int jtemp_hi = jtemp_lo + 1; + + amrex::Real rhoy_lo = log_rhoy_table(irhoy_lo); + amrex::Real rhoy_hi = log_rhoy_table(irhoy_hi); + + amrex::Real t_lo = log_temp_table(jtemp_lo); + amrex::Real t_hi = log_temp_table(jtemp_hi); + + amrex::Real fij = data(jtemp_lo, irhoy_lo, component); + amrex::Real fip1j = data(jtemp_lo, irhoy_hi, component); + amrex::Real fijp1 = data(jtemp_hi, irhoy_lo, component); + amrex::Real fip1jp1 = data(jtemp_hi, irhoy_hi, component); + + amrex::Real r = evaluate_linear_2d(fip1jp1, fip1j, fijp1, fij, + rhoy_hi, rhoy_lo, t_hi, t_lo, log_rhoy, log_temp); + + return r; +} + + +template +AMREX_INLINE AMREX_GPU_DEVICE +amrex::Real +evaluate_dr_dtemp(const int irhoy_lo, const int jtemp_lo, + const table_t& table_meta, const R& log_rhoy_table, const T& log_temp_table, const D& data, + const amrex::Real log_rhoy, const amrex::Real log_temp, const int component) +{ + + // Differentiate the same bilinear log-rate interpolant as evaluate_vars. + // At temperature knots, use the cell selected by find_index_extrap: + // the cell to the right, except at the upper endpoint (the last cell). + + const int irhoy_hi = irhoy_lo + 1; + const int jtemp_hi = jtemp_lo + 1; + + const amrex::Real log_temp_lo = log_temp_table(jtemp_lo); + const amrex::Real log_temp_hi = log_temp_table(jtemp_hi); + + // The interpolated rate is constant outside the temperature table. + if (log_temp < log_temp_lo || log_temp > log_temp_hi) { + return 0.0_rt; + } + + const amrex::Real log_rhoy_lo = log_rhoy_table(irhoy_lo); + const amrex::Real log_rhoy_hi = log_rhoy_table(irhoy_hi); + + const amrex::Real fij = data(jtemp_lo, irhoy_lo, component); + const amrex::Real fip1j = data(jtemp_lo, irhoy_hi, component); + const amrex::Real fijp1 = data(jtemp_hi, irhoy_lo, component); + const amrex::Real fip1jp1 = data(jtemp_hi, irhoy_hi, component); + + // compute the gradients in the T direction: dlog(r)/dlog(T) |_i and + // dlog(r)/dlog(T) |_{i+1} + + const amrex::Real dlogT = log_temp_hi - log_temp_lo; + const amrex::Real dlogr_dlogT_i = (fijp1 - fij) / dlogT; + const amrex::Real dlogr_dlogT_ip1 = (fip1jp1 - fip1j) / dlogT; + + return evaluate_linear_1d(dlogr_dlogT_ip1, dlogr_dlogT_i, + log_rhoy_hi, log_rhoy_lo, log_rhoy); +} + + +template +AMREX_INLINE AMREX_GPU_DEVICE +amrex::Real +evaluate_dr_drhoYe(const int irhoy_lo, const int jtemp_lo, + [[maybe_unused]] const table_t& table_meta, + const R& log_rhoy_table, const T& log_temp_table, const D& data, + const amrex::Real log_rhoy, const amrex::Real log_temp, const int component) +{ + + // Differentiate the same bilinear log-rate interpolant as evaluate_vars. + // At (rho Ye) knots, use the cell selected by find_index_extrap: + // the cell to the right, except at the upper endpoint (the last cell). + + const int irhoy_hi = irhoy_lo + 1; + const int jtemp_hi = jtemp_lo + 1; + + const amrex::Real log_rhoy_lo = log_rhoy_table(irhoy_lo); + const amrex::Real log_rhoy_hi = log_rhoy_table(irhoy_hi); + + // The interpolated rate is constant outside the density table. + if (log_rhoy < log_rhoy_lo || log_rhoy > log_rhoy_hi) { + return 0.0_rt; + } + + const amrex::Real log_temp_lo = log_temp_table(jtemp_lo); + const amrex::Real log_temp_hi = log_temp_table(jtemp_hi); + + const amrex::Real fij = data(jtemp_lo, irhoy_lo, component); + const amrex::Real fip1j = data(jtemp_lo, irhoy_hi, component); + const amrex::Real fijp1 = data(jtemp_hi, irhoy_lo, component); + const amrex::Real fip1jp1 = data(jtemp_hi, irhoy_hi, component); + + // compute the gradients in the rhoY direction: dlog(r)/dlog(ρY_e) |_j and + // dlog(r)/dlog(ρY_e) |_{j+1} + + const amrex::Real dlogrhoy = log_rhoy_hi - log_rhoy_lo; + const amrex::Real dlogr_dlogrhoy_j = (fip1j - fij) / dlogrhoy; + const amrex::Real dlogr_dlogrhoy_jp1 = (fip1jp1 - fijp1) / dlogrhoy; + + return evaluate_linear_1d(dlogr_dlogrhoy_jp1, dlogr_dlogrhoy_j, + log_temp_hi, log_temp_lo, log_temp); +} + + +template +AMREX_INLINE AMREX_GPU_DEVICE +void +get_entries(const int irhoy_lo, const int jtemp_lo, + const table_t& table_meta, const R& log_rhoy_table, const T& log_temp_table, const D& data, + const amrex::Real log_rhoy, const amrex::Real log_temp, + weak_rate_t& entries) +{ + + // only interpolate the quantities we currently use + + entries.rate = evaluate_vars(irhoy_lo, jtemp_lo, + log_rhoy_table, log_temp_table, data, + log_rhoy, log_temp, jtab_rate); + + entries.enu = evaluate_vars(irhoy_lo, jtemp_lo, + log_rhoy_table, log_temp_table, data, + log_rhoy, log_temp, jtab_nuloss); + + entries.gamma = evaluate_vars(irhoy_lo, jtemp_lo, + log_rhoy_table, log_temp_table, data, + log_rhoy, log_temp, jtab_gamma); + + if constexpr (do_T_derivatives) { + entries.drate_dT = + evaluate_dr_dtemp(irhoy_lo, jtemp_lo, + table_meta, log_rhoy_table, log_temp_table, data, + log_rhoy, log_temp, jtab_rate); + + entries.drate_drhoye = + evaluate_dr_drhoYe(irhoy_lo, jtemp_lo, + table_meta, log_rhoy_table, log_temp_table, data, + log_rhoy, log_temp, jtab_rate); + + entries.denu_dT = + evaluate_dr_dtemp(irhoy_lo, jtemp_lo, + table_meta, log_rhoy_table, log_temp_table, data, + log_rhoy, log_temp, jtab_nuloss); + + entries.denu_drhoye = + evaluate_dr_drhoYe(irhoy_lo, jtemp_lo, + table_meta, log_rhoy_table, log_temp_table, data, + log_rhoy, log_temp, jtab_nuloss); + + } +} + +template +AMREX_INLINE AMREX_GPU_DEVICE +void +tabular_evaluate(const table_t& table_meta, + const R& log_rhoy_table, const T& log_temp_table, const D& data, + const amrex::Real log_rhoy, const amrex::Real rhoy, + const amrex::Real log_temp, const amrex::Real temp, + weak_rate_t& entries) +{ + + // Get the table entries at this rhoy, temp + + // get the index into the table -- all components are + // stored with the same indices + + const int irhoy_lo = interp_net::find_index_extrap(log_rhoy, log_rhoy_table); + const int jtemp_lo = interp_net::find_index_extrap(log_temp, log_temp_table); + + get_entries(irhoy_lo, jtemp_lo, + table_meta, log_rhoy_table, log_temp_table, data, + log_rhoy, log_temp, entries); + + // Fill outputs: rate, d(rate)/dT, and (negative) neutrino loss + // contribution to energy generation + + entries.rate = amrex::Math::exp10(entries.rate); + if constexpr (do_T_derivatives) { + entries.drate_dT = entries.rate * entries.drate_dT / temp; + entries.drate_drhoye = entries.rate * entries.drate_drhoye / rhoy; + } else { + entries.drate_dT = 0.0; + entries.drate_drhoye = 0.0; + } + entries.enu = -amrex::Math::exp10(entries.enu); + if constexpr (do_T_derivatives) { + entries.denu_dT = entries.enu * entries.denu_dT / temp; + entries.denu_drhoye = entries.enu * entries.denu_drhoye / rhoy; + } else { + entries.denu_dT = 0.0; + entries.denu_drhoye = 0.0; + } + entries.gamma = amrex::Math::exp10(entries.gamma); +} + +#endif diff --git a/networks/massive-star-medium/tabular_weak_rates.H b/networks/massive-star-medium/tabular_weak_rates.H new file mode 100644 index 0000000000..e1099b2071 --- /dev/null +++ b/networks/massive-star-medium/tabular_weak_rates.H @@ -0,0 +1,705 @@ +#ifndef TABULAR_WEAK_RATES_H +#define TABULAR_WEAK_RATES_H + +#include + +#include + +#include +#include +#include +#include +#include + +namespace tabular_weak_rates { + + using namespace Rates; + using namespace Species; + + using namespace rate_tables; + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Al27_to_Si27_beta_neg_weaktab(T& rate_eval, const amrex::Real temp, const amrex::Real log_temp, const amrex::Real rho, const amrex::Real rhoy, const amrex::Real log_rhoy, const amrex::Array1D& Y) { + + // Al27 --> Si27 + + weak_rate_t table_values{}; + constexpr int do_T_derivatives = std::is_same_v; + tabular_evaluate(j_Al27_Si27_meta, j_Al27_Si27_rhoy, j_Al27_Si27_temp, j_Al27_Si27_data, + log_rhoy, rhoy, log_temp, temp, table_values); + + rate_eval.screened_rates(k_Al27_to_Si27_beta_neg_weaktab) = table_values.rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Al27_to_Si27_beta_neg_weaktab) = table_values.drate_dT; + + // accumulate ∂/∂Y_e contributions to Al27 and Si27 + // this is the derivative of ∂Y(Al27)/∂t = -Y(Al27) λ and + // ∂Y(Si27)/∂t = +Y(Al27) λ + rate_eval.dweak_ydot_dYe(Al27) -= rho * Y(Al27) * table_values.drate_drhoye; + rate_eval.dweak_ydot_dYe(Si27) += rho * Y(Al27) * table_values.drate_drhoye; + + // also accumulate the derivatives of ε_{ν,weak} with respect to T and Y + rate_eval.denuc_weak_dY(Al27) += C::n_A * (table_values.enu + table_values.gamma); + rate_eval.denuc_weak_dT += C::n_A * Y(Al27) * table_values.denu_dT; + // finally the derivatives of ε_{ν,weak} with respect to Ye + rate_eval.denuc_weak_dYe += C::n_A * rho * Y(Al27) * table_values.denu_drhoye; + } + + rate_eval.enuc_weak += C::n_A * Y(Al27) * (table_values.enu + table_values.gamma); + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si27_to_Al27_electron_capture_weaktab(T& rate_eval, const amrex::Real temp, const amrex::Real log_temp, const amrex::Real rho, const amrex::Real rhoy, const amrex::Real log_rhoy, const amrex::Array1D& Y) { + + // Si27 --> Al27 + + weak_rate_t table_values{}; + constexpr int do_T_derivatives = std::is_same_v; + tabular_evaluate(j_Si27_Al27_meta, j_Si27_Al27_rhoy, j_Si27_Al27_temp, j_Si27_Al27_data, + log_rhoy, rhoy, log_temp, temp, table_values); + + rate_eval.screened_rates(k_Si27_to_Al27_electron_capture_weaktab) = table_values.rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si27_to_Al27_electron_capture_weaktab) = table_values.drate_dT; + + // accumulate ∂/∂Y_e contributions to Si27 and Al27 + // this is the derivative of ∂Y(Si27)/∂t = -Y(Si27) λ and + // ∂Y(Al27)/∂t = +Y(Si27) λ + rate_eval.dweak_ydot_dYe(Si27) -= rho * Y(Si27) * table_values.drate_drhoye; + rate_eval.dweak_ydot_dYe(Al27) += rho * Y(Si27) * table_values.drate_drhoye; + + // also accumulate the derivatives of ε_{ν,weak} with respect to T and Y + rate_eval.denuc_weak_dY(Si27) += C::n_A * (table_values.enu + table_values.gamma); + rate_eval.denuc_weak_dT += C::n_A * Y(Si27) * table_values.denu_dT; + // finally the derivatives of ε_{ν,weak} with respect to Ye + rate_eval.denuc_weak_dYe += C::n_A * rho * Y(Si27) * table_values.denu_drhoye; + } + + rate_eval.enuc_weak += C::n_A * Y(Si27) * (table_values.enu + table_values.gamma); + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_P29_to_Si29_electron_capture_weaktab(T& rate_eval, const amrex::Real temp, const amrex::Real log_temp, const amrex::Real rho, const amrex::Real rhoy, const amrex::Real log_rhoy, const amrex::Array1D& Y) { + + // P29 --> Si29 + + weak_rate_t table_values{}; + constexpr int do_T_derivatives = std::is_same_v; + tabular_evaluate(j_P29_Si29_meta, j_P29_Si29_rhoy, j_P29_Si29_temp, j_P29_Si29_data, + log_rhoy, rhoy, log_temp, temp, table_values); + + rate_eval.screened_rates(k_P29_to_Si29_electron_capture_weaktab) = table_values.rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_P29_to_Si29_electron_capture_weaktab) = table_values.drate_dT; + + // accumulate ∂/∂Y_e contributions to P29 and Si29 + // this is the derivative of ∂Y(P29)/∂t = -Y(P29) λ and + // ∂Y(Si29)/∂t = +Y(P29) λ + rate_eval.dweak_ydot_dYe(P29) -= rho * Y(P29) * table_values.drate_drhoye; + rate_eval.dweak_ydot_dYe(Si29) += rho * Y(P29) * table_values.drate_drhoye; + + // also accumulate the derivatives of ε_{ν,weak} with respect to T and Y + rate_eval.denuc_weak_dY(P29) += C::n_A * (table_values.enu + table_values.gamma); + rate_eval.denuc_weak_dT += C::n_A * Y(P29) * table_values.denu_dT; + // finally the derivatives of ε_{ν,weak} with respect to Ye + rate_eval.denuc_weak_dYe += C::n_A * rho * Y(P29) * table_values.denu_drhoye; + } + + rate_eval.enuc_weak += C::n_A * Y(P29) * (table_values.enu + table_values.gamma); + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si29_to_P29_beta_neg_weaktab(T& rate_eval, const amrex::Real temp, const amrex::Real log_temp, const amrex::Real rho, const amrex::Real rhoy, const amrex::Real log_rhoy, const amrex::Array1D& Y) { + + // Si29 --> P29 + + weak_rate_t table_values{}; + constexpr int do_T_derivatives = std::is_same_v; + tabular_evaluate(j_Si29_P29_meta, j_Si29_P29_rhoy, j_Si29_P29_temp, j_Si29_P29_data, + log_rhoy, rhoy, log_temp, temp, table_values); + + rate_eval.screened_rates(k_Si29_to_P29_beta_neg_weaktab) = table_values.rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si29_to_P29_beta_neg_weaktab) = table_values.drate_dT; + + // accumulate ∂/∂Y_e contributions to Si29 and P29 + // this is the derivative of ∂Y(Si29)/∂t = -Y(Si29) λ and + // ∂Y(P29)/∂t = +Y(Si29) λ + rate_eval.dweak_ydot_dYe(Si29) -= rho * Y(Si29) * table_values.drate_drhoye; + rate_eval.dweak_ydot_dYe(P29) += rho * Y(Si29) * table_values.drate_drhoye; + + // also accumulate the derivatives of ε_{ν,weak} with respect to T and Y + rate_eval.denuc_weak_dY(Si29) += C::n_A * (table_values.enu + table_values.gamma); + rate_eval.denuc_weak_dT += C::n_A * Y(Si29) * table_values.denu_dT; + // finally the derivatives of ε_{ν,weak} with respect to Ye + rate_eval.denuc_weak_dYe += C::n_A * rho * Y(Si29) * table_values.denu_drhoye; + } + + rate_eval.enuc_weak += C::n_A * Y(Si29) * (table_values.enu + table_values.gamma); + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_P31_to_Si31_electron_capture_weaktab(T& rate_eval, const amrex::Real temp, const amrex::Real log_temp, const amrex::Real rho, const amrex::Real rhoy, const amrex::Real log_rhoy, const amrex::Array1D& Y) { + + // P31 --> Si31 + + weak_rate_t table_values{}; + constexpr int do_T_derivatives = std::is_same_v; + tabular_evaluate(j_P31_Si31_meta, j_P31_Si31_rhoy, j_P31_Si31_temp, j_P31_Si31_data, + log_rhoy, rhoy, log_temp, temp, table_values); + + rate_eval.screened_rates(k_P31_to_Si31_electron_capture_weaktab) = table_values.rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_P31_to_Si31_electron_capture_weaktab) = table_values.drate_dT; + + // accumulate ∂/∂Y_e contributions to P31 and Si31 + // this is the derivative of ∂Y(P31)/∂t = -Y(P31) λ and + // ∂Y(Si31)/∂t = +Y(P31) λ + rate_eval.dweak_ydot_dYe(P31) -= rho * Y(P31) * table_values.drate_drhoye; + rate_eval.dweak_ydot_dYe(Si31) += rho * Y(P31) * table_values.drate_drhoye; + + // also accumulate the derivatives of ε_{ν,weak} with respect to T and Y + rate_eval.denuc_weak_dY(P31) += C::n_A * (table_values.enu + table_values.gamma); + rate_eval.denuc_weak_dT += C::n_A * Y(P31) * table_values.denu_dT; + // finally the derivatives of ε_{ν,weak} with respect to Ye + rate_eval.denuc_weak_dYe += C::n_A * rho * Y(P31) * table_values.denu_drhoye; + } + + rate_eval.enuc_weak += C::n_A * Y(P31) * (table_values.enu + table_values.gamma); + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Si31_to_P31_beta_neg_weaktab(T& rate_eval, const amrex::Real temp, const amrex::Real log_temp, const amrex::Real rho, const amrex::Real rhoy, const amrex::Real log_rhoy, const amrex::Array1D& Y) { + + // Si31 --> P31 + + weak_rate_t table_values{}; + constexpr int do_T_derivatives = std::is_same_v; + tabular_evaluate(j_Si31_P31_meta, j_Si31_P31_rhoy, j_Si31_P31_temp, j_Si31_P31_data, + log_rhoy, rhoy, log_temp, temp, table_values); + + rate_eval.screened_rates(k_Si31_to_P31_beta_neg_weaktab) = table_values.rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Si31_to_P31_beta_neg_weaktab) = table_values.drate_dT; + + // accumulate ∂/∂Y_e contributions to Si31 and P31 + // this is the derivative of ∂Y(Si31)/∂t = -Y(Si31) λ and + // ∂Y(P31)/∂t = +Y(Si31) λ + rate_eval.dweak_ydot_dYe(Si31) -= rho * Y(Si31) * table_values.drate_drhoye; + rate_eval.dweak_ydot_dYe(P31) += rho * Y(Si31) * table_values.drate_drhoye; + + // also accumulate the derivatives of ε_{ν,weak} with respect to T and Y + rate_eval.denuc_weak_dY(Si31) += C::n_A * (table_values.enu + table_values.gamma); + rate_eval.denuc_weak_dT += C::n_A * Y(Si31) * table_values.denu_dT; + // finally the derivatives of ε_{ν,weak} with respect to Ye + rate_eval.denuc_weak_dYe += C::n_A * rho * Y(Si31) * table_values.denu_drhoye; + } + + rate_eval.enuc_weak += C::n_A * Y(Si31) * (table_values.enu + table_values.gamma); + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cl33_to_S33_electron_capture_weaktab(T& rate_eval, const amrex::Real temp, const amrex::Real log_temp, const amrex::Real rho, const amrex::Real rhoy, const amrex::Real log_rhoy, const amrex::Array1D& Y) { + + // Cl33 --> S33 + + weak_rate_t table_values{}; + constexpr int do_T_derivatives = std::is_same_v; + tabular_evaluate(j_Cl33_S33_meta, j_Cl33_S33_rhoy, j_Cl33_S33_temp, j_Cl33_S33_data, + log_rhoy, rhoy, log_temp, temp, table_values); + + rate_eval.screened_rates(k_Cl33_to_S33_electron_capture_weaktab) = table_values.rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cl33_to_S33_electron_capture_weaktab) = table_values.drate_dT; + + // accumulate ∂/∂Y_e contributions to Cl33 and S33 + // this is the derivative of ∂Y(Cl33)/∂t = -Y(Cl33) λ and + // ∂Y(S33)/∂t = +Y(Cl33) λ + rate_eval.dweak_ydot_dYe(Cl33) -= rho * Y(Cl33) * table_values.drate_drhoye; + rate_eval.dweak_ydot_dYe(S33) += rho * Y(Cl33) * table_values.drate_drhoye; + + // also accumulate the derivatives of ε_{ν,weak} with respect to T and Y + rate_eval.denuc_weak_dY(Cl33) += C::n_A * (table_values.enu + table_values.gamma); + rate_eval.denuc_weak_dT += C::n_A * Y(Cl33) * table_values.denu_dT; + // finally the derivatives of ε_{ν,weak} with respect to Ye + rate_eval.denuc_weak_dYe += C::n_A * rho * Y(Cl33) * table_values.denu_drhoye; + } + + rate_eval.enuc_weak += C::n_A * Y(Cl33) * (table_values.enu + table_values.gamma); + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_P33_to_S33_beta_neg_weaktab(T& rate_eval, const amrex::Real temp, const amrex::Real log_temp, const amrex::Real rho, const amrex::Real rhoy, const amrex::Real log_rhoy, const amrex::Array1D& Y) { + + // P33 --> S33 + + weak_rate_t table_values{}; + constexpr int do_T_derivatives = std::is_same_v; + tabular_evaluate(j_P33_S33_meta, j_P33_S33_rhoy, j_P33_S33_temp, j_P33_S33_data, + log_rhoy, rhoy, log_temp, temp, table_values); + + rate_eval.screened_rates(k_P33_to_S33_beta_neg_weaktab) = table_values.rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_P33_to_S33_beta_neg_weaktab) = table_values.drate_dT; + + // accumulate ∂/∂Y_e contributions to P33 and S33 + // this is the derivative of ∂Y(P33)/∂t = -Y(P33) λ and + // ∂Y(S33)/∂t = +Y(P33) λ + rate_eval.dweak_ydot_dYe(P33) -= rho * Y(P33) * table_values.drate_drhoye; + rate_eval.dweak_ydot_dYe(S33) += rho * Y(P33) * table_values.drate_drhoye; + + // also accumulate the derivatives of ε_{ν,weak} with respect to T and Y + rate_eval.denuc_weak_dY(P33) += C::n_A * (table_values.enu + table_values.gamma); + rate_eval.denuc_weak_dT += C::n_A * Y(P33) * table_values.denu_dT; + // finally the derivatives of ε_{ν,weak} with respect to Ye + rate_eval.denuc_weak_dYe += C::n_A * rho * Y(P33) * table_values.denu_drhoye; + } + + rate_eval.enuc_weak += C::n_A * Y(P33) * (table_values.enu + table_values.gamma); + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S33_to_Cl33_beta_neg_weaktab(T& rate_eval, const amrex::Real temp, const amrex::Real log_temp, const amrex::Real rho, const amrex::Real rhoy, const amrex::Real log_rhoy, const amrex::Array1D& Y) { + + // S33 --> Cl33 + + weak_rate_t table_values{}; + constexpr int do_T_derivatives = std::is_same_v; + tabular_evaluate(j_S33_Cl33_meta, j_S33_Cl33_rhoy, j_S33_Cl33_temp, j_S33_Cl33_data, + log_rhoy, rhoy, log_temp, temp, table_values); + + rate_eval.screened_rates(k_S33_to_Cl33_beta_neg_weaktab) = table_values.rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S33_to_Cl33_beta_neg_weaktab) = table_values.drate_dT; + + // accumulate ∂/∂Y_e contributions to S33 and Cl33 + // this is the derivative of ∂Y(S33)/∂t = -Y(S33) λ and + // ∂Y(Cl33)/∂t = +Y(S33) λ + rate_eval.dweak_ydot_dYe(S33) -= rho * Y(S33) * table_values.drate_drhoye; + rate_eval.dweak_ydot_dYe(Cl33) += rho * Y(S33) * table_values.drate_drhoye; + + // also accumulate the derivatives of ε_{ν,weak} with respect to T and Y + rate_eval.denuc_weak_dY(S33) += C::n_A * (table_values.enu + table_values.gamma); + rate_eval.denuc_weak_dT += C::n_A * Y(S33) * table_values.denu_dT; + // finally the derivatives of ε_{ν,weak} with respect to Ye + rate_eval.denuc_weak_dYe += C::n_A * rho * Y(S33) * table_values.denu_drhoye; + } + + rate_eval.enuc_weak += C::n_A * Y(S33) * (table_values.enu + table_values.gamma); + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S33_to_P33_electron_capture_weaktab(T& rate_eval, const amrex::Real temp, const amrex::Real log_temp, const amrex::Real rho, const amrex::Real rhoy, const amrex::Real log_rhoy, const amrex::Array1D& Y) { + + // S33 --> P33 + + weak_rate_t table_values{}; + constexpr int do_T_derivatives = std::is_same_v; + tabular_evaluate(j_S33_P33_meta, j_S33_P33_rhoy, j_S33_P33_temp, j_S33_P33_data, + log_rhoy, rhoy, log_temp, temp, table_values); + + rate_eval.screened_rates(k_S33_to_P33_electron_capture_weaktab) = table_values.rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S33_to_P33_electron_capture_weaktab) = table_values.drate_dT; + + // accumulate ∂/∂Y_e contributions to S33 and P33 + // this is the derivative of ∂Y(S33)/∂t = -Y(S33) λ and + // ∂Y(P33)/∂t = +Y(S33) λ + rate_eval.dweak_ydot_dYe(S33) -= rho * Y(S33) * table_values.drate_drhoye; + rate_eval.dweak_ydot_dYe(P33) += rho * Y(S33) * table_values.drate_drhoye; + + // also accumulate the derivatives of ε_{ν,weak} with respect to T and Y + rate_eval.denuc_weak_dY(S33) += C::n_A * (table_values.enu + table_values.gamma); + rate_eval.denuc_weak_dT += C::n_A * Y(S33) * table_values.denu_dT; + // finally the derivatives of ε_{ν,weak} with respect to Ye + rate_eval.denuc_weak_dYe += C::n_A * rho * Y(S33) * table_values.denu_drhoye; + } + + rate_eval.enuc_weak += C::n_A * Y(S33) * (table_values.enu + table_values.gamma); + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cl35_to_S35_electron_capture_weaktab(T& rate_eval, const amrex::Real temp, const amrex::Real log_temp, const amrex::Real rho, const amrex::Real rhoy, const amrex::Real log_rhoy, const amrex::Array1D& Y) { + + // Cl35 --> S35 + + weak_rate_t table_values{}; + constexpr int do_T_derivatives = std::is_same_v; + tabular_evaluate(j_Cl35_S35_meta, j_Cl35_S35_rhoy, j_Cl35_S35_temp, j_Cl35_S35_data, + log_rhoy, rhoy, log_temp, temp, table_values); + + rate_eval.screened_rates(k_Cl35_to_S35_electron_capture_weaktab) = table_values.rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cl35_to_S35_electron_capture_weaktab) = table_values.drate_dT; + + // accumulate ∂/∂Y_e contributions to Cl35 and S35 + // this is the derivative of ∂Y(Cl35)/∂t = -Y(Cl35) λ and + // ∂Y(S35)/∂t = +Y(Cl35) λ + rate_eval.dweak_ydot_dYe(Cl35) -= rho * Y(Cl35) * table_values.drate_drhoye; + rate_eval.dweak_ydot_dYe(S35) += rho * Y(Cl35) * table_values.drate_drhoye; + + // also accumulate the derivatives of ε_{ν,weak} with respect to T and Y + rate_eval.denuc_weak_dY(Cl35) += C::n_A * (table_values.enu + table_values.gamma); + rate_eval.denuc_weak_dT += C::n_A * Y(Cl35) * table_values.denu_dT; + // finally the derivatives of ε_{ν,weak} with respect to Ye + rate_eval.denuc_weak_dYe += C::n_A * rho * Y(Cl35) * table_values.denu_drhoye; + } + + rate_eval.enuc_weak += C::n_A * Y(Cl35) * (table_values.enu + table_values.gamma); + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_S35_to_Cl35_beta_neg_weaktab(T& rate_eval, const amrex::Real temp, const amrex::Real log_temp, const amrex::Real rho, const amrex::Real rhoy, const amrex::Real log_rhoy, const amrex::Array1D& Y) { + + // S35 --> Cl35 + + weak_rate_t table_values{}; + constexpr int do_T_derivatives = std::is_same_v; + tabular_evaluate(j_S35_Cl35_meta, j_S35_Cl35_rhoy, j_S35_Cl35_temp, j_S35_Cl35_data, + log_rhoy, rhoy, log_temp, temp, table_values); + + rate_eval.screened_rates(k_S35_to_Cl35_beta_neg_weaktab) = table_values.rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_S35_to_Cl35_beta_neg_weaktab) = table_values.drate_dT; + + // accumulate ∂/∂Y_e contributions to S35 and Cl35 + // this is the derivative of ∂Y(S35)/∂t = -Y(S35) λ and + // ∂Y(Cl35)/∂t = +Y(S35) λ + rate_eval.dweak_ydot_dYe(S35) -= rho * Y(S35) * table_values.drate_drhoye; + rate_eval.dweak_ydot_dYe(Cl35) += rho * Y(S35) * table_values.drate_drhoye; + + // also accumulate the derivatives of ε_{ν,weak} with respect to T and Y + rate_eval.denuc_weak_dY(S35) += C::n_A * (table_values.enu + table_values.gamma); + rate_eval.denuc_weak_dT += C::n_A * Y(S35) * table_values.denu_dT; + // finally the derivatives of ε_{ν,weak} with respect to Ye + rate_eval.denuc_weak_dYe += C::n_A * rho * Y(S35) * table_values.denu_drhoye; + } + + rate_eval.enuc_weak += C::n_A * Y(S35) * (table_values.enu + table_values.gamma); + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar37_to_Cl37_electron_capture_weaktab(T& rate_eval, const amrex::Real temp, const amrex::Real log_temp, const amrex::Real rho, const amrex::Real rhoy, const amrex::Real log_rhoy, const amrex::Array1D& Y) { + + // Ar37 --> Cl37 + + weak_rate_t table_values{}; + constexpr int do_T_derivatives = std::is_same_v; + tabular_evaluate(j_Ar37_Cl37_meta, j_Ar37_Cl37_rhoy, j_Ar37_Cl37_temp, j_Ar37_Cl37_data, + log_rhoy, rhoy, log_temp, temp, table_values); + + rate_eval.screened_rates(k_Ar37_to_Cl37_electron_capture_weaktab) = table_values.rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar37_to_Cl37_electron_capture_weaktab) = table_values.drate_dT; + + // accumulate ∂/∂Y_e contributions to Ar37 and Cl37 + // this is the derivative of ∂Y(Ar37)/∂t = -Y(Ar37) λ and + // ∂Y(Cl37)/∂t = +Y(Ar37) λ + rate_eval.dweak_ydot_dYe(Ar37) -= rho * Y(Ar37) * table_values.drate_drhoye; + rate_eval.dweak_ydot_dYe(Cl37) += rho * Y(Ar37) * table_values.drate_drhoye; + + // also accumulate the derivatives of ε_{ν,weak} with respect to T and Y + rate_eval.denuc_weak_dY(Ar37) += C::n_A * (table_values.enu + table_values.gamma); + rate_eval.denuc_weak_dT += C::n_A * Y(Ar37) * table_values.denu_dT; + // finally the derivatives of ε_{ν,weak} with respect to Ye + rate_eval.denuc_weak_dYe += C::n_A * rho * Y(Ar37) * table_values.denu_drhoye; + } + + rate_eval.enuc_weak += C::n_A * Y(Ar37) * (table_values.enu + table_values.gamma); + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ar37_to_K37_beta_neg_weaktab(T& rate_eval, const amrex::Real temp, const amrex::Real log_temp, const amrex::Real rho, const amrex::Real rhoy, const amrex::Real log_rhoy, const amrex::Array1D& Y) { + + // Ar37 --> K37 + + weak_rate_t table_values{}; + constexpr int do_T_derivatives = std::is_same_v; + tabular_evaluate(j_Ar37_K37_meta, j_Ar37_K37_rhoy, j_Ar37_K37_temp, j_Ar37_K37_data, + log_rhoy, rhoy, log_temp, temp, table_values); + + rate_eval.screened_rates(k_Ar37_to_K37_beta_neg_weaktab) = table_values.rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ar37_to_K37_beta_neg_weaktab) = table_values.drate_dT; + + // accumulate ∂/∂Y_e contributions to Ar37 and K37 + // this is the derivative of ∂Y(Ar37)/∂t = -Y(Ar37) λ and + // ∂Y(K37)/∂t = +Y(Ar37) λ + rate_eval.dweak_ydot_dYe(Ar37) -= rho * Y(Ar37) * table_values.drate_drhoye; + rate_eval.dweak_ydot_dYe(K37) += rho * Y(Ar37) * table_values.drate_drhoye; + + // also accumulate the derivatives of ε_{ν,weak} with respect to T and Y + rate_eval.denuc_weak_dY(Ar37) += C::n_A * (table_values.enu + table_values.gamma); + rate_eval.denuc_weak_dT += C::n_A * Y(Ar37) * table_values.denu_dT; + // finally the derivatives of ε_{ν,weak} with respect to Ye + rate_eval.denuc_weak_dYe += C::n_A * rho * Y(Ar37) * table_values.denu_drhoye; + } + + rate_eval.enuc_weak += C::n_A * Y(Ar37) * (table_values.enu + table_values.gamma); + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Cl37_to_Ar37_beta_neg_weaktab(T& rate_eval, const amrex::Real temp, const amrex::Real log_temp, const amrex::Real rho, const amrex::Real rhoy, const amrex::Real log_rhoy, const amrex::Array1D& Y) { + + // Cl37 --> Ar37 + + weak_rate_t table_values{}; + constexpr int do_T_derivatives = std::is_same_v; + tabular_evaluate(j_Cl37_Ar37_meta, j_Cl37_Ar37_rhoy, j_Cl37_Ar37_temp, j_Cl37_Ar37_data, + log_rhoy, rhoy, log_temp, temp, table_values); + + rate_eval.screened_rates(k_Cl37_to_Ar37_beta_neg_weaktab) = table_values.rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Cl37_to_Ar37_beta_neg_weaktab) = table_values.drate_dT; + + // accumulate ∂/∂Y_e contributions to Cl37 and Ar37 + // this is the derivative of ∂Y(Cl37)/∂t = -Y(Cl37) λ and + // ∂Y(Ar37)/∂t = +Y(Cl37) λ + rate_eval.dweak_ydot_dYe(Cl37) -= rho * Y(Cl37) * table_values.drate_drhoye; + rate_eval.dweak_ydot_dYe(Ar37) += rho * Y(Cl37) * table_values.drate_drhoye; + + // also accumulate the derivatives of ε_{ν,weak} with respect to T and Y + rate_eval.denuc_weak_dY(Cl37) += C::n_A * (table_values.enu + table_values.gamma); + rate_eval.denuc_weak_dT += C::n_A * Y(Cl37) * table_values.denu_dT; + // finally the derivatives of ε_{ν,weak} with respect to Ye + rate_eval.denuc_weak_dYe += C::n_A * rho * Y(Cl37) * table_values.denu_drhoye; + } + + rate_eval.enuc_weak += C::n_A * Y(Cl37) * (table_values.enu + table_values.gamma); + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_K37_to_Ar37_electron_capture_weaktab(T& rate_eval, const amrex::Real temp, const amrex::Real log_temp, const amrex::Real rho, const amrex::Real rhoy, const amrex::Real log_rhoy, const amrex::Array1D& Y) { + + // K37 --> Ar37 + + weak_rate_t table_values{}; + constexpr int do_T_derivatives = std::is_same_v; + tabular_evaluate(j_K37_Ar37_meta, j_K37_Ar37_rhoy, j_K37_Ar37_temp, j_K37_Ar37_data, + log_rhoy, rhoy, log_temp, temp, table_values); + + rate_eval.screened_rates(k_K37_to_Ar37_electron_capture_weaktab) = table_values.rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_K37_to_Ar37_electron_capture_weaktab) = table_values.drate_dT; + + // accumulate ∂/∂Y_e contributions to K37 and Ar37 + // this is the derivative of ∂Y(K37)/∂t = -Y(K37) λ and + // ∂Y(Ar37)/∂t = +Y(K37) λ + rate_eval.dweak_ydot_dYe(K37) -= rho * Y(K37) * table_values.drate_drhoye; + rate_eval.dweak_ydot_dYe(Ar37) += rho * Y(K37) * table_values.drate_drhoye; + + // also accumulate the derivatives of ε_{ν,weak} with respect to T and Y + rate_eval.denuc_weak_dY(K37) += C::n_A * (table_values.enu + table_values.gamma); + rate_eval.denuc_weak_dT += C::n_A * Y(K37) * table_values.denu_dT; + // finally the derivatives of ε_{ν,weak} with respect to Ye + rate_eval.denuc_weak_dYe += C::n_A * rho * Y(K37) * table_values.denu_drhoye; + } + + rate_eval.enuc_weak += C::n_A * Y(K37) * (table_values.enu + table_values.gamma); + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co56_to_Fe56_electron_capture_weaktab(T& rate_eval, const amrex::Real temp, const amrex::Real log_temp, const amrex::Real rho, const amrex::Real rhoy, const amrex::Real log_rhoy, const amrex::Array1D& Y) { + + // Co56 --> Fe56 + + weak_rate_t table_values{}; + constexpr int do_T_derivatives = std::is_same_v; + tabular_evaluate(j_Co56_Fe56_meta, j_Co56_Fe56_rhoy, j_Co56_Fe56_temp, j_Co56_Fe56_data, + log_rhoy, rhoy, log_temp, temp, table_values); + + rate_eval.screened_rates(k_Co56_to_Fe56_electron_capture_weaktab) = table_values.rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co56_to_Fe56_electron_capture_weaktab) = table_values.drate_dT; + + // accumulate ∂/∂Y_e contributions to Co56 and Fe56 + // this is the derivative of ∂Y(Co56)/∂t = -Y(Co56) λ and + // ∂Y(Fe56)/∂t = +Y(Co56) λ + rate_eval.dweak_ydot_dYe(Co56) -= rho * Y(Co56) * table_values.drate_drhoye; + rate_eval.dweak_ydot_dYe(Fe56) += rho * Y(Co56) * table_values.drate_drhoye; + + // also accumulate the derivatives of ε_{ν,weak} with respect to T and Y + rate_eval.denuc_weak_dY(Co56) += C::n_A * (table_values.enu + table_values.gamma); + rate_eval.denuc_weak_dT += C::n_A * Y(Co56) * table_values.denu_dT; + // finally the derivatives of ε_{ν,weak} with respect to Ye + rate_eval.denuc_weak_dYe += C::n_A * rho * Y(Co56) * table_values.denu_drhoye; + } + + rate_eval.enuc_weak += C::n_A * Y(Co56) * (table_values.enu + table_values.gamma); + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Co56_to_Ni56_beta_neg_weaktab(T& rate_eval, const amrex::Real temp, const amrex::Real log_temp, const amrex::Real rho, const amrex::Real rhoy, const amrex::Real log_rhoy, const amrex::Array1D& Y) { + + // Co56 --> Ni56 + + weak_rate_t table_values{}; + constexpr int do_T_derivatives = std::is_same_v; + tabular_evaluate(j_Co56_Ni56_meta, j_Co56_Ni56_rhoy, j_Co56_Ni56_temp, j_Co56_Ni56_data, + log_rhoy, rhoy, log_temp, temp, table_values); + + rate_eval.screened_rates(k_Co56_to_Ni56_beta_neg_weaktab) = table_values.rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Co56_to_Ni56_beta_neg_weaktab) = table_values.drate_dT; + + // accumulate ∂/∂Y_e contributions to Co56 and Ni56 + // this is the derivative of ∂Y(Co56)/∂t = -Y(Co56) λ and + // ∂Y(Ni56)/∂t = +Y(Co56) λ + rate_eval.dweak_ydot_dYe(Co56) -= rho * Y(Co56) * table_values.drate_drhoye; + rate_eval.dweak_ydot_dYe(Ni56) += rho * Y(Co56) * table_values.drate_drhoye; + + // also accumulate the derivatives of ε_{ν,weak} with respect to T and Y + rate_eval.denuc_weak_dY(Co56) += C::n_A * (table_values.enu + table_values.gamma); + rate_eval.denuc_weak_dT += C::n_A * Y(Co56) * table_values.denu_dT; + // finally the derivatives of ε_{ν,weak} with respect to Ye + rate_eval.denuc_weak_dYe += C::n_A * rho * Y(Co56) * table_values.denu_drhoye; + } + + rate_eval.enuc_weak += C::n_A * Y(Co56) * (table_values.enu + table_values.gamma); + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Fe56_to_Co56_beta_neg_weaktab(T& rate_eval, const amrex::Real temp, const amrex::Real log_temp, const amrex::Real rho, const amrex::Real rhoy, const amrex::Real log_rhoy, const amrex::Array1D& Y) { + + // Fe56 --> Co56 + + weak_rate_t table_values{}; + constexpr int do_T_derivatives = std::is_same_v; + tabular_evaluate(j_Fe56_Co56_meta, j_Fe56_Co56_rhoy, j_Fe56_Co56_temp, j_Fe56_Co56_data, + log_rhoy, rhoy, log_temp, temp, table_values); + + rate_eval.screened_rates(k_Fe56_to_Co56_beta_neg_weaktab) = table_values.rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Fe56_to_Co56_beta_neg_weaktab) = table_values.drate_dT; + + // accumulate ∂/∂Y_e contributions to Fe56 and Co56 + // this is the derivative of ∂Y(Fe56)/∂t = -Y(Fe56) λ and + // ∂Y(Co56)/∂t = +Y(Fe56) λ + rate_eval.dweak_ydot_dYe(Fe56) -= rho * Y(Fe56) * table_values.drate_drhoye; + rate_eval.dweak_ydot_dYe(Co56) += rho * Y(Fe56) * table_values.drate_drhoye; + + // also accumulate the derivatives of ε_{ν,weak} with respect to T and Y + rate_eval.denuc_weak_dY(Fe56) += C::n_A * (table_values.enu + table_values.gamma); + rate_eval.denuc_weak_dT += C::n_A * Y(Fe56) * table_values.denu_dT; + // finally the derivatives of ε_{ν,weak} with respect to Ye + rate_eval.denuc_weak_dYe += C::n_A * rho * Y(Fe56) * table_values.denu_drhoye; + } + + rate_eval.enuc_weak += C::n_A * Y(Fe56) * (table_values.enu + table_values.gamma); + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_Ni56_to_Co56_electron_capture_weaktab(T& rate_eval, const amrex::Real temp, const amrex::Real log_temp, const amrex::Real rho, const amrex::Real rhoy, const amrex::Real log_rhoy, const amrex::Array1D& Y) { + + // Ni56 --> Co56 + + weak_rate_t table_values{}; + constexpr int do_T_derivatives = std::is_same_v; + tabular_evaluate(j_Ni56_Co56_meta, j_Ni56_Co56_rhoy, j_Ni56_Co56_temp, j_Ni56_Co56_data, + log_rhoy, rhoy, log_temp, temp, table_values); + + rate_eval.screened_rates(k_Ni56_to_Co56_electron_capture_weaktab) = table_values.rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_Ni56_to_Co56_electron_capture_weaktab) = table_values.drate_dT; + + // accumulate ∂/∂Y_e contributions to Ni56 and Co56 + // this is the derivative of ∂Y(Ni56)/∂t = -Y(Ni56) λ and + // ∂Y(Co56)/∂t = +Y(Ni56) λ + rate_eval.dweak_ydot_dYe(Ni56) -= rho * Y(Ni56) * table_values.drate_drhoye; + rate_eval.dweak_ydot_dYe(Co56) += rho * Y(Ni56) * table_values.drate_drhoye; + + // also accumulate the derivatives of ε_{ν,weak} with respect to T and Y + rate_eval.denuc_weak_dY(Ni56) += C::n_A * (table_values.enu + table_values.gamma); + rate_eval.denuc_weak_dT += C::n_A * Y(Ni56) * table_values.denu_dT; + // finally the derivatives of ε_{ν,weak} with respect to Ye + rate_eval.denuc_weak_dYe += C::n_A * rho * Y(Ni56) * table_values.denu_drhoye; + } + + rate_eval.enuc_weak += C::n_A * Y(Ni56) * (table_values.enu + table_values.gamma); + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_n_to_p_beta_neg_weaktab(T& rate_eval, const amrex::Real temp, const amrex::Real log_temp, const amrex::Real rho, const amrex::Real rhoy, const amrex::Real log_rhoy, const amrex::Array1D& Y) { + + // n --> p + + weak_rate_t table_values{}; + constexpr int do_T_derivatives = std::is_same_v; + tabular_evaluate(j_n_p_meta, j_n_p_rhoy, j_n_p_temp, j_n_p_data, + log_rhoy, rhoy, log_temp, temp, table_values); + + rate_eval.screened_rates(k_n_to_p_beta_neg_weaktab) = table_values.rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_n_to_p_beta_neg_weaktab) = table_values.drate_dT; + + // accumulate ∂/∂Y_e contributions to n and p + // this is the derivative of ∂Y(n)/∂t = -Y(n) λ and + // ∂Y(p)/∂t = +Y(n) λ + rate_eval.dweak_ydot_dYe(N) -= rho * Y(N) * table_values.drate_drhoye; + rate_eval.dweak_ydot_dYe(H1) += rho * Y(N) * table_values.drate_drhoye; + + // also accumulate the derivatives of ε_{ν,weak} with respect to T and Y + rate_eval.denuc_weak_dY(N) += C::n_A * (table_values.enu + table_values.gamma); + rate_eval.denuc_weak_dT += C::n_A * Y(N) * table_values.denu_dT; + // finally the derivatives of ε_{ν,weak} with respect to Ye + rate_eval.denuc_weak_dYe += C::n_A * rho * Y(N) * table_values.denu_drhoye; + } + + rate_eval.enuc_weak += C::n_A * Y(N) * (table_values.enu + table_values.gamma); + } + + template + AMREX_GPU_DEVICE AMREX_INLINE + void rate_p_to_n_electron_capture_weaktab(T& rate_eval, const amrex::Real temp, const amrex::Real log_temp, const amrex::Real rho, const amrex::Real rhoy, const amrex::Real log_rhoy, const amrex::Array1D& Y) { + + // p --> n + + weak_rate_t table_values{}; + constexpr int do_T_derivatives = std::is_same_v; + tabular_evaluate(j_p_n_meta, j_p_n_rhoy, j_p_n_temp, j_p_n_data, + log_rhoy, rhoy, log_temp, temp, table_values); + + rate_eval.screened_rates(k_p_to_n_electron_capture_weaktab) = table_values.rate; + if constexpr (std::is_same_v) { + rate_eval.dscreened_rates_dT(k_p_to_n_electron_capture_weaktab) = table_values.drate_dT; + + // accumulate ∂/∂Y_e contributions to p and n + // this is the derivative of ∂Y(p)/∂t = -Y(p) λ and + // ∂Y(n)/∂t = +Y(p) λ + rate_eval.dweak_ydot_dYe(H1) -= rho * Y(H1) * table_values.drate_drhoye; + rate_eval.dweak_ydot_dYe(N) += rho * Y(H1) * table_values.drate_drhoye; + + // also accumulate the derivatives of ε_{ν,weak} with respect to T and Y + rate_eval.denuc_weak_dY(H1) += C::n_A * (table_values.enu + table_values.gamma); + rate_eval.denuc_weak_dT += C::n_A * Y(H1) * table_values.denu_dT; + // finally the derivatives of ε_{ν,weak} with respect to Ye + rate_eval.denuc_weak_dYe += C::n_A * rho * Y(H1) * table_values.denu_drhoye; + } + + rate_eval.enuc_weak += C::n_A * Y(H1) * (table_values.enu + table_values.gamma); + } + + +} +#endif diff --git a/networks/massive-star-medium/temperature_table_rates.H b/networks/massive-star-medium/temperature_table_rates.H new file mode 100644 index 0000000000..25d918718e --- /dev/null +++ b/networks/massive-star-medium/temperature_table_rates.H @@ -0,0 +1,19 @@ +#ifndef TEMPERATURE_TABLE_RATES_H +#define TEMPERATURE_TABLE_RATES_H + +#include + +#include +#include +#include + +using namespace amrex::literals; + + +namespace temp_tabular { + + using namespace Rates; + + +} +#endif diff --git a/networks/massive-star-medium/tfactors.H b/networks/massive-star-medium/tfactors.H new file mode 100644 index 0000000000..f363363a33 --- /dev/null +++ b/networks/massive-star-medium/tfactors.H @@ -0,0 +1,34 @@ +#ifndef TFACTORS_H +#define TFACTORS_H + +struct tf_t { + amrex::Real T9; + amrex::Real T9i; + amrex::Real T943i; + amrex::Real T923i; + amrex::Real T913i; + amrex::Real T913; + amrex::Real T923; + amrex::Real T953; + amrex::Real lnT9; +}; + +AMREX_GPU_HOST_DEVICE AMREX_INLINE +tf_t evaluate_tfactors(const amrex::Real T) +{ + + tf_t tf; + tf.T9 = T * 1.e-9_rt; + tf.T9i = 1.0_rt / tf.T9; + tf.T913 = std::cbrt(tf.T9); + tf.T913i = 1.0_rt / tf.T913; + tf.T923i = tf.T913i * tf.T913i; + tf.T943i = tf.T9i * tf.T913i; + tf.T923 = tf.T913 * tf.T913; + tf.T953 = tf.T9 * tf.T923; + tf.lnT9 = std::log(tf.T9); + + return tf; +} + +#endif