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
The `init` function for `DualAbstractLinearProblem` with `DefaultLinearSolver`
previously had a runtime conditional that checked whether the auto-selected
algorithm was `GenericLUFactorization`. This caused the return type to be
`Union{LinearCache, DualLinearCache}`, breaking type inference.
This fix:
1. Removes the runtime conditional from `init`, ensuring it always returns
`DualLinearCache` for type stability
2. Moves the `GenericLUFactorization` optimization to `solve!` instead,
where it checks at solve-time and uses direct dual solving if applicable
3. Adds `_use_direct_dual_solve` helper functions to detect when direct
dual solving should be used
4. Adds `_solve_direct_dual!` function that solves the dual system directly
without separating primal/partials
This preserves the performance optimization for `GenericLUFactorization`
(which can work directly with any number type including Duals) while
ensuring `init` has a concrete return type.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
0 commit comments