Commit f0de8b6
_make_jac_reuse_state previously returned Union{Nothing, JacReuseState{T}}
because it conditionally allocated based on max_jac_age > 1. This caused
type instability in the Rosenbrock cache's JRType parameter, which
propagated to ODESolution return types and broke @inferred tests in:
- OrdinaryDiffEqRosenbrock: DAE Rosenbrock AD Tests
- OrdinaryDiffEqNonlinearSolve: Mass Matrix Tests with Singular Mass Matrices
Fix: always allocate JacReuseState regardless of max_jac_age. When
max_jac_age <= 1, the age check in _rosenbrock_jac_reuse_decision
triggers every step anyway, so behavior is unchanged.
Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com>
1 parent a6c6e19 commit f0de8b6
2 files changed
Lines changed: 9 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
104 | 103 | | |
105 | 104 | | |
106 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
0 commit comments