Skip to content

Commit b0d53ae

Browse files
committed
make sure cache u is updated
1 parent 0b7842a commit b0d53ae

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ext/LinearSolveForwardDiffExt.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,17 +189,19 @@ function Base.setproperty!(dc::DualLinearCache, sym::Symbol, val)
189189
# If the property is A or b, also update it in the LinearCache
190190
if sym === :A || sym === :b || sym === :u
191191
setproperty!(dc.linear_cache, sym, nodual_value(val))
192+
elseif hasfield(DualLinearCache, sym)
193+
setfield!(dc,sym,val)
192194
elseif hasfield(LinearSolve.LinearCache, sym)
193195
setproperty!(dc.linear_cache, sym, val)
194196
end
197+
195198

196199
# Update the partials if setting A or b
197200
if sym === :A
198201
setfield!(dc, :partials_A, partial_vals(val))
199202
elseif sym === :b
200203
setfield!(dc, :partials_b, partial_vals(val))
201204
elseif sym === :u
202-
Main.@infiltrate
203205
setfield!(dc, :partials_u, partial_vals(val))
204206
end
205207
end
@@ -258,3 +260,4 @@ end
258260

259261

260262
end
263+

0 commit comments

Comments
 (0)