Skip to content

Add/improve stage predictors for ESDIRK methods now in tableau form #3658

@singhharsh1708

Description

@singhharsh1708

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.

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 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

  • Add a generic predictor option (:trivial, :max_order, :variable_order, :cutoff_order, :tableau) wired into _build_initial_guess_efs_{true,false}.
  • Generalize current_extrapolant!-based prediction to all stages (not just stage 1) for :max_order.
  • Add order-limited interpolant evaluation to support :variable_order / :cutoff_order.
  • Keep the tableau custom α predictors as :tableau.
  • Benchmark all predictors × methods × stiff problems (nf / naccept / wall-time) — determine whether custom α beats the generic interpolant predictors, and pick sensible per-method defaults.
  • Add an nf/naccept benchmark to guard predictor regressions.

cc @ChrisRackauckas — updated to reflect the SUNDIALS predictor menu scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions