DiffEq - Modern C++ ODE Integration Library 1.0.0
High-performance C++ library for solving ODEs with async signal processing
|
Classical 4th-order Runge-Kutta integrator. More...
#include <rk4.hpp>
Public Types | |
using | base_type = core::AbstractIntegrator< S > |
using | state_type = typename base_type::state_type |
using | time_type = typename base_type::time_type |
using | value_type = typename base_type::value_type |
using | system_function = typename base_type::system_function |
![]() | |
using | state_type = S |
using | time_type = typename S::value_type |
using | value_type = typename S::value_type |
using | system_function = std::function< void(time_type, const state_type &, state_type &)> |
Public Member Functions | |
RK4Integrator (system_function sys) | |
void | step (state_type &state, time_type dt) override |
![]() | |
AbstractIntegrator (system_function sys) | |
virtual void | integrate (state_type &state, time_type dt, time_type end_time) |
time_type | current_time () const |
void | set_time (time_type t) |
void | set_system (system_function sys) |
Additional Inherited Members | |
![]() | |
void | advance_time (time_type dt) |
![]() | |
system_function | sys_ |
time_type | current_time_ |
Classical 4th-order Runge-Kutta integrator.
The most famous and widely used fixed-step ODE solver. Excellent balance between accuracy and computational cost.
Order: 4 Stability: Good for non-stiff problems Usage: General-purpose ODE integration
using diffeq::RK4Integrator< S >::base_type = core::AbstractIntegrator<S> |
using diffeq::RK4Integrator< S >::state_type = typename base_type::state_type |
using diffeq::RK4Integrator< S >::system_function = typename base_type::system_function |
using diffeq::RK4Integrator< S >::time_type = typename base_type::time_type |
using diffeq::RK4Integrator< S >::value_type = typename base_type::value_type |
|
inlineexplicit |
|
inlineoverridevirtual |
Implements diffeq::core::AbstractIntegrator< S >.