Skip to content

Commit 846cb26

Browse files
update values before klu_factor
Otherwise it's just using the values from before! BTW, why do we need to klu_factor before klu!, instead of just klu!? Don't that do the factorization as well?
1 parent c5168f3 commit 846cb26

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/factorization.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ function SciMLBase.solve(cache::LinearCache, alg::KLUFactorization; kwargs...)
143143
# If we have a cacheval already, run umfpack_symbolic to ensure the symbolic factorization exists
144144
# This won't recompute if it does.
145145
KLU.klu_analyze!(cache.cacheval)
146+
copyto!(cache.cacheval.nzval,A.nzval)
146147
if cache.cacheval._numeric === C_NULL # We MUST have a numeric factorization for reuse, unlike UMFPACK.
147148
KLU.klu_factor!(cache.cacheval)
148149
end

0 commit comments

Comments
 (0)