GlobalDiffEq: add adjoint-based global error control as a SciMLSensitivity extension#3953
Draft
ChrisRackauckas-Claude wants to merge 1 commit into
Draft
Conversation
This was referenced Jul 18, 2026
Carries SciML/GlobalDiffEq.jl#56 (GlobalAdjoint, adjoint_error_estimate; Cao and Petzold 2004, closes SciML/GlobalDiffEq.jl#4) into the monorepo, restructured as the package extension GlobalDiffEqSciMLSensitivityExt on SciMLSensitivity + QuadGK weakdeps. sensealg defaults to nothing and resolves to QuadratureAdjoint(autojacvec = true) when the extension loads; solving without the extension raises an instructive error. Public API and semantics otherwise match the original PR. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
ChrisRackauckas-Claude
force-pushed
the
globaldiffeq-adjoint
branch
from
July 22, 2026 08:24
ead709c to
78f31a5
Compare
This was referenced Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Ignore this PR until it has been reviewed by @ChrisRackauckas.
Now rebased onto
master— #3929 (the repo transfer) has merged, so this PR is the base of the remaining GlobalDiffEq stack. The single commit here is the only change; review it directly.Summary
Adds
GlobalAdjointandadjoint_error_estimate— adjoint-based a posteriori global error estimation and control (Cao and Petzold, SISC 26(2), 2004; closes SciML/GlobalDiffEq.jl#4). This is SciML/GlobalDiffEq.jl#56 carried into the monorepo, restructured as the package extensionGlobalDiffEqSciMLSensitivityExton SciMLSensitivity + QuadGK weakdeps so the base sublibrary stays light.Differences from GlobalDiffEq.jl#56:
ODEAdjointProblemconstruction, defect quadrature, the defaultsensealg) moved into the extension; the algorithm struct, validation, fixed-parameter SciMLStructures wrapper, orthogonal-direction sampling, and the gtol control loop stay in the package.sensealgdefaults tonothingand resolves toSciMLSensitivity.QuadratureAdjoint(autojacvec = true)when the extension is loaded; solving without the extension raises anArgumentErrorinstructing to runusing SciMLSensitivity, QuadGK.sensealgconstructor check.Version 1.3.0 (new public API), matching the bump proposed in GlobalDiffEq.jl#56.
Validation (run locally)
ODEDIFFEQ_TEST_GROUP=Core julia --project=lib/GlobalDiffEq -e 'using Pkg; Pkg.test()': pass — Basic 1/1, traits 3/3, Adjoint estimation and control 14/14, BigFloat 2/2ODEDIFFEQ_TEST_GROUP=QA julia --project=lib/GlobalDiffEq -e 'using Pkg; Pkg.test()': pass — 22 passed, 1 pre-existing declared broken🤖 Generated with Claude Code
https://claude.ai/code/session_01MfUh8tgp3iBmMv9nkBqoyY