Commit ce17627
test: cap dt in the marginal continuous-callback crossing-time tests
The three `solve(prob, Tsit5())` calls in "Additional
SymbolicContinuousCallback options" assert event times to 1.0e-4 while
integrating at the default `reltol = 1.0e-3`. For `c2 = cos(3t)` that
leaves no room: the numerical trajectory carries ~2e-4 of error, and
since `dc2/dt = ±3` at the crossings the recorded event time inherits
~7e-5 of it -- a 1.4x margin against the assertion. The rootfind itself
is exact (the condition value at the recorded time is ~1e-16), so what
these tests actually measured was default-tolerance quadrature error,
not event handling.
OrdinaryDiffEqCore 4.12.0 (SciML/OrdinaryDiffEq.jl#3720) reinitializes
the step-size controller after any continuous callback with
`maybe_discontinuity = true`, which is correct -- a PI controller's
history is meaningless across a discontinuity -- but it changes the step
sequence, and the c2 error grew to ~8e-4, pushing the crossing times to
2.6e-4 and over the threshold.
Pass `dtmax = 0.01` as the other four solves in the same testset already
do. Crossing times land within ~1e-12, so the assertions now test the
rootfind rather than the controller.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TNqmRywBbj51czPQgoiEC71 parent 3533298 commit ce17627
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
725 | | - | |
| 725 | + | |
726 | 726 | | |
727 | 727 | | |
728 | 728 | | |
| |||
841 | 841 | | |
842 | 842 | | |
843 | 843 | | |
844 | | - | |
| 844 | + | |
845 | 845 | | |
846 | 846 | | |
847 | 847 | | |
| |||
861 | 861 | | |
862 | 862 | | |
863 | 863 | | |
864 | | - | |
| 864 | + | |
865 | 865 | | |
866 | 866 | | |
867 | 867 | | |
| |||
0 commit comments