Commit 66d9e78
Fix wrong interpolation coefficients for Rodas3, ROS34PW3
The Rosenbrock consolidation PR (SciML#3102) added a Hermite fallback in
_ode_addsteps! for methods with empty H matrices that computed:
k₁ = dt*f₀ - (u - uprev)
k₂ = 2*(u - uprev) - dt*(f₀ + f₁)
But hermite_interpolant in generic_dense.jl expects k[1] = f₀ and
k[2] = f₁ (raw derivative values at endpoints). The mismatch produced
wildly wrong interpolated values at saveat points (e.g. u(0.15) = 3.97
vs correct 3.28 for the test ODE du/dt = u*p).
Remove the incorrect fallback. Methods with empty H now fall through
to the generic _ode_addsteps! which correctly stores f₀ and f₁ for
standard Hermite interpolation.
Fixes SciML/SciMLSensitivity.jl#1398 (Core2 stiff_adjoints failures).
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 1fc789e commit 66d9e78
1 file changed
+6
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
137 | 133 | | |
138 | 134 | | |
139 | 135 | | |
| |||
208 | 204 | | |
209 | 205 | | |
210 | 206 | | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
219 | 211 | | |
220 | 212 | | |
221 | 213 | | |
| |||
0 commit comments