|
Icarus
Vehicle Simulation as a Transformable Computational Graph, built on Vulcan and Janus
|
Adaptive Dormand-Prince RK4(5) integrator. More...
#include <RK45Integrator.hpp>


Classes | |
| struct | Statistics |
| Statistics for adaptive stepping. More... | |
Public Member Functions | |
| RK45Integrator (Scalar abs_tol=Scalar{1e-6}, Scalar rel_tol=Scalar{1e-6}) | |
| Construct with default tolerances. | |
| JanusVector< Scalar > | Step (const DerivativeFunc &f, const JanusVector< Scalar > &x, Scalar t, Scalar dt) override |
| Fixed-step interface (uses requested dt directly). | |
| AdaptiveStepResult< Scalar > | AdaptiveStep (const DerivativeFunc &f, const JanusVector< Scalar > &x, Scalar t, Scalar dt) override |
| Adaptive step with automatic error control. | |
| void | SetAbsTol (Scalar tol) override |
| Set absolute tolerance. | |
| void | SetRelTol (Scalar tol) override |
| Set relative tolerance. | |
| Scalar | GetAbsTol () const override |
| Get current absolute tolerance. | |
| Scalar | GetRelTol () const override |
| Get current relative tolerance. | |
| std::string | Name () const override |
| Get integrator name for logging. | |
| int | Order () const override |
| Get integrator order (for error analysis). | |
| IntegratorType | Type () const override |
| Get integrator type. | |
| void | SetMinDt (Scalar min_dt) |
| void | SetMaxDt (Scalar max_dt) |
| void | SetSafetyFactor (Scalar factor) |
| Scalar | GetMinDt () const |
| Scalar | GetMaxDt () const |
| Scalar | SuggestDt (Scalar dt, Scalar error, Scalar tol) const |
| Suggest next step size based on error. | |
| const Statistics & | GetStatistics () const |
| void | ResetStatistics () |
| Public Member Functions inherited from icarus::AdaptiveIntegrator< Scalar > | |
| bool | IsAdaptive () const override |
| Check if integrator supports adaptive stepping. | |
| Public Member Functions inherited from icarus::Integrator< Scalar > | |
| virtual | ~Integrator ()=default |
Additional Inherited Members | |
| Public Types inherited from icarus::Integrator< Scalar > | |
| using | DerivativeFunc |
| Derivative function signature. | |
Adaptive Dormand-Prince RK4(5) integrator.
Uses embedded 4th and 5th order solutions to estimate local truncation error. Adjusts step size to maintain error within tolerance.
Features:
| Scalar | Numeric type (double or casadi::MX) |
|
inlineexplicit |
Construct with default tolerances.
| abs_tol | Absolute tolerance (default 1e-6) |
| rel_tol | Relative tolerance (default 1e-6) |
|
inlineoverridevirtual |
Adaptive step with automatic error control.
Performs RK45 steps with automatic step size reduction when error exceeds tolerance. Retries with progressively smaller dt until the step is accepted or dt falls below min_dt.
| f | Derivative function |
| x | Current state |
| t | Current time |
| dt | Requested step size (may be reduced internally) |
| StepSizeTooSmallError | if dt reduces below min_dt without success |
Implements icarus::AdaptiveIntegrator< Scalar >.
|
inlinenodiscardoverridevirtual |
Get current absolute tolerance.
Implements icarus::AdaptiveIntegrator< Scalar >.
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscardoverridevirtual |
Get current relative tolerance.
Implements icarus::AdaptiveIntegrator< Scalar >.
|
inlinenodiscard |
|
inlinenodiscardoverridevirtual |
Get integrator name for logging.
Implements icarus::Integrator< Scalar >.
|
inlinenodiscardoverridevirtual |
Get integrator order (for error analysis).
Implements icarus::Integrator< Scalar >.
|
inline |
|
inlineoverridevirtual |
Set absolute tolerance.
Implements icarus::AdaptiveIntegrator< Scalar >.
|
inline |
|
inline |
|
inlineoverridevirtual |
Set relative tolerance.
Implements icarus::AdaptiveIntegrator< Scalar >.
|
inline |
|
inlineoverridevirtual |
Fixed-step interface (uses requested dt directly).
For compatibility with base Integrator interface. No step adaptation; returns 5th-order solution.
Implements icarus::Integrator< Scalar >.
|
inlinenodiscard |
Suggest next step size based on error.
| dt | Current step size |
| error | Current error estimate |
| tol | Error tolerance |
|
inlinenodiscardoverridevirtual |
Get integrator type.
Implements icarus::Integrator< Scalar >.