Explicit Runge-Kutta methods with a parameter
Source:R/solvers-erk-extra.R
parametric_rk_methods.RdAnas5(w) is Anastassi's fifth order method tuned to the frequency w
of an oscillatory problem; FRK65(omega) the adaptive sixth order fitted
method of Medvedev and coworkers, exact for the frequency omega;
pRRK22(kappa), pRRK33(kappa) and pRRK54(kappa) the parametric
relaxation SSP methods of Liu, Burchard, Kuzmin and Shang based on SSPRK22,
SSPRK33 and SSPRK54, stabilized by kappa (kappa = 0 gives the base
method). All take the limiters of explicit_rk_methods.
Usage
Anas5(w = 1, stage_limiter = NULL, step_limiter = NULL, thread = NULL)
FRK65(omega = 0, stage_limiter = NULL, step_limiter = NULL, thread = NULL)
pRRK22(kappa = 0, stage_limiter = NULL, step_limiter = NULL, thread = NULL)
pRRK33(kappa = 0, stage_limiter = NULL, step_limiter = NULL, thread = NULL)
pRRK54(kappa = 0, stage_limiter = NULL, step_limiter = NULL, thread = NULL)Arguments
- w, omega
Frequencies.
- stage_limiter, step_limiter, thread
See explicit_rk_methods.
- kappa
Stabilization parameter.
Examples
prob <- ODEProblem(function(u, p, t) c(u[2], -u[1]), c(0, 1), c(0, 10))
solve(prob, Anas5(w = 1), dt = 0.1)(10)
#> [1] -0.5440211 -0.8390715
solve(prob, FRK65(omega = 1))(10)
#> [1] -0.5279230 -0.8488422
solve(ODEProblem(function(u, p, t) -u, 1, c(0, 1)), pRRK33(kappa = 0.5), dt = 0.1)(1)
#> [1] 0.3678867