Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle StaticArrays.jl #440

Closed
ranocha opened this issue Dec 6, 2023 · 2 comments
Closed

Handle StaticArrays.jl #440

ranocha opened this issue Dec 6, 2023 · 2 comments

Comments

@ranocha
Copy link
Member

ranocha commented Dec 6, 2023

It looks like the current default algorithm will choose

DefaultAlgorithmChoice.KrylovJL_GMRES

when an SMatrix from StaticArrays.jl is passed. For example,

julia> using LinearSolve, StaticArrays

julia> A = @SMatrix [1.0 2.0; 3.0 4.0]; b = @SVector [1.0, 2.0]; prob = LinearProblem(A, b)
LinearProblem. In-place: true
b: 2-element SVector{2, Float64} with indices SOneTo(2):
 1.0
 2.0

julia> sol = solve(prob)
retcode: Default
u: 2-element Vector{Float64}:
 1.966189735084803e-16
 0.49999999999999994

julia> sol.alg
LinearSolve.DefaultLinearSolver(LinearSolve.DefaultAlgorithmChoice.KrylovJL_GMRES)

It would be nice if LinearSolve.jl could handle StaticArrays.jl efficiently.

CC @SKopecz

@ChrisRackauckas
Copy link
Member

This was fixed by #436 . The PR was already there I just needed to review and merge 😅

@ranocha
Copy link
Member Author

ranocha commented Dec 6, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants