Template Numerical Library version\ main:978fbd2
Loading...
Searching...
No Matches
TNL::Solvers::ODE::Methods::KuttaMerson< Value > Struct Template Reference

Fourth order Runge-Kutta-Merson method with adaptive step size. More...

#include <TNL/Solvers/ODE/Methods/KuttaMerson.h>

Collaboration diagram for TNL::Solvers::ODE::Methods::KuttaMerson< Value >:

Public Types

using ValueType = Value
 

Static Public Member Functions

static constexpr ValueType getCoefficient (const std::size_t stage, const std::size_t i)
 
static constexpr ValueType getErrorCoefficient (std::size_t i)
 
static constexpr std::size_t getStages ()
 
static constexpr ValueType getTimeCoefficient (std::size_t i)
 
static constexpr ValueType getUpdateCoefficient (std::size_t i)
 
static constexpr bool isAdaptive ()
 

Static Protected Attributes

static constexpr std::array< Value, Stages > error_coefficients { 0.2/3.0, 0.0, -0.3, 0.8/3.0, -0.1/3.0 }
 
static constexpr std::array< std::array< Value, Stages >, Stages > k_coefficients
 
static constexpr std::size_t Stages = 5
 
static constexpr std::array< Value, Stages > time_coefficients { 0.0, 1.0/3.0, 1.0/3.0, 0.5, 1.0 }
 
static constexpr std::array< Value, Stages > update_coefficients { 1.0/6.0, 0.0, 0.0, 2.0/3.0, 1.0/6.0 }
 

Detailed Description

template<typename Value = double>
struct TNL::Solvers::ODE::Methods::KuttaMerson< Value >

Fourth order Runge-Kutta-Merson method with adaptive step size.

Template Parameters
Valueis arithmetic type used for computations.

Member Data Documentation

◆ k_coefficients

template<typename Value = double>
std::array< std::array< Value, Stages>, Stages > TNL::Solvers::ODE::Methods::KuttaMerson< Value >::k_coefficients
staticconstexprprotected
Initial value:
{
std::array< Value, Stages >{ 0.0, 0.0, 0.0, 0.0 },
std::array< Value, Stages >{ 1.0/3.0, 0.0, 0.0, 0.0 },
std::array< Value, Stages >{ 1.0/6.0, 1.0/6.0, 0.0, 0.0 },
std::array< Value, Stages >{ 0.125, 0.0, 0.375, 0.0 },
std::array< Value, Stages >{ 0.5, 0.0, -1.5, 2.0 }
}

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