Skip to content

Commit 3cb97cc

Browse files
committed
*Builder -> *PreconBuilder in proposed pattern
1 parent 8b8b171 commit 3cb97cc

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/src/basics/Preconditioners.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,24 +76,24 @@ to reuse the preconditioner once constructed for the subsequent solution of a mo
7676
```@example precon3
7777
using LinearSolve, LinearAlgebra
7878
79-
Base.@kwdef struct WeightedDiagonalBuilder
79+
Base.@kwdef struct WeightedDiagonalPreconBuilder
8080
w::Float64
8181
end
8282
83-
(builder::WeightedDiagonalBuilder)(A,p) = (builder.w*Diagonal(A),I)
83+
(builder::WeightedDiagonalPreconBuilder)(A,p) = (builder.w*Diagonal(A),I)
8484
8585
n = 4
8686
A = n*I-rand(n, n)
8787
b = rand(n)
8888
8989
prob = LinearProblem(A, b)
90-
sol = solve(prob, KrylovJL_GMRES(precs = WeightedDiagonalBuilder(w=0.9)) )
90+
sol = solve(prob, KrylovJL_GMRES(precs = WeightedDiagonalPreconBuilder(w=0.9)) )
9191
sol.u
9292
9393
B=A.+0.1
9494
cache=sol.cache
9595
reinit!(cache,A=B, reuse_precs=true)
96-
sol = solve!(cache, KrylovJL_GMRES(precs = WeightedDiagonalBuilder(w=0.9)) )
96+
sol = solve!(cache, KrylovJL_GMRES(precs = WeightedDiagonalPreconBuilder(w=0.9)) )
9797
sol.u
9898
```
9999
## Preconditioner Interface
@@ -128,14 +128,14 @@ The following preconditioners match the interface of LinearSolve.jl.
128128
Implementations of the algebraic multigrid method. Must be converted to a
129129
preconditioner via `AlgebraicMultigrid.aspreconditioner(AlgebraicMultigrid.precmethod(A))`.
130130
Requires `A` as a `AbstractMatrix`. Provides the following methods:
131-
131+
132132
+ `AlgebraicMultigrid.ruge_stuben(A)`
133133
+ `AlgebraicMultigrid.smoothed_aggregation(A)`
134134
- [PyAMG](https://github.com/cortner/PyAMG.jl):
135135
Implementations of the algebraic multigrid method. Must be converted to a
136136
preconditioner via `PyAMG.aspreconditioner(PyAMG.precmethod(A))`.
137137
Requires `A` as a `AbstractMatrix`. Provides the following methods:
138-
138+
139139
+ `PyAMG.RugeStubenSolver(A)`
140140
+ `PyAMG.SmoothedAggregationSolver(A)`
141141
- [ILUZero.ILU0Precon(A::SparseMatrixCSC{T,N}, b_type = T)](https://github.com/mcovalt/ILUZero.jl):
@@ -154,7 +154,7 @@ The following preconditioners match the interface of LinearSolve.jl.
154154
and `HYPRE.BoomerAMG`.
155155
- [KrylovPreconditioners.jl](https://github.com/JuliaSmoothOptimizers/KrylovPreconditioners.jl/): Provides GPU-ready
156156
preconditioners via KernelAbstractions.jl. At the time of writing the package provides the following methods:
157-
157+
158158
+ Incomplete Cholesky decomposition `KrylovPreconditioners.kp_ic0(A)`
159159
+ Incomplete LU decomposition `KrylovPreconditioners.kp_ilu0(A)`
160160
+ Block Jacobi `KrylovPreconditioners.BlockJacobiPreconditioner(A, nblocks, device)`

0 commit comments

Comments
 (0)