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

A class that defines a system of ordinary differential equations (ODE) problem. More...

#include <ODE.hpp>

Public Member Functions

 ODEProblem ()
 Construct a default ODEProblem instance.
 
 ODEProblem (const ODEProblem &other)
 Construct a copy of an ODEProblem instance.
 
virtual ~ODEProblem ()
 Destroy this ODEProblem instance.
 
auto operator= (ODEProblem other) -> ODEProblem &
 Assign a ODEProblem instance to this instance.
 
auto setNumEquations (unsigned num) -> void
 Set the number of ordinary differential equations.
 
auto setFunction (const ODEFunction &f) -> void
 Set the right-hand side function of the system of ordinary differential equations.
 
auto setJacobian (const ODEJacobian &J) -> void
 Set the Jacobian of the right-hand side function of the system of ordinary differential equations.
 
auto initialized () const -> bool
 Return true if the problem has bee initialized.
 
auto numEquations () const -> unsigned
 Return the number of ordinary differential equations.
 
auto function () const -> const ODEFunction &
 Return the right-hand side function of the system of ordinary differential equations.
 
auto jacobian () const -> const ODEJacobian &
 Return the Jacobian of the right-hand side function of the system of ordinary differential equations.
 
auto function (double t, VectorConstRef y, VectorRef f) const -> int
 Evaluate the right-hand side function of the system of ordinary differential equations. More...
 
auto jacobian (double t, VectorConstRef y, MatrixRef J) const -> int
 Evaluate the Jacobian of the right-hand side function of the system of ordinary differential equations. More...
 

Detailed Description

A class that defines a system of ordinary differential equations (ODE) problem.

See also
ODESolver, ODEOptions

Member Function Documentation

◆ function()

auto function ( double  t,
VectorConstRef  y,
VectorRef  f 
) const -> int

Evaluate the right-hand side function of the system of ordinary differential equations.

Parameters
tThe time variable of the function
yThe y-variables of the function
[out]fThe result of the function evaluation.
Returns
Return 0 if successful, any other number otherwise.

◆ jacobian()

auto jacobian ( double  t,
VectorConstRef  y,
MatrixRef  J 
) const -> int

Evaluate the Jacobian of the right-hand side function of the system of ordinary differential equations.

Parameters
tThe time variable of the function
yThe y-variables of the function
[out]JThe result of the Jacobian evaluation.
Returns
Return 0 if successful, any other number otherwise.

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