Template Class LSODAIntegrator

Inheritance Relationships

Base Type

Class Documentation

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

LSODA integrator - automatically switches between stiff and non-stiff methods.

Automatically switches between non-stiff (Adams, approximated by RK45) and stiff (BDF) methods based on stiffness detection. This is a simplified version inspired by the original LSODA algorithm.

Public Types

enum class MethodType

Values:

enumerator ADAMS
enumerator BDF
using base_type = core::AdaptiveIntegrator<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 LSODAIntegrator(system_function sys, time_type rtol = static_cast<time_type>(1e-6), time_type atol = static_cast<time_type>(1e-9))
inline void step(state_type &state, time_type dt) override
inline time_type adaptive_step(state_type &state, time_type dt) override
inline MethodType get_current_method() const
inline void set_stiffness_detection_frequency(int frequency)
inline void set_stiffness_threshold(time_type threshold)
inline void set_tolerances(time_type rtol, time_type atol)
inline void integrate(state_type &state, time_type dt, time_type end_time) override