Template Class AdaptiveIntegrator

Inheritance Relationships

Base Type

Derived Types

Class Documentation

template<system_state S>
class AdaptiveIntegrator : public diffeq::core::AbstractIntegrator<S>

Subclassed by diffeq::BDFIntegrator< S >, diffeq::DOP853Integrator< S >, diffeq::LSODAIntegrator< S >, diffeq::RK23Integrator< S >, diffeq::RK45Integrator< S >, diffeq::SimpleBDF1Integrator< S >

Public Types

using base_type = 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 Functions

inline explicit AdaptiveIntegrator(system_function sys, time_type rtol = static_cast<time_type>(1e-6), time_type atol = static_cast<time_type>(1e-9))
inline virtual void integrate(state_type &state, time_type dt, time_type end_time) override
virtual time_type adaptive_step(state_type &state, time_type dt) = 0
inline void set_tolerances(time_type rtol, time_type atol)
inline void set_step_limits(time_type dt_min, time_type dt_max)

Protected Functions

inline time_type calculate_tolerance(value_type y_val) const
inline time_type error_norm(const state_type &error, const state_type &y) const
inline time_type error_norm_scipy_style(const state_type &error, const state_type &y_old, const state_type &y_new) const
inline time_type suggest_step_size(time_type current_dt, time_type error_norm, int order) const

Protected Attributes

time_type rtol_
time_type atol_
time_type dt_min_
time_type dt_max_
time_type safety_factor_