@@ -5,7 +5,7 @@ using HYPRE.LibHYPRE: HYPRE_Complex
5
5
using HYPRE: HYPRE, HYPREMatrix, HYPRESolver, HYPREVector
6
6
using LinearSolve: HYPREAlgorithm, LinearCache, LinearProblem, LinearSolve,
7
7
OperatorAssumptions, default_tol, init_cacheval, __issquare,
8
- __conditioning
8
+ __conditioning, LinearSolveAdjoint
9
9
using SciMLBase: LinearProblem, SciMLBase
10
10
using UnPack: @unpack
11
11
using Setfield: @set!
@@ -68,6 +68,7 @@ function SciMLBase.init(prob::LinearProblem, alg::HYPREAlgorithm,
68
68
Pl = LinearAlgebra. I,
69
69
Pr = LinearAlgebra. I,
70
70
assumptions = OperatorAssumptions (),
71
+ sensealg = LinearSolveAdjoint (),
71
72
kwargs... )
72
73
@unpack A, b, u0, p = prob
73
74
@@ -89,10 +90,9 @@ function SciMLBase.init(prob::LinearProblem, alg::HYPREAlgorithm,
89
90
cache = LinearCache{
90
91
typeof (A), typeof (b), typeof (u0), typeof (p), typeof (alg), Tc,
91
92
typeof (Pl), typeof (Pr), typeof (reltol),
92
- typeof (__issquare (assumptions))
93
+ typeof (__issquare (assumptions), typeof (sensealg) )
93
94
}(A, b, u0, p, alg, cacheval, isfresh, Pl, Pr, abstol, reltol,
94
- maxiters,
95
- verbose, assumptions)
95
+ maxiters, verbose, assumptions, sensealg)
96
96
return cache
97
97
end
98
98
0 commit comments