From 980c5f9a34c0893346b182bd4f42c0ea06fcce42 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Mon, 25 Sep 2023 17:12:22 -0400 Subject: [PATCH] Update chebyshev setup --- Grid/algorithms/CoarsenedMatrix.h | 47 +++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/Grid/algorithms/CoarsenedMatrix.h b/Grid/algorithms/CoarsenedMatrix.h index e30a37e2..5509d138 100644 --- a/Grid/algorithms/CoarsenedMatrix.h +++ b/Grid/algorithms/CoarsenedMatrix.h @@ -123,7 +123,7 @@ public: }; template -class Aggregation { +class Aggregation { public: typedef iVector siteVector; typedef Lattice CoarseVector; @@ -170,7 +170,8 @@ public: subspace[b] = noise; } } - virtual void CreateSubspace(GridParallelRNG &RNG,LinearOperatorBase &hermop,int nn=nbasis) { + virtual void CreateSubspace(GridParallelRNG &RNG,LinearOperatorBase &hermop,int nn=nbasis) + { RealD scale; @@ -229,6 +230,11 @@ public: scale = std::pow(norm2(noise),-0.5); noise=noise*scale; + std::cout << GridLogMessage<<" Chebyshev subspace pass-1 : ord "< "< &hermop, + int nn, + double hi, + double lo, + int orderfilter + ) { + + RealD scale; + + FineField noise(FineGrid); + FineField Mn(FineGrid); + FineField tmp(FineGrid); + + // New normalised noise + std::cout << GridLogMessage<<" Chebyshev subspace pure noise : ord "< "< Cheb(lo,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< "<