Skip to content

Commit 7c1f1b2

Browse files
author
Avik Pal
committed
Fix HYPRE
1 parent 34995f6 commit 7c1f1b2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/LinearSolveHYPREExt.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ using HYPRE.LibHYPRE: HYPRE_Complex
55
using HYPRE: HYPRE, HYPREMatrix, HYPRESolver, HYPREVector
66
using LinearSolve: HYPREAlgorithm, LinearCache, LinearProblem, LinearSolve,
77
OperatorAssumptions, default_tol, init_cacheval, __issquare,
8-
__conditioning
8+
__conditioning, LinearSolveAdjoint
99
using SciMLBase: LinearProblem, SciMLBase
1010
using UnPack: @unpack
1111
using 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
9797
end
9898

0 commit comments

Comments
 (0)