ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::ButcherTableau Class Reference

Coefficients of an explicit Runge-Kutta method. More...

#include <Acts/Propagator/ButcherTableau.hpp>

Public Member Functions

 ButcherTableau (std::string name, unsigned order, unsigned embeddedOrder, std::vector< double > c, std::vector< std::vector< double > > a, std::vector< double > b, std::vector< double > bEmbedded)
 Construct and validate a tableau.
double a (std::size_t i, std::size_t j) const
double b (std::size_t i) const
double bEmbedded (std::size_t i) const
double c (std::size_t i) const
unsigned embeddedOrder () const
bool firstSameAsLast () const
bool hasEmbedded () const
const std::string & name () const
unsigned order () const
std::size_t stages () const

Static Public Member Functions

static std::shared_ptr< const ButcherTableau > classicalRk4 ()
 The classical fourth-order method without an embedded solution (W.
static std::shared_ptr< const ButcherTableau > dormandPrince54 ()
 The Dormand-Prince 5(4) pair RK5(4)7M (J.
static std::shared_ptr< const ButcherTableau > verner98 ()
 The "most efficient" Verner 9(8) pair.

Detailed Description

Coefficients of an explicit Runge-Kutta method.

The tableau defines the stages

Y_i = y + h * sum_{j < i} a(i, j) * K_j, K_i = f(Y_i),

the solution y_1 = y + h * sum_i b(i) * K_i and optionally an embedded solution with the weights bEmbedded for an error estimate.

The equation of motion is a second-order equation for the position. A tableau with the coefficients A and b, applied to the first-order system of the free parameters, is the same as the general Runge-Kutta-Nyström method with the position coefficients A^2 and b A (Hairer, Nørsett, Wanner, Solving Ordinary Differential Equations I, 2nd ed., Springer 1993, Section II.14).

Note
The Runge-Kutta-Nyström step of EigenStepper and of the ATLAS stepper is a different fourth-order method than classicalRk4 on the first-order system, so the two do not give the same result.

Constructor & Destructor Documentation

◆ ButcherTableau()

Acts::ButcherTableau::ButcherTableau ( std::string name,
unsigned order,
unsigned embeddedOrder,
std::vector< double > c,
std::vector< std::vector< double > > a,
std::vector< double > b,
std::vector< double > bEmbedded )

Construct and validate a tableau.

Parameters
nameName of the method
orderOrder of the solution
embeddedOrderOrder of the embedded solution, ignored without embedded weights
cStage nodes
aStage coefficients, one row per stage, each row with the coefficients of the previous stages
bWeights of the solution
bEmbeddedWeights of the embedded solution, or empty
Exceptions
std::invalid_argumentif the sizes do not match, if the first node is not zero, or if a row of a does not sum to its node

Member Function Documentation

◆ a()

double Acts::ButcherTableau::a ( std::size_t i,
std::size_t j ) const
Parameters
iStage index
jIndex of a previous stage, j < i
Returns
the coefficient of stage j in stage i

◆ b()

double Acts::ButcherTableau::b ( std::size_t i) const
Parameters
iStage index
Returns
the weight of stage i in the solution

◆ bEmbedded()

double Acts::ButcherTableau::bEmbedded ( std::size_t i) const
Parameters
iStage index
Returns
the weight of stage i in the embedded solution

◆ c()

double Acts::ButcherTableau::c ( std::size_t i) const
Parameters
iStage index
Returns
the node of stage i

◆ classicalRk4()

std::shared_ptr< const ButcherTableau > Acts::ButcherTableau::classicalRk4 ( )
static

The classical fourth-order method without an embedded solution (W.

Kutta, Z. Math. Phys. 46 (1901) 435-453; Hairer, Nørsett, Wanner, Solving Ordinary Differential Equations I, Section II.1)

Returns
the shared tableau

◆ dormandPrince54()

std::shared_ptr< const ButcherTableau > Acts::ButcherTableau::dormandPrince54 ( )
static

The Dormand-Prince 5(4) pair RK5(4)7M (J.

R. Dormand, P. J. Prince, A family of embedded Runge-Kutta formulae, J. Comput. Appl. Math. 6 (1980) 19-26, Table 2; Hairer, Nørsett, Wanner, Solving Ordinary Differential Equations I, Section II.5, DOPRI5). The stepper propagates the fifth-order solution and uses the fourth-order solution for the error estimate.

Returns
the shared tableau

◆ embeddedOrder()

unsigned Acts::ButcherTableau::embeddedOrder ( ) const
Returns
the order of the embedded solution

◆ firstSameAsLast()

bool Acts::ButcherTableau::firstSameAsLast ( ) const
Returns
true if the last stage is at the end of the step (FSAL), so its field is the field at the end

◆ hasEmbedded()

bool Acts::ButcherTableau::hasEmbedded ( ) const
Returns
true if the tableau has embedded weights

◆ name()

const std::string & Acts::ButcherTableau::name ( ) const
Returns
the name of the method

◆ order()

unsigned Acts::ButcherTableau::order ( ) const
Returns
the order of the solution

◆ stages()

std::size_t Acts::ButcherTableau::stages ( ) const
Returns
the number of stages

◆ verner98()

std::shared_ptr< const ButcherTableau > Acts::ButcherTableau::verner98 ( )
static

The "most efficient" Verner 9(8) pair.

The method is described in J. H. Verner, Numerically optimal Runge-Kutta pairs with interpolants, Numerical Algorithms 53 (2010) 383-396, doi:10.1007/s11075-009-9290-3. The coefficients are from J. H. Verner, https://www.sfu.ca/~jverner/, file RKV98.IIa.Efficient.000000349.081210.CoeffsOnlyRADandFLOATS. The stepper propagates the ninth-order solution and uses the eighth-order solution for the error estimate.

Returns
the shared tableau