mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-09 23:45:36 +00:00
Zero changes. (I mean literally)
This commit is contained in:
parent
be7b37b9c9
commit
98af36217a
@ -64,7 +64,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
// Painful ; fix syntactical niceness
|
||||
LatticeComplex LinkTrace(&Fine);
|
||||
LinkTrace=zero;
|
||||
LinkTrace=Zero();
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
LinkTrace = LinkTrace + trace(U[mu]);
|
||||
}
|
||||
@ -72,7 +72,7 @@ int main (int argc, char ** argv)
|
||||
// (1+2+3)=6 = N(N-1)/2 terms
|
||||
LatticeComplex Plaq(&Fine);
|
||||
|
||||
Plaq = zero;
|
||||
Plaq = Zero();
|
||||
|
||||
for(int mu=1;mu<Nd;mu++){
|
||||
for(int nu=0;nu<mu;nu++){
|
||||
@ -89,7 +89,7 @@ int main (int argc, char ** argv)
|
||||
int Nt = Plaq_T.size();
|
||||
|
||||
TComplex Plaq_T_sum;
|
||||
Plaq_T_sum=zero;
|
||||
Plaq_T_sum=Zero();
|
||||
for(int t=0;t<Nt;t++){
|
||||
Plaq_T_sum = Plaq_T_sum+Plaq_T[t];
|
||||
Complex Pt=TensorRemove(Plaq_T[t]);
|
||||
|
@ -106,7 +106,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
// Painful ; fix syntactical niceness
|
||||
LatticeComplex LinkTrace(&Fine);
|
||||
LinkTrace=zero;
|
||||
LinkTrace=Zero();
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
LinkTrace = LinkTrace + trace(U[mu]);
|
||||
}
|
||||
@ -115,7 +115,7 @@ int main (int argc, char ** argv)
|
||||
LatticeComplex Plaq(&Fine);
|
||||
LatticeComplex cPlaq(&Coarse);
|
||||
|
||||
Plaq = zero;
|
||||
Plaq = Zero();
|
||||
#if 1
|
||||
for(int mu=1;mu<Nd;mu++){
|
||||
for(int nu=0;nu<mu;nu++){
|
||||
@ -131,7 +131,7 @@ int main (int argc, char ** argv)
|
||||
int Nt = Plaq_T.size();
|
||||
|
||||
TComplex Plaq_T_sum;
|
||||
Plaq_T_sum=zero;
|
||||
Plaq_T_sum=Zero();
|
||||
for(int t=0;t<Nt;t++){
|
||||
Plaq_T_sum = Plaq_T_sum+Plaq_T[t];
|
||||
Complex Pt=TensorRemove(Plaq_T[t]);
|
||||
|
@ -60,7 +60,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
// Painful ; fix syntactical niceness
|
||||
LatticeComplex LinkTrace(&Fine);
|
||||
LinkTrace=zero;
|
||||
LinkTrace=Zero();
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
LinkTrace = LinkTrace + trace(U[mu]);
|
||||
}
|
||||
@ -68,7 +68,7 @@ int main (int argc, char ** argv)
|
||||
// (1+2+3)=6 = N(N-1)/2 terms
|
||||
LatticeComplex Plaq(&Fine);
|
||||
|
||||
Plaq = zero;
|
||||
Plaq = Zero();
|
||||
#if 1
|
||||
for(int mu=1;mu<Nd;mu++){
|
||||
for(int nu=0;nu<mu;nu++){
|
||||
@ -85,7 +85,7 @@ int main (int argc, char ** argv)
|
||||
int Nt = Plaq_T.size();
|
||||
|
||||
TComplex Plaq_T_sum;
|
||||
Plaq_T_sum=zero;
|
||||
Plaq_T_sum=Zero();
|
||||
for(int t=0;t<Nt;t++){
|
||||
Plaq_T_sum = Plaq_T_sum+Plaq_T[t];
|
||||
Complex Pt=TensorRemove(Plaq_T[t]);
|
||||
|
@ -201,10 +201,10 @@ void TestWhat(What & Ddwf,
|
||||
LatticeFermion src (FGrid); random(*RNG5,src);
|
||||
LatticeFermion phi (FGrid); random(*RNG5,phi);
|
||||
LatticeFermion chi (FGrid); random(*RNG5,chi);
|
||||
LatticeFermion result(FGrid); result=zero;
|
||||
LatticeFermion ref(FGrid); ref=zero;
|
||||
LatticeFermion tmp(FGrid); tmp=zero;
|
||||
LatticeFermion err(FGrid); tmp=zero;
|
||||
LatticeFermion result(FGrid); result=Zero();
|
||||
LatticeFermion ref(FGrid); ref=Zero();
|
||||
LatticeFermion tmp(FGrid); tmp=Zero();
|
||||
LatticeFermion err(FGrid); tmp=Zero();
|
||||
|
||||
LatticeFermion src_e (FrbGrid);
|
||||
LatticeFermion src_o (FrbGrid);
|
||||
@ -334,7 +334,7 @@ void TestMoo(This & Dw, That &sDw)
|
||||
|
||||
LatticeFermion ssrc(sgrid);
|
||||
LatticeFermion nsrc(ngrid);
|
||||
LatticeFermion zz(ngrid); zz=zero;
|
||||
LatticeFermion zz(ngrid); zz=Zero();
|
||||
LatticeFermion sres(sgrid);
|
||||
LatticeFermion nres(ngrid);
|
||||
LatticeFermion ndiff(ngrid);
|
||||
|
@ -47,7 +47,7 @@ int main (int argc, char ** argv)
|
||||
LatticeComplex ShiftU(&Fine);
|
||||
|
||||
LatticeComplex lex(&Fine);
|
||||
lex=zero;
|
||||
lex=Zero();
|
||||
Integer stride =1;
|
||||
{
|
||||
LatticeComplex coor(&Fine);
|
||||
|
@ -65,7 +65,7 @@ int main (int argc, char ** argv)
|
||||
GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds4);
|
||||
|
||||
LatticeFermionD src(FGrid); random(RNG5,src);
|
||||
LatticeFermionD result(FGrid); result=zero;
|
||||
LatticeFermionD result(FGrid); result=Zero();
|
||||
LatticeGaugeFieldD Umu(UGrid);
|
||||
LatticeGaugeFieldF Umu_f(UGrid_f);
|
||||
|
||||
@ -83,9 +83,9 @@ int main (int argc, char ** argv)
|
||||
LatticeFermionD result_o_2(FrbGrid);
|
||||
pickCheckerboard(Odd,src_o,src);
|
||||
result_o.Checkerboard() = Odd;
|
||||
result_o = zero;
|
||||
result_o = Zero();
|
||||
result_o_2.Checkerboard() = Odd;
|
||||
result_o_2 = zero;
|
||||
result_o_2 = Zero();
|
||||
|
||||
SchurDiagMooeeOperator<DomainWallFermionD,LatticeFermionD> HermOpEO(Ddwf);
|
||||
SchurDiagMooeeOperator<DomainWallFermionF,LatticeFermionF> HermOpEO_f(Ddwf_f);
|
||||
|
@ -65,7 +65,7 @@ int main (int argc, char ** argv)
|
||||
GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds4);
|
||||
|
||||
LatticeFermionD src(FGrid); random(RNG5,src);
|
||||
LatticeFermionD result(FGrid); result=zero;
|
||||
LatticeFermionD result(FGrid); result=Zero();
|
||||
LatticeGaugeFieldD Umu(UGrid);
|
||||
LatticeGaugeFieldF Umu_f(UGrid_f);
|
||||
|
||||
@ -83,7 +83,7 @@ int main (int argc, char ** argv)
|
||||
LatticeFermionD result_cg(FrbGrid);
|
||||
pickCheckerboard(Odd,src_o,src);
|
||||
result_cg.Checkerboard() = Odd;
|
||||
result_cg = zero;
|
||||
result_cg = Zero();
|
||||
LatticeFermionD result_mcg(result_cg);
|
||||
LatticeFermionD result_rlcg(result_cg);
|
||||
|
||||
|
@ -104,7 +104,7 @@ public:
|
||||
// norm2,
|
||||
// Reduce,
|
||||
//
|
||||
// mac,mult,sub,add, vone,vzero,vcomplex_i, =zero,
|
||||
// mac,mult,sub,add, vone,vzero,vcomplex_i, =Zero(),
|
||||
// vset,vsplat,vstore,vstream,vload, scalar*vec, vec*scalar
|
||||
// unary -,
|
||||
// *= , -=, +=
|
||||
|
@ -61,7 +61,7 @@ int main(int argc, char ** argv) {
|
||||
Field Diff(&Fine);
|
||||
LatticeComplex lex(&Fine);
|
||||
|
||||
lex = zero;
|
||||
lex = Zero();
|
||||
random(fRNG,Foo);
|
||||
gaussian(fRNG,Bar);
|
||||
|
||||
|
@ -84,7 +84,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
// Painful ; fix syntactical niceness : to check reader
|
||||
LatticeComplex LinkTrace(&Fine);
|
||||
LinkTrace=zero;
|
||||
LinkTrace=Zero();
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
LinkTrace = LinkTrace + trace(U[mu]);
|
||||
}
|
||||
@ -110,7 +110,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
LatticeComplex Plaq(&Fine);
|
||||
LatticeComplex cPlaq(&Coarse);
|
||||
Plaq = zero;
|
||||
Plaq = Zero();
|
||||
for(int mu=1;mu<Nd;mu++){
|
||||
for(int nu=0;nu<mu;nu++){
|
||||
Plaq = Plaq + trace(PeriodicBC::CovShiftForward(U[mu],mu,U[nu])*adj(PeriodicBC::CovShiftForward(U[nu],nu,U[mu])));
|
||||
@ -127,7 +127,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
|
||||
TComplex Plaq_T_sum;
|
||||
Plaq_T_sum=zero;
|
||||
Plaq_T_sum=Zero();
|
||||
for(int t=0;t<Nt;t++){
|
||||
Plaq_T_sum = Plaq_T_sum+Plaq_T[t];
|
||||
Complex Pt=TensorRemove(Plaq_T[t]);
|
||||
|
@ -54,7 +54,7 @@ public:
|
||||
|
||||
void RectPlaq(const std::vector<LatticeColourMatrix> &U, LatticeComplex &RectPlaqValue )
|
||||
{
|
||||
RectPlaqValue=zero;
|
||||
RectPlaqValue=Zero();
|
||||
// 12 * vol loops
|
||||
for(int mu=1;mu<Nd;mu++){
|
||||
for(int nu=0;nu<mu;nu++){
|
||||
@ -101,7 +101,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
// Painful ; fix syntactical niceness : to check reader
|
||||
LatticeComplex LinkTrace(&Fine);
|
||||
LinkTrace=zero;
|
||||
LinkTrace=Zero();
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
LinkTrace = LinkTrace + trace(U[mu]);
|
||||
}
|
||||
@ -109,7 +109,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
LatticeComplex Plaq(&Fine);
|
||||
LatticeComplex cPlaq(&Coarse);
|
||||
Plaq = zero;
|
||||
Plaq = Zero();
|
||||
for(int mu=1;mu<Nd;mu++){
|
||||
for(int nu=0;nu<mu;nu++){
|
||||
Plaq = Plaq + trace(PeriodicBC::CovShiftForward(U[mu],mu,U[nu])*adj(PeriodicBC::CovShiftForward(U[nu],nu,U[mu])));
|
||||
@ -134,7 +134,7 @@ int main (int argc, char ** argv)
|
||||
// Rect Plaq Calc Deriv
|
||||
|
||||
LatticeComplex RectPlaq_d(&Fine);
|
||||
RectPlaq_d = zero;
|
||||
RectPlaq_d = Zero();
|
||||
LatticeColourMatrix ds_U(&Fine);
|
||||
LatticeColourMatrix left_2(&Fine);
|
||||
LatticeColourMatrix upper_l(&Fine);
|
||||
@ -151,7 +151,7 @@ int main (int argc, char ** argv)
|
||||
// //
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
|
||||
ds_U=zero; // dS / dUmu
|
||||
ds_U=Zero(); // dS / dUmu
|
||||
|
||||
for(int nu=0;nu<Nd;nu++){
|
||||
|
||||
@ -275,7 +275,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
|
||||
TComplex Plaq_T_sum;
|
||||
Plaq_T_sum=zero;
|
||||
Plaq_T_sum=Zero();
|
||||
for(int t=0;t<Nt;t++){
|
||||
Plaq_T_sum = Plaq_T_sum+Plaq_T[t];
|
||||
Complex Pt=TensorRemove(Plaq_T[t]);
|
||||
|
@ -60,8 +60,8 @@ int main (int argc, char ** argv)
|
||||
GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds4);
|
||||
|
||||
LatticeFermion src(FGrid); random(RNG5,src);
|
||||
LatticeFermion result(FGrid); result=zero;
|
||||
LatticeFermion ref(FGrid); ref=zero;
|
||||
LatticeFermion result(FGrid); result=Zero();
|
||||
LatticeFermion ref(FGrid); ref=Zero();
|
||||
LatticeFermion tmp(FGrid);
|
||||
LatticeFermion err(FGrid);
|
||||
LatticeGaugeField Umu(UGrid); SU3::HotConfiguration(RNG4,Umu);
|
||||
|
@ -128,7 +128,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
|
||||
|
||||
// LatticeFermion result(FGrid); result=zero;
|
||||
// LatticeFermion result(FGrid); result=Zero();
|
||||
// LatticeGaugeField Umu(UGrid);
|
||||
|
||||
// SU3::HotConfiguration(RNG4,Umu);
|
||||
@ -145,7 +145,7 @@ int main (int argc, char ** argv)
|
||||
// LatticeFermion src_o(FrbGrid);
|
||||
// LatticeFermion result_o(FrbGrid);
|
||||
// pickCheckerboard(Odd,src_o,src);
|
||||
// result_o=zero;
|
||||
// result_o=Zero();
|
||||
|
||||
// SchurDiagMooeeOperator<DomainWallFermionR,LatticeFermion> HermOpEO(Ddwf);
|
||||
// ConjugateGradient<LatticeFermion> CG(1.0e-8,10000);
|
||||
|
@ -107,10 +107,10 @@ void TestWhat(What & Ddwf,
|
||||
LatticeFermion src (FGrid); random(*RNG5,src);
|
||||
LatticeFermion phi (FGrid); random(*RNG5,phi);
|
||||
LatticeFermion chi (FGrid); random(*RNG5,chi);
|
||||
LatticeFermion result(FGrid); result=zero;
|
||||
LatticeFermion ref(FGrid); ref=zero;
|
||||
LatticeFermion tmp(FGrid); tmp=zero;
|
||||
LatticeFermion err(FGrid); tmp=zero;
|
||||
LatticeFermion result(FGrid); result=Zero();
|
||||
LatticeFermion ref(FGrid); ref=Zero();
|
||||
LatticeFermion tmp(FGrid); tmp=Zero();
|
||||
LatticeFermion err(FGrid); tmp=Zero();
|
||||
|
||||
LatticeFermion src_e (FrbGrid);
|
||||
LatticeFermion src_o (FrbGrid);
|
||||
|
@ -60,7 +60,7 @@ int main (int argc, char ** argv)
|
||||
LatticeComplex ShiftUe(&RBFine);
|
||||
LatticeComplex ShiftUo(&RBFine);
|
||||
LatticeComplex lex(&Fine);
|
||||
lex=zero;
|
||||
lex=Zero();
|
||||
Integer stride =1;
|
||||
{
|
||||
double nrm;
|
||||
|
@ -60,7 +60,7 @@ int main (int argc, char ** argv)
|
||||
LatticeComplex ShiftUe(&RBFine);
|
||||
LatticeComplex ShiftUo(&RBFine);
|
||||
LatticeComplex lex(&Fine);
|
||||
lex=zero;
|
||||
lex=Zero();
|
||||
Integer stride =1;
|
||||
{
|
||||
double nrm;
|
||||
|
@ -46,7 +46,7 @@ int main (int argc, char ** argv)
|
||||
LatticeComplex U(&Fine);
|
||||
LatticeComplex ShiftU(&Fine);
|
||||
LatticeComplex lex(&Fine);
|
||||
lex=zero;
|
||||
lex=Zero();
|
||||
Integer stride =1;
|
||||
{
|
||||
double nrm;
|
||||
|
@ -69,18 +69,18 @@ int main (int argc, char ** argv)
|
||||
LatticeFermion src (FGrid); random(RNG5, src);
|
||||
LatticeFermion phi (FGrid); random(RNG5, phi);
|
||||
LatticeFermion chi (FGrid); random(RNG5, chi);
|
||||
LatticeFermion result(FGrid); result = zero;
|
||||
LatticeFermion ref (FGrid); ref = zero;
|
||||
LatticeFermion tmp (FGrid); tmp = zero;
|
||||
LatticeFermion err (FGrid); err = zero;
|
||||
LatticeFermion result(FGrid); result = Zero();
|
||||
LatticeFermion ref (FGrid); ref = Zero();
|
||||
LatticeFermion tmp (FGrid); tmp = Zero();
|
||||
LatticeFermion err (FGrid); err = Zero();
|
||||
LatticeGaugeField Umu (UGrid); SU3::HotConfiguration(RNG4, Umu);
|
||||
std::vector<LatticeColourMatrix> U(4,UGrid);
|
||||
|
||||
// Only one non-zero (y)
|
||||
Umu = zero;
|
||||
Umu = Zero();
|
||||
for(int nn=0; nn<Nd; nn++){
|
||||
random(RNG4, U[nn]);
|
||||
if(nn>0){ U[nn] = zero; }
|
||||
if(nn>0){ U[nn] = Zero(); }
|
||||
PokeIndex<LorentzIndex>(Umu, U[nn], nn);
|
||||
}
|
||||
|
||||
|
@ -68,19 +68,19 @@ int main (int argc, char ** argv)
|
||||
LatticeFermion src (FGrid); random(RNG5,src);
|
||||
LatticeFermion phi (FGrid); random(RNG5,phi);
|
||||
LatticeFermion chi (FGrid); random(RNG5,chi);
|
||||
LatticeFermion result(FGrid); result=zero;
|
||||
LatticeFermion ref(FGrid); ref=zero;
|
||||
LatticeFermion tmp(FGrid); tmp=zero;
|
||||
LatticeFermion err(FGrid); tmp=zero;
|
||||
LatticeFermion result(FGrid); result=Zero();
|
||||
LatticeFermion ref(FGrid); ref=Zero();
|
||||
LatticeFermion tmp(FGrid); tmp=Zero();
|
||||
LatticeFermion err(FGrid); tmp=Zero();
|
||||
LatticeGaugeField Umu(UGrid); SU3::HotConfiguration(RNG4,Umu);
|
||||
std::vector<LatticeColourMatrix> U(4,UGrid);
|
||||
|
||||
// Only one non-zero (y)
|
||||
Umu=zero;
|
||||
Umu=Zero();
|
||||
for(int nn=0;nn<Nd;nn++){
|
||||
random(RNG4,U[nn]);
|
||||
if ( nn>0 )
|
||||
U[nn]=zero;
|
||||
U[nn]=Zero();
|
||||
PokeIndex<LorentzIndex>(Umu,U[nn],nn);
|
||||
}
|
||||
|
||||
|
@ -76,8 +76,8 @@ int main (int argc, char ** argv)
|
||||
GridParallelRNG RNG5(FGrid); RNG5.SeedFixedIntegers(seeds5);
|
||||
|
||||
LatticeFermion src (FGrid); random(RNG5,src);
|
||||
LatticeFermion result(FGrid); result=zero;
|
||||
LatticeFermion ref(FGrid); ref=zero;
|
||||
LatticeFermion result(FGrid); result=Zero();
|
||||
LatticeFermion ref(FGrid); ref=Zero();
|
||||
LatticeFermion tmp(FGrid);
|
||||
LatticeFermion err(FGrid);
|
||||
|
||||
@ -86,7 +86,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
// Only one non-zero (y)
|
||||
/*
|
||||
Umu=zero;
|
||||
Umu=Zero();
|
||||
for(int nn=0;nn<Nd;nn++){
|
||||
random(RNG4,U[nn]);
|
||||
PokeIndex<LorentzIndex>(Umu,U[nn],nn);
|
||||
|
@ -71,7 +71,7 @@ int main (int argc, char ** argv)
|
||||
std::cout<<"*************************************************"<<std::endl;
|
||||
std::cout<<"Testing Fourier from of known plane wave "<<std::endl;
|
||||
std::cout<<"*************************************************"<<std::endl;
|
||||
C=zero;
|
||||
C=Zero();
|
||||
for(int mu=0;mu<4;mu++){
|
||||
RealD TwoPiL = M_PI * 2.0/ latt_size[mu];
|
||||
LatticeCoordinate(coor,mu);
|
||||
@ -80,7 +80,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
C = exp(C*ci);
|
||||
Csav = C;
|
||||
S=zero;
|
||||
S=Zero();
|
||||
S = S+C;
|
||||
|
||||
FFT theFFT(&GRID);
|
||||
@ -92,12 +92,12 @@ int main (int argc, char ** argv)
|
||||
theFFT.FFT_dim(Ctilde,Ctilde,2,FFT::forward); std::cout << theFFT.MFlops()<<" Mflops "<<std::endl;
|
||||
theFFT.FFT_dim(Ctilde,Ctilde,3,FFT::forward); std::cout << theFFT.MFlops()<<" Mflops "<<std::endl;
|
||||
|
||||
// C=zero;
|
||||
// C=Zero();
|
||||
// Ctilde = where(abs(Ctilde)<1.0e-10,C,Ctilde);
|
||||
TComplexD cVol;
|
||||
cVol()()() = vol;
|
||||
|
||||
Cref=zero;
|
||||
Cref=Zero();
|
||||
pokeSite(cVol,Cref,p);
|
||||
// std::cout <<"Ctilde "<< Ctilde <<std::endl;
|
||||
// std::cout <<"Cref "<< Cref <<std::endl;
|
||||
@ -121,9 +121,9 @@ int main (int argc, char ** argv)
|
||||
theFFT.FFT_dim(Stilde,S,3,FFT::forward); std::cout << theFFT.MFlops()<<" mflops "<<std::endl;
|
||||
|
||||
SpinMatrixD Sp;
|
||||
Sp = zero; Sp = Sp+cVol;
|
||||
Sp = Zero(); Sp = Sp+cVol;
|
||||
|
||||
S=zero;
|
||||
S=Zero();
|
||||
pokeSite(Sp,S,p);
|
||||
|
||||
S= S-Stilde;
|
||||
@ -139,7 +139,7 @@ int main (int argc, char ** argv)
|
||||
LatticeGaugeFieldD Umu(&GRID);
|
||||
|
||||
SU3::ColdConfiguration(pRNG,Umu); // Unit gauge
|
||||
// Umu=zero;
|
||||
// Umu=Zero();
|
||||
////////////////////////////////////////////////////
|
||||
// Wilson test
|
||||
////////////////////////////////////////////////////
|
||||
@ -225,13 +225,13 @@ int main (int argc, char ** argv)
|
||||
Gamma::Algebra::GammaT,
|
||||
Gamma::Algebra::Gamma5
|
||||
};
|
||||
LatticeFermionD Kinetic(FGrid); Kinetic = zero;
|
||||
LatticeFermionD Kinetic(FGrid); Kinetic = Zero();
|
||||
LatticeComplexD kmu(FGrid);
|
||||
LatticeInteger scoor(FGrid);
|
||||
LatticeComplexD sk (FGrid); sk = zero;
|
||||
LatticeComplexD sk2(FGrid); sk2= zero;
|
||||
LatticeComplexD W(FGrid); W= zero;
|
||||
// LatticeComplexD a(FGrid); a= zero;
|
||||
LatticeComplexD sk (FGrid); sk = Zero();
|
||||
LatticeComplexD sk2(FGrid); sk2= Zero();
|
||||
LatticeComplexD W(FGrid); W= Zero();
|
||||
// LatticeComplexD a(FGrid); a= Zero();
|
||||
LatticeComplexD one(FGrid); one =ComplexD(1.0,0.0);
|
||||
ComplexD ci(0.0,1.0);
|
||||
|
||||
@ -295,7 +295,7 @@ int main (int argc, char ** argv)
|
||||
LatticeFermionD diff(&GRID);
|
||||
|
||||
std::vector<int> point(4,0);
|
||||
src=zero;
|
||||
src=Zero();
|
||||
SpinColourVectorD ferm; gaussian(sRNG,ferm);
|
||||
pokeSite(ferm,src,point);
|
||||
|
||||
@ -313,9 +313,9 @@ int main (int argc, char ** argv)
|
||||
|
||||
Gamma G5(Gamma::Algebra::Gamma5);
|
||||
|
||||
LatticeFermionD src5(FGrid); src5=zero;
|
||||
LatticeFermionD src5(FGrid); src5=Zero();
|
||||
LatticeFermionD tmp5(FGrid);
|
||||
LatticeFermionD result5(FGrid); result5=zero;
|
||||
LatticeFermionD result5(FGrid); result5=Zero();
|
||||
LatticeFermionD result4(&GRID);
|
||||
const int sdir=0;
|
||||
|
||||
@ -374,7 +374,7 @@ int main (int argc, char ** argv)
|
||||
LatticeFermionD diff(&GRID);
|
||||
|
||||
std::vector<int> point(4,0);
|
||||
src=zero;
|
||||
src=Zero();
|
||||
SpinColourVectorD ferm; gaussian(sRNG,ferm);
|
||||
pokeSite(ferm,src,point);
|
||||
|
||||
@ -393,9 +393,9 @@ int main (int argc, char ** argv)
|
||||
|
||||
Gamma G5(Gamma::Algebra::Gamma5);
|
||||
|
||||
LatticeFermionD src5(FGrid); src5=zero;
|
||||
LatticeFermionD src5(FGrid); src5=Zero();
|
||||
LatticeFermionD tmp5(FGrid);
|
||||
LatticeFermionD result5(FGrid); result5=zero;
|
||||
LatticeFermionD result5(FGrid); result5=Zero();
|
||||
LatticeFermionD result4(&GRID);
|
||||
const int sdir=0;
|
||||
|
||||
@ -448,8 +448,8 @@ int main (int argc, char ** argv)
|
||||
typedef Photon<QEDGimplTypesD> QEDGaction;
|
||||
|
||||
QEDGaction Maxwell(QEDGaction::FEYNMAN_L);
|
||||
QEDGaction::GaugeField Prop(&GRID);Prop=zero;
|
||||
QEDGaction::GaugeField Source(&GRID);Source=zero;
|
||||
QEDGaction::GaugeField Prop(&GRID);Prop=Zero();
|
||||
QEDGaction::GaugeField Source(&GRID);Source=Zero();
|
||||
|
||||
Maxwell.FreePropagator (Source,Prop);
|
||||
std::cout << " MaxwellFree propagator\n";
|
||||
|
@ -64,7 +64,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
ComplexF ci(0.0,1.0);
|
||||
|
||||
C=zero;
|
||||
C=Zero();
|
||||
for(int mu=0;mu<4;mu++){
|
||||
RealD TwoPiL = M_PI * 2.0/ latt_size[mu];
|
||||
LatticeCoordinate(coor,mu);
|
||||
@ -73,7 +73,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
C = exp(C*ci);
|
||||
|
||||
S=zero;
|
||||
S=Zero();
|
||||
S = S+C;
|
||||
|
||||
FFT theFFT(&Fine);
|
||||
@ -84,12 +84,12 @@ int main (int argc, char ** argv)
|
||||
theFFT.FFT_dim(Ctilde,Ctilde,2,FFT::forward); std::cout << theFFT.MFlops()<<std::endl;
|
||||
theFFT.FFT_dim(Ctilde,Ctilde,3,FFT::forward); std::cout << theFFT.MFlops()<<std::endl;
|
||||
|
||||
// C=zero;
|
||||
// C=Zero();
|
||||
// Ctilde = where(abs(Ctilde)<1.0e-10,C,Ctilde);
|
||||
TComplexF cVol;
|
||||
cVol()()() = vol;
|
||||
|
||||
C=zero;
|
||||
C=Zero();
|
||||
pokeSite(cVol,C,p);
|
||||
C=C-Ctilde;
|
||||
std::cout << "diff scalar "<<norm2(C) << std::endl;
|
||||
@ -101,9 +101,9 @@ int main (int argc, char ** argv)
|
||||
theFFT.FFT_dim(Stilde,Stilde,3,FFT::forward); std::cout << theFFT.MFlops()<<" "<<theFFT.USec() <<std::endl;
|
||||
|
||||
SpinMatrixF Sp;
|
||||
Sp = zero; Sp = Sp+cVol;
|
||||
Sp = Zero(); Sp = Sp+cVol;
|
||||
|
||||
S=zero;
|
||||
S=Zero();
|
||||
pokeSite(Sp,S,p);
|
||||
|
||||
S= S-Stilde;
|
||||
|
@ -64,28 +64,28 @@ void createTestAlgebra(void)
|
||||
SpinMatrix testg5;
|
||||
const Complex I(0., 1.), mI(0., -1.);
|
||||
|
||||
testg[0] = zero;
|
||||
testg[0] = Zero();
|
||||
testg[0]()(0, 3) = I;
|
||||
testg[0]()(1, 2) = I;
|
||||
testg[0]()(2, 1) = mI;
|
||||
testg[0]()(3, 0) = mI;
|
||||
std::cout << GridLogMessage << "test GammaX= " << std::endl;
|
||||
print(testg[0]);
|
||||
testg[1] = zero;
|
||||
testg[1] = Zero();
|
||||
testg[1]()(0, 3) = -1.;
|
||||
testg[1]()(1, 2) = 1.;
|
||||
testg[1]()(2, 1) = 1.;
|
||||
testg[1]()(3, 0) = -1.;
|
||||
std::cout << GridLogMessage << "test GammaY= " << std::endl;
|
||||
print(testg[1]);
|
||||
testg[2] = zero;
|
||||
testg[2] = Zero();
|
||||
testg[2]()(0, 2) = I;
|
||||
testg[2]()(1, 3) = mI;
|
||||
testg[2]()(2, 0) = mI;
|
||||
testg[2]()(3, 1) = I;
|
||||
std::cout << GridLogMessage << "test GammaZ= " << std::endl;
|
||||
print(testg[2]);
|
||||
testg[3] = zero;
|
||||
testg[3] = Zero();
|
||||
testg[3]()(0, 2) = 1.;
|
||||
testg[3]()(1, 3) = 1.;
|
||||
testg[3]()(2, 0) = 1.;
|
||||
|
@ -127,7 +127,7 @@ int main (int argc, char ** argv)
|
||||
tmpsrc=src*2.0;
|
||||
PokeIndex<0>(src_2f,tmpsrc,1);
|
||||
|
||||
StandardFermionField result_1f(FGrid_1f); result_1f=zero;
|
||||
StandardFermionField result_1f(FGrid_1f); result_1f=Zero();
|
||||
StandardGaugeField Umu_1f(UGrid_1f);
|
||||
Replicate(Umu_2f,Umu_1f);
|
||||
|
||||
@ -166,7 +166,7 @@ int main (int argc, char ** argv)
|
||||
StandardFermionField src_o_1f(FrbGrid_1f);
|
||||
StandardFermionField result_o_1f(FrbGrid_1f);
|
||||
pickCheckerboard(Odd,src_o_1f,src_1f);
|
||||
result_o_1f=zero;
|
||||
result_o_1f=Zero();
|
||||
|
||||
SchurDiagMooeeOperator<StandardDiracOp,StandardFermionField> HermOpEO(Ddwf);
|
||||
ConjugateGradient<StandardFermionField> CG(1.0e-8,10000);
|
||||
@ -258,11 +258,11 @@ int main (int argc, char ** argv)
|
||||
|
||||
}
|
||||
|
||||
GparityFermionField result_2f(FGrid_2f); result_2f=zero;
|
||||
GparityFermionField result_2f(FGrid_2f); result_2f=Zero();
|
||||
GparityFermionField src_o_2f(FrbGrid_2f);
|
||||
GparityFermionField result_o_2f(FrbGrid_2f);
|
||||
pickCheckerboard(Odd,src_o_2f,src_2f);
|
||||
result_o_2f=zero;
|
||||
result_o_2f=Zero();
|
||||
|
||||
ConjugateGradient<GparityFermionField> CG2f(1.0e-8,10000);
|
||||
SchurDiagMooeeOperator<GparityDiracOp,GparityFermionField> HermOpEO2f(GPDdwf);
|
||||
@ -278,8 +278,8 @@ int main (int argc, char ** argv)
|
||||
StandardFermionField res0 (FGrid_2f);
|
||||
StandardFermionField res1 (FGrid_2f);
|
||||
|
||||
res0=zero;
|
||||
res1=zero;
|
||||
res0=Zero();
|
||||
res1=Zero();
|
||||
|
||||
res0o = PeekIndex<0>(result_o_2f,0);
|
||||
res1o = PeekIndex<0>(result_o_2f,1);
|
||||
@ -298,7 +298,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
replica = where( xcoor_1f5 >= Integer(L), replica1,replica0 );
|
||||
|
||||
replica0 = zero;
|
||||
replica0 = Zero();
|
||||
setCheckerboard(replica0,result_o_1f);
|
||||
|
||||
std::cout << "Norm2 solutions is " <<norm2(replica)<<" "<< norm2(replica0)<<std::endl;
|
||||
|
@ -57,10 +57,10 @@ int main (int argc, char ** argv)
|
||||
FermionField src (&Grid); random(pRNG,src);
|
||||
FermionField phi (&Grid); random(pRNG,phi);
|
||||
FermionField chi (&Grid); random(pRNG,chi);
|
||||
FermionField result(&Grid); result=zero;
|
||||
FermionField ref(&Grid); ref=zero;
|
||||
FermionField tmp(&Grid); tmp=zero;
|
||||
FermionField err(&Grid); tmp=zero;
|
||||
FermionField result(&Grid); result=Zero();
|
||||
FermionField ref(&Grid); ref=Zero();
|
||||
FermionField tmp(&Grid); tmp=Zero();
|
||||
FermionField err(&Grid); tmp=Zero();
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
std::vector<LatticeColourMatrix> U(4,&Grid);
|
||||
|
||||
@ -70,7 +70,7 @@ int main (int argc, char ** argv)
|
||||
}
|
||||
|
||||
// Only one non-zero (y)
|
||||
Umu=zero;
|
||||
Umu=Zero();
|
||||
for(int nn=0;nn<Nd;nn++){
|
||||
random(pRNG,U[nn]);
|
||||
std::cout<<GridLogMessage<<"U[nn]"<<norm2(U[nn])<<std::endl;
|
||||
|
@ -121,7 +121,7 @@ int main(int argc, char** argv) {
|
||||
// Test group structure
|
||||
// (U_f * V_f)_r = U_r * V_r
|
||||
LatticeGaugeField UV(grid);
|
||||
UV = zero;
|
||||
UV = Zero();
|
||||
for (int mu = 0; mu < Nd; mu++) {
|
||||
SU<Nc>::LatticeMatrix Umu = peekLorentz(U,mu);
|
||||
SU<Nc>::LatticeMatrix Vmu = peekLorentz(V,mu);
|
||||
@ -139,7 +139,7 @@ int main(int argc, char** argv) {
|
||||
typename AdjointRep<Nc>::LatticeField Vr = AdjRep.U; // V_r
|
||||
|
||||
typename AdjointRep<Nc>::LatticeField UrVr(grid);
|
||||
UrVr = zero;
|
||||
UrVr = Zero();
|
||||
for (int mu = 0; mu < Nd; mu++) {
|
||||
typename AdjointRep<Nc>::LatticeMatrix Urmu = peekLorentz(Ur,mu);
|
||||
typename AdjointRep<Nc>::LatticeMatrix Vrmu = peekLorentz(Vr,mu);
|
||||
@ -200,7 +200,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
|
||||
// Tranform to the adjoint representation
|
||||
U = zero; // fill this with only one direction
|
||||
U = Zero(); // fill this with only one direction
|
||||
pokeLorentz(U,Ufund,0); // the representation transf acts on full gauge fields
|
||||
|
||||
AdjRep.update_representation(U);
|
||||
@ -315,7 +315,7 @@ int main(int argc, char** argv) {
|
||||
SU<Nc>::HotConfiguration<LatticeGaugeField>(gridRNG, V2);
|
||||
|
||||
LatticeGaugeField UV2(grid);
|
||||
UV2 = zero;
|
||||
UV2 = Zero();
|
||||
for (int mu = 0; mu < Nd; mu++) {
|
||||
SU<Nc>::LatticeMatrix Umu2 = peekLorentz(U2,mu);
|
||||
SU<Nc>::LatticeMatrix Vmu2 = peekLorentz(V2,mu);
|
||||
@ -332,7 +332,7 @@ int main(int argc, char** argv) {
|
||||
typename TwoIndexRep< Nc, Symmetric >::LatticeField Vr2 = TIndexRep.U; // V_r
|
||||
|
||||
typename TwoIndexRep< Nc, Symmetric >::LatticeField Ur2Vr2(grid);
|
||||
Ur2Vr2 = zero;
|
||||
Ur2Vr2 = Zero();
|
||||
for (int mu = 0; mu < Nd; mu++) {
|
||||
typename TwoIndexRep< Nc, Symmetric >::LatticeMatrix Urmu2 = peekLorentz(Ur2,mu);
|
||||
typename TwoIndexRep< Nc, Symmetric >::LatticeMatrix Vrmu2 = peekLorentz(Vr2,mu);
|
||||
@ -393,7 +393,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
|
||||
// Tranform to the 2Index Sym representation
|
||||
U = zero; // fill this with only one direction
|
||||
U = Zero(); // fill this with only one direction
|
||||
pokeLorentz(U,Ufund2,0); // the representation transf acts on full gauge fields
|
||||
|
||||
TIndexRep.update_representation(U);
|
||||
@ -425,7 +425,7 @@ int main(int argc, char** argv) {
|
||||
SU<Nc>::HotConfiguration<LatticeGaugeField>(gridRNG, V2A);
|
||||
|
||||
LatticeGaugeField UV2A(grid);
|
||||
UV2A = zero;
|
||||
UV2A = Zero();
|
||||
for (int mu = 0; mu < Nd; mu++) {
|
||||
SU<Nc>::LatticeMatrix Umu2A = peekLorentz(U2,mu);
|
||||
SU<Nc>::LatticeMatrix Vmu2A = peekLorentz(V2,mu);
|
||||
@ -442,7 +442,7 @@ int main(int argc, char** argv) {
|
||||
typename TwoIndexRep< Nc, AntiSymmetric >::LatticeField Vr2A = TIndexRepA.U; // V_r
|
||||
|
||||
typename TwoIndexRep< Nc, AntiSymmetric >::LatticeField Ur2Vr2A(grid);
|
||||
Ur2Vr2A = zero;
|
||||
Ur2Vr2A = Zero();
|
||||
for (int mu = 0; mu < Nd; mu++) {
|
||||
typename TwoIndexRep< Nc, AntiSymmetric >::LatticeMatrix Urmu2A = peekLorentz(Ur2A,mu);
|
||||
typename TwoIndexRep< Nc, AntiSymmetric >::LatticeMatrix Vrmu2A = peekLorentz(Vr2A,mu);
|
||||
@ -503,7 +503,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
|
||||
// Tranform to the 2Index Sym representation
|
||||
U = zero; // fill this with only one direction
|
||||
U = Zero(); // fill this with only one direction
|
||||
pokeLorentz(U,Ufund2A,0); // the representation transf acts on full gauge fields
|
||||
|
||||
TIndexRepA.update_representation(U);
|
||||
|
@ -388,7 +388,7 @@ int main(int argc, char **argv) {
|
||||
std::vector<int> coor(4);
|
||||
for(int d=0;d<4;d++) coor[d] = 0;
|
||||
peekSite(cmat,Foo,coor);
|
||||
Foo = zero;
|
||||
Foo = Zero();
|
||||
pokeSite(cmat,Foo,coor);
|
||||
}
|
||||
random(Foo);
|
||||
@ -403,14 +403,14 @@ int main(int argc, char **argv) {
|
||||
Fine._ldimensions[0] * Fine._ldimensions[1] * Fine._ldimensions[2];
|
||||
|
||||
LatticeInteger lex(&Fine);
|
||||
lex = zero;
|
||||
lex = Zero();
|
||||
for (int d = 0; d < 4; d++) {
|
||||
LatticeInteger coor(&Fine);
|
||||
LatticeCoordinate(coor, d);
|
||||
lex = lex + coor * mm[d];
|
||||
}
|
||||
|
||||
// Bar = zero;
|
||||
// Bar = Zero();
|
||||
// Bar = where(lex<Integer(10),Foo,Bar);
|
||||
|
||||
cout << "peeking sites..\n";
|
||||
@ -534,7 +534,7 @@ int main(int argc, char **argv) {
|
||||
bShifted = Cshift(rFoo, dir, shift); // Shift red->black
|
||||
rShifted = Cshift(bFoo, dir, shift); // Shift black->red
|
||||
|
||||
ShiftedCheck = zero;
|
||||
ShiftedCheck = Zero();
|
||||
setCheckerboard(ShiftedCheck, bShifted); // Put them all together
|
||||
setCheckerboard(ShiftedCheck,
|
||||
rShifted); // and check the results (later)
|
||||
|
@ -69,18 +69,18 @@ int main (int argc, char ** argv)
|
||||
LatticeFermion src (FGrid); random(RNG5, src);
|
||||
LatticeFermion phi (FGrid); random(RNG5, phi);
|
||||
LatticeFermion chi (FGrid); random(RNG5, chi);
|
||||
LatticeFermion result(FGrid); result = zero;
|
||||
LatticeFermion ref (FGrid); ref = zero;
|
||||
LatticeFermion tmp (FGrid); tmp = zero;
|
||||
LatticeFermion err (FGrid); err = zero;
|
||||
LatticeFermion result(FGrid); result = Zero();
|
||||
LatticeFermion ref (FGrid); ref = Zero();
|
||||
LatticeFermion tmp (FGrid); tmp = Zero();
|
||||
LatticeFermion err (FGrid); err = Zero();
|
||||
LatticeGaugeField Umu (UGrid); SU3::HotConfiguration(RNG4, Umu);
|
||||
std::vector<LatticeColourMatrix> U(4,UGrid);
|
||||
|
||||
// Only one non-zero (y)
|
||||
Umu = zero;
|
||||
Umu = Zero();
|
||||
for(int nn=0; nn<Nd; nn++){
|
||||
random(RNG4, U[nn]);
|
||||
if(nn>0){ U[nn] = zero; }
|
||||
if(nn>0){ U[nn] = Zero(); }
|
||||
PokeIndex<LorentzIndex>(Umu, U[nn], nn);
|
||||
}
|
||||
|
||||
|
@ -68,19 +68,19 @@ int main (int argc, char ** argv)
|
||||
LatticeFermion src (FGrid); random(RNG5,src);
|
||||
LatticeFermion phi (FGrid); random(RNG5,phi);
|
||||
LatticeFermion chi (FGrid); random(RNG5,chi);
|
||||
LatticeFermion result(FGrid); result=zero;
|
||||
LatticeFermion ref(FGrid); ref=zero;
|
||||
LatticeFermion tmp(FGrid); tmp=zero;
|
||||
LatticeFermion err(FGrid); tmp=zero;
|
||||
LatticeFermion result(FGrid); result=Zero();
|
||||
LatticeFermion ref(FGrid); ref=Zero();
|
||||
LatticeFermion tmp(FGrid); tmp=Zero();
|
||||
LatticeFermion err(FGrid); tmp=Zero();
|
||||
LatticeGaugeField Umu(UGrid); random(RNG4,Umu);
|
||||
std::vector<LatticeColourMatrix> U(4,UGrid);
|
||||
|
||||
// Only one non-zero (y)
|
||||
Umu=zero;
|
||||
Umu=Zero();
|
||||
for(int nn=0;nn<Nd;nn++){
|
||||
random(RNG4,U[nn]);
|
||||
if ( nn>0 )
|
||||
U[nn]=zero;
|
||||
U[nn]=Zero();
|
||||
PokeIndex<LorentzIndex>(Umu,U[nn],nn);
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ int main (int argc, char ** argv)
|
||||
neg = -pos;
|
||||
zz = ComplexD(0.0,0.0);
|
||||
|
||||
Charge=zero;
|
||||
Charge=Zero();
|
||||
|
||||
// Parallel plate capacitor
|
||||
{
|
||||
@ -90,7 +90,7 @@ int main (int argc, char ** argv)
|
||||
std::vector<LatticeComplexD> k(4,&GRID);
|
||||
LatticeComplexD ksq(&GRID);
|
||||
|
||||
ksq=zero;
|
||||
ksq=Zero();
|
||||
for(int mu=0;mu<nd;mu++) {
|
||||
|
||||
Integer L=latt_size[mu];
|
||||
|
@ -76,7 +76,7 @@ int main (int argc, char ** argv)
|
||||
for( int cb=0;cb<2;cb++ ) {
|
||||
|
||||
one.Checkerboard()=subsets[cb];
|
||||
mask= zero;
|
||||
mask= Zero();
|
||||
setCheckerboard(mask,one);
|
||||
|
||||
// std::cout<<GridLogMessage<<mask<<std::endl;
|
||||
|
@ -58,10 +58,10 @@ int main (int argc, char ** argv)
|
||||
typename ImprovedStaggeredFermionR::ImplParams params;
|
||||
|
||||
FermionField src (&Grid); random(pRNG,src);
|
||||
FermionField result(&Grid); result=zero;
|
||||
FermionField ref(&Grid); ref=zero;
|
||||
FermionField tmp(&Grid); tmp=zero;
|
||||
FermionField err(&Grid); tmp=zero;
|
||||
FermionField result(&Grid); result=Zero();
|
||||
FermionField ref(&Grid); ref=Zero();
|
||||
FermionField tmp(&Grid); tmp=Zero();
|
||||
FermionField err(&Grid); tmp=Zero();
|
||||
FermionField phi (&Grid); random(pRNG,phi);
|
||||
FermionField chi (&Grid); random(pRNG,chi);
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
@ -82,7 +82,7 @@ int main (int argc, char ** argv)
|
||||
*/
|
||||
}
|
||||
|
||||
ref = zero;
|
||||
ref = Zero();
|
||||
|
||||
RealD mass=0.1;
|
||||
RealD c1=9.0/8.0;
|
||||
@ -90,7 +90,7 @@ int main (int argc, char ** argv)
|
||||
RealD u0=1.0;
|
||||
|
||||
{ // Simple improved staggered implementation
|
||||
ref = zero;
|
||||
ref = Zero();
|
||||
RealD c1tad = 0.5*c1/u0;
|
||||
RealD c2tad = 0.5*c2/u0/u0/u0;
|
||||
|
||||
|
@ -69,10 +69,10 @@ int main (int argc, char ** argv)
|
||||
|
||||
random(pRNG5,src);
|
||||
|
||||
FermionField result(FGrid); result=zero;
|
||||
FermionField ref(FGrid); ref=zero;
|
||||
FermionField tmp(FGrid); tmp=zero;
|
||||
FermionField err(FGrid); tmp=zero;
|
||||
FermionField result(FGrid); result=Zero();
|
||||
FermionField ref(FGrid); ref=Zero();
|
||||
FermionField tmp(FGrid); tmp=Zero();
|
||||
FermionField err(FGrid); tmp=Zero();
|
||||
FermionField phi (FGrid); random(pRNG5,phi);
|
||||
FermionField chi (FGrid); random(pRNG5,chi);
|
||||
|
||||
@ -107,7 +107,7 @@ int main (int argc, char ** argv)
|
||||
RealD u0=1.0;
|
||||
|
||||
{ // Simple improved staggered implementation
|
||||
ref = zero;
|
||||
ref = Zero();
|
||||
RealD c1tad = 0.5*c1/u0;
|
||||
RealD c2tad = 0.5*c2/u0/u0/u0;
|
||||
|
||||
|
@ -71,14 +71,14 @@ int main (int argc, char ** argv)
|
||||
random(pRNG5,src);
|
||||
/*
|
||||
std::vector<int> site({0,1,2,0,0});
|
||||
ColourVector cv = zero;
|
||||
ColourVector cv = Zero();
|
||||
cv()()(0)=1.0;
|
||||
src = zero;
|
||||
src = Zero();
|
||||
pokeSite(cv,src,site);
|
||||
*/
|
||||
FermionField result(FGrid); result=zero;
|
||||
FermionField tmp(FGrid); tmp=zero;
|
||||
FermionField err(FGrid); tmp=zero;
|
||||
FermionField result(FGrid); result=Zero();
|
||||
FermionField tmp(FGrid); tmp=Zero();
|
||||
FermionField err(FGrid); tmp=Zero();
|
||||
FermionField phi (FGrid); random(pRNG5,phi);
|
||||
FermionField chi (FGrid); random(pRNG5,chi);
|
||||
|
||||
@ -88,7 +88,7 @@ int main (int argc, char ** argv)
|
||||
/*
|
||||
for(int mu=1;mu<4;mu++){
|
||||
auto tmp = PeekIndex<LorentzIndex>(Umu,mu);
|
||||
tmp = zero;
|
||||
tmp = Zero();
|
||||
PokeIndex<LorentzIndex>(Umu,tmp,mu);
|
||||
}
|
||||
*/
|
||||
@ -149,7 +149,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
|
||||
FermionField ssrc (sFGrid); localConvert(src,ssrc);
|
||||
FermionField sresult(sFGrid); sresult=zero;
|
||||
FermionField sresult(sFGrid); sresult=Zero();
|
||||
|
||||
StaggeredKernelsStatic::Opt=StaggeredKernelsStatic::OptHandUnroll;
|
||||
t0=usecond();
|
||||
|
@ -66,10 +66,10 @@ int main (int argc, char ** argv)
|
||||
LatticeFermion src (&Grid); random(pRNG,src);
|
||||
LatticeFermion phi (&Grid); random(pRNG,phi);
|
||||
LatticeFermion chi (&Grid); random(pRNG,chi);
|
||||
LatticeFermion result(&Grid); result=zero;
|
||||
LatticeFermion ref(&Grid); ref=zero;
|
||||
LatticeFermion tmp(&Grid); tmp=zero;
|
||||
LatticeFermion err(&Grid); tmp=zero;
|
||||
LatticeFermion result(&Grid); result=Zero();
|
||||
LatticeFermion ref(&Grid); ref=Zero();
|
||||
LatticeFermion tmp(&Grid); tmp=Zero();
|
||||
LatticeFermion err(&Grid); tmp=Zero();
|
||||
LatticeGaugeField Umu(&Grid);
|
||||
SU3::HotConfiguration(pRNG,Umu);
|
||||
std::vector<LatticeColourMatrix> U(4,&Grid);
|
||||
@ -80,7 +80,7 @@ int main (int argc, char ** argv)
|
||||
}
|
||||
|
||||
// Only one non-zero (y)
|
||||
Umu=zero;
|
||||
Umu=Zero();
|
||||
for(int nn=0;nn<Nd;nn++){
|
||||
random(pRNG,U[nn]);
|
||||
std::cout<<GridLogMessage<<"U[nn]"<<norm2(U[nn])<<std::endl;
|
||||
|
@ -67,10 +67,10 @@ int main (int argc, char ** argv)
|
||||
LatticeFermion src (&Grid); random(pRNG,src);
|
||||
LatticeFermion phi (&Grid); random(pRNG,phi);
|
||||
LatticeFermion chi (&Grid); random(pRNG,chi);
|
||||
LatticeFermion result(&Grid); result=zero;
|
||||
LatticeFermion ref(&Grid); ref=zero;
|
||||
LatticeFermion tmp(&Grid); tmp=zero;
|
||||
LatticeFermion err(&Grid); tmp=zero;
|
||||
LatticeFermion result(&Grid); result=Zero();
|
||||
LatticeFermion ref(&Grid); ref=Zero();
|
||||
LatticeFermion tmp(&Grid); tmp=Zero();
|
||||
LatticeFermion err(&Grid); tmp=Zero();
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
std::vector<LatticeColourMatrix> U(4,&Grid);
|
||||
|
||||
@ -80,7 +80,7 @@ int main (int argc, char ** argv)
|
||||
}
|
||||
|
||||
// Only one non-zero (y)
|
||||
Umu=zero;
|
||||
Umu=Zero();
|
||||
for(int nn=0;nn<Nd;nn++){
|
||||
random(pRNG,U[nn]);
|
||||
std::cout<<GridLogMessage<<"U[nn]"<<norm2(U[nn])<<std::endl;
|
||||
|
@ -68,19 +68,19 @@ int main (int argc, char ** argv)
|
||||
LatticeFermion src (FGrid); random(RNG5,src);
|
||||
LatticeFermion phi (FGrid); random(RNG5,phi);
|
||||
LatticeFermion chi (FGrid); random(RNG5,chi);
|
||||
LatticeFermion result(FGrid); result=zero;
|
||||
LatticeFermion ref(FGrid); ref=zero;
|
||||
LatticeFermion tmp(FGrid); tmp=zero;
|
||||
LatticeFermion err(FGrid); tmp=zero;
|
||||
LatticeFermion result(FGrid); result=Zero();
|
||||
LatticeFermion ref(FGrid); ref=Zero();
|
||||
LatticeFermion tmp(FGrid); tmp=Zero();
|
||||
LatticeFermion err(FGrid); tmp=Zero();
|
||||
LatticeGaugeField Umu(UGrid); random(RNG4,Umu);
|
||||
std::vector<LatticeColourMatrix> U(4,UGrid);
|
||||
|
||||
// Only one non-zero (y)
|
||||
Umu=zero;
|
||||
Umu=Zero();
|
||||
for(int nn=0;nn<Nd;nn++){
|
||||
random(RNG4,U[nn]);
|
||||
if ( nn>0 )
|
||||
U[nn]=zero;
|
||||
U[nn]=Zero();
|
||||
PokeIndex<LorentzIndex>(Umu,U[nn],nn);
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ void TestCGunprec(What & Ddwf,
|
||||
GridParallelRNG *RNG5)
|
||||
{
|
||||
LatticeFermion src (FGrid); random(*RNG5,src);
|
||||
LatticeFermion result(FGrid); result=zero;
|
||||
LatticeFermion result(FGrid); result=Zero();
|
||||
|
||||
MdagMLinearOperator<What,LatticeFermion> HermOp(Ddwf);
|
||||
ConjugateGradient<LatticeFermion> CG(1.0e-8,10000);
|
||||
@ -182,7 +182,7 @@ void TestCGprec(What & Ddwf,
|
||||
LatticeFermion src_o(FrbGrid);
|
||||
LatticeFermion result_o(FrbGrid);
|
||||
pickCheckerboard(Odd,src_o,src);
|
||||
result_o=zero;
|
||||
result_o=Zero();
|
||||
|
||||
SchurDiagMooeeOperator<What,LatticeFermion> HermOpEO(Ddwf);
|
||||
ConjugateGradient<LatticeFermion> CG(1.0e-8,10000);
|
||||
@ -199,7 +199,7 @@ void TestCGschur(What & Ddwf,
|
||||
GridParallelRNG *RNG5)
|
||||
{
|
||||
LatticeFermion src (FGrid); random(*RNG5,src);
|
||||
LatticeFermion result(FGrid); result=zero;
|
||||
LatticeFermion result(FGrid); result=Zero();
|
||||
|
||||
ConjugateGradient<LatticeFermion> CG(1.0e-8,10000);
|
||||
SchurRedBlackDiagMooeeSolve<LatticeFermion> SchurSolver(CG);
|
||||
|
@ -73,19 +73,19 @@ int main (int argc, char ** argv)
|
||||
GridParallelRNG CRNG(Coarse5d);CRNG.SeedFixedIntegers(cseeds);
|
||||
|
||||
LatticeFermion src(FGrid); random(RNG5,src);
|
||||
LatticeFermion result(FGrid); result=zero;
|
||||
LatticeFermion ref(FGrid); ref=zero;
|
||||
LatticeFermion result(FGrid); result=Zero();
|
||||
LatticeFermion ref(FGrid); ref=Zero();
|
||||
LatticeFermion tmp(FGrid);
|
||||
LatticeFermion err(FGrid);
|
||||
LatticeGaugeField Umu(UGrid); SU3::HotConfiguration(RNG4,Umu);
|
||||
|
||||
#if 0
|
||||
std::vector<LatticeColourMatrix> U(4,UGrid);
|
||||
Umu=zero;
|
||||
Umu=Zero();
|
||||
Complex cone(1.0,0.0);
|
||||
for(int nn=0;nn<Nd;nn++){
|
||||
if(1) {
|
||||
if (nn>2) { U[nn]=zero; std::cout<<GridLogMessage << "zeroing gauge field in dir "<<nn<<std::endl; }
|
||||
if (nn>2) { U[nn]=Zero(); std::cout<<GridLogMessage << "zeroing gauge field in dir "<<nn<<std::endl; }
|
||||
else { U[nn]=cone; std::cout<<GridLogMessage << "unit gauge field in dir "<<nn<<std::endl; }
|
||||
}
|
||||
pokeIndex<LorentzIndex>(Umu,U[nn],nn);
|
||||
@ -119,7 +119,8 @@ int main (int argc, char ** argv)
|
||||
|
||||
MdagMLinearOperator<DomainWallFermionR,LatticeFermion> HermDefOp(Ddwf);
|
||||
typedef Aggregation<vSpinColourVector,vTComplex,nbasis> Subspace;
|
||||
Subspace Aggregates(Coarse5d,FGrid);
|
||||
int cb = 0;
|
||||
Subspace Aggregates(Coarse5d,FGrid,cb);
|
||||
Aggregates.CreateSubspaceRandom(RNG5);
|
||||
|
||||
subspace=Aggregates.subspace;
|
||||
@ -142,7 +143,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
blockPromote(c_src,err,subspace);
|
||||
|
||||
prom=zero;
|
||||
prom=Zero();
|
||||
for(int b=0;b<nbasis;b++){
|
||||
prom=prom+subspace[b];
|
||||
}
|
||||
|
@ -127,10 +127,10 @@ void TestWhat(What & Ddwf,
|
||||
LatticeFermion src (FGrid); random(*RNG5,src);
|
||||
LatticeFermion phi (FGrid); random(*RNG5,phi);
|
||||
LatticeFermion chi (FGrid); random(*RNG5,chi);
|
||||
LatticeFermion result(FGrid); result=zero;
|
||||
LatticeFermion ref(FGrid); ref=zero;
|
||||
LatticeFermion tmp(FGrid); tmp=zero;
|
||||
LatticeFermion err(FGrid); tmp=zero;
|
||||
LatticeFermion result(FGrid); result=Zero();
|
||||
LatticeFermion ref(FGrid); ref=Zero();
|
||||
LatticeFermion tmp(FGrid); tmp=Zero();
|
||||
LatticeFermion err(FGrid); tmp=Zero();
|
||||
|
||||
LatticeFermion src_e (FrbGrid);
|
||||
LatticeFermion src_o (FrbGrid);
|
||||
|
@ -61,8 +61,8 @@ int main (int argc, char ** argv)
|
||||
GridParallelRNG CRNG(Coarse5d);CRNG.SeedFixedIntegers(cseeds);
|
||||
|
||||
LatticeFermion src(FGrid); gaussian(RNG5,src);
|
||||
LatticeFermion result(FGrid); result=zero;
|
||||
LatticeFermion ref(FGrid); ref=zero;
|
||||
LatticeFermion result(FGrid); result=Zero();
|
||||
LatticeFermion ref(FGrid); ref=Zero();
|
||||
LatticeFermion tmp(FGrid);
|
||||
LatticeFermion err(FGrid);
|
||||
LatticeGaugeField Umu(UGrid);
|
||||
@ -74,7 +74,7 @@ int main (int argc, char ** argv)
|
||||
// SU3::ColdConfiguration(RNG4,Umu);
|
||||
// SU3::TepidConfiguration(RNG4,Umu);
|
||||
// SU3::HotConfiguration(RNG4,Umu);
|
||||
// Umu=zero;
|
||||
// Umu=Zero();
|
||||
|
||||
RealD mass=0.1;
|
||||
RealD M5=1.5;
|
||||
@ -95,7 +95,7 @@ int main (int argc, char ** argv)
|
||||
std::cout<<GridLogMessage << "Calling Aggregation class to build subspace" <<std::endl;
|
||||
std::cout<<GridLogMessage << "**************************************************"<< std::endl;
|
||||
MdagMLinearOperator<DomainWallFermionR,LatticeFermion> HermDefOp(Ddwf);
|
||||
Subspace Aggregates(Coarse5d,FGrid);
|
||||
Subspace Aggregates(Coarse5d,FGrid,0);
|
||||
Aggregates.CreateSubspace(RNG5,HermDefOp);
|
||||
|
||||
|
||||
@ -105,7 +105,7 @@ int main (int argc, char ** argv)
|
||||
CoarseVector c_src (Coarse5d);
|
||||
CoarseVector c_res (Coarse5d);
|
||||
gaussian(CRNG,c_src);
|
||||
c_res=zero;
|
||||
c_res=Zero();
|
||||
|
||||
std::cout<<GridLogMessage << "**************************************************"<< std::endl;
|
||||
std::cout<<GridLogMessage << "Solving mdagm-CG on coarse space "<< std::endl;
|
||||
|
@ -178,7 +178,7 @@ int main(int argc, char **argv)
|
||||
for(int s=0; s<Ls; ++s){ axpby_ssp_pminus(spProj_Phi, 0.0, Phi, 1.0, Phi, s, s); }
|
||||
Deofa_L.Omega(spProj_Phi, tmp[0], -1, 0);
|
||||
G5R5(tmp[1], tmp[0]);
|
||||
tmp[0] = zero;
|
||||
tmp[0] = Zero();
|
||||
SchurSolver(Deofa_L, tmp[1], tmp[0]);
|
||||
Deofa_L.Omega(tmp[0], tmp[1], -1, 1);
|
||||
rw_eofa[hit] = -k*innerProduct(spProj_Phi,tmp[1]).real();
|
||||
@ -187,7 +187,7 @@ int main(int argc, char **argv)
|
||||
for(int s=0; s<Ls; ++s){ axpby_ssp_pplus(spProj_Phi, 0.0, Phi, 1.0, Phi, s, s); }
|
||||
Deofa_R.Omega(spProj_Phi, tmp[0], 1, 0);
|
||||
G5R5(tmp[1], tmp[0]);
|
||||
tmp[0] = zero;
|
||||
tmp[0] = Zero();
|
||||
SchurSolver(Deofa_R, tmp[1], tmp[0]);
|
||||
Deofa_R.Omega(tmp[0], tmp[1], 1, 1);
|
||||
rw_eofa[hit] += k*innerProduct(spProj_Phi,tmp[1]).real();
|
||||
|
@ -181,7 +181,7 @@ int main(int argc, char **argv)
|
||||
for(int s=0; s<Ls; ++s){ axpby_ssp_pminus(spProj_Phi, 0.0, Phi, 1.0, Phi, s, s); }
|
||||
Deofa_L.Omega(spProj_Phi, tmp[0], -1, 0);
|
||||
G5R5(tmp[1], tmp[0]);
|
||||
tmp[0] = zero;
|
||||
tmp[0] = Zero();
|
||||
SchurSolver(Deofa_L, tmp[1], tmp[0]);
|
||||
Deofa_L.Omega(tmp[0], tmp[1], -1, 1);
|
||||
rw_eofa[hit] = -k*innerProduct(spProj_Phi,tmp[1]).real();
|
||||
@ -190,7 +190,7 @@ int main(int argc, char **argv)
|
||||
for(int s=0; s<Ls; ++s){ axpby_ssp_pplus(spProj_Phi, 0.0, Phi, 1.0, Phi, s, s); }
|
||||
Deofa_R.Omega(spProj_Phi, tmp[0], 1, 0);
|
||||
G5R5(tmp[1], tmp[0]);
|
||||
tmp[0] = zero;
|
||||
tmp[0] = Zero();
|
||||
SchurSolver(Deofa_R, tmp[1], tmp[0]);
|
||||
Deofa_R.Omega(tmp[0], tmp[1], 1, 1);
|
||||
rw_eofa[hit] += k*innerProduct(spProj_Phi,tmp[1]).real();
|
||||
|
@ -185,7 +185,7 @@ int main(int argc, char **argv)
|
||||
for(int s=0; s<Ls; ++s){ axpby_ssp_pminus(spProj_Phi, 0.0, Phi, 1.0, Phi, s, s); }
|
||||
Deofa_L.Omega(spProj_Phi, tmp[0], -1, 0);
|
||||
G5R5(tmp[1], tmp[0]);
|
||||
tmp[0] = zero;
|
||||
tmp[0] = Zero();
|
||||
SchurSolver(Deofa_L, tmp[1], tmp[0]);
|
||||
Deofa_L.Dtilde(tmp[0], tmp[1]);
|
||||
Deofa_L.Omega(tmp[1], tmp[0], -1, 1);
|
||||
@ -195,7 +195,7 @@ int main(int argc, char **argv)
|
||||
for(int s=0; s<Ls; ++s){ axpby_ssp_pplus(spProj_Phi, 0.0, Phi, 1.0, Phi, s, s); }
|
||||
Deofa_R.Omega(spProj_Phi, tmp[0], 1, 0);
|
||||
G5R5(tmp[1], tmp[0]);
|
||||
tmp[0] = zero;
|
||||
tmp[0] = Zero();
|
||||
SchurSolver(Deofa_R, tmp[1], tmp[0]);
|
||||
Deofa_R.Dtilde(tmp[0], tmp[1]);
|
||||
Deofa_R.Omega(tmp[1], tmp[0], 1, 1);
|
||||
|
@ -188,7 +188,7 @@ int main(int argc, char **argv)
|
||||
for(int s=0; s<Ls; ++s){ axpby_ssp_pminus(spProj_Phi, 0.0, Phi, 1.0, Phi, s, s); }
|
||||
Deofa_L.Omega(spProj_Phi, tmp[0], -1, 0);
|
||||
G5R5(tmp[1], tmp[0]);
|
||||
tmp[0] = zero;
|
||||
tmp[0] = Zero();
|
||||
SchurSolver(Deofa_L, tmp[1], tmp[0]);
|
||||
Deofa_L.Dtilde(tmp[0], tmp[1]);
|
||||
Deofa_L.Omega(tmp[1], tmp[0], -1, 1);
|
||||
@ -198,7 +198,7 @@ int main(int argc, char **argv)
|
||||
for(int s=0; s<Ls; ++s){ axpby_ssp_pplus(spProj_Phi, 0.0, Phi, 1.0, Phi, s, s); }
|
||||
Deofa_R.Omega(spProj_Phi, tmp[0], 1, 0);
|
||||
G5R5(tmp[1], tmp[0]);
|
||||
tmp[0] = zero;
|
||||
tmp[0] = Zero();
|
||||
SchurSolver(Deofa_R, tmp[1], tmp[0]);
|
||||
Deofa_R.Dtilde(tmp[0], tmp[1]);
|
||||
Deofa_R.Omega(tmp[1], tmp[0], 1, 1);
|
||||
|
@ -104,7 +104,7 @@ int main(int argc,char **argv)
|
||||
std::cout <<"Zmul diff "<< Reduce(err)<<std::endl;
|
||||
|
||||
random(sRNG,mat);
|
||||
mat = zero;
|
||||
mat = Zero();
|
||||
mat()()(0,0) = 1.0;
|
||||
random(sRNG,vec);
|
||||
|
||||
@ -127,7 +127,7 @@ int main(int argc,char **argv)
|
||||
vComplexF errF;
|
||||
|
||||
random(sRNG,matF);
|
||||
matF = zero;
|
||||
matF = Zero();
|
||||
matF()()(0,0)=1.0;
|
||||
random(sRNG,vecF);
|
||||
|
||||
@ -176,8 +176,8 @@ int main(int argc,char **argv)
|
||||
LatticeFermion tmp (FGrid);
|
||||
LatticeFermion srce(FrbGrid);
|
||||
|
||||
LatticeFermion resulto(FrbGrid); resulto=zero;
|
||||
LatticeFermion resulta(FrbGrid); resulta=zero;
|
||||
LatticeFermion resulto(FrbGrid); resulto=Zero();
|
||||
LatticeFermion resulta(FrbGrid); resulta=Zero();
|
||||
LatticeFermion diff(FrbGrid);
|
||||
LatticeGaugeField Umu(UGrid);
|
||||
|
||||
@ -192,7 +192,7 @@ int main(int argc,char **argv)
|
||||
std::vector<LatticeColourMatrix> U(4,UGrid);
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
U[mu] = PeekIndex<LorentzIndex>(Umu,mu);
|
||||
if ( mu!=mmu ) U[mu] = zero;
|
||||
if ( mu!=mmu ) U[mu] = Zero();
|
||||
if ( mu==mmu ) U[mu] = 1.0;
|
||||
PokeIndex<LorentzIndex>(Umu,U[mu],mu);
|
||||
}
|
||||
@ -246,13 +246,13 @@ int main(int argc,char **argv)
|
||||
#if 0
|
||||
std::cout<<"=========== result Grid ============="<<std::endl;
|
||||
std::cout<<std::endl;
|
||||
tmp = zero;
|
||||
tmp = Zero();
|
||||
setCheckerboard(tmp,resulto);
|
||||
std::cout<<tmp<<std::endl;
|
||||
std::cout<<std::endl;
|
||||
std::cout<<"=========== result ASM ============="<<std::endl;
|
||||
std::cout<<std::endl;
|
||||
tmp = zero;
|
||||
tmp = Zero();
|
||||
setCheckerboard(tmp,resulta);
|
||||
std::cout<<tmp<<std::endl;
|
||||
#endif
|
||||
|
@ -123,7 +123,7 @@ int main (int argc, char ** argv)
|
||||
//////////////////////////////////////////////
|
||||
|
||||
|
||||
LatticeComplex dS(UGrid); dS = zero;
|
||||
LatticeComplex dS(UGrid); dS = Zero();
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
mommu = PeekIndex<LorentzIndex>(UdSdU,mu);
|
||||
mommu=Ta(mommu)*2.0;
|
||||
|
@ -148,7 +148,7 @@ int main (int argc, char ** argv)
|
||||
//////////////////////////////////////////////
|
||||
|
||||
|
||||
LatticeComplex dS(UGrid); dS = zero;
|
||||
LatticeComplex dS(UGrid); dS = Zero();
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
mommu = PeekIndex<LorentzIndex>(UdSdU,mu);
|
||||
mommu=Ta(mommu)*2.0;
|
||||
|
@ -130,7 +130,7 @@ int main (int argc, char** argv)
|
||||
//////////////////////////////////////////////
|
||||
|
||||
LatticeComplex dS(UGrid);
|
||||
dS = zero;
|
||||
dS = Zero();
|
||||
for(int mu=0; mu<Nd; mu++){
|
||||
mommu = PeekIndex<LorentzIndex>(UdSdU, mu);
|
||||
mommu = Ta(mommu)*2.0;
|
||||
|
@ -157,9 +157,9 @@ int main (int argc, char ** argv)
|
||||
std::cout << GridLogMessage<< " dsdumu + dag " << norm2(mommu)<<std::endl;
|
||||
}
|
||||
|
||||
LatticeComplex dS(UGrid); dS = zero;
|
||||
LatticeComplex dSmom(UGrid); dSmom = zero;
|
||||
LatticeComplex dSmom2(UGrid); dSmom2 = zero;
|
||||
LatticeComplex dS(UGrid); dS = Zero();
|
||||
LatticeComplex dSmom(UGrid); dSmom = Zero();
|
||||
LatticeComplex dSmom2(UGrid); dSmom2 = Zero();
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
mommu = PeekIndex<LorentzIndex>(UdSdU,mu);
|
||||
mommu=Ta(mommu)*2.0;
|
||||
|
@ -135,7 +135,7 @@ int main (int argc, char** argv)
|
||||
//////////////////////////////////////////////
|
||||
|
||||
LatticeComplex dS(UGrid);
|
||||
dS = zero;
|
||||
dS = Zero();
|
||||
for(int mu=0; mu<Nd; mu++){
|
||||
mommu = PeekIndex<LorentzIndex>(UdSdU, mu);
|
||||
mommu = Ta(mommu)*2.0;
|
||||
|
@ -98,7 +98,7 @@ int main (int argc, char ** argv)
|
||||
// Use derivative to estimate dS
|
||||
//////////////////////////////////////////////
|
||||
|
||||
LatticeComplex dS(&Grid); dS = zero;
|
||||
LatticeComplex dS(&Grid); dS = Zero();
|
||||
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
|
||||
|
@ -128,7 +128,7 @@ int main (int argc, char ** argv)
|
||||
// Use derivative to estimate dS
|
||||
//////////////////////////////////////////////
|
||||
|
||||
LatticeComplex dS(UGrid); dS = zero;
|
||||
LatticeComplex dS(UGrid); dS = Zero();
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
mommu = PeekIndex<LorentzIndex>(UdSdU,mu);
|
||||
mommu=Ta(mommu)*2.0;
|
||||
@ -165,7 +165,7 @@ int main (int argc, char ** argv)
|
||||
//
|
||||
// Gparity --- deriv is pc Uc dSdUc + p U dSdU
|
||||
//
|
||||
// Pmu = zero;
|
||||
// Pmu = Zero();
|
||||
// for(int mu=0;mu<Nd;mu++){
|
||||
// SU<Ncol>::GaussianFundamentalLieAlgebraMatrix(pRNG, Pmu);
|
||||
// PokeIndex<LorentzIndex>(P, Pmu, mu);
|
||||
@ -177,7 +177,7 @@ int main (int argc, char ** argv)
|
||||
// LatticeMatrix la (grid);
|
||||
// Complex ci(0.0,scale);
|
||||
// Matrix ta;
|
||||
// out=zero;
|
||||
// out=Zero();
|
||||
// for(int a=0;a<generators();a++){
|
||||
// gaussian(pRNG,ca);
|
||||
// generator(a,ta);
|
||||
|
@ -134,7 +134,7 @@ int main (int argc, char ** argv)
|
||||
PokeIndex<LorentzIndex>(UdSdU,mommu,mu);
|
||||
}
|
||||
|
||||
LatticeComplex dS(UGrid); dS = zero;
|
||||
LatticeComplex dS(UGrid); dS = Zero();
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
forcemu = PeekIndex<LorentzIndex>(UdSdU,mu);
|
||||
mommu = PeekIndex<LorentzIndex>(mom,mu);
|
||||
|
@ -29,9 +29,6 @@ Author: Azusa Yamaguchi <ayamaguc@staffmail.ed.ac.uk>
|
||||
|
||||
using namespace std;
|
||||
using namespace Grid;
|
||||
;
|
||||
|
||||
#define parallel_for PARALLEL_FOR_LOOP for
|
||||
|
||||
int main (int argc, char ** argv)
|
||||
{
|
||||
@ -114,7 +111,7 @@ int main (int argc, char ** argv)
|
||||
// Use derivative to estimate dS
|
||||
//////////////////////////////////////////////
|
||||
|
||||
LatticeComplex dS(&Grid); dS = zero;
|
||||
LatticeComplex dS(&Grid); dS = Zero();
|
||||
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
auto UdSdUmu = PeekIndex<LorentzIndex>(UdSdU,mu);
|
||||
@ -150,7 +147,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
// Prediciton
|
||||
|
||||
dS = zero;
|
||||
dS = Zero();
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
auto dSdPmu = PeekIndex<LorentzIndex>(UdSdP,mu);
|
||||
auto Pmu = PeekIndex<LorentzIndex>(P,mu);
|
||||
|
@ -125,7 +125,7 @@ int main (int argc, char ** argv)
|
||||
//////////////////////////////////////////////
|
||||
|
||||
|
||||
LatticeComplex dS(UGrid); dS = zero;
|
||||
LatticeComplex dS(UGrid); dS = Zero();
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
mommu = PeekIndex<LorentzIndex>(UdSdU,mu);
|
||||
mommu=Ta(mommu)*2.0;
|
||||
|
@ -132,7 +132,7 @@ int main (int argc, char** argv)
|
||||
//////////////////////////////////////////////
|
||||
|
||||
LatticeComplex dS(UGrid);
|
||||
dS = zero;
|
||||
dS = Zero();
|
||||
for(int mu=0; mu<Nd; mu++){
|
||||
mommu = PeekIndex<LorentzIndex>(UdSdU, mu);
|
||||
mommu = Ta(mommu)*2.0;
|
||||
|
@ -137,7 +137,7 @@ int main (int argc, char** argv)
|
||||
//////////////////////////////////////////////
|
||||
|
||||
LatticeComplex dS(UGrid);
|
||||
dS = zero;
|
||||
dS = Zero();
|
||||
for(int mu=0; mu<Nd; mu++){
|
||||
mommu = PeekIndex<LorentzIndex>(UdSdU, mu);
|
||||
mommu = Ta(mommu)*2.0;
|
||||
|
@ -125,7 +125,7 @@ int main (int argc, char ** argv)
|
||||
//////////////////////////////////////////////
|
||||
|
||||
|
||||
LatticeComplex dS(UGrid); dS = zero;
|
||||
LatticeComplex dS(UGrid); dS = Zero();
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
mommu = PeekIndex<LorentzIndex>(UdSdU,mu);
|
||||
mommu=Ta(mommu)*2.0;
|
||||
|
@ -97,7 +97,7 @@ int main (int argc, char ** argv)
|
||||
// Use derivative to estimate dS
|
||||
//////////////////////////////////////////////
|
||||
|
||||
LatticeComplex dS(&Grid); dS = zero;
|
||||
LatticeComplex dS(&Grid); dS = Zero();
|
||||
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
|
||||
|
@ -139,9 +139,9 @@ int main (int argc, char ** argv)
|
||||
std::cout << GridLogMessage<< " dsdumu + dag " << norm2(mommu)<<std::endl;
|
||||
}
|
||||
|
||||
LatticeComplex dS(&Grid); dS = zero;
|
||||
LatticeComplex dSmom(&Grid); dSmom = zero;
|
||||
LatticeComplex dSmom2(&Grid); dSmom2 = zero;
|
||||
LatticeComplex dS(&Grid); dS = Zero();
|
||||
LatticeComplex dSmom(&Grid); dSmom = Zero();
|
||||
LatticeComplex dSmom2(&Grid); dSmom2 = Zero();
|
||||
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
mommu = PeekIndex<LorentzIndex>(UdSdU,mu);
|
||||
|
@ -139,7 +139,7 @@ int main (int argc, char ** argv)
|
||||
//////////////////////////////////////////////
|
||||
|
||||
|
||||
LatticeComplex dS(UGrid); dS = zero;
|
||||
LatticeComplex dS(UGrid); dS = Zero();
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
mommu = PeekIndex<LorentzIndex>(UdSdU,mu);
|
||||
mommu=Ta(mommu)*2.0;
|
||||
|
@ -53,7 +53,7 @@ inline void make_4D_with_gammas(Lattice<vobj> &in_5d, Lattice<vobj> &out_4d, int
|
||||
template<class vobj>
|
||||
inline void make_5D_with_gammas(Lattice<vobj> &in_4d, Lattice<vobj> &out_5d, int Ls)
|
||||
{
|
||||
out_5d = zero;
|
||||
out_5d = Zero();
|
||||
Gamma G5(Gamma::Algebra::Gamma5);
|
||||
GridBase *_grid(in_4d.Grid());
|
||||
Lattice<vobj> tmp(_grid);
|
||||
|
@ -32,9 +32,9 @@ namespace Grid{
|
||||
|
||||
// Put this section in a separate header
|
||||
// ifdefs ?? Local makefile suggestion , policy as make parameter
|
||||
typedef QCD::PeriodicGimplR ImplementationPolicy;
|
||||
typedef QCD::WilsonImplR FermionImplementationPolicy;
|
||||
typedef QCD::NoHirep RepresentationPolicy;
|
||||
typedef PeriodicGimplR ImplementationPolicy;
|
||||
typedef WilsonImplR FermionImplementationPolicy;
|
||||
typedef NoHirep RepresentationPolicy;
|
||||
typedef Grid::XmlReader Serialiser;
|
||||
|
||||
// Register all object names
|
||||
|
@ -72,7 +72,7 @@ public:
|
||||
template<typename CoarseField>
|
||||
void coarseToFine(const CoarseField& in, Field& out) {
|
||||
|
||||
out = zero;
|
||||
out = Zero();
|
||||
out.Checkerboard() = _evec._v[0].Checkerboard();
|
||||
|
||||
int Nbasis = sizeof(in[0]._internal._internal) / sizeof(in[0]._internal._internal[0]);
|
||||
@ -90,7 +90,7 @@ public:
|
||||
template<typename CoarseField>
|
||||
void fineToCoarse(const Field& in, CoarseField& out) {
|
||||
|
||||
out = zero;
|
||||
out = Zero();
|
||||
|
||||
int Nbasis = sizeof(out[0]._internal._internal) / sizeof(out[0]._internal._internal[0]);
|
||||
assert(Nbasis == _evec._Nm);
|
||||
@ -113,7 +113,7 @@ public:
|
||||
|
||||
template<typename CoarseField>
|
||||
void deflateFine(BasisFieldVector<CoarseField>& _coef,const std::vector<RealD>& eval,int N,const Field& src_orig,Field& result) {
|
||||
result = zero;
|
||||
result = Zero();
|
||||
for (int i=0;i<N;i++) {
|
||||
Field tmp(result.Grid());
|
||||
coarseToFine(_coef._v[i],tmp);
|
||||
@ -125,7 +125,7 @@ public:
|
||||
void deflateCoarse(BasisFieldVector<CoarseField>& _coef,const std::vector<RealD>& eval,int N,const Field& src_orig,Field& result) {
|
||||
CoarseField src_coarse(_coef._v[0].Grid());
|
||||
CoarseField result_coarse = src_coarse;
|
||||
result_coarse = zero;
|
||||
result_coarse = Zero();
|
||||
fineToCoarse(src_orig,src_coarse);
|
||||
for (int i=0;i<N;i++) {
|
||||
axpy(result_coarse,TensorRemove(innerProduct(_coef._v[i],src_coarse)) / eval[i],_coef._v[i],result_coarse);
|
||||
|
@ -4,6 +4,7 @@ template<typename Field>
|
||||
class BlockedGrid {
|
||||
public:
|
||||
GridBase* _grid;
|
||||
GridBase* Grid(void) { return _grid; };
|
||||
typedef typename Field::scalar_type Coeff_t;
|
||||
typedef typename Field::vector_type vCoeff_t;
|
||||
|
||||
|
@ -142,7 +142,7 @@ public:
|
||||
return false;
|
||||
fseeko(_f,cur,SEEK_SET);
|
||||
|
||||
size_t sz = sizeof(out[0]) * out._odata.size();
|
||||
size_t sz = sizeof(out[0]) * out.size();
|
||||
|
||||
GridStopWatch gsw;
|
||||
gsw.Start();
|
||||
@ -161,7 +161,7 @@ public:
|
||||
|
||||
fseek(_f,0,SEEK_CUR); // switch to write
|
||||
|
||||
size_t sz = sizeof(out[0]) * out._odata.size();
|
||||
size_t sz = sizeof(out[0]) * out.size();
|
||||
|
||||
GridStopWatch gsw;
|
||||
gsw.Start();
|
||||
@ -393,7 +393,7 @@ void CoarseGridLanczos(BlockProjector<Field>& pr,RealD alpha2,RealD beta,int Npo
|
||||
v_i.Checkerboard() = Odd;
|
||||
|
||||
for (int j=0;j<smoothed_eval_outer;j++) {
|
||||
tmp=zero;
|
||||
tmp=Zero();
|
||||
//pr.deflate(coef,eval3,Nstop2,v_i,tmp);
|
||||
CG(HermOp, v_i, tmp);
|
||||
|
||||
@ -432,7 +432,7 @@ void CoarseGridLanczos(BlockProjector<Field>& pr,RealD alpha2,RealD beta,int Npo
|
||||
|
||||
// undeflated solve
|
||||
std::cout << GridLogMessage << " Undeflated solve "<<std::endl;
|
||||
result = zero;
|
||||
result = Zero();
|
||||
CG(HermOp, src_orig, result);
|
||||
// if (UCoarseGrid->IsBoss())
|
||||
// write_history("cg_test.undefl",CG.ResHistory);
|
||||
@ -440,7 +440,7 @@ void CoarseGridLanczos(BlockProjector<Field>& pr,RealD alpha2,RealD beta,int Npo
|
||||
|
||||
// deflated solve with all eigenvectors
|
||||
std::cout << GridLogMessage << " Deflated solve with all evectors"<<std::endl;
|
||||
result = zero;
|
||||
result = Zero();
|
||||
pr.deflate(coef,eval2,Nstop2,src_orig,result);
|
||||
CG(HermOp, src_orig, result);
|
||||
// if (UCoarseGrid->IsBoss())
|
||||
@ -449,7 +449,7 @@ void CoarseGridLanczos(BlockProjector<Field>& pr,RealD alpha2,RealD beta,int Npo
|
||||
|
||||
// deflated solve with non-blocked eigenvectors
|
||||
std::cout << GridLogMessage << " Deflated solve with non-blocked evectors"<<std::endl;
|
||||
result = zero;
|
||||
result = Zero();
|
||||
pr.deflate(coef,eval1,Nstop1,src_orig,result);
|
||||
CG(HermOp, src_orig, result);
|
||||
// if (UCoarseGrid->IsBoss())
|
||||
@ -458,7 +458,7 @@ void CoarseGridLanczos(BlockProjector<Field>& pr,RealD alpha2,RealD beta,int Npo
|
||||
|
||||
// deflated solve with all eigenvectors and original eigenvalues from proj
|
||||
std::cout << GridLogMessage << " Deflated solve with all eigenvectors and original eigenvalues from proj"<<std::endl;
|
||||
result = zero;
|
||||
result = Zero();
|
||||
pr.deflate(coef,eval3,Nstop2,src_orig,result);
|
||||
CG(HermOp, src_orig, result);
|
||||
// if (UCoarseGrid->IsBoss())
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
{
|
||||
assert(this->_Aggregate.subspace.size()==nbasis);
|
||||
emptyUserRecord record;
|
||||
Grid::QCD::ScidacWriter WR;
|
||||
Grid::ScidacWriter WR;
|
||||
WR.open(evecs_file);
|
||||
for(int k=0;k<nbasis;k++) {
|
||||
WR.writeScidacFieldRecord(this->_Aggregate.subspace[k],record);
|
||||
@ -82,7 +82,7 @@ public:
|
||||
|
||||
std::cout << GridLogIRL<< "checkpointFineRestore: Reading evecs from "<<evecs_file<<std::endl;
|
||||
emptyUserRecord record;
|
||||
Grid::QCD::ScidacReader RD ;
|
||||
Grid::ScidacReader RD ;
|
||||
RD.open(evecs_file);
|
||||
for(int k=0;k<nbasis;k++) {
|
||||
this->_Aggregate.subspace[k].Checkerboard()=this->_checkerboard;
|
||||
@ -96,7 +96,7 @@ public:
|
||||
{
|
||||
int n = this->evec_coarse.size();
|
||||
emptyUserRecord record;
|
||||
Grid::QCD::ScidacWriter WR;
|
||||
Grid::ScidacWriter WR;
|
||||
WR.open(evecs_file);
|
||||
for(int k=0;k<n;k++) {
|
||||
WR.writeScidacFieldRecord(this->evec_coarse[k],record);
|
||||
@ -119,7 +119,7 @@ public:
|
||||
assert(this->evals_coarse.size()==nvec);
|
||||
emptyUserRecord record;
|
||||
std::cout << GridLogIRL<< "checkpointCoarseRestore: Reading evecs from "<<evecs_file<<std::endl;
|
||||
Grid::QCD::ScidacReader RD ;
|
||||
Grid::ScidacReader RD ;
|
||||
RD.open(evecs_file);
|
||||
for(int k=0;k<nvec;k++) {
|
||||
RD.readScidacFieldRecord(this->evec_coarse[k],record);
|
||||
|
@ -60,7 +60,7 @@ int main (int argc, char ** argv)
|
||||
GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds4);
|
||||
|
||||
LatticeFermion src(FGrid); random(RNG5,src);
|
||||
LatticeFermion result(FGrid); result=zero;
|
||||
LatticeFermion result(FGrid); result=Zero();
|
||||
LatticeGaugeField Umu(UGrid); SU3::HotConfiguration(RNG4,Umu);
|
||||
|
||||
std::vector<LatticeColourMatrix> U(4,UGrid);
|
||||
|
@ -146,7 +146,7 @@ void TestCGunprec(What & Ddwf,
|
||||
GridParallelRNG *RNG5)
|
||||
{
|
||||
LatticeFermion src (FGrid); random(*RNG5,src);
|
||||
LatticeFermion result(FGrid); result=zero;
|
||||
LatticeFermion result(FGrid); result=Zero();
|
||||
|
||||
MdagMLinearOperator<What,LatticeFermion> HermOp(Ddwf);
|
||||
ConjugateGradient<LatticeFermion> CG(1.0e-8,10000);
|
||||
@ -165,7 +165,7 @@ void TestCGprec(What & Ddwf,
|
||||
LatticeFermion src_o(FrbGrid);
|
||||
LatticeFermion result_o(FrbGrid);
|
||||
pickCheckerboard(Odd,src_o,src);
|
||||
result_o=zero;
|
||||
result_o=Zero();
|
||||
|
||||
SchurDiagMooeeOperator<What,LatticeFermion> HermOpEO(Ddwf);
|
||||
ConjugateGradient<LatticeFermion> CG(1.0e-8,10000);
|
||||
@ -182,7 +182,7 @@ void TestCGschur(What & Ddwf,
|
||||
GridParallelRNG *RNG5)
|
||||
{
|
||||
LatticeFermion src (FGrid); random(*RNG5,src);
|
||||
LatticeFermion result(FGrid); result=zero;
|
||||
LatticeFermion result(FGrid); result=Zero();
|
||||
|
||||
ConjugateGradient<LatticeFermion> CG(1.0e-8,10000);
|
||||
SchurRedBlackDiagMooeeSolve<LatticeFermion> SchurSolver(CG);
|
||||
|
@ -64,7 +64,7 @@ int main(int argc, char** argv) {
|
||||
LatticeFermion src(FGrid);
|
||||
random(RNG5, src);
|
||||
LatticeFermion result(FGrid);
|
||||
result = zero;
|
||||
result = Zero();
|
||||
LatticeGaugeField Umu(UGrid);
|
||||
|
||||
SU3::HotConfiguration(RNG4, Umu);
|
||||
@ -84,7 +84,7 @@ int main(int argc, char** argv) {
|
||||
LatticeFermion src_o(FrbGrid);
|
||||
LatticeFermion result_o(FrbGrid);
|
||||
pickCheckerboard(Odd, src_o, src);
|
||||
result_o = zero;
|
||||
result_o = Zero();
|
||||
|
||||
GridStopWatch CGTimer;
|
||||
|
||||
|
@ -68,7 +68,7 @@ int main(int argc, char** argv) {
|
||||
LatticeFermion src(FGrid);
|
||||
random(RNG5, src);
|
||||
LatticeFermion result(FGrid);
|
||||
result = zero;
|
||||
result = Zero();
|
||||
LatticeGaugeField Umu(UGrid);
|
||||
|
||||
std::cout << GridLogMessage << "Generating random gauge field" << std::endl;
|
||||
@ -88,7 +88,7 @@ int main(int argc, char** argv) {
|
||||
LatticeFermion src_o(FrbGrid);
|
||||
LatticeFermion result_o(FrbGrid);
|
||||
pickCheckerboard(Odd, src_o, src);
|
||||
result_o = zero;
|
||||
result_o = Zero();
|
||||
|
||||
GridStopWatch CGTimer;
|
||||
|
||||
|
@ -60,7 +60,7 @@ int main (int argc, char ** argv)
|
||||
GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds4);
|
||||
|
||||
LatticeFermion src(FGrid); random(RNG5,src);
|
||||
LatticeFermion result(FGrid); result=zero;
|
||||
LatticeFermion result(FGrid); result=Zero();
|
||||
LatticeGaugeField Umu(UGrid); SU3::HotConfiguration(RNG4,Umu);
|
||||
|
||||
std::vector<LatticeColourMatrix> U(4,UGrid);
|
||||
|
@ -60,7 +60,7 @@ int main (int argc, char ** argv)
|
||||
GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds4);
|
||||
|
||||
LatticeFermion src(FGrid); random(RNG5,src);
|
||||
LatticeFermion result(FGrid); result=zero;
|
||||
LatticeFermion result(FGrid); result=Zero();
|
||||
LatticeGaugeField Umu(UGrid); SU3::HotConfiguration(RNG4,Umu);
|
||||
|
||||
std::vector<LatticeColourMatrix> U(4,UGrid);
|
||||
|
@ -64,7 +64,7 @@ int main (int argc, char ** argv)
|
||||
GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds4);
|
||||
|
||||
LatticeFermion src(FGrid); random(RNG5,src);
|
||||
LatticeFermion result(FGrid); result=zero;
|
||||
LatticeFermion result(FGrid); result=Zero();
|
||||
LatticeGaugeField Umu(UGrid); SU3::HotConfiguration(RNG4,Umu);
|
||||
|
||||
std::vector<LatticeColourMatrix> U(4,UGrid);
|
||||
|
@ -65,7 +65,7 @@ int main (int argc, char ** argv)
|
||||
GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds4);
|
||||
|
||||
LatticeFermion src(FGrid); random(RNG5,src);
|
||||
LatticeFermion result(FGrid); result=zero;
|
||||
LatticeFermion result(FGrid); result=Zero();
|
||||
LatticeGaugeField Umu(UGrid);
|
||||
|
||||
SU3::HotConfiguration(RNG4,Umu);
|
||||
@ -86,32 +86,32 @@ int main (int argc, char ** argv)
|
||||
std::cout<<GridLogMessage<<"* Solving with MdagM VPGCR "<<std::endl;
|
||||
std::cout<<GridLogMessage<<"*********************************************************"<<std::endl;
|
||||
MdagMLinearOperator<DomainWallFermionR,LatticeFermion> HermOp(Ddwf);
|
||||
result=zero;
|
||||
result=Zero();
|
||||
PGCR(HermOp,src,result);
|
||||
|
||||
std::cout<<GridLogMessage<<"*********************************************************"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"* Solving with g5-VPGCR "<<std::endl;
|
||||
std::cout<<GridLogMessage<<"*********************************************************"<<std::endl;
|
||||
Gamma5R5HermitianLinearOperator<DomainWallFermionR,LatticeFermion> g5HermOp(Ddwf);
|
||||
result=zero;
|
||||
result=Zero();
|
||||
PGCR(g5HermOp,src,result);
|
||||
|
||||
std::cout<<GridLogMessage<<"*********************************************************"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"* Solving with MdagM-CR "<<std::endl;
|
||||
std::cout<<GridLogMessage<<"*********************************************************"<<std::endl;
|
||||
result=zero;
|
||||
result=Zero();
|
||||
CR(HermOp,src,result);
|
||||
|
||||
std::cout<<GridLogMessage<<"*********************************************************"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"* Solving with g5-CR "<<std::endl;
|
||||
std::cout<<GridLogMessage<<"*********************************************************"<<std::endl;
|
||||
result=zero;
|
||||
result=Zero();
|
||||
CR(g5HermOp,src,result);
|
||||
|
||||
std::cout<<GridLogMessage<<"*********************************************************"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"* Solving with MdagM-CG "<<std::endl;
|
||||
std::cout<<GridLogMessage<<"*********************************************************"<<std::endl;
|
||||
result=zero;
|
||||
result=Zero();
|
||||
CG(HermOp,src,result);
|
||||
|
||||
Grid_finalize();
|
||||
|
@ -158,7 +158,7 @@ public:
|
||||
_FineOperator.Op(Min,tmp);
|
||||
tmp = in - tmp; // in - A Min
|
||||
|
||||
Csol=zero;
|
||||
Csol=Zero();
|
||||
_Aggregates.ProjectToSubspace (Csrc,tmp);
|
||||
HermOp.AdjOp(Csrc,Ctmp);// Normal equations
|
||||
CG(MdagMOp,Ctmp,Csol);
|
||||
@ -193,7 +193,7 @@ public:
|
||||
|
||||
CoarseVector Csrc(_CoarseOperator.Grid());
|
||||
CoarseVector Ctmp(_CoarseOperator.Grid());
|
||||
CoarseVector Csol(_CoarseOperator.Grid()); Csol=zero;
|
||||
CoarseVector Csol(_CoarseOperator.Grid()); Csol=Zero();
|
||||
|
||||
ConjugateGradient<CoarseVector> CG(1.0e-10,100000);
|
||||
ConjugateGradient<FineField> fCG(3.0e-2,1000);
|
||||
@ -239,13 +239,13 @@ public:
|
||||
Lattice<iScalar<vInteger> > subset(src.Grid());
|
||||
|
||||
FineField r(src.Grid());
|
||||
FineField zz(src.Grid()); zz=zero;
|
||||
FineField zz(src.Grid()); zz=Zero();
|
||||
FineField vec1(src.Grid());
|
||||
FineField vec2(src.Grid());
|
||||
|
||||
const Integer block=params.domainsize;
|
||||
|
||||
subset=zero;
|
||||
subset=Zero();
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
LatticeCoordinate(coor,mu+1);
|
||||
coor = div(coor,block);
|
||||
@ -327,7 +327,7 @@ public:
|
||||
|
||||
CoarseVector Csrc(_CoarseOperator.Grid());
|
||||
CoarseVector Ctmp(_CoarseOperator.Grid());
|
||||
CoarseVector Csol(_CoarseOperator.Grid()); Csol=zero;
|
||||
CoarseVector Csol(_CoarseOperator.Grid()); Csol=Zero();
|
||||
|
||||
ConjugateGradient<CoarseVector> CG(3.0e-3,100000);
|
||||
// ConjugateGradient<FineField> fCG(3.0e-2,1000);
|
||||
@ -407,7 +407,7 @@ public:
|
||||
|
||||
CoarseVector Csrc(_CoarseOperator.Grid());
|
||||
CoarseVector Ctmp(_CoarseOperator.Grid());
|
||||
CoarseVector Csol(_CoarseOperator.Grid()); Csol=zero;
|
||||
CoarseVector Csol(_CoarseOperator.Grid()); Csol=Zero();
|
||||
|
||||
ConjugateGradient<CoarseVector> CG(1.0e-3,100000);
|
||||
|
||||
@ -507,8 +507,8 @@ int main (int argc, char ** argv)
|
||||
Gamma g5(Gamma::Algebra::Gamma5);
|
||||
|
||||
LatticeFermion src(FGrid); gaussian(RNG5,src);// src=src+g5*src;
|
||||
LatticeFermion result(FGrid); result=zero;
|
||||
LatticeFermion ref(FGrid); ref=zero;
|
||||
LatticeFermion result(FGrid); result=Zero();
|
||||
LatticeFermion ref(FGrid); ref=Zero();
|
||||
LatticeFermion tmp(FGrid);
|
||||
LatticeFermion err(FGrid);
|
||||
LatticeGaugeField Umu(UGrid);
|
||||
@ -523,7 +523,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
if ( params.domaindecompose ) {
|
||||
Lattice<iScalar<vInteger> > coor(UGrid);
|
||||
zz=zero;
|
||||
zz=Zero();
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
LatticeCoordinate(coor,mu);
|
||||
U = PeekIndex<LorentzIndex>(Umu,mu);
|
||||
@ -536,7 +536,7 @@ int main (int argc, char ** argv)
|
||||
// SU3::ColdConfiguration(RNG4,Umu);
|
||||
// SU3::TepidConfiguration(RNG4,Umu);
|
||||
// SU3::HotConfiguration(RNG4,Umu);
|
||||
// Umu=zero;
|
||||
// Umu=Zero();
|
||||
|
||||
RealD mass=params.mq;
|
||||
RealD M5=1.8;
|
||||
@ -574,7 +574,7 @@ int main (int argc, char ** argv)
|
||||
// result = Aggregates.subspace[i];
|
||||
// Aggregates.subspace[i]=result+g5*result;
|
||||
// }
|
||||
result=zero;
|
||||
result=Zero();
|
||||
|
||||
std::cout<<GridLogMessage << "**************************************************"<< std::endl;
|
||||
std::cout<<GridLogMessage << "Building coarse representation of Indef operator" <<std::endl;
|
||||
@ -590,7 +590,7 @@ int main (int argc, char ** argv)
|
||||
CoarseVector c_src (Coarse5d);
|
||||
CoarseVector c_res (Coarse5d);
|
||||
gaussian(CRNG,c_src);
|
||||
c_res=zero;
|
||||
c_res=Zero();
|
||||
|
||||
std::cout<<GridLogMessage << "**************************************************"<< std::endl;
|
||||
std::cout<<GridLogMessage << "Solving posdef-CG on coarse space "<< std::endl;
|
||||
@ -661,7 +661,7 @@ int main (int argc, char ** argv)
|
||||
std::cout<<GridLogMessage << "Building a two level DDPGCR "<< std::endl;
|
||||
std::cout<<GridLogMessage << "**************************************************"<< std::endl;
|
||||
// PrecGeneralisedConjugateResidual<LatticeFermion> PGCRDD(1.0e-8,100000,PreconDD,8,128);
|
||||
// result=zero;
|
||||
// result=Zero();
|
||||
// std::cout<<GridLogMessage<<"checking norm src "<<norm2(src)<<std::endl;
|
||||
// PGCRDD(HermIndefOp,src,result);
|
||||
|
||||
@ -670,7 +670,7 @@ int main (int argc, char ** argv)
|
||||
std::cout<<GridLogMessage << "**************************************************"<< std::endl;
|
||||
PrecGeneralisedConjugateResidual<LatticeFermion> PGCR(1.0e-8,100000,Precon,8,8);
|
||||
std::cout<<GridLogMessage<<"checking norm src "<<norm2(src)<<std::endl;
|
||||
result=zero;
|
||||
result=Zero();
|
||||
PGCR(HermIndefOp,src,result);
|
||||
|
||||
std::cout<<GridLogMessage << "**************************************************"<< std::endl;
|
||||
@ -682,7 +682,7 @@ int main (int argc, char ** argv)
|
||||
LatticeFermion src_o(FrbGrid);
|
||||
LatticeFermion result_o(FrbGrid);
|
||||
pickCheckerboard(Odd,src_o,src);
|
||||
result_o=zero;
|
||||
result_o=Zero();
|
||||
|
||||
pCG(HermOpEO,src_o,result_o);
|
||||
|
||||
|
@ -91,7 +91,7 @@ int main (int argc, char ** argv)
|
||||
FermionField tmp(FGrid);
|
||||
|
||||
for(int s=0;s<nrhs;s++) random(pRNG5,src[s]);
|
||||
for(int s=0;s<nrhs;s++) result[s]=zero;
|
||||
for(int s=0;s<nrhs;s++) result[s]=Zero();
|
||||
|
||||
LatticeGaugeField Umu(UGrid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
@ -203,7 +203,7 @@ int main (int argc, char ** argv)
|
||||
MdagMLinearOperator<DomainWallFermionR,FermionField> HermOp(Ddwf);
|
||||
MdagMLinearOperator<DomainWallFermionR,FermionField> HermOpCk(Dchk);
|
||||
ConjugateGradient<FermionField> CG((1.0e-5/(me+1)),10000);
|
||||
s_res = zero;
|
||||
s_res = Zero();
|
||||
CG(HermOp,s_src,s_res);
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
@ -96,11 +96,11 @@ int main (int argc, char ** argv)
|
||||
FermionField tmp(FGrid);
|
||||
std::cout << GridLogMessage << "Made the Fermion Fields"<<std::endl;
|
||||
|
||||
for(int s=0;s<nrhs;s++) result[s]=zero;
|
||||
for(int s=0;s<nrhs;s++) result[s]=Zero();
|
||||
#undef LEXICO_TEST
|
||||
#ifdef LEXICO_TEST
|
||||
{
|
||||
LatticeFermion lex(FGrid); lex = zero;
|
||||
LatticeFermion lex(FGrid); lex = Zero();
|
||||
LatticeFermion ftmp(FGrid);
|
||||
Integer stride =10000;
|
||||
double nrm;
|
||||
@ -162,7 +162,7 @@ int main (int argc, char ** argv)
|
||||
FermionField s_src_tmp(SFGrid);
|
||||
FermionField s_src_diff(SFGrid);
|
||||
{
|
||||
LatticeFermion lex(SFGrid); lex = zero;
|
||||
LatticeFermion lex(SFGrid); lex = Zero();
|
||||
LatticeFermion ftmp(SFGrid);
|
||||
Integer stride =10000;
|
||||
double nrm;
|
||||
@ -198,7 +198,7 @@ int main (int argc, char ** argv)
|
||||
MdagMLinearOperator<DomainWallFermionR,FermionField> HermOp(Ddwf);
|
||||
MdagMLinearOperator<DomainWallFermionR,FermionField> HermOpCk(Dchk);
|
||||
ConjugateGradient<FermionField> CG((1.0e-2),10000);
|
||||
s_res = zero;
|
||||
s_res = Zero();
|
||||
CG(HermOp,s_src,s_res);
|
||||
|
||||
std::cout << GridLogMessage << " split residual norm "<<norm2(s_res)<<std::endl;
|
||||
|
@ -85,7 +85,7 @@ int main (int argc, char ** argv)
|
||||
std::vector<FermionField> src_o(nrhs,FrbGrid);
|
||||
|
||||
for(int s=0;s<nrhs;s++) random(pRNG5,src[s]);
|
||||
for(int s=0;s<nrhs;s++) result[s]=zero;
|
||||
for(int s=0;s<nrhs;s++) result[s]=Zero();
|
||||
|
||||
LatticeGaugeField Umu(UGrid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
@ -134,7 +134,7 @@ int main (int argc, char ** argv)
|
||||
MdagMLinearOperator<DomainWallFermionR,FermionField> HermOp(Ddwf);
|
||||
MdagMLinearOperator<DomainWallFermionR,FermionField> HermOpCk(Dchk);
|
||||
ConjugateGradient<FermionField> CG((1.0e-8/(me+1)),10000);
|
||||
s_res = zero;
|
||||
s_res = Zero();
|
||||
CG(HermOp,s_src,s_res);
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
@ -56,11 +56,11 @@ int main (int argc, char ** argv)
|
||||
// Source and result in the algebra
|
||||
// needed for the second test
|
||||
AVector src_vec(&Grid); random(pRNG, src_vec);
|
||||
AVector result_vec(&Grid); result_vec = zero;
|
||||
AVector result_vec(&Grid); result_vec = Zero();
|
||||
|
||||
LatticeColourMatrix src(&Grid);
|
||||
SU<Nc>::FundamentalLieAlgebraMatrix(src_vec, src);
|
||||
LatticeColourMatrix result(&Grid); result=zero;
|
||||
LatticeColourMatrix result(&Grid); result=Zero();
|
||||
|
||||
|
||||
// Generate a field of adjoint matrices
|
||||
|
@ -92,7 +92,7 @@ int main (int argc, char ** argv)
|
||||
FermionField tmp(FGrid);
|
||||
|
||||
for(int s=0;s<nrhs;s++) random(pRNG5,src[s]);
|
||||
for(int s=0;s<nrhs;s++) result[s]=zero;
|
||||
for(int s=0;s<nrhs;s++) result[s]=Zero();
|
||||
|
||||
LatticeGaugeField Umu(UGrid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
@ -127,7 +127,7 @@ int main (int argc, char ** argv)
|
||||
MdagMLinearOperator<DomainWallFermionR,FermionField> HermOp(Ddwf);
|
||||
MdagMLinearOperator<DomainWallFermionR,FermionField> HermOpCk(Dchk);
|
||||
ConjugateGradient<FermionField> CG((1.0e-8/(me+1)),10000);
|
||||
s_res = zero;
|
||||
s_res = Zero();
|
||||
CG(HermOp,s_src,s_res);
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
@ -69,7 +69,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
FermionField src(FGrid); random(pRNG5,src);
|
||||
FermionField src_o(FrbGrid); pickCheckerboard(Odd,src_o,src);
|
||||
FermionField result_o(FrbGrid); result_o=zero;
|
||||
FermionField result_o(FrbGrid); result_o=Zero();
|
||||
RealD nrm = norm2(src);
|
||||
|
||||
LatticeGaugeField Umu(UGrid); SU3::HotConfiguration(pRNG,Umu);
|
||||
@ -93,7 +93,7 @@ int main (int argc, char ** argv)
|
||||
FermionField src4d_o(UrbGrid); pickCheckerboard(Odd,src4d_o,src4d);
|
||||
FermionField result4d_o(UrbGrid);
|
||||
|
||||
result4d_o=zero;
|
||||
result4d_o=Zero();
|
||||
CG(HermOp4d,src4d_o,result4d_o);
|
||||
std::cout << GridLogMessage << "************************************************************************ "<<std::endl;
|
||||
|
||||
@ -102,7 +102,7 @@ int main (int argc, char ** argv)
|
||||
std::cout << GridLogMessage << " Calling 5d CG for "<<Ls <<" right hand sides" <<std::endl;
|
||||
std::cout << GridLogMessage << "************************************************************************ "<<std::endl;
|
||||
Ds.ZeroCounters();
|
||||
result_o=zero;
|
||||
result_o=Zero();
|
||||
CG(HermOp,src_o,result_o);
|
||||
Ds.Report();
|
||||
std::cout << GridLogMessage << "************************************************************************ "<<std::endl;
|
||||
@ -111,7 +111,7 @@ int main (int argc, char ** argv)
|
||||
std::cout << GridLogMessage << " Calling multiRHS CG for "<<Ls <<" right hand sides" <<std::endl;
|
||||
std::cout << GridLogMessage << "************************************************************************ "<<std::endl;
|
||||
Ds.ZeroCounters();
|
||||
result_o=zero;
|
||||
result_o=Zero();
|
||||
mCG(HermOp,src_o,result_o);
|
||||
Ds.Report();
|
||||
std::cout << GridLogMessage << "************************************************************************ "<<std::endl;
|
||||
@ -120,7 +120,7 @@ int main (int argc, char ** argv)
|
||||
std::cout << GridLogMessage << " Calling Block CG for "<<Ls <<" right hand sides" <<std::endl;
|
||||
std::cout << GridLogMessage << "************************************************************************ "<<std::endl;
|
||||
Ds.ZeroCounters();
|
||||
result_o=zero;
|
||||
result_o=Zero();
|
||||
BCGrQ(HermOp,src_o,result_o);
|
||||
Ds.Report();
|
||||
std::cout << GridLogMessage << "************************************************************************ "<<std::endl;
|
||||
|
@ -68,7 +68,7 @@ int main (int argc, char ** argv)
|
||||
GridParallelRNG pRNG5(FGrid); pRNG5.SeedFixedIntegers(seeds);
|
||||
|
||||
FermionField src(FGrid); random(pRNG5,src);
|
||||
FermionField result(FGrid); result=zero;
|
||||
FermionField result(FGrid); result=Zero();
|
||||
RealD nrm = norm2(src);
|
||||
|
||||
LatticeGaugeField Umu(UGrid); SU3::HotConfiguration(pRNG,Umu);
|
||||
@ -89,7 +89,7 @@ int main (int argc, char ** argv)
|
||||
ImprovedStaggeredFermionR Ds4d(Umu,Umu,*UGrid,*UrbGrid,mass);
|
||||
MdagMLinearOperator<ImprovedStaggeredFermionR,FermionField> HermOp4d(Ds4d);
|
||||
FermionField src4d(UGrid); random(pRNG,src4d);
|
||||
FermionField result4d(UGrid); result4d=zero;
|
||||
FermionField result4d(UGrid); result4d=Zero();
|
||||
CG(HermOp4d,src4d,result4d);
|
||||
std::cout << GridLogMessage << "************************************************************************ "<<std::endl;
|
||||
|
||||
@ -97,7 +97,7 @@ int main (int argc, char ** argv)
|
||||
std::cout << GridLogMessage << "************************************************************************ "<<std::endl;
|
||||
std::cout << GridLogMessage << " Calling 5d CG for "<<Ls <<" right hand sides" <<std::endl;
|
||||
std::cout << GridLogMessage << "************************************************************************ "<<std::endl;
|
||||
result=zero;
|
||||
result=Zero();
|
||||
Ds.ZeroCounters();
|
||||
CG(HermOp,src,result);
|
||||
Ds.Report();
|
||||
@ -106,7 +106,7 @@ int main (int argc, char ** argv)
|
||||
std::cout << GridLogMessage << "************************************************************************ "<<std::endl;
|
||||
std::cout << GridLogMessage << " Calling multiRHS CG for "<<Ls <<" right hand sides" <<std::endl;
|
||||
std::cout << GridLogMessage << "************************************************************************ "<<std::endl;
|
||||
result=zero;
|
||||
result=Zero();
|
||||
Ds.ZeroCounters();
|
||||
mCG(HermOp,src,result);
|
||||
Ds.Report();
|
||||
@ -115,7 +115,7 @@ int main (int argc, char ** argv)
|
||||
std::cout << GridLogMessage << "************************************************************************ "<<std::endl;
|
||||
std::cout << GridLogMessage << " Calling Block CG for "<<Ls <<" right hand sides" <<std::endl;
|
||||
std::cout << GridLogMessage << "************************************************************************ "<<std::endl;
|
||||
result=zero;
|
||||
result=Zero();
|
||||
Ds.ZeroCounters();
|
||||
BCGrQ(HermOp,src,result);
|
||||
Ds.Report();
|
||||
|
@ -76,7 +76,7 @@ int main (int argc, char ** argv)
|
||||
FermionField res_o(&RBGrid);
|
||||
FermionField src_o(&RBGrid);
|
||||
pickCheckerboard(Odd,src_o,src);
|
||||
res_o=zero;
|
||||
res_o=Zero();
|
||||
|
||||
SchurStaggeredOperator<ImprovedStaggeredFermionR,FermionField> HermOpEO(Ds);
|
||||
ConjugateGradient<FermionField> CG(1.0e-8,10000);
|
||||
|
@ -61,7 +61,7 @@ int main (int argc, char ** argv)
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
FermionField src(&Grid); random(pRNG,src);
|
||||
FermionField result(&Grid); result=zero;
|
||||
FermionField result(&Grid); result=Zero();
|
||||
FermionField resid(&Grid);
|
||||
|
||||
RealD mass=0.1;
|
||||
|
@ -64,7 +64,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
FermionField src(&Grid); random(pRNG,src);
|
||||
RealD nrm = norm2(src);
|
||||
FermionField result(&Grid); result=zero;
|
||||
FermionField result(&Grid); result=Zero();
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
double volume=1;
|
||||
|
@ -59,7 +59,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
LatticeFermion src(&Grid); random(pRNG,src);
|
||||
RealD nrm = norm2(src);
|
||||
LatticeFermion result(&Grid); result=zero;
|
||||
LatticeFermion result(&Grid); result=Zero();
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
std::vector<LatticeColourMatrix> U(4,&Grid);
|
||||
@ -78,7 +78,7 @@ int main (int argc, char ** argv)
|
||||
LatticeFermion src_o(&RBGrid);
|
||||
LatticeFermion result_o(&RBGrid);
|
||||
pickCheckerboard(Odd,src_o,src);
|
||||
result_o=zero;
|
||||
result_o=Zero();
|
||||
|
||||
SchurDiagMooeeOperator<WilsonFermionR,LatticeFermion> HermOpEO(Dw);
|
||||
ConjugateGradient<LatticeFermion> CG(1.0e-8,10000);
|
||||
|
@ -60,7 +60,7 @@ int main (int argc, char ** argv)
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
LatticeFermion src(&Grid); random(pRNG,src);
|
||||
LatticeFermion result(&Grid); result=zero;
|
||||
LatticeFermion result(&Grid); result=Zero();
|
||||
LatticeFermion resid(&Grid);
|
||||
|
||||
RealD mass=0.5;
|
||||
|
@ -59,7 +59,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
LatticeFermion src(&Grid); random(pRNG,src);
|
||||
RealD nrm = norm2(src);
|
||||
LatticeFermion result(&Grid); result=zero;
|
||||
LatticeFermion result(&Grid); result=Zero();
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
double volume=1;
|
||||
|
@ -59,7 +59,7 @@ int main (int argc, char ** argv)
|
||||
|
||||
LatticeFermion src(&Grid); random(pRNG,src);
|
||||
RealD nrm = norm2(src);
|
||||
LatticeFermion result(&Grid); result=zero;
|
||||
LatticeFermion result(&Grid); result=Zero();
|
||||
LatticeGaugeField Umu(&Grid); SU3::HotConfiguration(pRNG,Umu);
|
||||
|
||||
std::vector<LatticeColourMatrix> U(4,&Grid);
|
||||
|
@ -64,7 +64,7 @@ int main(int argc, char** argv) {
|
||||
LatticeFermion src(FGrid);
|
||||
random(RNG5, src);
|
||||
LatticeFermion result(FGrid);
|
||||
result = zero;
|
||||
result = Zero();
|
||||
LatticeGaugeField Umu(UGrid);
|
||||
|
||||
SU3::HotConfiguration(RNG4, Umu);
|
||||
@ -106,7 +106,7 @@ int main(int argc, char** argv) {
|
||||
LatticeFermion src_o(FrbGrid);
|
||||
LatticeFermion result_o(FrbGrid);
|
||||
pickCheckerboard(Odd, src_o, src);
|
||||
result_o = zero;
|
||||
result_o = Zero();
|
||||
|
||||
GridStopWatch CGTimer;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user