Skip to content

Commit 7fe9ebc

Browse files
committed
make SciMLLinearSolveAlgorithms callable
1 parent 73ca567 commit 7fe9ebc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/common.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,9 @@ SciMLBase.solve(prob::LinearProblem, alg, args...; kwargs...) =
7878
solve(init(prob, alg, args...; kwargs...))
7979

8080
SciMLBase.solve(cache) = solve(cache, cache.alg)
81+
82+
function (alg::SciMLLinearSolveAlgorithm)(x,A,b,args...;u0=nothing,kwargs...)
83+
prob = LinearProblem(A,b;u0=x)
84+
x = solve(prob,alg,args...;kwargs...)
85+
return x
86+
end

0 commit comments

Comments
 (0)