Reaktoro 
A unified framework for modeling chemically reactive systems
Reaktoro::DaeProblem Class Reference

Detailed Description

A class that defines a system of differential-algebraic equations (DAE) problem.

See also
DaeSolver, DaeOptions

#include <DaeSolver.hpp>

Public Member Functions

 DaeProblem ()
 Construct a default DaeProblem instance.
 
 DaeProblem (const DaeProblem &other)
 Construct a copy of an DaeProblem instance.
 
virtual ~DaeProblem ()
 Destroy this DaeProblem instance.
 
auto operator= (DaeProblem other) -> DaeProblem &
 Assign a DaeProblem instance to this instance.
 
auto setNumEquations (unsigned num) -> void
 Set the number of ordinary differential equations.
 
auto setFunction (const DaeFunction &f) -> void
 Set the right-hand side function of the system of ordinary differential equations.
 
auto setJacobian (const DaeJacobian &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 DaeFunction &
 Return the right-hand side function of the system of ordinary differential equations.
 
auto jacobian () const -> const DaeJacobian &
 Return the Jacobian of the right-hand side function of the system of ordinary differential equations.
 
auto function (double t, const Vector &y, const Vector &ydot, Vector &f) const -> int
 Evaluate the right-hand side function of the system of ordinary differential equations. More...
 
auto jacobian (double t, const Vector &y, const Vector &ydot, Matrix &J) const -> int
 Evaluate the Jacobian of the right-hand side function of the system of ordinary differential equations. More...
 

Member Function Documentation

auto Reaktoro::DaeProblem::function ( double  t,
const Vector y,
const Vector ydot,
Vector f 
) const -> int

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

Parameters
tThe independent progress variable.
yThe values of the y variables.
ydotThe values of the first-order derivatives of the y variables.
[out]fThe result of the function evaluation.
Returns
Return 0 if successful, any other number otherwise.
auto Reaktoro::DaeProblem::jacobian ( double  t,
const Vector y,
const Vector ydot,
Matrix J 
) const -> int

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

Parameters
tThe independent progress variable.
yThe values of the y variables.
ydotThe values of the first-order derivatives of the y variables.
[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: