Reaktoro
A unified framework for modeling chemically reactive systems
ODESolver Class Reference

A wrapper class for CVODE, a library for solving ordinary differential equations. More...

#include <ODE.hpp>

Public Member Functions

 ODESolver ()
 Construct a default ODESolver instance.
 
 ODESolver (const ODESolver &other)=delete
 Construct a copy of an ODESolver instance.
 
virtual ~ODESolver ()
 Destroy this ODESolver instance.
 
auto operator= (ODESolver other) -> ODESolver &
 Assign a ODESolver instance to this instance.
 
auto setOptions (const ODEOptions &options) -> void
 Set the options for the ODE solver. More...
 
auto setProblem (const ODEProblem &problem) -> void
 Set the ODE problem. More...
 
auto initialize (double tstart, VectorConstRef y) -> void
 Initializes the ODE solver. More...
 
auto integrate (double &t, VectorRef y) -> void
 Integrate the ODE performing a single step. More...
 
auto integrate (double &t, VectorRef y, double tfinal) -> void
 Integrate the ODE performing a single step not going over a given time. More...
 
auto solve (double &t, double dt, VectorRef y) -> void
 Solve the ODE equations from a given start time to a final one. More...
 

Detailed Description

A wrapper class for CVODE, a library for solving ordinary differential equations.

See also
ODEProblem, ODEOptions

Member Function Documentation

◆ setOptions()

auto setOptions ( const ODEOptions options) -> void

Set the options for the ODE solver.

See also
ODEOptions

◆ setProblem()

auto setProblem ( const ODEProblem problem) -> void

Set the ODE problem.

See also
ODEProblem

◆ initialize()

auto initialize ( double  tstart,
VectorConstRef  y 
) -> void

Initializes the ODE solver.

This method should be invoked whenever the user intends to make a call to ODESolver::integrate.

Parameters
tstartThe start time of the integration.
yThe initial values of the variables

◆ integrate() [1/2]

auto integrate ( double &  t,
VectorRef  y 
) -> void

Integrate the ODE performing a single step.

Parameters
[in,out]tThe current time of the integration as input, the new current time as output
[in,out]yThe current variables as input, the new current variables as output

◆ integrate() [2/2]

auto integrate ( double &  t,
VectorRef  y,
double  tfinal 
) -> void

Integrate the ODE performing a single step not going over a given time.

Parameters
[in,out]tThe current time of the integration as input, the new current time as output
[in,out]yThe current variables as input, the new current variables as output
tfinalThe final time that the integration must satisfy

◆ solve()

auto solve ( double &  t,
double  dt,
VectorRef  y 
) -> void

Solve the ODE equations from a given start time to a final one.

Parameters
[in,out]tThe current time of the integration as input, the new current time as output
dtThe value of the time step
[in,out]yThe current variables as input, the new current variables as output

The documentation for this class was generated from the following files:
  • Reaktoro/Math/ODE.hpp
  • Reaktoro/Math/ODE.cpp