Background
Following the SDIRK tableau-form unification (#3196, #3650, #3651), all SDIRK/ESDIRK methods route through ESDIRKIMEXCache + _perform_step_iip!/_oop!. The per-stage Newton initial guess ("predictor") is the initial value handed to nlsolve! for each stage z_i, currently selected in _build_initial_guess_efs_{true,false} from: const_stage_guess, the tableau α matrix, or zero.
Make the full SUNDIALS ARKODE implicit-predictor menu available generically to every method, keep the tableau-derived custom α predictors as another option, and benchmark them all — do the custom ones actually win?
Predictor menu to implement
Selectable via a predictor option on the algorithms, wired into the generic stage-guess path:
:trivial (SUNDIALS 0) — z_i = u_n (Δu = 0). This is exactly today's empty-α default. already effectively present.
:max_order (SUNDIALS 1) — evaluate the previous step's dense-output interpolant at the stage time t_n + c_i·dt, at full available order. Building block already exists: current_extrapolant! / ode_extrapolant! (currently only used for stage 1 when extrapolant == :interpolant). Needs generalizing to all stages.
:variable_order (SUNDIALS 2) — same interpolant but with order reduced as the stage abscissa c_i extrapolates further.
:cutoff_order (SUNDIALS 3) — full order for stages with small c_i, drop to order 1 beyond a cutoff.
:tableau — the existing custom α / const_stage_guess predictors (KenCarp/Kvaerno/TRBDF2/Cash4).
Variable/cutoff order need an order-limited interpolant evaluation, which the current dense-output code doesn't expose — that's the main new infrastructure piece.
Current state by method
The ESDIRK*L2SA family (ESDIRK54I8L2SA, ESDIRK436L2SA2, ESDIRK437L2SA, ESDIRK547L2SA2, ESDIRK659L2SA) ships with no predictor (empty α ⇒ trivial). KenCarp/Kvaerno/TRBDF2/Cash4 carry tuned α predictors.
Measured impact (reltol = abstol = 1e-8)
Even a naive copy-previous-stage predictor (α[i][i-1]=1) on the no-predictor ESDIRK*L2SA family cuts function evaluations measurably — confirming predictors matter here:
| Method |
Problem |
nf (trivial) |
nf (copy-prev) |
Δ |
| ESDIRK54I8L2SA |
VanDerPol |
33515 |
28642 |
−14.5% |
| ESDIRK436L2SA2 |
VanDerPol |
37624 |
33600 |
−10.7% |
| ESDIRK437L2SA |
VanDerPol |
38834 |
34834 |
−10.3% |
| ESDIRK54I8L2SA |
Pollution |
2457 |
2278 |
−7.3% |
| ESDIRK436L2SA2 |
Robertson |
11063 |
9938 |
−10.2% |
(Predictors also shift naccept indirectly via the nlsolve convergence-rate estimate feeding the controller, so this is a behavioral change requiring validation, not a free swap.)
Proposed work
cc @ChrisRackauckas — updated to reflect the SUNDIALS predictor menu scope.
Background
Following the SDIRK tableau-form unification (#3196, #3650, #3651), all SDIRK/ESDIRK methods route through
ESDIRKIMEXCache+_perform_step_iip!/_oop!. The per-stage Newton initial guess ("predictor") is the initial value handed tonlsolve!for each stagez_i, currently selected in_build_initial_guess_efs_{true,false}from:const_stage_guess, the tableauαmatrix, or zero.Goal (per @ChrisRackauckas)
Make the full SUNDIALS ARKODE implicit-predictor menu available generically to every method, keep the tableau-derived custom α predictors as another option, and benchmark them all — do the custom ones actually win?
Predictor menu to implement
Selectable via a
predictoroption on the algorithms, wired into the generic stage-guess path::trivial(SUNDIALS 0) —z_i = u_n(Δu = 0). This is exactly today's empty-αdefault. already effectively present.:max_order(SUNDIALS 1) — evaluate the previous step's dense-output interpolant at the stage timet_n + c_i·dt, at full available order. Building block already exists:current_extrapolant!/ode_extrapolant!(currently only used for stage 1 whenextrapolant == :interpolant). Needs generalizing to all stages.:variable_order(SUNDIALS 2) — same interpolant but with order reduced as the stage abscissac_iextrapolates further.:cutoff_order(SUNDIALS 3) — full order for stages with smallc_i, drop to order 1 beyond a cutoff.:tableau— the existing customα/const_stage_guesspredictors (KenCarp/Kvaerno/TRBDF2/Cash4).Variable/cutoff order need an order-limited interpolant evaluation, which the current dense-output code doesn't expose — that's the main new infrastructure piece.
Current state by method
The ESDIRK*L2SA family (
ESDIRK54I8L2SA,ESDIRK436L2SA2,ESDIRK437L2SA,ESDIRK547L2SA2,ESDIRK659L2SA) ships with no predictor (emptyα⇒ trivial). KenCarp/Kvaerno/TRBDF2/Cash4 carry tunedαpredictors.Measured impact (reltol = abstol = 1e-8)
Even a naive copy-previous-stage predictor (
α[i][i-1]=1) on the no-predictor ESDIRK*L2SA family cuts function evaluations measurably — confirming predictors matter here:(Predictors also shift
nacceptindirectly via the nlsolve convergence-rate estimate feeding the controller, so this is a behavioral change requiring validation, not a free swap.)Proposed work
predictoroption (:trivial,:max_order,:variable_order,:cutoff_order,:tableau) wired into_build_initial_guess_efs_{true,false}.current_extrapolant!-based prediction to all stages (not just stage 1) for:max_order.:variable_order/:cutoff_order.αpredictors as:tableau.αbeats the generic interpolant predictors, and pick sensible per-method defaults.cc @ChrisRackauckas — updated to reflect the SUNDIALS predictor menu scope.