@@ -5,7 +5,7 @@ using HYPRE.LibHYPRE: HYPRE_Complex
55using HYPRE: HYPRE, HYPREMatrix, HYPRESolver, HYPREVector
66using LinearSolve: HYPREAlgorithm, LinearCache, LinearProblem, LinearSolve,
77 OperatorAssumptions, default_tol, init_cacheval, __issquare,
8- __conditioning
8+ __conditioning, LinearSolveAdjoint
99using SciMLBase: LinearProblem, SciMLBase
1010using UnPack: @unpack
1111using Setfield: @set!
@@ -68,6 +68,7 @@ function SciMLBase.init(prob::LinearProblem, alg::HYPREAlgorithm,
6868 Pl = LinearAlgebra. I,
6969 Pr = LinearAlgebra. I,
7070 assumptions = OperatorAssumptions (),
71+ sensealg = LinearSolveAdjoint (),
7172 kwargs... )
7273 @unpack A, b, u0, p = prob
7374
@@ -89,10 +90,9 @@ function SciMLBase.init(prob::LinearProblem, alg::HYPREAlgorithm,
8990 cache = LinearCache{
9091 typeof (A), typeof (b), typeof (u0), typeof (p), typeof (alg), Tc,
9192 typeof (Pl), typeof (Pr), typeof (reltol),
92- typeof (__issquare (assumptions))
93+ typeof (__issquare (assumptions), typeof (sensealg) )
9394 }(A, b, u0, p, alg, cacheval, isfresh, Pl, Pr, abstol, reltol,
94- maxiters,
95- verbose, assumptions)
95+ maxiters, verbose, assumptions, sensealg)
9696 return cache
9797end
9898
0 commit comments