From 09da34bd13e5b904a88424128931b89be8b65658 Mon Sep 17 00:00:00 2001 From: Alexis Montoison <35051714+amontoison@users.noreply.github.com> Date: Tue, 5 Nov 2024 16:20:19 -0600 Subject: [PATCH] Apply suggestions from code review --- src/minres_qlp.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/minres_qlp.jl b/src/minres_qlp.jl index 5c70ddcc9..cd0dc20c2 100644 --- a/src/minres_qlp.jl +++ b/src/minres_qlp.jl @@ -355,9 +355,9 @@ kwargs_minres_qlp = (:M, :ldiv, :λ, :atol, :rtol, :Artol, :itmax, :timemax, :ve @kswap!(wₖ₋₁, wₖ) # Compute w̅ₖ kcopy!(n, wₖ, wₖ₋₁) - kaxpby!(n, spₖ, vₖ, cpₖ, wₖ) + kaxpby!(n, -cpₖ, vₖ, spₖ, wₖ) # Compute ẘₖ₋₁ - kaxpby!(n, -cpₖ, vₖ, spₖ, wₖ₋₁) + kaxpby!(n, spₖ, vₖ, cpₖ, wₖ₋₁) else # [ẘₖ₋₂ w̄ₖ₋₁ vₖ] [cpₖ 0 spₖ] [1 0 0 ] = [wₖ₋₂ ẘₖ₋₁ w̄ₖ] ⟷ wₖ₋₂ = cpₖ * ẘₖ₋₂ + spₖ * vₖ # [ 0 1 0 ] [0 cdₖ sdₖ] ⟷ ẘₖ₋₁ = cdₖ * w̄ₖ₋₁ + sdₖ * (spₖ * ẘₖ₋₂ - cpₖ * vₖ)