DaeSolver.hpp
30 using DaeFunction = std::function<int(double t, VectorConstRef u, VectorConstRef udot, VectorRef F)>;
33 using DaeJacobian = std::function<int(double t, VectorConstRef u, VectorConstRef udot, MatrixRef J)>;
auto integrate(double &t, VectorRef y) -> void
Integrate the ODE performing a single step.
Definition: DaeSolver.cpp:186
auto numEquations() const -> unsigned
Return the number of ordinary differential equations.
Definition: DaeSolver.cpp:129
Eigen::Ref< Eigen::MatrixXd > MatrixRef
Alias to Eigen type Ref<MatrixXd>.
Definition: Matrix.hpp:43
auto jacobian() const -> const DaeJacobian &
Return the Jacobian of the right-hand side function of the system of ordinary differential equations.
Definition: DaeSolver.cpp:139
A class that defines a system of differential-algebraic equations (DAE) problem.
Definition: DaeSolver.hpp:44
virtual ~DaeSolver()
Destroy this DaeSolver instance.
Definition: DaeSolver.cpp:162
std::function< int(double t, VectorConstRef u, VectorConstRef udot, MatrixRef J)> DaeJacobian
The function signature of the Jacobian of the right-hand side function of a system of ordinary differ...
Definition: DaeSolver.hpp:33
auto setFunction(const DaeFunction &f) -> void
Set the right-hand side function of the system of ordinary differential equations.
Definition: DaeSolver.cpp:114
A class for solving differential-algebraic equations (DAE).
Definition: DaeSolver.hpp:104
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
auto setProblem(const DaeProblem &problem) -> void
Set the ODE problem.
Definition: DaeSolver.cpp:176
virtual ~DaeProblem()
Destroy this DaeProblem instance.
Definition: DaeSolver.cpp:100
auto setJacobian(const DaeJacobian &J) -> void
Set the Jacobian of the right-hand side function of the system of ordinary differential equations.
Definition: DaeSolver.cpp:119
DaeSolver()
Construct a default DaeSolver instance.
Definition: DaeSolver.cpp:154
auto setOptions(const DaeOptions &options) -> void
Set the options for the ODE solver.
Definition: DaeSolver.cpp:171
std::function< int(double t, VectorConstRef u, VectorConstRef udot, VectorRef F)> DaeFunction
The function signature of the right-hand side function of a system of ordinary differential equations...
Definition: DaeSolver.hpp:30
DaeProblem()
Construct a default DaeProblem instance.
Definition: DaeSolver.cpp:92
auto operator=(DaeSolver other) -> DaeSolver &
Assign a DaeSolver instance to this instance.
Definition: DaeSolver.cpp:165
auto solve(double &t, double dt, VectorRef y) -> void
Solve the ODE equations from a given start time to a final one.
Definition: DaeSolver.cpp:196
auto initialize(double tstart, VectorConstRef y) -> void
Initializes the ODE solver.
Definition: DaeSolver.cpp:181
A struct that defines the options for the DaeSolver.
Definition: DaeSolver.hpp:38
Eigen::Ref< Eigen::VectorXd > VectorRef
< Alias to Eigen type VectorXd.
Definition: Matrix.hpp:29
auto setNumEquations(unsigned num) -> void
Set the number of ordinary differential equations.
Definition: DaeSolver.cpp:109
auto operator=(DaeProblem other) -> DaeProblem &
Assign a DaeProblem instance to this instance.
Definition: DaeSolver.cpp:103
Eigen::Ref< const Eigen::VectorXd > VectorConstRef
< Alias to Eigen type Ref<VectorXd>.
Definition: Matrix.hpp:31
auto initialized() const -> bool
Return true if the problem has bee initialized.
Definition: DaeSolver.cpp:124