|
| 1 | +# Explicit general linear methods with built-in global error estimation |
| 2 | +# (GLEE methods) from Constantinescu (2016), doi:10.1137/15M1014633. |
| 3 | +abstract type AbstractGLEEAlgorithm <: |
| 4 | +OrdinaryDiffEqCore.OrdinaryDiffEqAdaptiveAlgorithm end |
| 5 | + |
| 6 | +const _GLEE_DOCS_SHARED = """ |
| 7 | +GLEE methods propagate the solution `y` together with an asymptotically |
| 8 | +correct estimate `ε` of its global (accumulated) error, at the cost of a few |
| 9 | +extra stages per step. Solving any `ODEProblem` with a GLEE method produces a |
| 10 | +solution whose states are `ArrayPartition`s: `sol.u[i].x[1]` is the solution |
| 11 | +and `sol.u[i].x[2]` is the global error estimate at `sol.t[i]` (see |
| 12 | +[`global_error_estimate`](@ref)). The per-step increment of `ε` is an |
| 13 | +asymptotically correct local error estimate, which drives standard step-size |
| 14 | +adaptivity, so local tolerances behave exactly as for ordinary adaptive |
| 15 | +Runge-Kutta methods while the global error is estimated for free. |
| 16 | +
|
| 17 | +Only explicit, mass-matrix-free ODEs are supported. The reference for the |
| 18 | +methods and their theory is: |
| 19 | +
|
| 20 | +Emil M. Constantinescu, *Estimating Global Errors in Time Stepping*, SIAM |
| 21 | +Journal on Numerical Analysis 54(6), 2016. [arXiv:1503.05166](https://arxiv.org/abs/1503.05166) |
| 22 | +""" |
| 23 | + |
| 24 | +""" |
| 25 | + GLEE23() |
| 26 | +
|
| 27 | +3-stage, second-order explicit general linear method with global error |
| 28 | +estimation (Constantinescu 2016, eq. (4.6); PETSc's `TSGLEE23`). The cheapest |
| 29 | +GLEE method: only the first decoupling condition holds, so prefer |
| 30 | +[`GLEE24`](@ref) for long-time integration or mildly stiff problems. |
| 31 | +
|
| 32 | +$(_GLEE_DOCS_SHARED) |
| 33 | +""" |
| 34 | +struct GLEE23 <: AbstractGLEEAlgorithm end |
| 35 | + |
| 36 | +""" |
| 37 | + GLEE24() |
| 38 | +
|
| 39 | +4-stage, second-order explicit general linear method with global error |
| 40 | +estimation (Constantinescu 2016, eq. (A.3); PETSc's `TSGLEE24`). Satisfies |
| 41 | +both decoupling conditions (`B·U` and `B·A·U` diagonal), which keeps the error |
| 42 | +estimate faithful in long-time integration; this is the recommended |
| 43 | +second-order GLEE method. |
| 44 | +
|
| 45 | +$(_GLEE_DOCS_SHARED) |
| 46 | +""" |
| 47 | +struct GLEE24 <: AbstractGLEEAlgorithm end |
| 48 | + |
| 49 | +""" |
| 50 | + GLEE35() |
| 51 | +
|
| 52 | +5-stage, third-order explicit general linear method with global error |
| 53 | +estimation (Constantinescu 2016, eq. (4.9); PETSc's `TSGLEE35`). Satisfies |
| 54 | +both decoupling conditions and has a large negative-real-axis stability |
| 55 | +region; this is the recommended third-order GLEE method. |
| 56 | +
|
| 57 | +$(_GLEE_DOCS_SHARED) |
| 58 | +""" |
| 59 | +struct GLEE35 <: AbstractGLEEAlgorithm end |
| 60 | + |
| 61 | +SciMLBase.alg_order(::GLEE23) = 2 |
| 62 | +SciMLBase.alg_order(::GLEE24) = 2 |
| 63 | +SciMLBase.alg_order(::GLEE35) = 3 |
| 64 | + |
| 65 | +OrdinaryDiffEqCore.alg_adaptive_order(alg::AbstractGLEEAlgorithm) = |
| 66 | + SciMLBase.alg_order(alg) |
| 67 | + |
| 68 | +_glee_tableau_for(::GLEE23, ::Type{T}, ::Type{T2}) where {T, T2} = GLEE23Tableau(T, T2) |
| 69 | +_glee_tableau_for(::GLEE24, ::Type{T}, ::Type{T2}) where {T, T2} = GLEE24Tableau(T, T2) |
| 70 | +_glee_tableau_for(::GLEE35, ::Type{T}, ::Type{T2}) where {T, T2} = GLEE35Tableau(T, T2) |
0 commit comments