mirror of
				https://github.com/paboyle/Grid.git
				synced 2025-11-03 21:44:33 +00:00 
			
		
		
		
	Zero changes. (I mean literally)
This commit is contained in:
		@@ -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);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user