Scine::Kinetx  3.0.0
Kinetic models for reaction networks.
 All Classes Files Functions Variables Enumerations Pages
Scine::Kinetx::ImplicitEuler Class Reference

Implicit Euler-type integration algorithm (y_k+1 = dt f(t_k+1, y_k+1)), where f(t_k+1, y_k+1) is the reaction rate and k the integration step. Requires the Jacobian of the reaction system. More...

#include <ImplicitEuler.h>

Inheritance diagram for Scine::Kinetx::ImplicitEuler:
Inheritance graph
Collaboration diagram for Scine::Kinetx::ImplicitEuler:
Collaboration graph

Public Member Functions

 ImplicitEuler (Network &net)
 Constructor. More...
 
void propagateY (Eigen::VectorXd &y, double &t, double &dt) const overridefinal
 Propagate the concentration. More...
 
- Public Member Functions inherited from Scine::Kinetx::RungeKutta
 RungeKutta (Network &net)
 Constructor. More...
 
void propagate (Eigen::VectorXd &concentrations, Eigen::VectorXd &yFlux, Eigen::VectorXd &rFlux, Eigen::VectorXd &rForwardFlux, Eigen::VectorXd &rBackwardFlux, double &t, double &dt) const
 Propagate the numerical integration by one time step. More...
 
- Public Member Functions inherited from Scine::Kinetx::IntegratorBase
 IntegratorBase (Network &net)
 Constructor. More...
 
virtual Eigen::MatrixXd runIntegration (Eigen::VectorXd y, double tStart, double dt, Eigen::VectorXd &rFlux, Eigen::VectorXd &rForwardFlux, Eigen::VectorXd &rBackwardFlux, const unsigned int batchInterval=1000, const unsigned int nBatches=100000, const double convergenceConcentrationChange=1e-10)
 Run the numerical integration until a maximum number of steps or convergence is reached. More...
 
virtual Eigen::MatrixXd runIntegrationByTime (Eigen::VectorXd y, double tStart, double dt, Eigen::VectorXd &rFlux, Eigen::VectorXd &rForwardFlux, Eigen::VectorXd &rBackwardFlux, const double tMax, const unsigned int batchInterval=1000, const double convergenceConcentrationChange=1e-10)
 Run the numerical integration until a maximum time or convergence is reached. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Scine::Kinetx::IntegratorBase
void trackVertexAndEdgeFluxes (const Eigen::VectorXd &y, const Eigen::VectorXd &yInitial, Eigen::VectorXd &yFlux, Eigen::VectorXd &rFlux, Eigen::VectorXd &rForwardFlux, Eigen::VectorXd &rBackwardFlux, const double &dt) const
 Keep track on the vertex and edge fluxes. More...
 
Eigen::VectorXd g (const Eigen::VectorXd &concentrations) const
 Calculate the concentration gradient. More...
 
Eigen::VectorXd gFlux (const Eigen::VectorXd &concentrationsT0, const Eigen::VectorXd &concentrationsT1, Eigen::VectorXd &flux, Eigen::VectorXd &forwardFlux, Eigen::VectorXd &backwardFlux) const
 Calculate the concentration flux gradient. More...
 
Eigen::MatrixXd fFlux (const Eigen::VectorXd &concentrationsT0, const Eigen::VectorXd &concentrationsT1) const
 Calculate the total edge flux gradient. More...
 
std::tuple< Eigen::MatrixXd,
Eigen::MatrixXd,
Eigen::MatrixXd > 
fFluxDirected (const Eigen::VectorXd &concentrationsT0, const Eigen::VectorXd &concentrationsT1) const
 Calculate the edge flux while keeping track on the direction. More...
 
Eigen::MatrixXd f (const Eigen::VectorXd &concentrations) const
 
std::pair< Eigen::MatrixXd,
Eigen::MatrixXd > 
fDirected (const Eigen::VectorXd &concentrations) const
 The same as f(..) but keeping track on the directions. More...
 
Eigen::SparseMatrix< double > jacobi (const Eigen::VectorXd &concentrations) const
 
void printHeader (const Eigen::VectorXd &y, const double dt, const double t)
 
bool printTimeAndCheckConvergenceStep (const Eigen::VectorXd &y, const Eigen::VectorXd &yOld, Eigen::VectorXd &yMax, const unsigned int batchInterval, const unsigned int iBatch, const double dt, const double t, const double convergenceConcentrationChange)
 
- Static Protected Member Functions inherited from Scine::Kinetx::IntegratorBase
static double fast_pow (const double &x, const int &n)
 
- Protected Attributes inherited from Scine::Kinetx::IntegratorBase
Network_net
 

Detailed Description

Implicit Euler-type integration algorithm (y_k+1 = dt f(t_k+1, y_k+1)), where f(t_k+1, y_k+1) is the reaction rate and k the integration step. Requires the Jacobian of the reaction system.

Constructor & Destructor Documentation

Scine::Kinetx::ImplicitEuler::ImplicitEuler ( Network net)

Constructor.

Parameters
netThe network of reactions.

Member Function Documentation

void Scine::Kinetx::ImplicitEuler::propagateY ( Eigen::VectorXd &  concentrations,
double &  t,
double &  dt 
) const
finaloverridevirtual

Propagate the concentration.

Parameters
concentrationsThe concentration.
tThe current time.
dtThe time increment.

Implements Scine::Kinetx::RungeKutta.


The documentation for this class was generated from the following files: