From a07556dd5f2e3f92a1b542edf89defd20246252b Mon Sep 17 00:00:00 2001 From: Chulwoo Jung Date: Sat, 15 Apr 2017 09:32:15 -0400 Subject: [PATCH] Added back the convergence test from evecs of tridiagonal matrix. Bugfixes --- .../iterative/ImplicitlyRestartedLanczos.h | 55 ++++++++++++++++--- 1 file changed, 46 insertions(+), 9 deletions(-) diff --git a/lib/algorithms/iterative/ImplicitlyRestartedLanczos.h b/lib/algorithms/iterative/ImplicitlyRestartedLanczos.h index 39495e00..3fc62d36 100644 --- a/lib/algorithms/iterative/ImplicitlyRestartedLanczos.h +++ b/lib/algorithms/iterative/ImplicitlyRestartedLanczos.h @@ -167,7 +167,7 @@ public: void step(DenseVector& lmd, DenseVector& lme, DenseVector& evec, - Field& w,int Nm,int k) + Field& w,int Nm,int k, RealD &norm) { assert( k< Nm ); @@ -183,6 +183,7 @@ public: RealD beta = normalise(w); // 6. βk+1 := ∥wk∥2. If βk+1 = 0 then Stop // 7. vk+1 := wk/βk+1 + norm=beta; std::cout< B(Nm); +#pragma omp for + for(int ss=0;ss < grid->oSites();ss++){ + for(int j=0; joSites()); for(int j=0; j= SS - Nk && i >= 0; --i){ RealD diff = 0; - diff = abs( tevecs[i][Nm - 1 - lock_num] ) * resid_nrm; + diff = fabs( tevecs[i][Nm - 1 - lock_num] ) * resid_nrm; std::cout<