Skip to content

Commit

Permalink
fix logic for "reuse_precs=true"
Browse files Browse the repository at this point in the history
  • Loading branch information
j-fu committed Oct 16, 2024
1 parent 952957f commit 2d09816
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ function SciMLBase.reinit!(cache::LinearCache;


isfresh = !isnothing(A)
precsisfresh = reuse_precs || isfresh || !isnothing(p)
precsisfresh = !reuse_precs && (isfresh || !isnothing(p))
isfresh |= cache.isfresh
precsisfresh |= cache.precsisfresh

Expand All @@ -246,7 +246,7 @@ function SciMLBase.reinit!(cache::LinearCache;
cache.Pl = Pl
cache.Pr = Pr
cache.isfresh = true
cache.isfresh = true
cache.precsisfresh = precsisfresh
end
end

Expand Down

0 comments on commit 2d09816

Please sign in to comment.