8#include "fourdst/logging/logging.h"
9#include "fourdst/config/config.h"
11#include "quill/Logger.h"
26 template <
typename EngineT>
71 using DynamicNetworkSolverStrategy::DynamicNetworkSolverStrategy;
99 quill::Logger*
m_logger = LogManager::getInstance().newFileLogger(
"integration.log",
"GridFire");
126 const boost::numeric::ublas::vector<double>& Y,
127 boost::numeric::ublas::vector<double>& dYdt,
131 void observe(
const boost::numeric::ublas::vector<double>& state,
double t)
const;
132 void compute_and_cache(
const boost::numeric::ublas::vector<double>& state,
double t)
const;
171 const boost::numeric::ublas::vector<double>& Y,
172 boost::numeric::ublas::matrix<double>& J,
174 boost::numeric::ublas::vector<double>& dfdt
180 quill::Logger*
m_logger = LogManager::getInstance().getLogger(
"log");
Abstract class for engines supporting Jacobian and stoichiometry operations.
A network solver that directly integrates the reaction network ODEs.
quill::Logger * m_logger
Logger instance.
NetOut evaluate(const NetIn &netIn) override
Evaluates the network for a given timestep using direct integration.
Config & m_config
Configuration instance.
Abstract base class for network solver strategies.
NetworkSolverStrategy(EngineT &engine)
Constructor for the NetworkSolverStrategy.
virtual ~NetworkSolverStrategy()=default
Virtual destructor.
virtual NetOut evaluate(const NetIn &netIn)=0
Evaluates the network for a given timestep.
Abstract interfaces for reaction network engines in GridFire.
NetworkSolverStrategy< DynamicEngine > DynamicNetworkSolverStrategy
Type alias for a network solver strategy that uses a DynamicEngine.
DynamicEngine & m_engine
The engine used to evaluate the network.
const double m_T9
Temperature in units of 10^9 K.
const double m_rho
Density in g/cm^3.
void operator()(const boost::numeric::ublas::vector< double > &Y, boost::numeric::ublas::matrix< double > &J, double t, boost::numeric::ublas::vector< double > &dfdt) const
Calculates the Jacobian matrix.
JacobianFunctor(DynamicEngine &engine, const double T9, const double rho)
Constructor for the JacobianFunctor.
DynamicEngine & m_engine
The engine used to evaluate the network.
void observe(const boost::numeric::ublas::vector< double > &state, double t) const
const double m_T9
Temperature in units of 10^9 K.
double m_last_observed_time
Last time the state was observed.
void compute_and_cache(const boost::numeric::ublas::vector< double > &state, double t) const
quill::Logger * m_logger
Logger instance.
const double m_rho
Density in g/cm^3.
std::optional< StepDerivatives< double > > m_cached_result
void operator()(const boost::numeric::ublas::vector< double > &Y, boost::numeric::ublas::vector< double > &dYdt, double t) const
Calculates the time derivatives of the species abundances.
RHSManager(DynamicEngine &engine, const double T9, const double rho)
Constructor for the RHSFunctor.