Sandals  v0.0.0
A C++ library for ODEs/DAEs integration
Loading...
Searching...
No Matches
Sandals::Tableau< S > Struct Template Reference

Struct container for the Butcher tableau of a Runge-Kutta method. More...

#include <Tableau.hxx>

Public Types

using Type = enum class type : Integer {ERK=0, IRK=1, DIRK=2}
 
using Vector = Eigen::Vector<Real, S>
 
using Matrix = Eigen::Matrix<Real, S, S>
 

Public Member Functions

bool check (bool verbose=false) const
 

Public Attributes

std::string name
 
Type type
 
Integer order
 
Integer order_e {-1}
 
Matrix A
 
Vector b
 
Vector b_e {Vector::Zero()}
 
Vector c
 
bool is_embedded {false}
 

Private Member Functions

Integer compute_order (Matrix const &A, Vector const &b, Vector const &c, bool verbose=false) const
 

Detailed Description

template<Integer S>
struct Sandals::Tableau< S >

Butcher tableau

Runge-Kutta methods are a family of numerical techniques for solving ODEs and DAEs. These methods approximate the solution by combining weighted evaluations of the system's functions at specific points called nodes within the integration domain.

A Runge-Kutta method is characterized by its Butcher tableau, a tabular representation of the method's parameters. For a method of order \(p\) and \(s\) stages, the Butcher tableau is defined as

\[ \begin{array}{c|ccc} c_1 & a_{11} & a_{12} & \dots & a_{1s} \\ c_2 & a_{21} & a_{22} & \dots & a_{2s} \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ c_s & a_{s1} & a_{s2} & \dots & a_{ss} \\ \hline & b_1 & b_2 & \dots & b_s \end{array} \text{,} \]

where \(\mathbf{A}\) is the Runge-Kutta coefficient matrix, \(\mathbf{b}\) is the Runge-Kutta weights vector, \(\hat{\mathbf{b}}\) is the (optional) embedded Runge-Kutta weights vector, and \(\mathbf{c}\) is the Runge-Kutta nodes vector. These parameters define the method's structure and determine its accuracy and stability.

Template Parameters
SThe size of the Butcher tableau.

Member Typedef Documentation

◆ Matrix

template<Integer S>
using Sandals::Tableau< S >::Matrix = Eigen::Matrix<Real, S, S>

Templetized matrix type.

◆ Type

template<Integer S>
using Sandals::Tableau< S >::Type = enum class type : Integer {ERK=0, IRK=1, DIRK=2}

Runge-Kutta type enumeration.

◆ Vector

template<Integer S>
using Sandals::Tableau< S >::Vector = Eigen::Vector<Real, S>

Templetized vector type.

Member Function Documentation

◆ check()

template<Integer S>
bool Sandals::Tableau< S >::check ( bool verbose = false) const
inline

Check the Butcher tableau consistency for a generic Runge-Kutta method.

Parameters
[in]verboseVerbosity flag.
Returns
True if the Butcher tableau is consistent and its order is verified, false otherwise.

◆ compute_order()

template<Integer S>
Integer Sandals::Tableau< S >::compute_order ( Matrix const & A,
Vector const & b,
Vector const & c,
bool verbose = false ) const
inlineprivate

Check the order of a Runge-Kutta method according to the conditions taken from: A family of embedded Runge-Kutta formulae, J. R. Dormand and P. J. Prince, Journal of Computational and Applied Mathematics, volume 6(1), 1980. DOI 10.1016/0771-0509(80)90013-3.

Parameters
[in]AMatrix \( \mathbf{A} \).
[in]bWeights vector \( \mathbf{b} \) or embedded weights vector \( \hat{\mathbf{b}} \).
[in]cNodes vector \( \mathbf{c} \).
[in]verboseVerbosity flag.
Returns
The calculated order of the Runge-Kutta method.

Member Data Documentation

◆ A

template<Integer S>
Matrix Sandals::Tableau< S >::A

Matrix \( \mathbf{A} \).

◆ b

template<Integer S>
Vector Sandals::Tableau< S >::b

Weights vector \( \mathbf{b} \).

◆ b_e

template<Integer S>
Vector Sandals::Tableau< S >::b_e {Vector::Zero()}

Embedded weights vector \( \hat{\mathbf{b}} \).

◆ c

template<Integer S>
Vector Sandals::Tableau< S >::c

Nodes vector \( \mathbf{c} \).

◆ is_embedded

template<Integer S>
bool Sandals::Tableau< S >::is_embedded {false}

Embedded method boolean.

◆ name

template<Integer S>
std::string Sandals::Tableau< S >::name

Name of the Runge-Kutta method.

◆ order

template<Integer S>
Integer Sandals::Tableau< S >::order

Order of the Runge-Kutta method.

◆ order_e

template<Integer S>
Integer Sandals::Tableau< S >::order_e {-1}

Order of the Runge-Kutta embedded method.

◆ type

template<Integer S>
Type Sandals::Tableau< S >::type

Runge-Kutta type.


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