OrdinaryDiffEqPDIRK
PDIRK methods are parallel DIRK methods. SDIRK methods, or singly-diagonally implicit methods, have to build and solve a factorize a Jacobian of the form W = I-gammaJ where gamma is dependent on the chosen method. PDIRK methods use multiple different choices of gamma, i.e. W_i = I-gamma_iJ, which are all used in the update process. There are some advantages to this, as no SDIRK method can be a higher order than 5, while DIRK methods generally can have arbitrarily high order and lower error coefficients, leading to lower errors at larger dt sizes. With the right construction of the tableau, these matrices can be factorized and the underlying steps can be computed in parallel, which is why these are the parallel DIRK methods.
OrdinaryDiffEqPDIRK is experimental, as there are no parallel DIRK tableaus that achieve good performance in the literature.
Installation
To be able to access the solvers in OrdinaryDiffEqPDIRK, you must first install them use the Julia package manager:
using Pkg
Pkg.add("OrdinaryDiffEqPDIRK")This will only install the solvers listed at the bottom of this page. If you want to explore other solvers for your problem, you will need to install some of the other libraries listed in the navigation bar on the left.
Example usage
using OrdinaryDiffEqPDIRK
function lorenz!(du, u, p, t)
du[1] = 10.0 * (u[2] - u[1])
du[2] = u[1] * (28.0 - u[3]) - u[2]
du[3] = u[1] * u[2] - (8 / 3) * u[3]
end
u0 = [1.0; 0.0; 0.0]
tspan = (0.0, 100.0)
prob = ODEProblem(lorenz!, u0, tspan)
sol = solve(prob, PDIRK44())Full list of solvers
OrdinaryDiffEqPDIRK.PDIRK44 — Type
PDIRK44(;
autodiff = AutoForwardDiff(), concrete_jac = nothing, linsolve = nothing,
nlsolve = NLNewton(), extrapolant = :constant, threading = true
)Fourth-order, parallel diagonally implicit Runge-Kutta method. It evaluates the independent diagonal stages concurrently when threading = true, making it useful when stage solves are expensive and the problem can use CPU parallelism.
PDIRK44 is non-adaptive. Supply dt when solving an ODEProblem.
Fields
linsolve: optional linear solver configuration used by the implicit stages.nlsolve: nonlinear solver algorithm used for the stage equations.extrapolant: initial-stage extrapolation strategy.threading: whether eligible internal stage work uses threaded execution.autodiff: automatic-differentiation backend used to form Jacobians.concrete_jac: controls whether a concrete Jacobian is cached when supported.
Keywords
autodiff = AutoForwardDiff(): ADTypes backend for Jacobian construction.concrete_jac = nothing: retain the default Jacobian-concretization policy. Set a boolean value to request or disable a concrete Jacobian where the problem supports it.linsolve = nothing: linear solver algorithm or configuration.nothingselects the OrdinaryDiffEq default.nlsolve = NLNewton(): nonlinear solver for each implicit stage.extrapolant = :constant: extrapolation strategy used to initialize stage solves.threading = true: enable threaded independent stage work. Set tofalsefor serial execution.
Examples
using OrdinaryDiffEqPDIRK
using SciMLBase: ODEProblem, solve
prob = ODEProblem((u, p, t) -> -10u, 1.0, (0.0, 1.0))
sol = solve(prob, PDIRK44(), dt = 0.1)References
A. Iserles and S. P. Norsett, "On the theory of parallel Runge-Kutta methods," IMA Journal of Numerical Analysis 10 (1990), pp. 463-488.