From bbe1d5b49e45b162a35e2e5d14ba4f1a72001212 Mon Sep 17 00:00:00 2001 From: Daniel Richtmann Date: Fri, 23 Mar 2018 20:00:41 +0100 Subject: [PATCH] WilsonMG: Temporarily use GMRES in construction of basis vectors This can go back to CG once Mdag in CoarsenedMatrix works. --- lib/algorithms/CoarsenedMatrix.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/algorithms/CoarsenedMatrix.h b/lib/algorithms/CoarsenedMatrix.h index fdf0abce..15db315a 100644 --- a/lib/algorithms/CoarsenedMatrix.h +++ b/lib/algorithms/CoarsenedMatrix.h @@ -209,7 +209,8 @@ namespace Grid { RealD scale; - ConjugateGradient CG(1.0e-2,10000); + TrivialPrecon TrivialPrec; + FlexibleGeneralisedMinimalResidual FGMRES(1.0e-14,1,TrivialPrec,1,false); // TODO: need to use GMRES as long as Mdag doesn't work on coarser levels (i.e., MdagM isn't hermitian) FineField noise(FineGrid); FineField Mn(FineGrid); @@ -223,7 +224,7 @@ namespace Grid { for(int i=0;i<3;i++){ - CG(hermop,noise,subspace[b]); + FGMRES(hermop,noise,subspace[b]); noise = subspace[b]; scale = std::pow(norm2(noise),-0.5); @@ -302,7 +303,7 @@ namespace Grid { return norm2(out); }; - RealD Mdag (const CoarseVector &in, CoarseVector &out){ + RealD Mdag (const CoarseVector &in, CoarseVector &out){ // TODO: get this correct return M(in,out); };