Skip to content

Commit 8194943

Browse files
clean up
1 parent 1e47fbe commit 8194943

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

docs/src/basics/Preconditioners.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ preconditioners written to match the required interface.
6363
preconditioner, defined as a diagonal matrix `Diagonal(1./s)`.
6464
- `ComposePreconditioner(prec1,prec2)`: composes the preconditioners to apply
6565
`prec1` before `prec2`.
66-
- `InvComposePreconditioner(prec1,prec2)`: only god knows what this is for.
6766

6867
## Preconditioner Interface
6968

src/default.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function init_cacheval(alg::Nothing, A, b, u, Pl, Pr, maxiters, abstol, reltol,
103103

104104
# Not factorizable operator, default to only using A*x
105105
# IterativeSolvers is faster on CPU but not GPU-compatible
106-
elseif cache.u isa Array
106+
elseif u isa Array
107107
alg = IterativeSolversJL_GMRES()
108108
init_cacheval(alg, A, b, u, Pl, Pr, maxiters, abstol, reltol, verbose)
109109
else

src/preconditioners.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ function LinearAlgebra.ldiv!(y, A::ComposePreconditioner, x)
7878
ldiv!(outer, y)
7979
end
8080

81+
# This is just an implementation detail for Krylov.jl
82+
# It wants to use mul! instead of ldiv! so we convert.
83+
8184
struct InvComposePreconditioner{Tp <: ComposePreconditioner}
8285
P::Tp
8386
end

0 commit comments

Comments
 (0)