Repository navigation
fix: specialize A*sol to use sol.u for AbstractNoTimeSolution - #1363
Merged
ChrisRackauckas merged 1 commit intoMay 21, 2026
Merged
Conversation
Member
|
thanks! |
Merged
2 tasks
ChrisRackauckas-Claude
pushed a commit
to ChrisRackauckas-Claude/SciMLBase.jl
that referenced
this pull request
May 26, 2026
…oTimeSolution)` The broad `*(A::AbstractMatrix, sol::AbstractNoTimeSolution) = A * sol.u` method introduced in SciML#1363 had unresolved ambiguities with LinearAlgebra's specialized methods (Diagonal, AbstractTriangular, Adjoint/Transpose-of-vector) that surfaced as Aqua `detect_ambiguities` failures and a MethodError in LinearSolve.jl's static_arrays test. Add disambiguators in solution_interface.jl that forward each conflicting signature to `A * sol.u`, preserving the LinearAlgebra fast paths. Also broaden the StaticArrays extension to cover both N=1 and N=2 sol shapes (StaticMatrix * AbstractMatrix exists in StaticArrays too). Verified locally: `Test.detect_ambiguities(SciMLBase)` returns empty on both Julia 1.10 and 1.12 with these methods. Co-Authored-By: Chris Rackauckas <[email protected]>
ChrisRackauckas
added a commit
that referenced
this pull request
May 26, 2026
…tractNoTimeSolution)` After #1363 added `Base.:*(A::AbstractMatrix, sol::AbstractNoTimeSolution) = A * sol.u`, LinearSolve's `test/nopre/static_arrays.jl` started failing with a MethodError ambiguity between that method and StaticArrays' `*(::StaticMatrix, ::AbstractVector)`. This adds a weakdep extension on StaticArrays that defines the disambiguating method `*(::StaticMatrix, ::AbstractNoTimeSolution{<:Any, 1})`, which Julia's dispatcher selects unambiguously. Co-Authored-By: Chris Rackauckas <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ax where x is an AbstractNoTimeSolution was hitting a slow generic
fallback. Added a Base.: method that unwraps sol.u directly.