numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
|
Class of Runge-Kutta 4 formula (classic Runge-Kutta method). More...
#include <num_collect/ode/runge_kutta/rk4_formula.h>
Public Types | |
using | base_type = formula_base<rk4_formula<Problem>, Problem> |
Type of base class. | |
Public Types inherited from num_collect::ode::formula_base< rk4_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 ¤t, variable_type &estimate) |
Compute the next variable. | |
Public Member Functions inherited from num_collect::ode::formula_base< rk4_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 ¤t, variable_type &estimate) |
Compute the next variable. | |
Static Public Attributes | |
static constexpr auto | log_tag |
Log tag. | |
static constexpr index_type | order = 4 |
Order of this formula. | |
static constexpr index_type | stages = 4 |
Number of stages of this formula. | |
Coefficients in Butcher array. | |
| |
static constexpr scalar_type | a21 = coeff(1, 2) |
static constexpr scalar_type | a32 = coeff(1, 2) |
static constexpr scalar_type | a43 = coeff(1) |
static constexpr scalar_type | b1 = coeff(0) |
static constexpr scalar_type | b2 = coeff(1, 2) |
static constexpr scalar_type | b3 = coeff(1, 2) |
static constexpr scalar_type | b4 = coeff(1) |
static constexpr scalar_type | c1 = coeff(1, 6) |
static constexpr scalar_type | c2 = coeff(1, 3) |
static constexpr scalar_type | c3 = coeff(1, 3) |
static constexpr scalar_type | c4 = coeff(1, 6) |
Private Attributes | |
Intermediate variables. | |
variable_type | k1_ {} |
variable_type | k2_ {} |
variable_type | k3_ {} |
variable_type | k4_ {} |
Additional Inherited Members | |
Protected Member Functions inherited from num_collect::ode::formula_base< rk4_formula< Problem >, Problem > | |
auto | derived () const noexcept -> const rk4_formula< Problem > & |
Access derived object. | |
auto | derived () noexcept -> rk4_formula< Problem > & |
Access derived object. | |
Static Protected Member Functions inherited from num_collect::ode::formula_base< rk4_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. | |
Class of Runge-Kutta 4 formula (classic Runge-Kutta method).
Problem | Type of problem. |
Definition at line 38 of file rk4_formula.h.
using num_collect::ode::runge_kutta::rk4_formula< Problem >::base_type = formula_base<rk4_formula<Problem>, Problem> |
Type of base class.
Definition at line 41 of file rk4_formula.h.
|
inline |
Compute the next variable.
[in] | time | Current time. |
[in] | step_size | Step size. |
[in] | current | Current variable. |
[out] | estimate | Estimate of the next variable. |
Definition at line 94 of file rk4_formula.h.
|
staticconstexpr |
Coefficient in Butcher array.
Definition at line 78 of file rk4_formula.h.
|
staticconstexpr |
Coefficient in Butcher array.
Definition at line 79 of file rk4_formula.h.
|
staticconstexpr |
Coefficient in Butcher array.
Definition at line 80 of file rk4_formula.h.
|
staticconstexpr |
Coefficient in Butcher array.
Definition at line 82 of file rk4_formula.h.
|
staticconstexpr |
Coefficient in Butcher array.
Definition at line 83 of file rk4_formula.h.
|
staticconstexpr |
Coefficient in Butcher array.
Definition at line 84 of file rk4_formula.h.
|
staticconstexpr |
Coefficient in Butcher array.
Definition at line 85 of file rk4_formula.h.
|
staticconstexpr |
Coefficient in Butcher array.
Definition at line 87 of file rk4_formula.h.
|
staticconstexpr |
Coefficient in Butcher array.
Definition at line 88 of file rk4_formula.h.
|
staticconstexpr |
Coefficient in Butcher array.
Definition at line 89 of file rk4_formula.h.
|
staticconstexpr |
Coefficient in Butcher array.
Definition at line 90 of file rk4_formula.h.
|
private |
Intermediate variable.
Definition at line 123 of file rk4_formula.h.
|
private |
Intermediate variable.
Definition at line 124 of file rk4_formula.h.
|
private |
Intermediate variable.
Definition at line 125 of file rk4_formula.h.
|
private |
Intermediate variable.
Definition at line 126 of file rk4_formula.h.
|
staticconstexpr |
Log tag.
Definition at line 64 of file rk4_formula.h.
|
staticconstexpr |
Order of this formula.
Definition at line 61 of file rk4_formula.h.
|
staticconstexpr |
Number of stages of this formula.
Definition at line 58 of file rk4_formula.h.