Repository navigation
Description
From Dennis Ogiermann, 2026-08-14: "Is there any chance we can funnel this into an ODEFunction or SplitODEFunction and make a search over which solver works best for our individual models?"
Status (2026-09-30): still gated on #65. #89 and #90 closed three of the gaps below; the two that sit on the jac_prototype/precs path moved to #65, and the Field-as-ODE-state gap from #81's addendum is added.
Relationship to #65
#65 is the prerequisite and covers the implicit hook that DESIGN.md §7 (:678-686) already scopes: a thin FunctionOperator-style adapter so LinearizedOp can be handed to ODEFunction as jac_prototype. This issue is the layer above it, and it is the part Dennis actually asked for: presenting the operator itself as the linear half of a split problem, and then searching the integrator space per model. Do #65 first.
What exists today
An RHS idiom and nothing else. Since #90 the documented explicit-stepping idiom is field-level apply!(du, P, u) on a prepared operator (src/linalg.jl:111-117, :688-695), a hand-rolled stepper rather than an ODEProblem; test/ode_rhs.jl exercises it and loads no ODE package. There is no SciML anywhere in [deps], [weakdeps], [extensions], or ext/.
Meanwhile every time-stepping example rolls its own integrator: explicit Euler in examples/heat_equation.jl:27-31, a hand-written Godunov split in examples/niederer_benchmark.jl:180-213, and examples/monodomain_amr.jl:60-72. None of them can reach an IMEX or exponential integrator, which for a stiff-diffusion / stiff-reaction monodomain problem is where the actual timestep savings live.
The false "OrdinaryDiffEq.jl interop" claim that README.md used to advertise was retracted in #90: README.md:150 and docs/index.qmd:23 now say there is no OrdinaryDiffEq integration yet.
The shape
A = prepare(diffusion(g, κ), u) # linear, constant, matrix-free
f2 = (du, u, p, t) -> reaction!(du, u, p, t) # pointwise
prob = ODEProblem(SplitODEFunction(sciml(A), f2), u0, tspan, p)SplitODEFunction is the right target rather than a plain ODEFunction because it is what unlocks the integrator families that suit this problem class: IMEX (KenCarp*, ARKODE), exponential integrators (ETDRK*, EPIRK*), and the split/LinearExponential methods. The reason the examples all hand-roll Godunov splitting is that there is no way to hand the linear half to a solver as an operator.
Then the search: a work-precision sweep across integrators, per model, comparing wall time at fixed accuracy against a reference solution. That belongs in benchmark/ or examples/, never in the package — same rule that keeps DifferentiationInterface out of [deps] per CLAUDE.md. The output is a work-precision diagram per model plus a recommended default, which is directly what Dennis asked for.
Gaps that block the wrapper
-
PreparedOperatorhas no supertype (src/linalg.jl:35), soislinear(P),isconstant(P), andadjoint(P)areMethodErrors. A SciML operator needs at least the first two. Done in fix(linalg): prepared operators declare their traits #89: it stays outsideAbstractOperatorby design and declares all four traits explicitly (src/linalg.jl:75-82);adjoint(P)remains deliberately unsupported — compose first, then prepare. -
PreparedComposedandPreparedAdjointare<: AbstractOperator(src/linalg.jl:298,326) but declare no trait methods, soislinearon a prepared composed tree silently falls through to thefalsedefault atsrc/operators/abstract.jl:31. Any wrapper that forwards traits fromP.opgets a wrong answer that degrades safely by accident rather than by design. This is an invariant hazard — "traits default to the weaker claim" only protects you if the weaker claim is also the declared one — and it should be fixed regardless of whether this issue proceeds. Done in fix(linalg): prepared operators declare their traits #89 (src/linalg.jl:308-311,:337-340). - The
update_coefficients!hook (vialinearize!) andldiv!onMultigridPreconditionermoved to feat(sciml): build the planned SciMLOperators jac_prototype adapter (DESIGN §7) #65 — both sit on thejac_prototype/precspath. -
isconstantis declared on every leaf and propagated through the algebra, and consumed nowhere insrc/. It is the obvious contract for a SciMLisconstant/ caching decision and is currently inert. - The affine term needs a home. Inhomogeneous BCs live outside the linear map by design and come back through
boundary_rhs. In aSplitODEFunctionthat is a constant additive term, and the wrapper has to either carry an affine slot or document thatf2must include it. Nothing supplies it today. (It also re-allocates on every call —src/linalg.jl:493-512.) -
Fieldcannot be an OrdinaryDiffEq state. It defines onlyeltype/similar/copy(src/Fields.jl:263-266) — nocopyto!, broadcast,norm,length, or indexing — so aSplitODEFunctionoverFields is impossible today, and a flat-state adapter pays back exactly the staging copiesDESIGN.md:675-677warns about. Needs the minimal array interface OrdinaryDiffEq actually requires ofu(and which parts only adaptive stepping or particular integrator families need), with interior-only broadcast/norm consistent with the interior-only-DOF invariant. Scoped in meta(sciml): expose prepared operators to the SciML integrator stack #81's addendum, question 1. - Don't route around the guard.
src/linalg.jl:704-711deliberately makesmul!(y, ::AbstractOperator, x::AbstractVector)throw with "wrap the operator once withprepare(L, x)". A convenience constructor must not bypass it. - Fix the
README.md:147claim, or make it true. Retracted in docs: retract the OrdinaryDiffEq interop claim and document field-level apply! as the explicit-stepping idiom #90.
Scope note
Extension only — ext/MatrixFreeOperatorsSciMLExt.jl, weak dep, nothing added to [deps], per CLAUDE.md and DESIGN.md:50 ("Drop SciMLOperators as the core … a thin optional adapter"). The solver search is a benchmark artifact, not a package feature.
—
🤖 Claude checked off what #89/#90 already did and handed two chores to #65.
claude-opus-5-5[1m] (high) · claude-code 2.1.285 · unreviewed
Activity