From 4b8710970c78682e6873ebbc61ba40a1e78226bf Mon Sep 17 00:00:00 2001 From: Daniel Richtmann Date: Wed, 16 May 2018 17:23:12 +0200 Subject: [PATCH] WilsonMG: Switch to Galerkin coarsening in CoarsenedMatrix --- lib/algorithms/CoarsenedMatrix.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/algorithms/CoarsenedMatrix.h b/lib/algorithms/CoarsenedMatrix.h index 4b94652e..1d42bab5 100644 --- a/lib/algorithms/CoarsenedMatrix.h +++ b/lib/algorithms/CoarsenedMatrix.h @@ -295,8 +295,17 @@ namespace Grid { return norm2(out); }; - RealD Mdag (const CoarseVector &in, CoarseVector &out){ - return M(in,out); + RealD Mdag (const CoarseVector &in, CoarseVector &out){ + // // corresponds to Petrov-Galerkin coarsening + // return M(in,out); + + // corresponds to Galerkin coarsening + CoarseVector tmp(Grid()); + G5C(tmp, in); + M(tmp, out); + G5C(out, out); + return norm2(out); + }; void Mdir(const CoarseVector &in, CoarseVector &out, int dir, int disp){ @@ -453,7 +462,7 @@ namespace Grid { std::cout<