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::DOP853Integrator< S > Class Template Reference

DOP853 (Dormand-Prince 8(5,3)) adaptive integrator. More...

#include <dop853.hpp>

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

Public Types

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 Types inherited from diffeq::core::AdaptiveIntegrator< S >
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 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

 DOP853Integrator (system_function sys, time_type rtol=static_cast< time_type >(1e-8), time_type atol=static_cast< time_type >(1e-10))
 
void step (state_type &state, time_type dt) override
 
time_type adaptive_step (state_type &state, time_type dt) override
 
- Public Member Functions inherited from diffeq::core::AdaptiveIntegrator< S >
 AdaptiveIntegrator (system_function sys, time_type rtol=static_cast< time_type >(1e-6), time_type atol=static_cast< time_type >(1e-9))
 
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
 
void set_tolerances (time_type rtol, time_type atol)
 
void set_step_limits (time_type dt_min, time_type dt_max)
 
- Public Member Functions inherited from diffeq::core::AbstractIntegrator< S >
 AbstractIntegrator (system_function sys)
 
virtual void step (state_type &state, time_type dt)=0
 
time_type current_time () const
 
void set_time (time_type t)
 
void set_system (system_function sys)
 

Public Attributes

time_type safety_factor_ = fortran_safety
 
time_type fac1_ = fortran_fac1
 
time_type fac2_ = fortran_fac2
 
time_type beta_ = fortran_beta
 
time_type dt_max_ = fortran_dt_max
 
time_type dt_min_ = fortran_dt_min
 
int nmax_ = fortran_nmax
 
int nstiff_ = fortran_nstiff
 
time_type facold_ = static_cast<time_type>(1e-4)
 
int iastiff_ = 0
 
int nonsti_ = 0
 
time_type hlamb_ = 0
 
int nstep_ = 0
 
int naccpt_ = 0
 
int nrejct_ = 0
 
int nfcn_ = 0
 
time_type target_time_ = 0
 

Static Public Attributes

static constexpr time_type fortran_safety = static_cast<time_type>(0.9)
 
static constexpr time_type fortran_fac1 = static_cast<time_type>(0.333)
 
static constexpr time_type fortran_fac2 = static_cast<time_type>(6.0)
 
static constexpr time_type fortran_beta = static_cast<time_type>(0.0)
 
static constexpr time_type fortran_dt_max = static_cast<time_type>(1e100)
 
static constexpr time_type fortran_dt_min = static_cast<time_type>(1e-16)
 
static constexpr int fortran_nmax = 100000
 
static constexpr int fortran_nstiff = 1000
 

Additional Inherited Members

- Protected Member Functions inherited from diffeq::core::AdaptiveIntegrator< S >
time_type calculate_tolerance (value_type y_val) const
 
time_type error_norm (const state_type &error, const state_type &y) const
 
time_type error_norm_scipy_style (const state_type &error, const state_type &y_old, const state_type &y_new) const
 
time_type suggest_step_size (time_type current_dt, time_type error_norm, int order) const
 
- Protected Member Functions inherited from diffeq::core::AbstractIntegrator< S >
void advance_time (time_type dt)
 
- Protected Attributes inherited from diffeq::core::AdaptiveIntegrator< S >
time_type rtol_
 
time_type atol_
 
time_type dt_min_
 
time_type dt_max_
 
time_type safety_factor_
 
- Protected Attributes inherited from diffeq::core::AbstractIntegrator< S >
system_function sys_
 
time_type current_time_
 

Detailed Description

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

DOP853 (Dormand-Prince 8(5,3)) adaptive integrator.

Eighth-order method with embedded 5th and 3rd order error estimation. Reference: Hairer, Norsett, Wanner, "Solving Ordinary Differential Equations I"

Definition at line 51 of file dop853.hpp.

Member Typedef Documentation

◆ base_type

template<system_state S>
using diffeq::DOP853Integrator< S >::base_type = core::AdaptiveIntegrator<S>

Definition at line 55 of file dop853.hpp.

◆ state_type

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

Definition at line 56 of file dop853.hpp.

◆ system_function

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

Definition at line 59 of file dop853.hpp.

◆ time_type

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

Definition at line 57 of file dop853.hpp.

◆ value_type

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

Definition at line 58 of file dop853.hpp.

Constructor & Destructor Documentation

◆ DOP853Integrator()

template<system_state S>
diffeq::DOP853Integrator< S >::DOP853Integrator ( system_function  sys,
time_type  rtol = static_cast<time_type>(1e-8),
time_type  atol = static_cast<time_type>(1e-10) 
)
inlineexplicit

Definition at line 176 of file dop853.hpp.

Member Function Documentation

◆ adaptive_step()

template<system_state S>
time_type diffeq::DOP853Integrator< S >::adaptive_step ( state_type &  state,
time_type  dt 
)
inlineoverride

Definition at line 189 of file dop853.hpp.

◆ step()

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

Definition at line 181 of file dop853.hpp.

Member Data Documentation

◆ beta_

template<system_state S>
time_type diffeq::DOP853Integrator< S >::beta_ = fortran_beta

Definition at line 75 of file dop853.hpp.

◆ dt_max_

template<system_state S>
time_type diffeq::DOP853Integrator< S >::dt_max_ = fortran_dt_max

Definition at line 76 of file dop853.hpp.

◆ dt_min_

template<system_state S>
time_type diffeq::DOP853Integrator< S >::dt_min_ = fortran_dt_min

Definition at line 77 of file dop853.hpp.

◆ fac1_

template<system_state S>
time_type diffeq::DOP853Integrator< S >::fac1_ = fortran_fac1

Definition at line 73 of file dop853.hpp.

◆ fac2_

template<system_state S>
time_type diffeq::DOP853Integrator< S >::fac2_ = fortran_fac2

Definition at line 74 of file dop853.hpp.

◆ facold_

template<system_state S>
time_type diffeq::DOP853Integrator< S >::facold_ = static_cast<time_type>(1e-4)

Definition at line 80 of file dop853.hpp.

◆ fortran_beta

template<system_state S>
constexpr time_type diffeq::DOP853Integrator< S >::fortran_beta = static_cast<time_type>(0.0)
staticconstexpr

Definition at line 65 of file dop853.hpp.

◆ fortran_dt_max

template<system_state S>
constexpr time_type diffeq::DOP853Integrator< S >::fortran_dt_max = static_cast<time_type>(1e100)
staticconstexpr

Definition at line 66 of file dop853.hpp.

◆ fortran_dt_min

template<system_state S>
constexpr time_type diffeq::DOP853Integrator< S >::fortran_dt_min = static_cast<time_type>(1e-16)
staticconstexpr

Definition at line 67 of file dop853.hpp.

◆ fortran_fac1

template<system_state S>
constexpr time_type diffeq::DOP853Integrator< S >::fortran_fac1 = static_cast<time_type>(0.333)
staticconstexpr

Definition at line 63 of file dop853.hpp.

◆ fortran_fac2

template<system_state S>
constexpr time_type diffeq::DOP853Integrator< S >::fortran_fac2 = static_cast<time_type>(6.0)
staticconstexpr

Definition at line 64 of file dop853.hpp.

◆ fortran_nmax

template<system_state S>
constexpr int diffeq::DOP853Integrator< S >::fortran_nmax = 100000
staticconstexpr

Definition at line 68 of file dop853.hpp.

◆ fortran_nstiff

template<system_state S>
constexpr int diffeq::DOP853Integrator< S >::fortran_nstiff = 1000
staticconstexpr

Definition at line 69 of file dop853.hpp.

◆ fortran_safety

template<system_state S>
constexpr time_type diffeq::DOP853Integrator< S >::fortran_safety = static_cast<time_type>(0.9)
staticconstexpr

Definition at line 62 of file dop853.hpp.

◆ hlamb_

template<system_state S>
time_type diffeq::DOP853Integrator< S >::hlamb_ = 0

Definition at line 84 of file dop853.hpp.

◆ iastiff_

template<system_state S>
int diffeq::DOP853Integrator< S >::iastiff_ = 0

Definition at line 82 of file dop853.hpp.

◆ naccpt_

template<system_state S>
int diffeq::DOP853Integrator< S >::naccpt_ = 0

Definition at line 87 of file dop853.hpp.

◆ nfcn_

template<system_state S>
int diffeq::DOP853Integrator< S >::nfcn_ = 0

Definition at line 89 of file dop853.hpp.

◆ nmax_

template<system_state S>
int diffeq::DOP853Integrator< S >::nmax_ = fortran_nmax

Definition at line 78 of file dop853.hpp.

◆ nonsti_

template<system_state S>
int diffeq::DOP853Integrator< S >::nonsti_ = 0

Definition at line 83 of file dop853.hpp.

◆ nrejct_

template<system_state S>
int diffeq::DOP853Integrator< S >::nrejct_ = 0

Definition at line 88 of file dop853.hpp.

◆ nstep_

template<system_state S>
int diffeq::DOP853Integrator< S >::nstep_ = 0

Definition at line 86 of file dop853.hpp.

◆ nstiff_

template<system_state S>
int diffeq::DOP853Integrator< S >::nstiff_ = fortran_nstiff

Definition at line 79 of file dop853.hpp.

◆ safety_factor_

template<system_state S>
time_type diffeq::DOP853Integrator< S >::safety_factor_ = fortran_safety

Definition at line 72 of file dop853.hpp.

◆ target_time_

template<system_state S>
time_type diffeq::DOP853Integrator< S >::target_time_ = 0

Definition at line 187 of file dop853.hpp.


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