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

Base class for all Runge-Kutta methods/implementations. More...

#include <Integrator.h>

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

Public Member Functions

virtual void propagate (Eigen::VectorXd &concentrations, Eigen::VectorXd &yFlux, Eigen::VectorXd &rFlux, Eigen::VectorXd &rForwardFlux, Eigen::VectorXd &rBackwardFlux, double &t, double &dt) const =0
 Propagate the numerical integration by one time step. 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)=0
 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)=0
 Run the numerical integration until a maximum time or convergence is reached. More...
 

Detailed Description

Base class for all Runge-Kutta methods/implementations.

Member Function Documentation

virtual void Scine::Kinetx::Integrator::propagate ( Eigen::VectorXd &  concentrations,
Eigen::VectorXd &  yFlux,
Eigen::VectorXd &  rFlux,
Eigen::VectorXd &  rForwardFlux,
Eigen::VectorXd &  rBackwardFlux,
double &  t,
double &  dt 
) const
pure virtual

Propagate the numerical integration by one time step.

Parameters
concentrationsThe current concentrations. Updated inplace.
yFluxThe current vertex (aggregate) flux. Updated inplace.
rFluxThe current total edge (reaction) flux. Updated inplace.
rForwardFluxThe current forward edge flux. Updated inplace.
rBackwardFluxThe current backward edge flux. Updated inplace.
tThe current time. Updated inplace.
dtThe time increment. This may be updated inplace depending on the integration algorithm.

Implemented in Scine::Kinetx::Cvode::Impl, Scine::Kinetx::IntegratorBase, Scine::Kinetx::Cvode, and Scine::Kinetx::RungeKutta.

virtual Eigen::MatrixXd Scine::Kinetx::Integrator::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 
)
pure virtual

Run the numerical integration until a maximum number of steps or convergence is reached.

Parameters
yThe input concentration.
tStartThe start time.
dtThe time increment.
rFluxThe reaction edge flux (total).
rForwardFluxThe forward reaction edge flux.
rBackwardFluxThe backward reaction edge flux.
batchIntervalThe number of steps per batch.
nBatchesThe number of integration batches.
convergenceConcentrationChangeThe concentration convergence threshold.
Returns
The final concentrations, max. concentrations, and vertex fluxes as a matrix with columns in this order.

Implemented in Scine::Kinetx::IntegratorBase, and Scine::Kinetx::Cvode.

virtual Eigen::MatrixXd Scine::Kinetx::Integrator::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 
)
pure virtual

Run the numerical integration until a maximum time or convergence is reached.

Parameters
yThe input concentration.
tStartThe start time.
dtThe time increment.
rFluxThe reaction edge flux (total).
rForwardFluxThe forward reaction edge flux.
rBackwardFluxThe backward reaction edge flux.
tMaxThe final time to integrate to.
batchIntervalThe number of steps per batch.
convergenceConcentrationChangeThe concentration convergence threshold.
Returns
The final concentrations, max. concentrations, and vertex fluxes as a matrix with columns in this order.

Implemented in Scine::Kinetx::IntegratorBase, and Scine::Kinetx::Cvode.


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