From 165c68e28efd5b53415aea9cce7680824bba223e Mon Sep 17 00:00:00 2001 From: Carleton DeTar Date: Sat, 29 Feb 2020 17:51:51 -0600 Subject: [PATCH] Change TrueResiduals to TrueResidualShift and IterationsToComplete to IterationsToCompleteShift --- .../iterative/BlockConjugateGradient.h | 6 ++--- Grid/algorithms/iterative/ConjugateGradient.h | 4 ++-- .../iterative/ConjugateGradientMultiShift.h | 24 +++++++++---------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Grid/algorithms/iterative/BlockConjugateGradient.h b/Grid/algorithms/iterative/BlockConjugateGradient.h index 14707d7b..75a8be06 100644 --- a/Grid/algorithms/iterative/BlockConjugateGradient.h +++ b/Grid/algorithms/iterative/BlockConjugateGradient.h @@ -308,7 +308,7 @@ void BlockCGrQsolve(LinearOperatorBase &Linop, const Field &B, Field &X) Linop.HermOp(X, AD); AD = AD-B; TrueResidual = std::sqrt(norm2(AD)/norm2(B)); - std::cout << GridLogMessage <<"\t True residual is " << TrueResidual < &Linop, const std::vector max_resid ) max_resid = rr; } - std::cout << GridLogIterative << "\t Block Iteration "< &Linop, const std::vector IterationsToComplete; - // Integer IterationsToComplete; //Number of iterations the CG took to finish. Filled in upon completion + Integer IterationsToComplete; //Number of iterations the CG took to finish. Filled in upon completion + std::vector IterationsToCompleteShift; // Iterations for this shift int verbose; MultiShiftFunction shifts; - std::vector TrueResiduals; + std::vector TrueResidualShift; ConjugateGradientMultiShift(Integer maxit,MultiShiftFunction &_shifts) : MaxIterations(maxit), shifts(_shifts) { verbose=1; - IterationsToComplete.resize(_shifts.order); - TrueResiduals.resize(_shifts.order); + IterationsToCompleteShift.resize(_shifts.order); + TrueResidualShift.resize(_shifts.order); } void operator() (LinearOperatorBase &Linop, const Field &src, Field &psi) @@ -133,9 +133,9 @@ public: // Handle trivial case of zero src. if( cp == 0. ){ for(int s=0;s