Use the analytic event Jacobian as the AD test oracle - #4100
Merged
ChrisRackauckas merged 1 commit intoAug 2, 2026
Merged
Conversation
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
ChrisRackauckas
marked this pull request as ready for review
August 2, 2026 22:04
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.
Ignore this PR until it has been reviewed by @ChrisRackauckas.
Summary
This is a test-oracle correction; it does not change solver behavior.
Clean-master failure
The trajectory contains exactly one bounce. Perturbing the parameters for finite differences also perturbs the located root time, so the finite-difference reference carries enough event-time noise to fail the default comparison:
2.7e-97.5e-8On untouched master
a7080c6f6d, the full AD group passes its 28,299 general checks, then the event set ends with 3 passes, 2 failures, and 1 existing broken test. The failures are the ForwardDiff Jacobian and Enzyme gradient comparisons against that noisy finite-difference oracle.Hosted history brackets the exposure after the last passing
275ed1e4run and the shared-controller mergefd3f95bb99(#3720); the test itself did not change across that boundary. The closed-form reference distinguishes a small numerical trajectory shift from an AD regression.Analytic reference
For initial height
hand restitutione, the impact speed isv = sqrt(2h). The final-state Jacobian used here is:Local verification
At
05db644879, the exact fullGROUP=AD julia +1.12 --project -e 'using Pkg; Pkg.test()'run passes:git diff --check: pass