Celeritas
0.5.0-86+4a8eea4
|
Integrate the field ODEs using Dormand-Prince RK5(4)7M. More...
#include <DormandPrinceStepper.hh>
Public Types | |
Type aliases | |
using | result_type = FieldStepperResult |
Public Member Functions | |
CELER_FUNCTION | DormandPrinceStepper (EquationT &&eq) |
Construct with the equation of motion. | |
CELER_FUNCTION result_type | operator() (real_type step, OdeState const &beg_state) const |
Numerically integrate using the DormandPrince RK5(4)7M method. | |
Integrate the field ODEs using Dormand-Prince RK5(4)7M.
The algorithm, RK5(4)7M and the coefficients have been adapted from J. R. Dormand and P. J. Prince, "A family of embedded Runge-Kutta formulae" Journal Computational and Applied Mathematics, volume 6, no 1 (1980) and the coefficients to locate the mid point are taken from L. F. Shampine, "Some Practical Runge-Kutta Formulas", Mathematics of * Computation, volume 46, number 17, pp 147 (1986).
For a given ordinary differential equation, \(dy/dx = f(x, y)\), the fifth order solution, \( y_{n+1} \), an embedded fourth order solution, \( y^{*}_{n+1} \), and the error estimate as difference between them are as follows,
\[ y_{n+1} = y_n + h \sum_{n=1}^{6} b_i k_i + O(h^6) y^{*}_{n+1} = y_n + h \sum_{n=1}^{7} b*_i k_i + O(h^5) y_{error} = y_{n+1} - y^{*}_{n+1} = \sum_{n=1}^{7} (b^{*}_i - b_i) k_i \]
where \(h\) is the step to advance and k_i is the right hand side of the function at \(x_n + h c_i\), and the coefficients (The Butcher table) for Dormand-Prince RK5(4)7M are
c_i | a_ij 0 | 1/5 | 1/5 3/10| 3/40 9/40 4/5 | 44/45 -56/15 32/9 8/9 | 19372/6561 -25360/2187 64448/6561 -212/729 1 | 9017/3168 -355/33 46732/5247 49/176 -5103/18656 1 | 35/384 0 500/1113 125/192 -2187/6784 11/84 ---------------------------------------------------------------------------- b*_i| 35/384 0 500/1113 125/192 -2187/6784 11/84 0 b_i | 5179/57600 0 7571/16695 393/640 -92097/339200 187/2100 1/40
The result at the mid point is computed
\[ y_{n+1/2} = y_n + (h/2) \Sigma_{n=1}^{7} c^{*}_i k_i \]
with the coefficients \(c^{*}\) taken from L. F. Shampine (1986).