Skip to content

Commit 6a2aac0

Browse files
Update iterative_wrappers.jl
1 parent 1ee536e commit 6a2aac0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/iterative_wrappers.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,9 @@ function SciMLBase.solve!(cache::LinearCache, alg::KrylovJL; kwargs...)
283283
end
284284

285285
# Copy the solution to the allocated output vector
286-
if cache.u !== cache.cacheval.x
287-
cache.u .= cache.cacheval.x
286+
cacheval = @get_cacheval(cache, :KrylovJL_GMRES)
287+
if cache.u !== cacheval.x
288+
cache.u .= cacheval.x
288289
end
289290

290291
return SciMLBase.build_linear_solution(alg, cache.u, resid, cache;

0 commit comments

Comments
 (0)