@@ -43,17 +43,13 @@ of random, `s` is an approximation to the eigenvalues of a system.
43
43
44
44
``` julia
45
45
s = rand (n)
46
-
47
- # Pr applies 1 ./ s .* vec
48
- Pr = LinearSolve. DiagonalPreconditioner (s)
49
- # Pl applies s .* vec
50
46
Pl = LinearSolve. DiagonalPreconditioner (s)
51
47
52
48
A = rand (n,n)
53
49
b = rand (n)
54
50
55
51
prob = LinearProblem (A,b)
56
- sol = solve (prob,IterativeSolvers_GMRES (),Pl= Pl,Pr = Pr )
52
+ sol = solve (prob,IterativeSolvers_GMRES (),Pl= Pl)
57
53
```
58
54
59
55
## Pre-Defined Preconditioners
@@ -63,6 +59,11 @@ preconditioners written to match the required interface.
63
59
64
60
- ` DiagonalPreconditioner(s::Union{Number,AbstractVector}) ` : the diagonal
65
61
preconditioner, defined as a diagonal matrix ` Diagonal(s) ` .
62
+ - ` InvDiagonalPreconditioner(s::Union{Number,AbstractVector}) ` : the diagonal
63
+ preconditioner, defined as a diagonal matrix ` Diagonal(1./s) ` .
64
+ - ` ComposePreconditioner(prec1,prec2) ` : composes the preconditioners to apply
65
+ ` prec1 ` before ` prec2 ` .
66
+ - ` InvComposePreconditioner(prec1,prec2) ` : only god knows what this is for.
66
67
67
68
## Preconditioner Interface
68
69
@@ -73,14 +74,6 @@ following interface:
73
74
74
75
- ` Base.eltype(::Preconditioner) `
75
76
- ` Base.adjoint(::Preconditioner) `
76
- - ` Base.inv(::Preconditioner) ` (Optional?)
77
-
78
- ### Required for Right Preconditioners
79
-
80
- - ` Base.\(::Preconditioner,::AbstractVector) `
81
77
- ` LinearAlgebra.ldiv!(::AbstractVector,::Preconditioner,::AbstractVector) `
82
-
83
- ### Required for Left Preconditioners
84
-
85
- - ` Base.*(::Preconditioner,::AbstractVector) `
86
- - ` LinearAlgebra.mul!(::AbstractVector,::Preconditioner,::AbstractVector) `
78
+ - ` Base.inv(::Preconditioner) ` (Dear Jesus Krylov.jl, why?)
79
+ - ` LinearAlgebra.mul!(::AbstractVector,::Preconditioner,::AbstractVector) ` (Required for Krylov.jl)
0 commit comments