Skip to content

Commit

Permalink
Use Conjugate Gradient (no plural) as full name of CG
Browse files Browse the repository at this point in the history
  • Loading branch information
wsshin committed Jan 5, 2022
1 parent 9a7fb26 commit f3710c3
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ makedocs(
"Getting started" => "getting_started.md",
"Preconditioning" => "preconditioning.md",
"Linear systems" => [
"Conjugate Gradients" => "linear_systems/cg.md",
"Conjugate Gradient" => "linear_systems/cg.md",
"Chebyshev iteration" => "linear_systems/chebyshev.md",
"MINRES" => "linear_systems/minres.md",
"BiCGStab(l)" => "linear_systems/bicgstabl.md",
Expand Down
4 changes: 2 additions & 2 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ When solving linear systems $Ax = b$ for a square matrix $A$ there are quite som

| Method | When to use it |
|---------------------|--------------------------------------------------------------------------|
| [Conjugate Gradients](@ref CG) | Best choice for **symmetric**, **positive-definite** matrices |
| [Conjugate Gradient](@ref CG) | Best choice for **symmetric**, **positive-definite** matrices |
| [MINRES](@ref MINRES) | For **symmetric**, **indefinite** matrices |
| [GMRES](@ref GMRES) | For **nonsymmetric** matrices when a good [preconditioner](@ref Preconditioning) is available |
| [IDR(s)](@ref IDRs) | For **nonsymmetric**, **strongly indefinite** problems without a good preconditioner |
| [BiCGStab(l)](@ref BiCGStabl) | Otherwise for **nonsymmetric** problems |

We also offer [Chebyshev iteration](@ref Chebyshev) as an alternative to Conjugate Gradients when bounds on the spectrum are known.
We also offer [Chebyshev iteration](@ref Chebyshev) as an alternative to Conjugate Gradient when bounds on the spectrum are known.

Stationary methods like [Jacobi](@ref), [Gauss-Seidel](@ref), [SOR](@ref) and [SSOR](@ref) can be used as smoothers to reduce high-frequency components in the error in just a few iterations.

Expand Down
4 changes: 2 additions & 2 deletions docs/src/linear_systems/cg.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [Conjugate Gradients (CG)](@id CG)
# [Conjugate Gradient (CG)](@id CG)

Conjugate Gradients solves $Ax = b$ approximately for $x$ where $A$ is a symmetric, positive-definite linear operator and $b$ the right-hand side vector. The method uses short recurrences and therefore has fixed memory costs and fixed computational costs per iteration.
Conjugate Gradient solves $Ax = b$ approximately for $x$ where $A$ is a symmetric, positive-definite linear operator and $b$ the right-hand side vector. The method uses short recurrences and therefore has fixed memory costs and fixed computational costs per iteration.

## Usage

Expand Down
2 changes: 1 addition & 1 deletion docs/src/linear_systems/chebyshev.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Chebyshev iteration solves the problem $Ax=b$ approximately for $x$ where $A$ is a symmetric, definite linear operator and $b$ the right-hand side vector. The methods assumes the interval $[\lambda_{min}, \lambda_{max}]$ containing all eigenvalues of $A$ is known, so that $x$ can be iteratively constructed via a Chebyshev polynomial with zeros in this interval. This polynomial ultimately acts as a filter that removes components in the direction of the eigenvectors from the initial residual.

The main advantage with respect to Conjugate Gradients is that BLAS1 operations such as inner products are avoided.
The main advantage with respect to Conjugate Gradient is that BLAS1 operations such as inner products are avoided.

## Usage

Expand Down
2 changes: 1 addition & 1 deletion test/cg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ end

ldiv!(y, P::JacobiPrec, x) = y .= x ./ P.diagonal

@testset "Conjugate Gradients" begin
@testset "Conjugate Gradient" begin

Random.seed!(1234321)

Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include("hessenberg.jl")
#Stationary solvers
include("stationary.jl")

#Conjugate gradients
#Conjugate gradient
include("cg.jl")

#BiCGStab(l)
Expand Down

0 comments on commit f3710c3

Please sign in to comment.