Sandals
v0.0.0
A C++ library for ODEs/DAEs integration
|
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 |
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.
S | The size of the Butcher tableau. |
using Sandals::Tableau< S >::Matrix = Eigen::Matrix<Real, S, S> |
Templetized matrix type.
using Sandals::Tableau< S >::Type = enum class type : Integer {ERK=0, IRK=1, DIRK=2} |
Runge-Kutta type enumeration.
using Sandals::Tableau< S >::Vector = Eigen::Vector<Real, S> |
Templetized vector type.
|
inline |
Check the Butcher tableau consistency for a generic Runge-Kutta method.
[in] | verbose | Verbosity flag. |
|
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.
[in] | A | Matrix \( \mathbf{A} \). |
[in] | b | Weights vector \( \mathbf{b} \) or embedded weights vector \( \hat{\mathbf{b}} \). |
[in] | c | Nodes vector \( \mathbf{c} \). |
[in] | verbose | Verbosity flag. |
Matrix Sandals::Tableau< S >::A |
Matrix \( \mathbf{A} \).
Vector Sandals::Tableau< S >::b |
Weights vector \( \mathbf{b} \).
Vector Sandals::Tableau< S >::b_e {Vector::Zero()} |
Embedded weights vector \( \hat{\mathbf{b}} \).
Vector Sandals::Tableau< S >::c |
Nodes vector \( \mathbf{c} \).
bool Sandals::Tableau< S >::is_embedded {false} |
Embedded method boolean.
std::string Sandals::Tableau< S >::name |
Name of the Runge-Kutta method.
Integer Sandals::Tableau< S >::order |
Order of the Runge-Kutta method.
Integer Sandals::Tableau< S >::order_e {-1} |
Order of the Runge-Kutta embedded method.
Type Sandals::Tableau< S >::type |
Runge-Kutta type.