@@ -51,11 +51,10 @@ function linearsolve_forwarddiff_solve(cache::DualLinearCache, alg, args...; kwa
51
51
52
52
rhs_list = xp_linsolve_rhs (uu, ∂_A, ∂_b)
53
53
54
- partial_prob = LinearProblem (cache. cache. A, rhs_list[1 ])
54
+ new_A = nodual_value (cache. prob. A)
55
+ partial_prob = LinearProblem (new_A, rhs_list[1 ])
55
56
partial_cache = init (partial_prob, alg, args... ; kwargs... )
56
57
57
- Main. @infiltrate
58
-
59
58
for i in eachindex (rhs_list)
60
59
partial_cache. b = rhs_list[i]
61
60
rhs_list[i] = copy (solve! (partial_cache, alg). u)
@@ -110,7 +109,8 @@ function xp_linsolve_rhs(uu, ∂_A::Union{<:Partials, <:AbstractArray{<:Partials
110
109
b_list = partials_to_list (∂_b)
111
110
112
111
Auu = [A * uu for A in A_list]
113
- b_list .- Auu
112
+
113
+ return b_list .- Auu
114
114
end
115
115
116
116
function xp_linsolve_rhs (
@@ -119,13 +119,12 @@ function xp_linsolve_rhs(
119
119
120
120
Auu = [A * uu for A in A_list]
121
121
122
- - Auu
122
+ return - Auu
123
123
end
124
124
125
125
function xp_linsolve_rhs (
126
126
uu, ∂_A:: Nothing , ∂_b:: Union{<:Partials, <:AbstractArray{<:Partials}} )
127
127
b_list = partials_to_list (∂_b)
128
- Main. @infiltrate
129
128
b_list
130
129
end
131
130
0 commit comments