diff --git a/Grid/algorithms/multigrid/Aggregates.h b/Grid/algorithms/multigrid/Aggregates.h index 404ff27b..fb708b16 100644 --- a/Grid/algorithms/multigrid/Aggregates.h +++ b/Grid/algorithms/multigrid/Aggregates.h @@ -228,6 +228,70 @@ public: } assert(b==nn); } + + + virtual void CreateSubspacePolyCheby(GridParallelRNG &RNG,LinearOperatorBase &hermop, + int nn, + double hi, + double lo1, + int orderfilter, + double lo2, + int orderstep) + { + RealD scale; + + FineField noise(FineGrid); + FineField Mn(FineGrid); + FineField tmp(FineGrid); + + // New normalised noise + gaussian(RNG,noise); + scale = std::pow(norm2(noise),-0.5); + noise=noise*scale; + + std::cout << GridLogMessage<<" CreateSubspacePolyCheby "< "< Cheb(lo1,hi,orderfilter); + Cheb(hermop,noise,Mn); + // normalise + scale = std::pow(norm2(Mn),-0.5); Mn=Mn*scale; + subspace[b] = Mn; + hermop.Op(Mn,tmp); + std::cout< "< "< Cheb(lo2,hi,orderstep); + Cheb(hermop,subspace[n-1],Mn); + + for(int m=0;m "< "< &hermop, int nn, double hi,