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<