Skip to content

Commit

Permalink
Add COCG in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
wsshin committed Jan 5, 2022
1 parent f3710c3 commit b457247
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/src/linear_systems/cg.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# [Conjugate Gradient (CG)](@id CG)

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.
CG solves $Ax = b$ approximately for $x$ where $A$ is a Hermitian, 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.

A simple variant called Conjugate Orthogonal Conjugate Gradient (COCG) is obtained by replacing the dot product ($x^*y$) in the CG algorithm with the unconjugated dot product ($xᵀy$). For complex symmetric matrices ($A = Aᵀ$), COCG is equivalent to Biconjugate Gradient (BiCG) but takes only one matrix-vector multiplication per iteration rather than two of BiCG. Therefore, COCG converges twice as fast in time as BiCG. Also, like in BiCG, $A$ in COCG does not need to be positive-definite.

## Usage

```@docs
cg
cg!
cocg
cocg!
```

## On the GPU
Expand Down

0 comments on commit b457247

Please sign in to comment.