From be18ffe3b43254925f81e51f0b7f0041468fb8e7 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Wed, 27 Sep 2023 16:21:58 -0400 Subject: [PATCH] Further tuning and lanczos --- tests/debug/Test_general_coarse_hdcg.cc | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/debug/Test_general_coarse_hdcg.cc b/tests/debug/Test_general_coarse_hdcg.cc index c11b19f4..7372785f 100644 --- a/tests/debug/Test_general_coarse_hdcg.cc +++ b/tests/debug/Test_general_coarse_hdcg.cc @@ -177,17 +177,21 @@ int main (int argc, char ** argv) LittleDiracOperator LittleDiracOp(geom,FrbGrid,Coarse5d); LittleDiracOp.CoarsenOperatorColoured(FineHermOp,Aggregates); + // Try projecting to one hop only + LittleDiracOperator LittleDiracOpProj(LittleDiracOp); + LittleDiracOpProj.ProjectNearestNeighbour(0.5); + typedef HermitianLinearOperator HermMatrix; HermMatrix CoarseOp (LittleDiracOp); ////////////////////////////////////////// // Build a coarse lanczos ////////////////////////////////////////// - Chebyshev IRLCheby(0.02,50.0,71); // 1 iter + Chebyshev IRLCheby(0.5,60.0,71); // 1 iter FunctionHermOp IRLOpCheby(IRLCheby,CoarseOp); PlainHermOp IRLOp (CoarseOp); - int Nk=64; - int Nm=128; + int Nk=48; + int Nm=64; int Nstop=Nk; ImplicitlyRestartedLanczos IRL(IRLOpCheby,IRLOp,Nstop,Nk,Nm,1.0e-5,20); @@ -195,6 +199,9 @@ int main (int argc, char ** argv) std::vector eval(Nm); std::vector evec(Nm,Coarse5d); CoarseVector c_src(Coarse5d); c_src=1.0; + + PowerMethod cPM; cPM(CoarseOp,c_src); + IRL.calc(eval,evec,c_src,Nconv); DeflatedGuesser DeflCoarseGuesser(evec,eval); @@ -230,7 +237,9 @@ int main (int argc, char ** argv) // use a limited stencil. Reread BFM code to check on evecs / deflation strategy with prec // std::vector los({3.0}); // Nbasis 40 == 36,36 iters - std::vector ords({7,8,10}); // Nbasis 40 == 40,38,36 iters (320,342,396 mults) + + // std::vector ords({7,8,10}); // Nbasis 40 == 40,38,36 iters (320,342,396 mults) + std::vector ords({7}); // Nbasis 40 == 40 iters (320 mults) // Standard CG // result=Zero();