diff --git a/lib/algorithms/CoarsenedMatrix.h b/lib/algorithms/CoarsenedMatrix.h index b2e5f6c5..08df1978 100644 --- a/lib/algorithms/CoarsenedMatrix.h +++ b/lib/algorithms/CoarsenedMatrix.h @@ -104,7 +104,7 @@ public: GridBase *FineGrid; std::vector > subspace; int checkerboard; - + int Checkerboard(void){return checkerboard;} Aggregation(GridBase *_CoarseGrid,GridBase *_FineGrid,int _checkerboard) : CoarseGrid(_CoarseGrid), FineGrid(_FineGrid), @@ -127,7 +127,7 @@ public: CoarseVector eProj(CoarseGrid); for(int i=0;ioSites();ss++){ eProj[ss](i)=CComplex(1.0); } @@ -273,7 +273,7 @@ public: Stencil.HaloExchange(in,compressor); parallel_for(int ss=0;ssoSites();ss++){ - siteVector res = zero; + siteVector res = Zero(); siteVector nbr; int ptype; StencilEntry *SE; @@ -320,7 +320,7 @@ public: FineField phi(FineGrid); FineField tmp(FineGrid); - FineField zz(FineGrid); zz=zero; + FineField zz(FineGrid); zz=Zero(); FineField Mphi(FineGrid); Lattice > coor(FineGrid); @@ -336,7 +336,7 @@ public: // set of vectors. int self_stencil=-1; for(int p=0;p({55,72,19,17,34})); diff --git a/lib/algorithms/approx/Forecast.h b/lib/algorithms/approx/Forecast.h index b9d73562..67596272 100644 --- a/lib/algorithms/approx/Forecast.h +++ b/lib/algorithms/approx/Forecast.h @@ -57,7 +57,7 @@ public: Field chi(phi); // forecasted solution // Trivial cases - if(degree == 0){ chi = zero; return chi; } + if(degree == 0){ chi = Zero(); return chi; } else if(degree == 1){ return prev_solns[0]; } // RealD dot; @@ -121,7 +121,7 @@ public: } // Use Gaussian elimination to solve equations and calculate initial guess - chi = zero; + chi = Zero(); r = phi; for(int i=degree-1; i>=0; i--){ a[i] = 0.0; diff --git a/lib/algorithms/iterative/ConjugateGradientMixedPrec.h b/lib/algorithms/iterative/ConjugateGradientMixedPrec.h index cbc6d222..877c1768 100644 --- a/lib/algorithms/iterative/ConjugateGradientMixedPrec.h +++ b/lib/algorithms/iterative/ConjugateGradientMixedPrec.h @@ -117,7 +117,7 @@ public: precisionChange(src_f, src_d); PrecChangeTimer.Stop(); - sol_f = zero; + sol_f = Zero(); //Optionally improve inner solver guess (eg using known eigenvectors) if(guesser != NULL) diff --git a/lib/algorithms/iterative/ConjugateGradientReliableUpdate.h b/lib/algorithms/iterative/ConjugateGradientReliableUpdate.h index 3ce2e887..ab12a41f 100644 --- a/lib/algorithms/iterative/ConjugateGradientReliableUpdate.h +++ b/lib/algorithms/iterative/ConjugateGradientReliableUpdate.h @@ -120,7 +120,7 @@ public: precisionChange(r_f, r); FieldF psi_f(r_f); - psi_f = zero; + psi_f = Zero(); FieldF p_f(r_f); FieldF mmp_f(r_f); @@ -219,7 +219,7 @@ public: Linop_d.HermOpAndNorm(psi, mmp, d, qq); r = src - mmp; - psi_f = zero; + psi_f = Zero(); precisionChange(r_f, r); cp = norm2(r); MaxResidSinceLastRelUp = cp; diff --git a/lib/algorithms/iterative/ConjugateResidual.h b/lib/algorithms/iterative/ConjugateResidual.h index 30833239..95bbf38e 100644 --- a/lib/algorithms/iterative/ConjugateResidual.h +++ b/lib/algorithms/iterative/ConjugateResidual.h @@ -56,7 +56,7 @@ public: RealD pAp, pAAp; GridBase *grid = src.Grid(); - psi=zero; + psi=Zero(); Field r(grid), p(grid), Ap(grid), Ar(grid); r=src; diff --git a/lib/algorithms/iterative/ImplicitlyRestartedLanczos.h b/lib/algorithms/iterative/ImplicitlyRestartedLanczos.h index 3b3cf31e..c7736c82 100644 --- a/lib/algorithms/iterative/ImplicitlyRestartedLanczos.h +++ b/lib/algorithms/iterative/ImplicitlyRestartedLanczos.h @@ -83,7 +83,7 @@ void basisRotateJ(Field &result,std::vector &basis,Eigen::MatrixXd& Qt,in result.Checkerboard() = basis[0].Checkerboard(); parallel_for(int ss=0;ss < grid->oSites();ss++){ - vobj B = zero; + vobj B = Zero(); for(int k=k0; k &_v,std::vector& sort_vals, s assert(idx[i] > i); assert(j!=idx.size()); assert(idx[j]==i); - std::swap(_v[i]._odata,_v[idx[i]]._odata); // should use vector move constructor, no data copy + swap(_v[i],_v[idx[i]]); // should use vector move constructor, no data copy std::swap(sort_vals[i],sort_vals[idx[i]]); idx[j] = idx[i]; @@ -153,7 +153,7 @@ void basisSortInPlace(std::vector & _v,std::vector& sort_vals, boo // If performance critical can improve. template void basisDeflate(const std::vector &_v,const std::vector& eval,const Field& src_orig,Field& result) { - result = zero; + result = Zero(); assert(_v.size()==eval.size()); int N = (int)_v.size(); for (int i=0;i &Linop,const Field &src, Field &psi){ - psi=zero; + psi=Zero(); RealD cp, ssq,rsq; ssq=norm2(src); rsq=Tolerance*Tolerance*ssq;