DiffEq - Modern C++ ODE Integration Library 1.0.0
High-performance C++ library for solving ODEs with async signal processing
Loading...
Searching...
No Matches
diffeq::RK4Integrator< S > Class Template Reference

Classical 4th-order Runge-Kutta integrator. More...

#include <rk4.hpp>

Inheritance diagram for diffeq::RK4Integrator< S >:
Collaboration diagram for diffeq::RK4Integrator< S >:

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
 
- Public Types inherited from diffeq::core::AbstractIntegrator< S >
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
 
- Public Member Functions inherited from diffeq::core::AbstractIntegrator< S >
 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

- Protected Member Functions inherited from diffeq::core::AbstractIntegrator< S >
void advance_time (time_type dt)
 
- Protected Attributes inherited from diffeq::core::AbstractIntegrator< S >
system_function sys_
 
time_type current_time_
 

Detailed Description

template<system_state S>
class diffeq::RK4Integrator< S >

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

Definition at line 19 of file rk4.hpp.

Member Typedef Documentation

◆ base_type

template<system_state S>
using diffeq::RK4Integrator< S >::base_type = core::AbstractIntegrator<S>

Definition at line 21 of file rk4.hpp.

◆ state_type

template<system_state S>
using diffeq::RK4Integrator< S >::state_type = typename base_type::state_type

Definition at line 22 of file rk4.hpp.

◆ system_function

template<system_state S>
using diffeq::RK4Integrator< S >::system_function = typename base_type::system_function

Definition at line 25 of file rk4.hpp.

◆ time_type

template<system_state S>
using diffeq::RK4Integrator< S >::time_type = typename base_type::time_type

Definition at line 23 of file rk4.hpp.

◆ value_type

template<system_state S>
using diffeq::RK4Integrator< S >::value_type = typename base_type::value_type

Definition at line 24 of file rk4.hpp.

Constructor & Destructor Documentation

◆ RK4Integrator()

template<system_state S>
diffeq::RK4Integrator< S >::RK4Integrator ( system_function  sys)
inlineexplicit

Definition at line 27 of file rk4.hpp.

Member Function Documentation

◆ step()

template<system_state S>
void diffeq::RK4Integrator< S >::step ( state_type &  state,
time_type  dt 
)
inlineoverridevirtual

Implements diffeq::core::AbstractIntegrator< S >.

Definition at line 30 of file rk4.hpp.


The documentation for this class was generated from the following file: