ODE.hpp
Eigen::Ref< Eigen::MatrixXd > MatrixRef
Alias to Eigen type Ref<MatrixXd>.
Definition: Matrix.hpp:43
auto initialize(double tstart, VectorConstRef y) -> void
Initializes the ODE solver.
Definition: ODE.cpp:404
std::function< int(double, VectorConstRef, VectorRef)> ODEFunction
The function signature of the right-hand side function of a system of ordinary differential equations...
Definition: ODE.hpp:30
ODEStepMode
The linear multistep method to be used in ODESolver.
Definition: ODE.hpp:36
unsigned max_num_steps
The maximum allowed number of steps before reaching the final time.
Definition: ODE.hpp:87
unsigned max_hnil_warnings
The maximum number of warnings for t + h = t, with h being too small compared to t.
Definition: ODE.hpp:90
auto setNumEquations(unsigned num) -> void
Set the number of ordinary differential equations.
Definition: ODE.cpp:336
unsigned max_num_nonlinear_iterations
The maximum number of nonlinear iterations.
Definition: ODE.hpp:96
unsigned max_order_bdf
The maximum order for the BDF integration scheme.
Definition: ODE.hpp:80
ODEProblem()
Construct a default ODEProblem instance.
Definition: ODE.cpp:319
A class that defines a system of ordinary differential equations (ODE) problem.
Definition: ODE.hpp:111
auto operator=(ODEProblem other) -> ODEProblem &
Assign a ODEProblem instance to this instance.
Definition: ODE.cpp:330
auto setFunction(const ODEFunction &f) -> void
Set the right-hand side function of the system of ordinary differential equations.
Definition: ODE.cpp:341
auto setProblem(const ODEProblem &problem) -> void
Set the ODE problem.
Definition: ODE.cpp:399
A wrapper class for CVODE, a library for solving ordinary differential equations.
Definition: ODE.hpp:169
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
auto solve(double &t, double dt, VectorRef y) -> void
Solve the ODE equations from a given start time to a final one.
Definition: ODE.cpp:419
auto integrate(double &t, VectorRef y) -> void
Integrate the ODE performing a single step.
Definition: ODE.cpp:409
std::function< int(double, VectorConstRef, MatrixRef)> ODEJacobian
The function signature of the Jacobian of the right-hand side function of a system of ordinary differ...
Definition: ODE.hpp:33
double stop_time
The value of the independent variable t past which the solution is not to proceed.
Definition: ODE.hpp:64
auto jacobian() const -> const ODEJacobian &
Return the Jacobian of the right-hand side function of the system of ordinary differential equations.
Definition: ODE.cpp:366
auto initialized() const -> bool
Return true if the problem has bee initialized.
Definition: ODE.cpp:351
unsigned max_order_adams
The maximum order for the Adams integration scheme.
Definition: ODE.hpp:84
double min_step
The lower bound on the magnitude of the step size.
Definition: ODE.hpp:67
virtual ~ODESolver()
Destroy this ODESolver instance.
Definition: ODE.cpp:385
ODESolver()
Construct a default ODESolver instance.
Definition: ODE.cpp:381
ODEIterationMode iteration
The type of nonlinear solver iteration used in the integration.
Definition: ODE.hpp:49
auto numEquations() const -> unsigned
Return the number of ordinary differential equations.
Definition: ODE.cpp:356
unsigned max_num_convergence_failures
The maximum number of convergence failures.
Definition: ODE.hpp:99
Vector abstols
The vector of absolute error tolerances for each component.
Definition: ODE.hpp:105
auto operator=(ODESolver other) -> ODESolver &
Assign a ODESolver instance to this instance.
Definition: ODE.cpp:388
bool stability_limit_detection
The flag that enables the STAbility Limit Detection (STALD) algorithm.
Definition: ODE.hpp:56
ODEStepMode step
The linear multistep method used in the integration.
Definition: ODE.hpp:46
double initial_step
The initial step size to be used in the integration.
Definition: ODE.hpp:60
virtual ~ODEProblem()
Destroy this ODEProblem instance.
Definition: ODE.cpp:327
unsigned max_num_error_test_failures
The maximum number of error test failures.
Definition: ODE.hpp:93
ODESolver(const ODESolver &other)=delete
Construct a copy of an ODESolver instance.
ODEIterationMode
The type of nonlinear solver iteration to be used in ODESolver.
Definition: ODE.hpp:39
double nonlinear_convergence_coefficient
The coefficient in the nonlinear convergence test.
Definition: ODE.hpp:102
Eigen::Ref< Eigen::VectorXd > VectorRef
< Alias to Eigen type VectorXd.
Definition: Matrix.hpp:29
auto setOptions(const ODEOptions &options) -> void
Set the options for the ODE solver.
Definition: ODE.cpp:394
auto setJacobian(const ODEJacobian &J) -> void
Set the Jacobian of the right-hand side function of the system of ordinary differential equations.
Definition: ODE.cpp:346
Eigen::Ref< const Eigen::VectorXd > VectorConstRef
< Alias to Eigen type Ref<VectorXd>.
Definition: Matrix.hpp:31
double max_step
The upper bound on the magnitude of the step size.
Definition: ODE.hpp:70