Commit 6a304a4
Handle empty u in construct_jacobian_cache
When u has length 0 (e.g. from u0=nothing converted to Float64[] by
OrdinaryDiffEqCore), return an empty Jacobian immediately instead of
passing the empty vector to ForwardDiff/DifferentiationInterface which
errors with "chunk size cannot be greater than structural_length(x)".
This fixes ImplicitDiscreteSolve's u0=nothing support for MTK systems
with only callbacks and no state variables.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent b0902e3 commit 6a304a4
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
38 | 44 | | |
39 | 45 | | |
40 | 46 | | |
| |||
0 commit comments