Skip to content

Commit 834f467

Browse files
committed
krylovJL should take preconditioner, etc from cache
1 parent 7fe9ebc commit 834f467

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/krylov.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ function KrylovJL(A, b, args...; solver = gmres, kwargs...)
1010
return KrylovJL(solver, A, b, args, kwargs)
1111
end
1212

13-
function SciMLBase.solve(prob::LinearProblem, alg::KrylovJL, args...; kwargs...)
14-
@unpack A, b, p = prob
13+
function SciMLBase.solve(cache::LinearCache, alg::KrylovJL,args...;kwargs...)
14+
@unpack A, b = cache
1515
x, stats = alg.solver(A, b, args...; kwargs...)
1616
resid = A * x - b
1717
retcode = stats.solved ? :Success : :Failure
18-
return SciMLBase.build_solution(prob, alg, x, resid; retcode = retcode)
19-
end
18+
return x #SciMLBase.build_solution(prob, alg, x, resid; retcode = retcode)
19+
end

0 commit comments

Comments
 (0)