diff --git a/tests/forces/Test_gpdwf_force.cc b/tests/forces/Test_gpdwf_force.cc index d6744080..b1c0dd80 100644 --- a/tests/forces/Test_gpdwf_force.cc +++ b/tests/forces/Test_gpdwf_force.cc @@ -71,8 +71,10 @@ int main (int argc, char ** argv) RealD mass=0.01; RealD M5=1.8; - const int nu = 3; - std::vector twists(Nd,0); twists[nu] = 1; + const int nu = 1; + std::vector twists(Nd,0); + twists[nu] = 1; + twists[3] = 1; GparityDomainWallFermionR::ImplParams params; params.twists = twists; GparityDomainWallFermionR Ddwf(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,params); Ddwf.M (phi,Mphi); @@ -91,16 +93,28 @@ int main (int argc, char ** argv) //////////////////////////////////// // Modify the gauge field a little //////////////////////////////////// - RealD dt = 0.0001; + RealD dt = 0.01; + LatticeColourMatrix zz(UGrid); zz=Zero(); LatticeColourMatrix mommu(UGrid); LatticeColourMatrix forcemu(UGrid); LatticeGaugeField mom(UGrid); LatticeGaugeField Uprime(UGrid); + const int Lnu=latt_size[nu]; + Lattice > coor(UGrid); + LatticeCoordinate(coor,nu); for(int mu=0;mu::GaussianFundamentalLieAlgebraMatrix(RNG4, mommu); // Traceless antihermitian momentum; gaussian in lie alg + // Traceless antihermitian momentum; gaussian in lie alg + SU::GaussianFundamentalLieAlgebraMatrix(RNG4, mommu); + if(0){ + if(mu==nu){ + mommu=where(coor==Lnu-1,mommu,zz); + } else { + mommu=Zero(); + } + } PokeIndex(mom,mommu,mu); @@ -125,6 +139,12 @@ int main (int argc, char ** argv) ComplexD Sprime = innerProduct(MphiPrime ,MphiPrime); + + LatticeComplex lip(FGrid); lip=localInnerProduct(Mphi,Mphi); + LatticeComplex lipp(FGrid); lipp=localInnerProduct(MphiPrime,MphiPrime); + LatticeComplex dip(FGrid); dip = lipp - lip; + std::cout << " dip "< twists(Nd,0); twists[nu] = 1; + std::vector twists(Nd,0); + twists[nu] = 1; + twists[3]=1; GparityWilsonFermionR::ImplParams params; params.twists = twists; GparityWilsonFermionR Wil(U,*UGrid,*UrbGrid,mass,params); Wil.M (phi,Mphi); @@ -86,7 +88,7 @@ int main (int argc, char ** argv) //////////////////////////////////// // Modify the gauge field a little //////////////////////////////////// - RealD dt = 0.1; + RealD dt = 0.01; LatticeColourMatrix mommu(UGrid); LatticeColourMatrix zz(UGrid); @@ -101,13 +103,13 @@ int main (int argc, char ** argv) for(int mu=0;mu::GaussianFundamentalLieAlgebraMatrix(RNG4, mommu); - mommu=where(coor==Lnu-1,mommu,zz); - //mommu=where(coor==0,mommu,zz); - // mommu=where(coor==1,mommu,zz); - } else { - mommu=Zero(); + SU::GaussianFundamentalLieAlgebraMatrix(RNG4, mommu); + if(0){ + if(mu==nu){ + mommu=where(coor==Lnu-1,mommu,zz); + } else { + mommu=Zero(); + } } PokeIndex(mom,mommu,mu); @@ -143,6 +145,10 @@ int main (int argc, char ** argv) mommu=Ta(mommu)*2.0; PokeIndex(UdSdU,mommu,mu); } + LatticeComplex lip(UGrid); lip=localInnerProduct(Mphi,Mphi); + LatticeComplex lipp(UGrid); lipp=localInnerProduct(MphiPrime,MphiPrime); + LatticeComplex dip(UGrid); dip = lipp - lip; + std::cout << " dip "<