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::tanaka1_formula< Problem, FormulaSolver > Class Template Reference

Class of Tanaka Formula 1. More...

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

+ Inheritance diagram for num_collect::ode::runge_kutta::tanaka1_formula< Problem, FormulaSolver >:
+ Collaboration diagram for num_collect::ode::runge_kutta::tanaka1_formula< Problem, FormulaSolver >:

Public Types

using base_type
 Type of base class.
 
using problem_type
 Type of problem.
 
using scalar_type
 Type of scalars.
 
using this_type = tanaka1_formula<Problem, FormulaSolver>
 Type of this class.
 
using variable_type
 Type of variables.
 
- Public Types inherited from num_collect::ode::runge_kutta::implicit_formula_base< Derived, Problem, FormulaSolver >
using base_type = formula_base<Derived, Problem>
 Type of base class.
 
using formula_solver_type = FormulaSolver
 Type of solver of formula.
 
using problem_type
 Type of problem.
 
using scalar_type
 Type of scalars.
 
using variable_type
 Type of variables.
 
- Public Types inherited from num_collect::ode::formula_base< Derived, Problem >
using problem_type = Problem
 Type of problem.
 
using scalar_type = typename problem_type::scalar_type
 Type of scalars.
 
using variable_type = typename problem_type::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::runge_kutta::implicit_formula_base< Derived, Problem, FormulaSolver >
 implicit_formula_base (const problem_type &problem=problem_type())
 Constructor.
 
auto formula_solver () -> formula_solver_type &
 Get solver of formula.
 
auto formula_solver () const -> const formula_solver_type &
 Get solver of formula.
 
auto logger () const noexcept -> const num_collect::logging::logger &
 Access to the logger.
 
auto logger () noexcept -> num_collect::logging::logger &
 Access to the logger.
 
auto tolerances (const error_tolerances< variable_type > &val) -> Derived &
 Set the error tolerances.
 
- Public Member Functions inherited from num_collect::ode::formula_base< Derived, 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 = 1
 Order of lesser coefficients of this formula.
 
static constexpr auto log_tag
 Log tag.
 
static constexpr index_type order = 3
 Order of this formula.
 
static constexpr index_type stages = 2
 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 a11 = coeff(13, 20)
 
static constexpr scalar_type a21 = coeff(-127, 180)
 
static constexpr scalar_type a22 = coeff(13, 20)
 
static constexpr scalar_type b1 = coeff(13, 20)
 
static constexpr scalar_type b2 = coeff(-1, 18)
 
static constexpr scalar_type c1 = coeff(100, 127)
 
static constexpr scalar_type c2 = coeff(27, 127)
 
static constexpr scalar_type cw1 = coeff(1)
 
static constexpr scalar_type ce1 = c1 - cw1
 
static constexpr scalar_type ce2 = c2
 

Protected Member Functions

auto formula_solver () -> formula_solver_type &
 Get solver of formula.
 
auto formula_solver () const -> const formula_solver_type &
 Get solver of formula.
 
- Protected Member Functions inherited from num_collect::ode::runge_kutta::implicit_formula_base< Derived, Problem, FormulaSolver >
auto derived () const noexcept -> const Derived &
 Access derived object.
 
auto derived () noexcept -> Derived &
 Access derived object.
 
- Protected Member Functions inherited from num_collect::ode::formula_base< Derived, Problem >
auto derived () const noexcept -> const Derived &
 Access derived object.
 
auto derived () noexcept -> Derived &
 Access derived object.
 

Private Attributes

Intermediate variables.
variable_type k1_ {}
 
variable_type k2_ {}
 

Additional Inherited Members

- Static Protected Member Functions inherited from num_collect::ode::formula_base< Derived, Problem >
template<typename T >
static constexpr auto coeff (T val) -> scalar_type
 Convert coefficients.
 
template<typename T1 , typename T2 >
static constexpr auto coeff (T1 num, T2 den) -> scalar_type
 Create coefficients.
 

Detailed Description

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
class num_collect::ode::runge_kutta::tanaka1_formula< Problem, FormulaSolver >

Class of Tanaka Formula 1.

Template Parameters
ProblemType of problem.
FormulaSolverType of solver of formula.

Definition at line 41 of file tanaka1_formula.h.

Member Typedef Documentation

◆ base_type

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
using num_collect::ode::runge_kutta::tanaka1_formula< Problem, FormulaSolver >::base_type
Initial value:
FormulaSolver>
implicit_formula_base(const problem_type &problem=problem_type())
Constructor.

Type of base class.

Definition at line 49 of file tanaka1_formula.h.

◆ problem_type

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
using num_collect::ode::formula_base< Derived, Problem >::problem_type

Type of problem.

Definition at line 44 of file formula_base.h.

◆ scalar_type

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
using num_collect::ode::formula_base< Derived, Problem >::scalar_type

Type of scalars.

Definition at line 45 of file formula_base.h.

◆ this_type

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
using num_collect::ode::runge_kutta::tanaka1_formula< Problem, FormulaSolver >::this_type = tanaka1_formula<Problem, FormulaSolver>

Type of this class.

Definition at line 46 of file tanaka1_formula.h.

◆ variable_type

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
using num_collect::ode::formula_base< Derived, Problem >::variable_type

Type of variables.

Definition at line 46 of file formula_base.h.

Member Function Documentation

◆ formula_solver() [1/2]

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
auto num_collect::ode::runge_kutta::implicit_formula_base< Derived, Problem, FormulaSolver >::formula_solver ( ) -> formula_solver_type&
inlinenodiscardprotected

Get solver of formula.

Returns
Solver of formula.

Definition at line 68 of file implicit_formula_base.h.

◆ formula_solver() [2/2]

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
auto num_collect::ode::runge_kutta::implicit_formula_base< Derived, Problem, FormulaSolver >::formula_solver ( ) const -> const formula_solver_type&
inlinenodiscardprotected

Get solver of formula.

Returns
Solver of formula.

Definition at line 77 of file implicit_formula_base.h.

◆ step()

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
void num_collect::ode::runge_kutta::tanaka1_formula< Problem, FormulaSolver >::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 109 of file tanaka1_formula.h.

◆ step_embedded()

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
void num_collect::ode::runge_kutta::tanaka1_formula< Problem, FormulaSolver >::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 125 of file tanaka1_formula.h.

Member Data Documentation

◆ a11

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
scalar_type num_collect::ode::runge_kutta::tanaka1_formula< Problem, FormulaSolver >::a11 = coeff(13, 20)
staticconstexpr

Coefficient in Butcher array.

Definition at line 92 of file tanaka1_formula.h.

◆ a21

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
scalar_type num_collect::ode::runge_kutta::tanaka1_formula< Problem, FormulaSolver >::a21 = coeff(-127, 180)
staticconstexpr

Coefficient in Butcher array.

Definition at line 93 of file tanaka1_formula.h.

◆ a22

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
scalar_type num_collect::ode::runge_kutta::tanaka1_formula< Problem, FormulaSolver >::a22 = coeff(13, 20)
staticconstexpr

Coefficient in Butcher array.

Definition at line 94 of file tanaka1_formula.h.

◆ b1

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
scalar_type num_collect::ode::runge_kutta::tanaka1_formula< Problem, FormulaSolver >::b1 = coeff(13, 20)
staticconstexpr

Coefficient in Butcher array.

Definition at line 96 of file tanaka1_formula.h.

◆ b2

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
scalar_type num_collect::ode::runge_kutta::tanaka1_formula< Problem, FormulaSolver >::b2 = coeff(-1, 18)
staticconstexpr

Coefficient in Butcher array.

Definition at line 97 of file tanaka1_formula.h.

◆ c1

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
scalar_type num_collect::ode::runge_kutta::tanaka1_formula< Problem, FormulaSolver >::c1 = coeff(100, 127)
staticconstexpr

Coefficient in Butcher array.

Definition at line 99 of file tanaka1_formula.h.

◆ c2

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
scalar_type num_collect::ode::runge_kutta::tanaka1_formula< Problem, FormulaSolver >::c2 = coeff(27, 127)
staticconstexpr

Coefficient in Butcher array.

Definition at line 100 of file tanaka1_formula.h.

◆ ce1

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
scalar_type num_collect::ode::runge_kutta::tanaka1_formula< Problem, FormulaSolver >::ce1 = c1 - cw1
staticconstexpr

Coefficient in Butcher array.

Definition at line 104 of file tanaka1_formula.h.

◆ ce2

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
scalar_type num_collect::ode::runge_kutta::tanaka1_formula< Problem, FormulaSolver >::ce2 = c2
staticconstexpr

Coefficient in Butcher array.

Definition at line 105 of file tanaka1_formula.h.

◆ cw1

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
scalar_type num_collect::ode::runge_kutta::tanaka1_formula< Problem, FormulaSolver >::cw1 = coeff(1)
staticconstexpr

Coefficient in Butcher array.

Definition at line 102 of file tanaka1_formula.h.

◆ k1_

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
variable_type num_collect::ode::runge_kutta::tanaka1_formula< Problem, FormulaSolver >::k1_ {}
private

Intermediate variable.

Definition at line 150 of file tanaka1_formula.h.

◆ k2_

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
variable_type num_collect::ode::runge_kutta::tanaka1_formula< Problem, FormulaSolver >::k2_ {}
private

Intermediate variable.

Definition at line 151 of file tanaka1_formula.h.

◆ lesser_order

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
index_type num_collect::ode::runge_kutta::tanaka1_formula< Problem, FormulaSolver >::lesser_order = 1
staticconstexpr

Order of lesser coefficients of this formula.

Definition at line 75 of file tanaka1_formula.h.

◆ log_tag

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
auto num_collect::ode::runge_kutta::tanaka1_formula< Problem, FormulaSolver >::log_tag
staticconstexpr
Initial value:
=
logging::log_tag_view("num_collect::ode::runge_kutta::tanaka1_formula")

Log tag.

Definition at line 78 of file tanaka1_formula.h.

◆ order

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
index_type num_collect::ode::runge_kutta::tanaka1_formula< Problem, FormulaSolver >::order = 3
staticconstexpr

Order of this formula.

Definition at line 72 of file tanaka1_formula.h.

◆ stages

template<concepts::problem Problem, concepts::slope_equation_solver FormulaSolver = inexact_newton_slope_equation_solver<Problem>>
index_type num_collect::ode::runge_kutta::tanaka1_formula< Problem, FormulaSolver >::stages = 2
staticconstexpr

Number of stages of this formula.

Definition at line 69 of file tanaka1_formula.h.


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