From 44fecd4d8d5a9239685dac1ed8ef6c3670604a29 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Fri, 9 Oct 2015 00:39:21 +0200 Subject: [PATCH] Lanczos test --- tests/Test_dwf_lanczos.cc | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/tests/Test_dwf_lanczos.cc b/tests/Test_dwf_lanczos.cc index 77ead91d..b591d044 100644 --- a/tests/Test_dwf_lanczos.cc +++ b/tests/Test_dwf_lanczos.cc @@ -35,21 +35,26 @@ int main (int argc, char ** argv) MdagMLinearOperator HermOp(Ddwf); - const int Nk = 10; - const int Np = 1; - RealD enorm = 1.0; - RealD vthrs = 1; - const int Nit= 1000; + const int Nk = 30; + const int Np = 10; + const int Nm = Nk+Np; + const int MaxIt= 10000; + RealD resid = 1.0e-8; - ImplicitlyRestartedLanczos IRL(HermOp,PolyX, - Nk,Np,enorm,vthrs,Nit); + std::vector Coeffs(1,1.0); + Polynomial PolyX(Coeffs); + ImplicitlyRestartedLanczos IRL(HermOp,PolyX,Nk,Nm,resid,MaxIt); - std::vector eval(Nk); - std::vector evec(Nk,FGrid); + std::vector eval(Nm); + std::vector evec(Nm,FGrid); + for(int i=0;i