From 36a14e4ee3ead006f84ace061c6b8514bd9a6566 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Fri, 5 Apr 2024 01:03:33 -0400 Subject: [PATCH] Best setup and introduce an HDCG refine method --- Grid/algorithms/multigrid/Aggregates.h | 37 +++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/Grid/algorithms/multigrid/Aggregates.h b/Grid/algorithms/multigrid/Aggregates.h index 7d775a79..baaec41d 100644 --- a/Grid/algorithms/multigrid/Aggregates.h +++ b/Grid/algorithms/multigrid/Aggregates.h @@ -340,11 +340,15 @@ public: Chebyshev Cheb4(0.05,hi,500); Chebyshev Cheb5(0.01,hi,2000); */ - /* 242 - Chebyshev Cheb1(0.1,hi,300); + /* 242 */ + /* + Chebyshev Cheb3(0.1,hi,300); Chebyshev Cheb2(0.02,hi,1000); - Chebyshev Cheb3(0.003,hi,2000); - */ + Chebyshev Cheb1(0.003,hi,2000); + 8? + */ + /* How many?? + */ Chebyshev Cheb2(0.001,hi,2500); Chebyshev Cheb1(0.02,hi,600); Cheb1(hermop,noise,Mn); scale = std::pow(norm2(Mn),-0.5); noise=Mn*scale; @@ -424,6 +428,7 @@ public: RealD MirsShift = Lo; ConjugateGradient CGsloppy(tol,maxit,false); ShiftedHermOpLinearOperator ShiftedFineHermOp(hermop,MirsShift); + tmp=Zero(); CGsloppy(hermop,subspace[b],tmp); RealD scale = std::pow(norm2(tmp),-0.5); tmp=tmp*scale; subspace[b]=tmp; @@ -431,6 +436,30 @@ public: std::cout< "< &hermop, + TwoLevelADEF2mrhs & theHDCG, + int nrhs) + { + std::vector src_mrhs(nrhs,FineGrid); + std::vector res_mrhs(nrhs,FineGrid); + FineField tmp(FineGrid); + for(int b =0;b "<