Skip to content

Commit a2a394b

Browse files
committed
put invpreconditioner back as it is used upstream. deprecate later
1 parent adb2f08 commit a2a394b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/preconditioners.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,12 @@ function LinearAlgebra.ldiv!(y, A::ComposePreconditioner, x)
2020
ldiv!(y, inner, x)
2121
ldiv!(outer, y)
2222
end
23+
24+
struct InvPreconditioner{T}
25+
P::T
26+
end
27+
28+
Base.eltype(A::InvPreconditioner) = Base.eltype(A.P)
29+
LinearAlgebra.ldiv!(A::InvPreconditioner, x) = mul!(x, A.P, x)
30+
LinearAlgebra.ldiv!(y, A::InvPreconditioner, x) = mul!(y, A.P, x)
31+
LinearAlgebra.mul!(y, A::InvPreconditioner, x) = ldiv!(y, A.P, x)

0 commit comments

Comments
 (0)