Commit 8adb5f3
Fix FunctionMap DiscreteProblem import; correct Hard DAE test assertion (#3469)
- FunctionMap: import DiscreteProblem/DiscreteFunction from SciMLBase.
v7's OrdinaryDiffEq no longer re-exports these.
- Hard DAE: the test asserted `abs(sol(2-2^-10, idxs=1)) <= 1e-4`
expecting u[1] to decay from 5 toward 0, but the DAE's algebraic
constraint `u[2] = u[1]` (from mass matrix row 2 = 0) makes
`du[1] = -100*(u[1]-u[1]) = 0`, so u[1] = 5 (constant) — the
correct solution. The old solver had imperfect constraint enforcement
that let u[1] drift, which the test relied on. v7's solver correctly
snaps u[2] to u[1] from step 1.
Change the assertion to `sol(2-2^-10, idxs=1) ≈ 5.0 atol=1e-4`.
Also add `initializealg = BrownFullBasicInit()` since v7's default
`CheckInit` rejects the inconsistent u0 = [5, 0, 0].
Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 1e32225 commit 8adb5f3
2 files changed
Lines changed: 12 additions & 4 deletions
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
267 | | - | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
268 | 270 | | |
269 | 271 | | |
270 | 272 | | |
| |||
292 | 294 | | |
293 | 295 | | |
294 | 296 | | |
295 | | - | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
296 | 301 | | |
297 | 302 | | |
298 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
299 | 306 | | |
300 | 307 | | |
0 commit comments