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::rkf45_formula< Problem > Class Template Reference

Class of Runge-Kutta-Fehlberg 45 formula. More...

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

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

Public Types

using base_type = formula_base<rkf45_formula<Problem>, Problem>
 Type of base class.
 
- Public Types inherited from num_collect::ode::formula_base< rkf45_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< rkf45_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 = 6
 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, 4)
 
static constexpr scalar_type a31 = coeff(3, 32)
 
static constexpr scalar_type a32 = coeff(9, 32)
 
static constexpr scalar_type a41 = coeff(1932, 2197)
 
static constexpr scalar_type a42 = coeff(-7200, 2197)
 
static constexpr scalar_type a43 = coeff(7296, 2197)
 
static constexpr scalar_type a51 = coeff(439, 216)
 
static constexpr scalar_type a52 = coeff(-8)
 
static constexpr scalar_type a53 = coeff(3680, 513)
 
static constexpr scalar_type a54 = coeff(-845, 4104)
 
static constexpr scalar_type a61 = coeff(-8, 27)
 
static constexpr scalar_type a62 = coeff(2)
 
static constexpr scalar_type a63 = coeff(-3544, 2565)
 
static constexpr scalar_type a64 = coeff(1859, 4104)
 
static constexpr scalar_type a65 = coeff(-11, 40)
 
static constexpr scalar_type b2 = coeff(1, 4)
 
static constexpr scalar_type b3 = coeff(3, 8)
 
static constexpr scalar_type b4 = coeff(12, 13)
 
static constexpr scalar_type b5 = coeff(1)
 
static constexpr scalar_type b6 = coeff(1, 2)
 
static constexpr scalar_type c1 = coeff(16, 135)
 
static constexpr scalar_type c3 = coeff(6656, 12825)
 
static constexpr scalar_type c4 = coeff(28561, 56430)
 
static constexpr scalar_type c5 = coeff(-9, 50)
 
static constexpr scalar_type c6 = coeff(2, 55)
 
static constexpr scalar_type cw1 = coeff(25, 216)
 
static constexpr scalar_type cw3 = coeff(1408, 2565)
 
static constexpr scalar_type cw4 = coeff(2197, 4104)
 
static constexpr scalar_type cw5 = coeff(-1, 5)
 
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
 

Private Attributes

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

Additional Inherited Members

- Protected Member Functions inherited from num_collect::ode::formula_base< rkf45_formula< Problem >, Problem >
auto derived () const noexcept -> const rkf45_formula< Problem > &
 Access derived object.
 
auto derived () noexcept -> rkf45_formula< Problem > &
 Access derived object.
 
- Static Protected Member Functions inherited from num_collect::ode::formula_base< rkf45_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::rkf45_formula< Problem >

Class of Runge-Kutta-Fehlberg 45 formula.

Template Parameters
ProblemType of problem.

Definition at line 37 of file rkf45_formula.h.

Member Typedef Documentation

◆ base_type

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

Type of base class.

Definition at line 40 of file rkf45_formula.h.

Member Function Documentation

◆ step()

template<concepts::problem Problem>
void num_collect::ode::runge_kutta::rkf45_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 121 of file rkf45_formula.h.

◆ step_embedded()

template<concepts::problem Problem>
void num_collect::ode::runge_kutta::rkf45_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 137 of file rkf45_formula.h.

Member Data Documentation

◆ a21

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

Coefficient in Butcher array.

Definition at line 80 of file rkf45_formula.h.

◆ a31

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

Coefficient in Butcher array.

Definition at line 81 of file rkf45_formula.h.

◆ a32

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

Coefficient in Butcher array.

Definition at line 82 of file rkf45_formula.h.

◆ a41

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::a41 = coeff(1932, 2197)
staticconstexpr

Coefficient in Butcher array.

Definition at line 83 of file rkf45_formula.h.

◆ a42

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::a42 = coeff(-7200, 2197)
staticconstexpr

Coefficient in Butcher array.

Definition at line 84 of file rkf45_formula.h.

◆ a43

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::a43 = coeff(7296, 2197)
staticconstexpr

Coefficient in Butcher array.

Definition at line 85 of file rkf45_formula.h.

◆ a51

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::a51 = coeff(439, 216)
staticconstexpr

Coefficient in Butcher array.

Definition at line 86 of file rkf45_formula.h.

◆ a52

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::a52 = coeff(-8)
staticconstexpr

Coefficient in Butcher array.

Definition at line 87 of file rkf45_formula.h.

◆ a53

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::a53 = coeff(3680, 513)
staticconstexpr

Coefficient in Butcher array.

Definition at line 88 of file rkf45_formula.h.

◆ a54

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::a54 = coeff(-845, 4104)
staticconstexpr

Coefficient in Butcher array.

Definition at line 89 of file rkf45_formula.h.

◆ a61

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::a61 = coeff(-8, 27)
staticconstexpr

Coefficient in Butcher array.

Definition at line 90 of file rkf45_formula.h.

◆ a62

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::a62 = coeff(2)
staticconstexpr

Coefficient in Butcher array.

Definition at line 91 of file rkf45_formula.h.

◆ a63

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::a63 = coeff(-3544, 2565)
staticconstexpr

Coefficient in Butcher array.

Definition at line 92 of file rkf45_formula.h.

◆ a64

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::a64 = coeff(1859, 4104)
staticconstexpr

Coefficient in Butcher array.

Definition at line 93 of file rkf45_formula.h.

◆ a65

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::a65 = coeff(-11, 40)
staticconstexpr

Coefficient in Butcher array.

Definition at line 94 of file rkf45_formula.h.

◆ b2

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

Coefficient in Butcher array.

Definition at line 96 of file rkf45_formula.h.

◆ b3

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

Coefficient in Butcher array.

Definition at line 97 of file rkf45_formula.h.

◆ b4

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::b4 = coeff(12, 13)
staticconstexpr

Coefficient in Butcher array.

Definition at line 98 of file rkf45_formula.h.

◆ b5

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

Coefficient in Butcher array.

Definition at line 99 of file rkf45_formula.h.

◆ b6

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

Coefficient in Butcher array.

Definition at line 100 of file rkf45_formula.h.

◆ c1

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::c1 = coeff(16, 135)
staticconstexpr

Coefficient in Butcher array.

Definition at line 102 of file rkf45_formula.h.

◆ c3

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::c3 = coeff(6656, 12825)
staticconstexpr

Coefficient in Butcher array.

Definition at line 103 of file rkf45_formula.h.

◆ c4

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::c4 = coeff(28561, 56430)
staticconstexpr

Coefficient in Butcher array.

Definition at line 104 of file rkf45_formula.h.

◆ c5

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::c5 = coeff(-9, 50)
staticconstexpr

Coefficient in Butcher array.

Definition at line 105 of file rkf45_formula.h.

◆ c6

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::c6 = coeff(2, 55)
staticconstexpr

Coefficient in Butcher array.

Definition at line 106 of file rkf45_formula.h.

◆ ce1

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

Coefficient in Butcher array.

Definition at line 113 of file rkf45_formula.h.

◆ ce3

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

Coefficient in Butcher array.

Definition at line 114 of file rkf45_formula.h.

◆ ce4

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

Coefficient in Butcher array.

Definition at line 115 of file rkf45_formula.h.

◆ ce5

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

Coefficient in Butcher array.

Definition at line 116 of file rkf45_formula.h.

◆ ce6

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::ce6 = c6
staticconstexpr

Coefficient in Butcher array.

Definition at line 117 of file rkf45_formula.h.

◆ cw1

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::cw1 = coeff(25, 216)
staticconstexpr

Coefficient in Butcher array.

Definition at line 108 of file rkf45_formula.h.

◆ cw3

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::cw3 = coeff(1408, 2565)
staticconstexpr

Coefficient in Butcher array.

Definition at line 109 of file rkf45_formula.h.

◆ cw4

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::cw4 = coeff(2197, 4104)
staticconstexpr

Coefficient in Butcher array.

Definition at line 110 of file rkf45_formula.h.

◆ cw5

template<concepts::problem Problem>
scalar_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::cw5 = coeff(-1, 5)
staticconstexpr

Coefficient in Butcher array.

Definition at line 111 of file rkf45_formula.h.

◆ k1_

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

Intermediate variable.

Definition at line 183 of file rkf45_formula.h.

◆ k2_

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

Intermediate variable.

Definition at line 184 of file rkf45_formula.h.

◆ k3_

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

Intermediate variable.

Definition at line 185 of file rkf45_formula.h.

◆ k4_

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

Intermediate variable.

Definition at line 186 of file rkf45_formula.h.

◆ k5_

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

Intermediate variable.

Definition at line 187 of file rkf45_formula.h.

◆ k6_

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

Intermediate variable.

Definition at line 188 of file rkf45_formula.h.

◆ lesser_order

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

Order of lesser coefficients of this formula.

Definition at line 67 of file rkf45_formula.h.

◆ log_tag

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

Log tag.

Definition at line 63 of file rkf45_formula.h.

◆ order

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

Order of this formula.

Definition at line 60 of file rkf45_formula.h.

◆ stages

template<concepts::problem Problem>
index_type num_collect::ode::runge_kutta::rkf45_formula< Problem >::stages = 6
staticconstexpr

Number of stages of this formula.

Definition at line 57 of file rkf45_formula.h.


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