Skip to main content

Exponential integration and matrix-function actions

Exponential integrators integrate the linear part of a stiff problem exactly — through the matrix exponential and the entire ϕ\phi-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 ϕ\phi-functions (Caliari & Ostermann, Appl. Numer. Math. 59 (2009) 568-581): ϕk(z)=∑j≥0zj/(j+k)!\phi_k(z) = \sum_{j\ge 0} z^j / (j+k)!, so ϕ1(z)=(ez−1)/z\phi_1(z) = (e^z - 1)/z and ϕ2(z)=(ez−1−z)/z2\phi_2(z) = (e^z - 1 - z)/z^2.

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 f=Ly+Nf = L y + N (requires the linear accessor — a SemilinearRHS), the base unsplit ETD2RK of Sarumi (arXiv:2601.06849, eqs. (7)-(8)):

Nn=N(tn,yn),w=edt Lyn+dt ϕ1(dt L) Nn(exp-Euler predictor),N_n = N(t^n, y^n), \qquad w = e^{\mathrm{dt}\,L} y^n + \mathrm{dt}\, \phi_1(\mathrm{dt}\,L)\, N_n \quad (\text{exp-Euler predictor}), yn+1=edt Lyn+dt ϕ1(dt L) Nn+dt ϕ2(dt L) (N(w)−Nn).y^{n+1} = e^{\mathrm{dt}\,L} y^n + \mathrm{dt}\,\phi_1(\mathrm{dt}\,L)\, N_n + \mathrm{dt}\,\phi_2(\mathrm{dt}\,L)\, \big(N(w) - N_n\big).

Explicit in NN (the predictor ww is built from yny^n alone), order 2, L-stable for the linear part: N=0N = 0 gives yn+1=edt Lyny^{n+1} = e^{\mathrm{dt}\,L} y^n exactly, so stiff linear modes are damped to ∣edt λ∣|e^{\mathrm{dt}\,\lambda}| per step, killed as dt ∣λ∣→∞\mathrm{dt}\,|\lambda| \to \infty. Cost: two NN evaluations + three matrix-function-vector products (edtLe^{\mathrm{dt}L}, ϕ1(dtL)\phi_1(\mathrm{dt}L), ϕ2(dtL)\phi_2(\mathrm{dt}L)).

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 Jn=Duf(tn,yn)J_n = D_u f(t^n, y^n) and carries all of the stiffness (the linear part and the linearization of the nonlinear part) through the ϕ\phi-functions of hJnh J_n:

c1=0, c2=1, a21=ϕ1,b1=ϕ1−2ϕ3, b2=2ϕ3,b^1=ϕ1  (embedded order 2).c_1 = 0,\ c_2 = 1,\ a_{21} = \phi_1, \qquad b_1 = \phi_1 - 2\phi_3,\ b_2 = 2\phi_3, \qquad \hat b_1 = \phi_1 \ \ (\text{embedded order 2}).

In the reformulation this costs two ϕ\phi-Krylov builds per step:

U2=yn+h ϕ1(hJn) Fn,D2=f(tn+h,U2)−Fn−Jn(U2−yn),U_2 = y^n + h\, \phi_1(h J_n)\, F_n, \qquad D_2 = f(t^n + h, U_2) - F_n - J_n (U_2 - y^n), yn+1=U2+2h ϕ3(hJn) D2,y^=U2(error=2h ϕ3(hJn) D2).y^{n+1} = U_2 + 2h\, \phi_3(h J_n)\, D_2, \qquad \hat y = U_2 \quad (\text{error} = 2h\, \phi_3(h J_n)\, D_2).

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 h2ϕ2(hJn)vnh^2 \phi_2(h J_n) v_n with vn=ft(tn,yn)v_n = f_t(t^n, y^n) (a third build; probed by the same one-sided finite difference as the Rosenbrock driver; skipped for autonomous RHS).

Properties. Exact on linear problems (yn+1=ehJnyny^{n+1} = e^{h J_n} y^n, D2=0D_2 = 0); order 3; L-stable for the linear part (scalar stability function ehλe^{h\lambda}); not stiffly accurate (U2≠yn+1U_2 \neq y^{n+1} — no first-stage reuse); fully explicit in the nonlinearity (JnJ_n is applied only through the ϕ\phi builds, never inverted). Cost: two full ff evaluations, one JnJ_n application, two ϕ\phi-Krylov builds (three with the non-autonomous vnv_n term). There is deliberately no w='linear' option: a J=LJ = L-only frozen operator is only first order on a genuinely nonlinear problem — the same order drop the Rosenbrock driver documents.

Matrix-free ϕk(dt L) v\phi_k(\mathrm{dt}\,L)\,v​

The linear operator is applied matrix-free through the declared linear accessor; no dense matrix is ever formed. Each ϕk(dt L) v\phi_k(\mathrm{dt}\,L)\,v (and edtLve^{\mathrm{dt}L}v) is a Krylov approximation (Hochbrueck's method): build the Arnoldi basis from vv (the same Hessenberg process as jfnk.gmres), project dt L\mathrm{dt}\,L to the small dense Hessenberg HH, and apply ϕk\phi_k to that block — ϕk(dtL)v≈∥v∥ V ϕk(H)e1\phi_k(\mathrm{dt}L)v \approx \|v\|\, V\, \phi_k(H) e_1, a short Taylor-vector series since ϕk\phi_k is entire. One Arnoldi build per distinct RHS vector (three per ETD2RK step); the LL-application count is the step's Krylov-iteration count.

Gradients​

  • ETD2RK: LL is constant, so the three matrix-function actions are constant linear maps — each is re-attached with its transposed operator as the adjoint (e(dtL)Te^{(\mathrm{dt}L)^T}, ϕk(dtL)T\phi_k(\mathrm{dt}L)^T), by backward hooks, with no structural approximation. The only adjoint error is the Krylov tolerance of the transpose ϕ\phi-actions. (Self-adjoint LL, like the periodic central-difference Laplacian, lets the adjoint reuse the forward accessor.)
  • EXPRB32: JnJ_n depends on yny^n, so the ϕ\phi actions are not constant maps; the driver re-attaches the frozen JnJ_n linearization (each ϕk(hJn)v\phi_k(h J_n)v with the transposed frozen operator as adjoint), dropping the dJn/dudJ_n/du Hessian terms. Because every occurrence of the frozen operator in the step map carries a factor of hh, the dropped terms are O(h2) ∥dJn/du∥O(h^2)\,\|dJ_n/du\| — one power better than the Rosenbrock frozen-WW O(h)O(h). 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 ϕ\phi-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 ϕk\phi_k method.

Tests: tests/test_exponential.py (orders, linearity exactness, the non-autonomous vnv_n term, the gradient re-attachment).