Skip to content

Commit 4f3d481

Browse files
committed
Clarify resnorm == r_0
1 parent 3cd65ab commit 4f3d481

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

src/bicgstabl.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ For BiCGStab(l) this is a less dubious term than "number of iterations";
159159
- `abstol::Real = zero(real(eltype(b)))`,
160160
`reltol::Real = sqrt(eps(real(eltype(b))))`: absolute and relative
161161
tolerance for the stopping condition
162-
`|r_k| ≤ max(reltol * resnorm, abstol)`, where `r_k ≈ A * x_k - b`
162+
`|r_k| ≤ max(reltol * |r_0|, abstol)`, where `r_k ≈ A * x_k - b`
163163
is the approximate residual in the `k`th iteration;
164164
!!! note
165165
1. The true residual norm is never computed during the iterations,

src/cg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ cg(A, b; kwargs...) = cg!(zerox(A, b), A, b; initially_zero = true, kwargs...)
181181
- `abstol::Real = zero(real(eltype(b)))`,
182182
`reltol::Real = sqrt(eps(real(eltype(b))))`: absolute and relative
183183
tolerance for the stopping condition
184-
`|r_k| ≤ max(reltol * resnorm, abstol)`, where `r_k ≈ A * x_k - b`
184+
`|r_k| ≤ max(reltol * |r_0|, abstol)`, where `r_k ≈ A * x_k - b`
185185
is approximately the residual in the `k`th iteration.
186186
!!! note
187187
The true residual norm is never explicitly computed during the iterations

src/chebyshev.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Solve Ax = b for symmetric, definite matrices A using Chebyshev iteration.
120120
- `abstol::Real = zero(real(eltype(b)))`,
121121
`reltol::Real = sqrt(eps(real(eltype(b))))`: absolute and relative
122122
tolerance for the stopping condition
123-
`|r_k| ≤ max(reltol * resnorm, abstol)`, where `r_k = A * x_k - b`
123+
`|r_k| ≤ max(reltol * |r_0|, abstol)`, where `r_k = A * x_k - b`
124124
is the residual in the `k`th iteration;
125125
- `maxiter::Int = size(A, 2)`: maximum number of inner iterations of GMRES;
126126
- `Pl = Identity()`: left preconditioner;

src/gmres.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Solves the problem ``Ax = b`` with restarted GMRES.
156156
- `abstol::Real = zero(real(eltype(b)))`,
157157
`reltol::Real = sqrt(eps(real(eltype(b))))`: absolute and relative
158158
tolerance for the stopping condition
159-
`|r_k| ≤ max(reltol * resnorm, abstol)`, where `r_k = A * x_k - b`
159+
`|r_k| ≤ max(reltol * |r_0|, abstol)`, where `r_k = A * x_k - b`
160160
- `restart::Int = min(20, size(A, 2))`: restarts GMRES after specified number of iterations;
161161
- `maxiter::Int = size(A, 2)`: maximum number of inner iterations of GMRES;
162162
- `Pl`: left preconditioner;

src/idrs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ shadow space.
2727
- `abstol::Real = zero(real(eltype(b)))`,
2828
`reltol::Real = sqrt(eps(real(eltype(b))))`: absolute and relative
2929
tolerance for the stopping condition
30-
`|r_k| ≤ max(reltol * resnorm, abstol)`, where `r_k = A * x_k - b`
30+
`|r_k| ≤ max(reltol * |r_0|, abstol)`, where `r_k = A * x_k - b`
3131
is the residual in the `k`th iteration;
3232
- `maxiter::Int = size(A, 2)`: maximum number of iterations;
3333
- `log::Bool`: keep track of the residual norm in each iteration;

src/minres.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ Solve Ax = b for (skew-)Hermitian matrices A using MINRES.
178178
- `abstol::Real = zero(real(eltype(b)))`,
179179
`reltol::Real = sqrt(eps(real(eltype(b))))`: absolute and relative
180180
tolerance for the stopping condition
181-
`|r_k| ≤ max(reltol * resnorm, abstol)`, where `r_k = A * x_k - b`
181+
`|r_k| ≤ max(reltol * |r_0|, abstol)`, where `r_k = A * x_k - b`
182182
is the residual in the `k`th iteration
183183
!!! note
184184
The residual is computed only approximately.

src/qmr.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ Solves the problem ``Ax = b`` with the Quasi-Minimal Residual (QMR) method.
240240
- `abstol::Real = zero(real(eltype(b)))`,
241241
`reltol::Real = sqrt(eps(real(eltype(b))))`: absolute and relative
242242
tolerance for the stopping condition
243-
`|r_k| ≤ max(reltol * resnorm, abstol)`, where `r_k = A * x_k - b`
243+
`|r_k| ≤ max(reltol * |r_0|, abstol)`, where `r_k = A * x_k - b`
244244
- `log::Bool`: keep track of the residual norm in each iteration;
245245
- `verbose::Bool`: print convergence information during the iteration.
246246

0 commit comments

Comments
 (0)