Exponential integration and matrix-function actions
Exponential integrators integrate the linear part of a stiff problem exactly — through the matrix exponential and the entire -functions — and only quadrature the mild nonlinear remainder. The stiffness is carried by the linear operator, so the method is unconditionally stable for the linear part and can run comfortably past the explicit wall, with no nonlinear solve per step. Finite-precision matrix-function actions still need a sufficient work budget; nonlinear remainder accuracy can impose a smaller step.
The -functions (Caliari & Ostermann, Appl. Numer. Math. 59 (2009) 568-581): , so and .
Higher-order exponential configurations
ExponentialRK adds explicit configuration names without growing the fixed enum
catalog. For a declared semilinear split, choose LawsonEuler, NorsettEuler,
ETDRK2, ETDRK3, ETDRK4 or HochOst4. For a full-Jacobian linearization,
choose Exp4, EPIRK4s3A, EPIRK4s3B, EPIRK5P1, EPIRK5P2, EXPRB53s3,
Exprb32 or Exprb43. The latter two provide embedded estimates.
import math
import torch
from warpSPHIntegrators.schemes import ExponentialRK
from warpSPHIntegrators import TensorState, tensor_rhs, solve
rhs = tensor_rhs(lambda t, y: -y + .1*y*y - .1*math.exp(-2*t))
run = solve(ExponentialRK('Exprb43'),
TensorState(torch.ones(1, dtype=torch.float64)), 1., rhs, dt=.1)
assert run.successful
assert abs(run.state.y.item() - math.exp(-1)) < 1e-6
The time-dependent full-Jacobian path augments time before linearization. Dense
actions up to dense_limit=64 entries, including an augmented clock, retain complete Jacobian/operator
derivatives. Above that bound, constant operators use Arnoldi and transpose
adjoints; tracked operator derivatives require an explicit larger dense bound.
phi_dim=60 limits work, while phi_tol=1e-11 controls dimension-refinement
agreement. An insufficient action budget fails the step. This numerical check
does not certify arbitrary nonnormal spectra.
Custom finalize must declare exponential_compatible=True and consume
ExponentialQuadrature, whose increments are already operator weighted. These
are affine tensor ODE methods; mass matrices and nonlinear projectors need a
different contract. There is no FSAL reuse.
On the known nonlinear reaction–diffusion demo at 1,024 entries and h=.1, ETDRK2/3/4 errors are 6.36e-4 / 4.51e-6 / 4.34e-8, with times .371/.741/.966 seconds on the measured CPU. The existing ETD2RK reaches the same second-order result faster; higher order is an accuracy option. Measurements and qualifications include source failures: pinned EPIRK5s3 misses order five, so it is unavailable, and HochOst4 uses the qualified cached formula.
Registered second-order and Rosenbrock alternatives
The following two fixed registrations retain their original action and gradient contracts. The factory above has separate checked-action and operator-AD behavior.
ETD2RK (ETD2RK)
A two-stage, second-order exponential time-differencing RK method for
semilinear RHS (requires the linear accessor — a
SemilinearRHS), the base unsplit ETD2RK of Sarumi (arXiv:2601.06849, eqs.
(7)-(8)):
Explicit in (the predictor is built from alone), order 2, L-stable for the linear part: gives exactly, so stiff linear modes are damped to per step, killed as . Cost: two evaluations + three matrix-function-vector products (, , ).
EXPRB32 (EXPRB32)
A two-stage, third-order exponential Rosenbrock method with an embedded order-2 estimator, from Hochbrueck, Ostermann & Schweitzer, SIAM J. Numer. Anal. 47(1) (2009) 786-803 (their section-5 coefficients, in the section-2.3 reformulation). The difference from ETD2RK: no split is needed — it freezes the full Jacobian and carries all of the stiffness (the linear part and the linearization of the nonlinear part) through the -functions of :
In the reformulation this costs two -Krylov builds per step:
The embedded estimate is the correction itself — free, no extra stage. For a non-autonomous RHS the HOS section-6 treatment applies: the stage gains with (a third build; probed by the same one-sided finite difference as the Rosenbrock driver; skipped for autonomous RHS).
Properties. Exact on linear problems (, );
order 3; L-stable for the linear part (scalar stability function );
not stiffly accurate ( — no first-stage reuse); fully
explicit in the nonlinearity ( is applied only through the builds,
never inverted). Cost: two full evaluations, one application,
two -Krylov builds (three with the non-autonomous term). There
is deliberately no w='linear' option: a -only frozen operator is
only first order on a genuinely nonlinear problem — the same order drop the
Rosenbrock driver documents.
Matrix-free
The linear operator is applied matrix-free through the declared linear
accessor; no dense matrix is ever formed. Each (and
) is a Krylov approximation (Hochbrueck's method): build
the Arnoldi basis from (the same Hessenberg process as jfnk.gmres),
project to the small dense Hessenberg , and apply
to that block — , a
short Taylor-vector series since is entire. One Arnoldi build per
distinct RHS vector (three per ETD2RK step); the -application count is the
step's Krylov-iteration count.
Gradients
- ETD2RK: is constant, so the three matrix-function actions are constant linear maps — each is re-attached with its transposed operator as the adjoint (, ), by backward hooks, with no structural approximation. The only adjoint error is the Krylov tolerance of the transpose -actions. (Self-adjoint , like the periodic central-difference Laplacian, lets the adjoint reuse the forward accessor.)
- EXPRB32: depends on , so the actions are not constant maps; the driver re-attaches the frozen linearization (each with the transposed frozen operator as adjoint), dropping the Hessian terms. Because every occurrence of the frozen operator in the step map carries a factor of , the dropped terms are — one power better than the Rosenbrock frozen- . Exact up to the Krylov tolerance on linear problems.
References
- Sarumi, arXiv:2601.06849 — the unsplit ETD2RK base scheme.
- Caliari & Ostermann, Exponential integrators for general linear operators, Appl. Numer. Math. 59 (2009) 568-581 — the -functions.
- Hochbrueck, Ostermann, Schweitzer, Exponential Rosenbrock and adaptive time integrators for semilinear PDEs, SIAM J. Numer. Anal. 47 (2009) 786-803 — EXPRB32.
- Hochbrueck, Unconditional stability of a Krylov exponential time differencing integrator (1997) — the Krylov method.
Tests: tests/test_exponential.py (orders, linearity exactness, the
non-autonomous term, the gradient re-attachment).