25#include <boost/numeric/odeint.hpp>
57 typedef std::array<double,7>
vec7;
64 static constexpr int ih1=0;
65 static constexpr int ihe3=1;
66 static constexpr int ihe4=2;
67 static constexpr int ic12=3;
68 static constexpr int in14=4;
69 static constexpr int io16=5;
80 static constexpr std::array<int,nIso>
aIon = {
91 static constexpr std::array<double,nIso>
mIon = {
Network(const NetworkFormat format=NetworkFormat::APPROX8)
static vector_type convert_netIn(const NetIn &netIn)
Converts the input parameters to the internal state vector.
NetOut evaluate(const NetIn &netIn) override
Evaluates the nuclear network.
void setStiff(bool stiff) override
Sets whether the solver should use a stiff method.
bool isStiff() const override
Checks if the solver is using a stiff method.
double ne20a_rate(const vec7 &T9)
Calculates the rate for the reaction ne20(a,g)mg24.
double n14p_rate(const vec7 &T9)
Calculates the rate for the reaction n14(p,g)o15 - o15 + p -> c12 + he4.
double dp_rate(const vec7 &T9)
Calculates the rate for the reaction p + d -> he3.
double rate_fit(const vec7 &T9, const vec7 &coef)
double pp_rate(const vec7 &T9)
Calculates the rate for the reaction p + p -> d.
double o16a_rate(const vec7 &T9)
Calculates the rate for the reaction o16(a,g)ne20.
double o16p_rate(const vec7 &T9)
Calculates the rate for the reaction o16(p,g)f17 then f17 -> o17(p,a)n14.
double n15pg_rate(const vec7 &T9)
Calculates the rate for the reaction n15(p,g)o16 (CNO II).
double he3he4_rate(const vec7 &T9)
Calculates the rate for the reaction he3(he3,2p)he4.
double c12c12_rate(const vec7 &T9)
Calculates the rate for the reaction c12(c12,a)ne20.
boost::numeric::ublas::matrix< double > matrix_type
Alias for a matrix of doubles using Boost uBLAS.
double c12o16_rate(const vec7 &T9)
Calculates the rate for the reaction c12(o16,a)mg24.
boost::numeric::ublas::vector< double > vector_type
Alias for a vector of doubles using Boost uBLAS.
double n15pa_rate(const vec7 &T9)
Calculates the rate for the reaction n15(p,a)c12 (CNO I).
double c12a_rate(const vec7 &T9)
Calculates the rate for the reaction c12 + he4 -> o16.
vec7 get_T9_array(const double &T)
double sum_product(const vec7 &a, const vec7 &b)
double triple_alpha_rate(const vec7 &T9)
Calculates the rate for the reaction he4 + he4 + he4 -> c12.
double n14a_rate(const vec7 &T9)
Calculates the rate for the reaction n14(a,g)f18 assumed to go on to ne20.
double he3he3_rate(const vec7 &T9)
Calculates the rate for the reaction he3 + he3 -> he4 + 2p.
double c12p_rate(const vec7 &T9)
Calculates the rate for the reaction c12 + p -> n13.
double n15pg_frac(const vec7 &T9)
Calculates the fraction for the reaction n15(p,g)o16.
std::array< double, 7 > vec7
Alias for a std::array of 7 doubles.
Input structure for the network evaluation.
Output structure for the network evaluation.
Contains constants and arrays related to the nuclear network.
static constexpr int ic12
static constexpr int iTemp
static constexpr int ihe4
static constexpr int io16
static constexpr int nIso
static constexpr std::array< int, nIso > aIon
static constexpr int img24
static constexpr std::array< double, nIso > mIon
static constexpr int iEnergy
static constexpr int ihe3
static constexpr int iDensity
static constexpr int in14
static constexpr int ine20
static constexpr int nVar
Functor to calculate the Jacobian matrix for implicit solvers.
void operator()(const vector_type &y, matrix_type &J, double, vector_type &dfdt) const
Calculates the Jacobian matrix.
Functor to calculate the derivatives for the ODE solver.
void operator()(const vector_type &y, vector_type &dydt, double) const
Calculates the derivatives of the state vector.