You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement `DiffEqBase.isinplace` for `Basis` to correctly report whether
the basis supports in-place evaluation based on the `IMPL` type parameter.
The issue was that when creating an `ODEProblem` from a `Basis` with
controls but without implicit variables (Basis{false, true}), SciMLBase
would incorrectly detect it as in-place compatible. This caused a
MethodError because:
- Basis{false, CTRLS} only supports out-of-place signatures: (u, p, t) or (u, p, t, c)
- Basis{true, CTRLS} supports in-place signatures: (du, u, p, t) or (du, u, p, t, c)
The fix adds:
```julia
DiffEqBase.isinplace(::Basis{IMPL, CTRLS}, n) where {IMPL, CTRLS} = IMPL
```
This ensures that `isinplace` returns `true` only when the basis has
implicit variables (IMPL=true) and supports in-place evaluation,
and `false` otherwise.
Fixes#554
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
0 commit comments