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

Sundials implementation called CVODE. More...

#include <Cvode.h>

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

Classes

struct  Impl
 

Public Member Functions

 Cvode (Network &net)
 Constructor. More...
 
 ~Cvode ()
 Destructor.
 
Eigen::MatrixXd runIntegrationByTime (Eigen::VectorXd y, double t, double dt, Eigen::VectorXd &rFlux, Eigen::VectorXd &rForwardFlux, Eigen::VectorXd &rBackwardFlux, const double tMax, const unsigned int batchInterval, const double convergenceConcentrationChange)
 Run the numerical integration until a maximum time or convergence is reached. More...
 
Eigen::MatrixXd runIntegration (Eigen::VectorXd y, double t, double dt, Eigen::VectorXd &rFlux, Eigen::VectorXd &rForwardFlux, Eigen::VectorXd &rBackwardFlux, const unsigned int batchInterval, const unsigned int nBatches, const double convergenceConcentrationChange)
 Run the numerical integration until a maximum number of steps or convergence is reached. 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...
 

Detailed Description

Sundials implementation called CVODE.

Constructor & Destructor Documentation

Scine::Kinetx::Cvode::Cvode ( Network net)

Constructor.

Parameters
netThe network of reactions.

Member Function Documentation

void Scine::Kinetx::Cvode::propagate ( Eigen::VectorXd &  concentrations,
Eigen::VectorXd &  yFlux,
Eigen::VectorXd &  rFlux,
Eigen::VectorXd &  rForwardFlux,
Eigen::VectorXd &  rBackwardFlux,
double &  t,
double &  dt 
) const
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.

Implements Scine::Kinetx::Integrator.

Eigen::MatrixXd Scine::Kinetx::Cvode::runIntegration ( Eigen::VectorXd  y,
double  tStart,
double  dt,
Eigen::VectorXd &  rFlux,
Eigen::VectorXd &  rForwardFlux,
Eigen::VectorXd &  rBackwardFlux,
const unsigned int  batchInterval,
const unsigned int  nBatches,
const double  convergenceConcentrationChange 
)
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.

Implements Scine::Kinetx::Integrator.

Eigen::MatrixXd Scine::Kinetx::Cvode::runIntegrationByTime ( Eigen::VectorXd  y,
double  tStart,
double  dt,
Eigen::VectorXd &  rFlux,
Eigen::VectorXd &  rForwardFlux,
Eigen::VectorXd &  rBackwardFlux,
const double  tMax,
const unsigned int  batchInterval,
const double  convergenceConcentrationChange 
)
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.

Implements Scine::Kinetx::Integrator.


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