Skip to content

Commit 225870f

Browse files
committed
krylov resid
1 parent b9c3924 commit 225870f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/iterative_wrappers.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ function SciMLBase.solve(cache::LinearCache, alg::KrylovJL; kwargs...)
137137

138138
args = (cache.cacheval, cache.A, cache.b)
139139
kwargs = (atol = atol, rtol = rtol, itmax = itmax, verbose = verbose,
140-
alg.kwargs...)
140+
history = true, alg.kwargs...)
141141

142142
if cache.cacheval isa Krylov.CgSolver
143143
N !== I &&
@@ -159,7 +159,7 @@ function SciMLBase.solve(cache::LinearCache, alg::KrylovJL; kwargs...)
159159
Krylov.solve!(args...; kwargs...)
160160
end
161161

162-
resid = nothing
162+
resid = cache.cacheval.stats.residuals |> last
163163

164164
return SciMLBase.build_linear_solution(alg, cache.u, resid, cache;
165165
iters = cache.cacheval.stats.niter)

0 commit comments

Comments
 (0)