diff --git a/lib/algorithms/iterative/MinimalResidual.h b/lib/algorithms/iterative/MinimalResidual.h index 74d4eb53..0198c425 100644 --- a/lib/algorithms/iterative/MinimalResidual.h +++ b/lib/algorithms/iterative/MinimalResidual.h @@ -63,8 +63,8 @@ template class MinimalResidual : public OperatorFunction { RealD guess = norm2(psi); assert(std::isnan(guess) == 0); - RealD ssq = norm2(src); // flopcount.addSiteFlops(4*Nc*Ns,s); // stands for "source squared" - RealD rsd_sq = Tolerance * Tolerance * ssq; // flopcount.addSiteFlops(4*Nc*Ns,s); // stands for "residual squared" + RealD ssq = norm2(src); // flopcount.addSiteFlops(4*Nc*Ns,s); + RealD rsq = Tolerance * Tolerance * ssq; // flopcount.addSiteFlops(4*Nc*Ns,s); Linop.Op(psi, Mr); // flopcount.addFlops(M.nFlops()); @@ -77,12 +77,12 @@ template class MinimalResidual : public OperatorFunction { std::cout << GridLogIterative << std::setprecision(4) << "MinimalResidual: mp " << d << std::endl; std::cout << GridLogIterative << std::setprecision(4) << "MinimalResidual: cp,r " << cp << std::endl; - if (cp <= rsd_sq) { + if (cp <= rsq) { return; } std::cout << GridLogIterative << std::setprecision(4) - << "MinimalResidual: k=0 residual " << cp << " target " << rsd_sq << std::endl; + << "MinimalResidual: k=0 residual " << cp << " target " << rsq << std::endl; GridStopWatch LinalgTimer; GridStopWatch MatrixTimer; @@ -115,11 +115,11 @@ template class MinimalResidual : public OperatorFunction { LinalgTimer.Stop(); std::cout << GridLogIterative << "MinimalResidual: Iteration " << k - << " residual " << cp << " target " << rsd_sq << std::endl; + << " residual " << cp << " target " << rsq << std::endl; std::cout << GridLogDebug << "a = " << a << " c = " << c << " d = " << d << std::endl; // Stopping condition - if (cp <= rsd_sq) { + if (cp <= rsq) { SolverTimer.Stop(); Linop.Op(psi, Mr); diff --git a/tests/solver/Test_wilson_gmres_unprec.cc b/tests/solver/Test_wilson_gmres_unprec.cc index f43a7737..13cc32b6 100644 --- a/tests/solver/Test_wilson_gmres_unprec.cc +++ b/tests/solver/Test_wilson_gmres_unprec.cc @@ -58,7 +58,7 @@ int main (int argc, char ** argv) WilsonFermionR Dw(Umu,Grid,RBGrid,mass); MdagMLinearOperator HermOp(Dw); - GeneralisedMinimalResidual GMRES(1.0e-8,10000, 1); + GeneralisedMinimalResidual GMRES(1.0e-8, 10000, 5); GMRES(HermOp,src,result); Grid_finalize();