Commit 4b3cafd
do_newJW: refactorize W on the linear path when γdt drifts (#3934)
For islinearfunction problems do_newJW returned (false, false) after the
first step, assuming a constant J means W never changes — but
W = J - M/(γdt) depends on the step size, so concrete-A linear solvers
kept the factorization from the first step's dt forever. Combined with
WOperator._concrete_form being stale for operator Jacobians
(SciML/SciMLOperators.jl#408), implicit solvers on
SplitODEProblem(MatrixOperator(A), f) with LU/KLU returned garbage with
retcode Success in ~2 steps (#3933).
Keep new_jac = false on the linear path (J really is constant) but apply
the standard W_γdt cutoff test for new_W, matching the DAE branch below.
Adds an end-to-end regression test (KenCarp3/4/5 + LU on a 2x2 split
operator problem, non-split TRBDF2, and the always-working Krylov path);
requires SciMLOperators >= 1.24.4 (compat bumped) for the companion fix,
so CI will resolve only once that releases.
Fixes #3933 together with SciML/SciMLOperators.jl#408.
Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com>1 parent 754b504 commit 4b3cafd
3 files changed
Lines changed: 56 additions & 1 deletion
File tree
- lib/OrdinaryDiffEqDifferentiation
- src
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
512 | | - | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
513 | 523 | | |
514 | 524 | | |
515 | 525 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
Lines changed: 44 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
0 commit comments