Skip to content

Commit 21827b3

Browse files
Fiox solution handling for KrylovJL on subarrays
Fixes #347
1 parent 0886d05 commit 21827b3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/iterative_wrappers.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,11 @@ function SciMLBase.solve!(cache::LinearCache, alg::KrylovJL; kwargs...)
282282
ReturnCode.Success
283283
end
284284

285+
# Copy the solution to the allocated output vector
286+
if cache.u !== cache.cacheval.x
287+
cache.u .= cache.cacheval.x
288+
end
289+
285290
return SciMLBase.build_linear_solution(alg, cache.u, resid, cache;
286291
iters = stats.niter)
287292
end

0 commit comments

Comments
 (0)