numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
Loading...
Searching...
No Matches
num_collect::ode::runge_kutta::dopri5_formula< Problem > Class Template Reference

Class of DOPRI5 formula using coefficients in [9]. More...

#include <num_collect/ode/runge_kutta/dopri5_formula.h>

+ Inheritance diagram for num_collect::ode::runge_kutta::dopri5_formula< Problem >:
+ Collaboration diagram for num_collect::ode::runge_kutta::dopri5_formula< Problem >:

Public Types

using base_type = formula_base<dopri5_formula<Problem>, Problem>
 Type of base class.
 
- Public Types inherited from num_collect::ode::formula_base< dopri5_formula< Problem >, Problem >
using problem_type
 Type of problem.
 
using scalar_type
 Type of scalars.
 
using variable_type
 Type of variables.
 

Public Member Functions

void step (scalar_type time, scalar_type step_size, const variable_type &current, variable_type &estimate)
 Compute the next variable.
 
void step_embedded (scalar_type time, scalar_type step_size, const variable_type &current, variable_type &estimate, variable_type &error)
 Compute the next variable and weak estimate of it with embedded formula.
 
- Public Member Functions inherited from num_collect::ode::formula_base< dopri5_formula< Problem >, Problem >
 formula_base (const problem_type &problem=problem_type())
 Constructor.
 
auto problem () -> problem_type &
 Get the problem.
 
auto problem () const -> const problem_type &
 Get the problem.
 
void step (scalar_type time, scalar_type step_size, const variable_type &current, variable_type &estimate)
 Compute the next variable.
 

Static Public Attributes

static constexpr index_type lesser_order = 4
 Order of lesser coefficients of this formula.
 
static constexpr auto log_tag
 Log tag.
 
static constexpr index_type order = 5
 Order of this formula.
 
static constexpr index_type stages = 7
 Number of stages of this formula.
 
Coefficients in Butcher array.
  • a is coefficients of intermidiate variables in calculation of intermidiate variables.
  • b is coefficients of time in calculation of intermidiate variables.
  • c is coefficients of intermidiate variables in calculation of estimates of next variables.
static constexpr scalar_type a21 = coeff(1, 5)
 
static constexpr scalar_type a31 = coeff(3, 40)
 
static constexpr scalar_type a32 = coeff(9, 40)
 
static constexpr scalar_type a41 = coeff(44, 45)
 
static constexpr scalar_type a42 = coeff(-56, 15)
 
static constexpr scalar_type a43 = coeff(32, 9)
 
static constexpr scalar_type a51 = coeff(19372, 6561)
 
static constexpr scalar_type a52 = coeff(-25360, 2187)
 
static constexpr scalar_type a53 = coeff(64448, 6561)
 
static constexpr scalar_type a54 = coeff(-212, 729)
 
static constexpr scalar_type a61 = coeff(9017, 3168)
 
static constexpr scalar_type a62 = coeff(-355, 33)
 
static constexpr scalar_type a63 = coeff(46732, 5247)
 
static constexpr scalar_type a64 = coeff(49, 176)
 
static constexpr scalar_type a65 = coeff(-5103, 18656)
 
static constexpr scalar_type a71 = coeff(35, 384)
 
static constexpr scalar_type a72 = coeff(0)
 
static constexpr scalar_type a73 = coeff(500, 1113)
 
static constexpr scalar_type a74 = coeff(125, 192)
 
static constexpr scalar_type a75 = coeff(-2187, 6784)
 
static constexpr scalar_type a76 = coeff(11, 84)
 
static constexpr scalar_type b2 = coeff(1, 5)
 
static constexpr scalar_type b3 = coeff(3, 10)
 
static constexpr scalar_type b4 = coeff(4, 5)
 
static constexpr scalar_type b5 = coeff(8, 9)
 
static constexpr scalar_type b6 = coeff(1)
 
static constexpr scalar_type b7 = coeff(1)
 
static constexpr scalar_type c1 = a71
 
static constexpr scalar_type c3 = a73
 
static constexpr scalar_type c4 = a74
 
static constexpr scalar_type c5 = a75
 
static constexpr scalar_type c6 = a76
 
static constexpr scalar_type cw1 = coeff(5179, 57600)
 
static constexpr scalar_type cw3 = coeff(7571, 16695)
 
static constexpr scalar_type cw4 = coeff(393, 640)
 
static constexpr scalar_type cw5 = coeff(-92097, 339200)
 
static constexpr scalar_type cw6 = coeff(187, 2100)
 
static constexpr scalar_type cw7 = coeff(1, 40)
 
static constexpr scalar_type ce1 = c1 - cw1
 
static constexpr scalar_type ce3 = c3 - cw3
 
static constexpr scalar_type ce4 = c4 - cw4
 
static constexpr scalar_type ce5 = c5 - cw5
 
static constexpr scalar_type ce6 = c6 - cw6
 
static constexpr scalar_type ce7 = -cw7
 

Private Attributes

Intermediate variables.
variable_type k1_ {}
 
variable_type k2_ {}
 
variable_type k3_ {}
 
variable_type k4_ {}
 
variable_type k5_ {}
 
variable_type k6_ {}
 
variable_type k7_ {}
 

Additional Inherited Members

- Protected Member Functions inherited from num_collect::ode::formula_base< dopri5_formula< Problem >, Problem >
auto derived () const noexcept -> const dopri5_formula< Problem > &
 Access derived object.
 
auto derived () noexcept -> dopri5_formula< Problem > &
 Access derived object.
 
- Static Protected Member Functions inherited from num_collect::ode::formula_base< dopri5_formula< Problem >, Problem >
static constexpr auto coeff (T val) -> scalar_type
 Convert coefficients.
 
static constexpr auto coeff (T1 num, T2 den) -> scalar_type
 Create coefficients.
 

Detailed Description

template<concepts::problem Problem>
class num_collect::ode::runge_kutta::dopri5_formula< Problem >

Class of DOPRI5 formula using coefficients in [9].

Template Parameters
ProblemType of problem.

Definition at line 37 of file dopri5_formula.h.

Member Typedef Documentation

◆ base_type

template<concepts::problem Problem>
using num_collect::ode::runge_kutta::dopri5_formula< Problem >::base_type = formula_base<dopri5_formula<Problem>, Problem>

Type of base class.

Definition at line 40 of file dopri5_formula.h.

Member Function Documentation

◆ step()

template<concepts::problem Problem>
void num_collect::ode::runge_kutta::dopri5_formula< Problem >::step ( scalar_type time,
scalar_type step_size,
const variable_type & current,
variable_type & estimate )
inline

Compute the next variable.

Parameters
[in]timeCurrent time.
[in]step_sizeStep size.
[in]currentCurrent variable.
[out]estimateEstimate of the next variable.

Definition at line 135 of file dopri5_formula.h.

◆ step_embedded()

template<concepts::problem Problem>
void num_collect::ode::runge_kutta::dopri5_formula< Problem >::step_embedded ( scalar_type time,
scalar_type step_size,
const variable_type & current,
variable_type & estimate,
variable_type & error )
inline

Compute the next variable and weak estimate of it with embedded formula.

Parameters
[in]timeCurrent time.
[in]step_sizeStep size.
[in]currentCurrent variable.
[out]estimateEstimate of the next variable.
[out]errorEstimate of error.

Definition at line 182 of file dopri5_formula.h.

Member Data Documentation

◆ a21

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::a21 = coeff(1, 5)
staticconstexpr

Coefficient in Butcher array.

Definition at line 80 of file dopri5_formula.h.

◆ a31

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::a31 = coeff(3, 40)
staticconstexpr

Coefficient in Butcher array.

Definition at line 81 of file dopri5_formula.h.

◆ a32

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::a32 = coeff(9, 40)
staticconstexpr

Coefficient in Butcher array.

Definition at line 82 of file dopri5_formula.h.

◆ a41

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::a41 = coeff(44, 45)
staticconstexpr

Coefficient in Butcher array.

Definition at line 83 of file dopri5_formula.h.

◆ a42

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::a42 = coeff(-56, 15)
staticconstexpr

Coefficient in Butcher array.

Definition at line 84 of file dopri5_formula.h.

◆ a43

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::a43 = coeff(32, 9)
staticconstexpr

Coefficient in Butcher array.

Definition at line 85 of file dopri5_formula.h.

◆ a51

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::a51 = coeff(19372, 6561)
staticconstexpr

Coefficient in Butcher array.

Definition at line 86 of file dopri5_formula.h.

◆ a52

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::a52 = coeff(-25360, 2187)
staticconstexpr

Coefficient in Butcher array.

Definition at line 87 of file dopri5_formula.h.

◆ a53

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::a53 = coeff(64448, 6561)
staticconstexpr

Coefficient in Butcher array.

Definition at line 88 of file dopri5_formula.h.

◆ a54

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::a54 = coeff(-212, 729)
staticconstexpr

Coefficient in Butcher array.

Definition at line 89 of file dopri5_formula.h.

◆ a61

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::a61 = coeff(9017, 3168)
staticconstexpr

Coefficient in Butcher array.

Definition at line 90 of file dopri5_formula.h.

◆ a62

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::a62 = coeff(-355, 33)
staticconstexpr

Coefficient in Butcher array.

Definition at line 91 of file dopri5_formula.h.

◆ a63

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::a63 = coeff(46732, 5247)
staticconstexpr

Coefficient in Butcher array.

Definition at line 92 of file dopri5_formula.h.

◆ a64

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::a64 = coeff(49, 176)
staticconstexpr

Coefficient in Butcher array.

Definition at line 93 of file dopri5_formula.h.

◆ a65

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::a65 = coeff(-5103, 18656)
staticconstexpr

Coefficient in Butcher array.

Definition at line 94 of file dopri5_formula.h.

◆ a71

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::a71 = coeff(35, 384)
staticconstexpr

Coefficient in Butcher array.

Definition at line 95 of file dopri5_formula.h.

◆ a72

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::a72 = coeff(0)
staticconstexpr

Coefficient in Butcher array.

Definition at line 96 of file dopri5_formula.h.

◆ a73

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::a73 = coeff(500, 1113)
staticconstexpr

Coefficient in Butcher array.

Definition at line 97 of file dopri5_formula.h.

◆ a74

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::a74 = coeff(125, 192)
staticconstexpr

Coefficient in Butcher array.

Definition at line 98 of file dopri5_formula.h.

◆ a75

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::a75 = coeff(-2187, 6784)
staticconstexpr

Coefficient in Butcher array.

Definition at line 99 of file dopri5_formula.h.

◆ a76

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::a76 = coeff(11, 84)
staticconstexpr

Coefficient in Butcher array.

Definition at line 100 of file dopri5_formula.h.

◆ b2

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::b2 = coeff(1, 5)
staticconstexpr

Coefficient in Butcher array.

Definition at line 102 of file dopri5_formula.h.

◆ b3

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::b3 = coeff(3, 10)
staticconstexpr

Coefficient in Butcher array.

Definition at line 103 of file dopri5_formula.h.

◆ b4

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::b4 = coeff(4, 5)
staticconstexpr

Coefficient in Butcher array.

Definition at line 104 of file dopri5_formula.h.

◆ b5

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::b5 = coeff(8, 9)
staticconstexpr

Coefficient in Butcher array.

Definition at line 105 of file dopri5_formula.h.

◆ b6

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::b6 = coeff(1)
staticconstexpr

Coefficient in Butcher array.

Definition at line 106 of file dopri5_formula.h.

◆ b7

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::b7 = coeff(1)
staticconstexpr

Coefficient in Butcher array.

Definition at line 107 of file dopri5_formula.h.

◆ c1

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::c1 = a71
staticconstexpr

Coefficient in Butcher array.

Definition at line 109 of file dopri5_formula.h.

◆ c3

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::c3 = a73
staticconstexpr

Coefficient in Butcher array.

Definition at line 111 of file dopri5_formula.h.

◆ c4

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::c4 = a74
staticconstexpr

Coefficient in Butcher array.

Definition at line 112 of file dopri5_formula.h.

◆ c5

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::c5 = a75
staticconstexpr

Coefficient in Butcher array.

Definition at line 113 of file dopri5_formula.h.

◆ c6

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::c6 = a76
staticconstexpr

Coefficient in Butcher array.

Definition at line 114 of file dopri5_formula.h.

◆ ce1

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::ce1 = c1 - cw1
staticconstexpr

Coefficient in Butcher array.

Definition at line 125 of file dopri5_formula.h.

◆ ce3

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::ce3 = c3 - cw3
staticconstexpr

Coefficient in Butcher array.

Definition at line 127 of file dopri5_formula.h.

◆ ce4

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::ce4 = c4 - cw4
staticconstexpr

Coefficient in Butcher array.

Definition at line 128 of file dopri5_formula.h.

◆ ce5

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::ce5 = c5 - cw5
staticconstexpr

Coefficient in Butcher array.

Definition at line 129 of file dopri5_formula.h.

◆ ce6

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::ce6 = c6 - cw6
staticconstexpr

Coefficient in Butcher array.

Definition at line 130 of file dopri5_formula.h.

◆ ce7

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::ce7 = -cw7
staticconstexpr

Coefficient in Butcher array.

Definition at line 131 of file dopri5_formula.h.

◆ cw1

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::cw1 = coeff(5179, 57600)
staticconstexpr

Coefficient in Butcher array.

Definition at line 117 of file dopri5_formula.h.

◆ cw3

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::cw3 = coeff(7571, 16695)
staticconstexpr

Coefficient in Butcher array.

Definition at line 119 of file dopri5_formula.h.

◆ cw4

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::cw4 = coeff(393, 640)
staticconstexpr

Coefficient in Butcher array.

Definition at line 120 of file dopri5_formula.h.

◆ cw5

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::cw5 = coeff(-92097, 339200)
staticconstexpr

Coefficient in Butcher array.

Definition at line 121 of file dopri5_formula.h.

◆ cw6

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::cw6 = coeff(187, 2100)
staticconstexpr

Coefficient in Butcher array.

Definition at line 122 of file dopri5_formula.h.

◆ cw7

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::cw7 = coeff(1, 40)
staticconstexpr

Coefficient in Butcher array.

Definition at line 123 of file dopri5_formula.h.

◆ k1_

template<concepts::problem Problem>
variable_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::k1_ {}
private

Intermediate variable.

Definition at line 202 of file dopri5_formula.h.

◆ k2_

template<concepts::problem Problem>
variable_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::k2_ {}
private

Intermediate variable.

Definition at line 203 of file dopri5_formula.h.

◆ k3_

template<concepts::problem Problem>
variable_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::k3_ {}
private

Intermediate variable.

Definition at line 204 of file dopri5_formula.h.

◆ k4_

template<concepts::problem Problem>
variable_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::k4_ {}
private

Intermediate variable.

Definition at line 205 of file dopri5_formula.h.

◆ k5_

template<concepts::problem Problem>
variable_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::k5_ {}
private

Intermediate variable.

Definition at line 206 of file dopri5_formula.h.

◆ k6_

template<concepts::problem Problem>
variable_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::k6_ {}
private

Intermediate variable.

Definition at line 207 of file dopri5_formula.h.

◆ k7_

template<concepts::problem Problem>
variable_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::k7_ {}
private

Intermediate variable.

Definition at line 208 of file dopri5_formula.h.

◆ lesser_order

template<concepts::problem Problem>
index_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::lesser_order = 4
staticconstexpr

Order of lesser coefficients of this formula.

Definition at line 67 of file dopri5_formula.h.

◆ log_tag

template<concepts::problem Problem>
auto num_collect::ode::runge_kutta::dopri5_formula< Problem >::log_tag
staticconstexpr
Initial value:
=
logging::log_tag_view("num_collect::ode::runge_kutta::dopri5_formula")

Log tag.

Definition at line 63 of file dopri5_formula.h.

◆ order

template<concepts::problem Problem>
index_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::order = 5
staticconstexpr

Order of this formula.

Definition at line 60 of file dopri5_formula.h.

◆ stages

template<concepts::problem Problem>
index_type num_collect::ode::runge_kutta::dopri5_formula< Problem >::stages = 7
staticconstexpr

Number of stages of this formula.

Definition at line 57 of file dopri5_formula.h.


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