0.3.0
Loading...
Searching...
No Matches
NAV::ButcherTableau Namespace Reference

Functions

template<typename Y, typename Z, std::floating_point Scalar, size_t s, std::array< std::array< Scalar, s+1 >, s+1 > butcherTableau>
RungeKuttaExplicit (const Y &y_n, const std::array< Z, s > &z, const Scalar &h, const auto &f, const auto &constParam, const Scalar &t_n)
 Calculates explicit Runge-Kutta methods. Order is defined by the Butcher tableau.
 

Variables

template<typename Scalar>
constexpr std::array< std::array< Scalar, 3 >, 3 > Heun2
 Butcher tableau for Heun's method (2nd order) (explicit)
 
template<typename Scalar>
constexpr std::array< std::array< Scalar, 4 >, 4 > Heun3
 Butcher tableau for Heun's method (3nd order) (explicit)
 
template<typename Scalar>
constexpr std::array< std::array< Scalar, 2 >, 2 > RK1
 Butcher tableau for Runge-Kutta 1st order (explicit) / (Forward) Euler method.
 
template<typename Scalar>
constexpr std::array< std::array< Scalar, 3 >, 3 > RK2
 Butcher tableau for Runge-Kutta 2nd order (explicit) / Explicit midpoint method.
 
template<typename Scalar>
constexpr std::array< std::array< Scalar, 4 >, 4 > RK3
 Butcher tableau for Runge-Kutta 3rd order (explicit) / Simpson's rule.
 
template<typename Scalar>
constexpr std::array< std::array< Scalar, 5 >, 5 > RK4
 Butcher tableau for Runge-Kutta 4th order (explicit)
 

Function Documentation

◆ RungeKuttaExplicit()

template<typename Y, typename Z, std::floating_point Scalar, size_t s, std::array< std::array< Scalar, s+1 >, s+1 > butcherTableau>
Y NAV::ButcherTableau::RungeKuttaExplicit ( const Y & y_n,
const std::array< Z, s > & z,
const Scalar & h,
const auto & f,
const auto & constParam,
const Scalar & t_n )
inline

Calculates explicit Runge-Kutta methods. Order is defined by the Butcher tableau.

Parameters
[in]y_nState vector at time t_n
[in]zArray of measurements, one for each evaluation point of the Runge Kutta
[in]hIntegration step in [s]
[in]fTime derivative function
[in]constParamConstant parameters passed to each time derivative function call
[in]t_nTime t_n
Returns
State vector at time t_(n+1)

Definition at line 44 of file NumericalIntegration.hpp.

Variable Documentation

◆ Heun2

template<typename Scalar>
std::array<std::array<Scalar, 3>, 3> NAV::ButcherTableau::Heun2
constexpr

Butcher tableau for Heun's method (2nd order) (explicit)

Definition at line 124 of file NumericalIntegration.hpp.

◆ Heun3

template<typename Scalar>
std::array<std::array<Scalar, 4>, 4> NAV::ButcherTableau::Heun3
constexpr

Butcher tableau for Heun's method (3nd order) (explicit)

Definition at line 139 of file NumericalIntegration.hpp.

◆ RK1

template<typename Scalar>
std::array<std::array<Scalar, 2>, 2> NAV::ButcherTableau::RK1
constexpr

Butcher tableau for Runge-Kutta 1st order (explicit) / (Forward) Euler method.

Definition at line 111 of file NumericalIntegration.hpp.

◆ RK2

template<typename Scalar>
std::array<std::array<Scalar, 3>, 3> NAV::ButcherTableau::RK2
constexpr

Butcher tableau for Runge-Kutta 2nd order (explicit) / Explicit midpoint method.

Definition at line 117 of file NumericalIntegration.hpp.

◆ RK3

template<typename Scalar>
std::array<std::array<Scalar, 4>, 4> NAV::ButcherTableau::RK3
constexpr

Butcher tableau for Runge-Kutta 3rd order (explicit) / Simpson's rule.

Definition at line 131 of file NumericalIntegration.hpp.

◆ RK4

template<typename Scalar>
std::array<std::array<Scalar, 5>, 5> NAV::ButcherTableau::RK4
constexpr

Butcher tableau for Runge-Kutta 4th order (explicit)

Definition at line 147 of file NumericalIntegration.hpp.