From 2191a4c660528418d9c12a6c006d6cd8d556eb38 Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Mon, 14 Feb 2022 15:39:05 -0500 Subject: [PATCH] Update comments in GMRES and GPMR --- src/gmres.jl | 2 +- src/gpmr.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gmres.jl b/src/gmres.jl index aa8650cf6..fa50098ad 100644 --- a/src/gmres.jl +++ b/src/gmres.jl @@ -213,7 +213,7 @@ function gmres!(solver :: GmresSolver{T,S}, A, b :: AbstractVector{T}; y[i] = y[i] - R[pos] * y[j] # yᵢ ← yᵢ - rᵢⱼyⱼ pos = pos - j + 1 end - # Rₖ can be singular is the system is inconsistent + # Rₖ can be singular if the system is inconsistent if abs(R[pos]) ≤ √eps(T) y[i] = zero(T) else diff --git a/src/gpmr.jl b/src/gpmr.jl index 2440fc9b8..cdbdda15b 100644 --- a/src/gpmr.jl +++ b/src/gpmr.jl @@ -398,7 +398,7 @@ function gpmr!(solver :: GpmrSolver{T,S}, A, B, b :: AbstractVector{T}, c :: Abs zt[i] = zt[i] - R[pos] * zt[j] # ζᵢ ← ζᵢ - rᵢ.ⱼζⱼ pos = pos - j + 1 # position of rᵢ.ⱼ₋₁ end - # Rₖ can be singular is the system is inconsistent + # Rₖ can be singular if the system is inconsistent if abs(R[pos]) ≤ √eps(T) zt[i] = zero(T) else