Skip to content

Commit

Permalink
[documentation] Use Aᴴ instead of Aᵀ
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Sep 7, 2022
1 parent 645e094 commit 330304a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Overdetermined sytems are less common but also occur.
4. Adjoint systems

<p align="center">
<b><i>Ax = b</i></b> &nbsp; and &nbsp; <b><i>Aᵀy = c</i></b>
<b><i>Ax = b</i></b> &nbsp; and &nbsp; <b><i>Aᴴy = c</i></b>
</p>

where **_A_** can have any shape.
Expand All @@ -81,7 +81,7 @@ where **_A_** can have any shape.
<p align="center">
[<b><i>M </i></b>&nbsp;&nbsp;&nbsp;<b><i> A</i></b>]&nbsp; [<b><i>x</i></b>] = [<b><i>b</i></b>]
<br>
[<b><i>Aᵀ</i></b>&nbsp;&nbsp; <b><i>-N</i></b>]&nbsp; [<b><i>y</i></b>]&nbsp;&nbsp;&nbsp;&nbsp;[<b><i>c</i></b>]
[<b><i>Aᴴ</i></b>&nbsp;&nbsp; <b><i>-N</i></b>]&nbsp; [<b><i>y</i></b>]&nbsp;&nbsp;&nbsp;&nbsp;[<b><i>c</i></b>]
</p>

where **_A_** can have any shape.
Expand All @@ -94,7 +94,7 @@ where **_A_** can have any shape.
[<b><i>B</i></b>&nbsp;&nbsp;&nbsp;<b><i>N</i></b>]&nbsp; [<b><i>y</i></b>]&nbsp;&nbsp;&nbsp;&nbsp;[<b><i>c</i></b>]
</p>

where **_A_** can have any shape and **_B_** has the shape of **_Aᵀ_**.
where **_A_** can have any shape and **_B_** has the shape of **_Aᴴ_**.
**_A_**, **_B_**, **_b_** and **_c_** must be all nonzero.

Krylov solvers are particularly appropriate in situations where such problems must be solved but a factorization is not possible, either because:
Expand Down
12 changes: 6 additions & 6 deletions docs/src/examples/tricg.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ N = diagm(0 => [5.0 * i for i = 1:n])
c = -b
# [I A] [x] = [b]
# [Aᵀ -I] [y] [c]
# [Aᴴ -I] [y] [c]
(x, y, stats) = tricg(A, b, c)
K = [eye(m) A; A' -eye(n)]
B = [b; c]
Expand All @@ -23,7 +23,7 @@ resid = norm(r)
@printf("TriCG: Relative residual: %8.1e\n", resid)
# [-I A] [x] = [b]
# [ Aᵀ I] [y] [c]
# [ Aᴴ I] [y] [c]
(x, y, stats) = tricg(A, b, c, flip=true)
K = [-eye(m) A; A' eye(n)]
B = [b; c]
Expand All @@ -32,7 +32,7 @@ resid = norm(r)
@printf("TriCG: Relative residual: %8.1e\n", resid)
# [I A] [x] = [b]
# [Aᵀ I] [y] [c]
# [Aᴴ I] [y] [c]
(x, y, stats) = tricg(A, b, c, spd=true)
K = [eye(m) A; A' eye(n)]
B = [b; c]
Expand All @@ -41,7 +41,7 @@ resid = norm(r)
@printf("TriCG: Relative residual: %8.1e\n", resid)
# [-I A] [x] = [b]
# [ Aᵀ -I] [y] [c]
# [ Aᴴ -I] [y] [c]
(x, y, stats) = tricg(A, b, c, snd=true)
K = [-eye(m) A; A' -eye(n)]
B = [b; c]
Expand All @@ -50,7 +50,7 @@ resid = norm(r)
@printf("TriCG: Relative residual: %8.1e\n", resid)
# [τI A] [x] = [b]
# [ Aᵀ νI] [y] [c]
# [ Aᴴ νI] [y] [c]
(τ, ν) = (1e-4, 1e2)
(x, y, stats) = tricg(A, b, c, τ=τ, ν=ν)
K = [τ*eye(m) A; A' ν*eye(n)]
Expand All @@ -60,7 +60,7 @@ resid = norm(r)
@printf("TriCG: Relative residual: %8.1e\n", resid)
# [M⁻¹ A ] [x] = [b]
# [Aᵀ -N⁻¹] [y] [c]
# [Aᴴ -N⁻¹] [y] [c]
(x, y, stats) = tricg(A, b, c, M=M, N=N, verbose=1)
K = [inv(M) A; A' -inv(N)]
H = BlockDiagonalOperator(M, N)
Expand Down
6 changes: 3 additions & 3 deletions docs/src/examples/trimr.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ m, n = size(A)
c = -b
# [D A] [x] = [b]
# [Aᵀ 0] [y] [c]
# [Aᴴ 0] [y] [c]
llt_D = cholesky(D)
opD⁻¹ = LinearOperator(Float64, 5, 5, true, true, (y, v) -> ldiv!(y, llt_D, v))
opH⁻¹ = BlockDiagonalOperator(opD⁻¹, eye(n))
Expand All @@ -34,7 +34,7 @@ N = diagm(0 => [5.0 * i for i = 1:n])
c = -b
# [I A] [x] = [b]
# [Aᵀ -I] [y] [c]
# [Aᴴ -I] [y] [c]
(x, y, stats) = trimr(A, b, c)
K = [eye(m) A; A' -eye(n)]
B = [b; c]
Expand All @@ -43,7 +43,7 @@ resid = norm(r)
@printf("TriMR: Relative residual: %8.1e\n", resid)
# [M A] [x] = [b]
# [Aᵀ -N] [y] [c]
# [Aᴴ -N] [y] [c]
ldlt_M = ldl(M)
ldlt_N = ldl(N)
opM⁻¹ = LinearOperator(Float64, size(M,1), size(M,2), true, true, (y, v) -> ldiv!(y, ldlt_M, v))
Expand Down
2 changes: 1 addition & 1 deletion docs/src/gpu.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ using CUDA, CUDA.CUSPARSE
A_gpu = CuSparseMatrixCSC(A_cpu) # A = CuSparseMatrixCSR(A_cpu)
b_gpu = CuVector(b_cpu)

# LLᵀ ≈ A for CuSparseMatrixCSC or CuSparseMatrixCSR matrices
# LLᴴ ≈ A for CuSparseMatrixCSC or CuSparseMatrixCSR matrices
P = ic02(A_gpu, 'O')

# Solve Py = x
Expand Down
6 changes: 3 additions & 3 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ Overdetermined sytems are less common but also occur.
4 - Adjoint systems

```math
Ax = b \quad \text{and} \quad A^T y = c
Ax = b \quad \text{and} \quad A^H y = c
```

where **_A_** can have any shape.

5 - Saddle-point and symmetric quasi-definite (SQD) systems

```math
\begin{bmatrix} M & \phantom{-}A \\ A^T & -N \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \left(\begin{bmatrix} b \\ 0 \end{bmatrix},\begin{bmatrix} 0 \\ c \end{bmatrix},\begin{bmatrix} b \\ c \end{bmatrix}\right)
\begin{bmatrix} M & \phantom{-}A \\ A^H & -N \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \left(\begin{bmatrix} b \\ 0 \end{bmatrix},\begin{bmatrix} 0 \\ c \end{bmatrix},\begin{bmatrix} b \\ c \end{bmatrix}\right)
```

where **_A_** can have any shape.
Expand All @@ -65,7 +65,7 @@ where **_A_** can have any shape.
\begin{bmatrix} M & A \\ B & N \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} b \\ c \end{bmatrix}
```

where **_A_** can have any shape and **_B_** has the shape of **_Aᵀ_**.
where **_A_** can have any shape and **_B_** has the shape of **_Aᴴ_**.
**_A_**, **_B_**, **_b_** and **_c_** must be all nonzero.

Krylov solvers are particularly appropriate in situations where such problems must be solved but a factorization is not possible, either because:
Expand Down
4 changes: 2 additions & 2 deletions docs/src/warm_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ Explicit restarts cannot be avoided in certain block methods, such as TriMR, due

```julia
# [E A] [x] = [b]
# [Aᵀ F] [y] [c]
# [Aᴴ F] [y] [c]
M = inv(E)
N = inv(F)
x₀, y₀, stats = trimr(A, b, c, M=M, N=N)

# E and F are not available inside TriMR
b₀ = b - Ex₀ - Ay
c₀ = c - Aᵀx- Fy
c₀ = c - Aᴴx- Fy

Δx, Δy, stats = trimr(A, b₀, c₀, M=M, N=N)
x = x₀ + Δx
Expand Down

0 comments on commit 330304a

Please sign in to comment.