diff --git a/Grid/algorithms/GeneralCoarsenedMatrix.h b/Grid/algorithms/GeneralCoarsenedMatrix.h index 0d666eac..e1b086fa 100644 --- a/Grid/algorithms/GeneralCoarsenedMatrix.h +++ b/Grid/algorithms/GeneralCoarsenedMatrix.h @@ -220,6 +220,30 @@ public: GridBase * FineGrid(void) { return _FineGrid; }; // this is all the linalg routines need to know GridCartesian * CoarseGrid(void) { return _CoarseGrid; }; // this is all the linalg routines need to know + + void ProjectNearestNeighbour(RealD shift) + { + int Nd = geom.grid->Nd(); + int point; + std::cout << "ProjectNearestNeighbour "<1) { + std::cout << "setting geom "< &A,const CoarseVector &in, CoarseVector &out) { + RealD ttot=0; + RealD tmult=0; + RealD texch=0; + RealD text=0; + ttot=-usecond(); conformable(CoarseGrid(),in.Grid()); conformable(in.Grid(),out.Grid()); out.Checkerboard() = in.Checkerboard(); CoarseVector tin=in; + texch-=usecond(); CoarseVector pin = Cell.Exchange(tin); + texch+=usecond(); CoarseVector pout(pin.Grid()); @@ -281,11 +312,15 @@ public: typedef CComplex calcComplex; int osites=pin.Grid()->oSites(); + int gsites=pin.Grid()->gSites(); + RealD flops = 1.0* npoint * nbasis * nbasis * 8 * gsites; + for(int point=0;point