diff --git a/examples/Example_wall_wall_spectrum.cc b/examples/Example_wall_wall_spectrum.cc index 0d70f351..2f994896 100644 --- a/examples/Example_wall_wall_spectrum.cc +++ b/examples/Example_wall_wall_spectrum.cc @@ -9,6 +9,7 @@ using namespace std; using namespace Grid; typedef SpinColourMatrix Propagator; typedef SpinColourVector Fermion; +typedef PeriodicGimplR GimplR; template class CovariantLaplacianCshift : public SparseMatrixBase { @@ -55,6 +56,15 @@ void MakePhase(Coordinate mom,LatticeComplex &phase) } phase = exp(phase*ci); } +void LinkSmear(int nstep, RealD rho,LatticeGaugeField &Uin,LatticeGaugeField &Usmr) +{ + Smear_Stout Stout(rho); + LatticeGaugeField Utmp(Uin.Grid()); + Utmp = Uin; + for(int i=0;i::avgPlaquette(U); + Real plaq=WilsonLoops::avgPlaquette(U); std::cout << " Initial plaquette "<::SteepestDescentGaugeFix(Ufix,xform,alpha,10000,1.0e-12, 1.0e-12,true,orthog); + FourierAcceleratedGaugeFixer::SteepestDescentGaugeFix(Ufix,xform,alpha,10000,1.0e-12, 1.0e-12,true,orthog); - plaq=WilsonLoops::avgPlaquette(Ufix); + plaq=WilsonLoops::avgPlaquette(Ufix); std::cout << " Final plaquette "< void GaussianSmear(LatticeGaugeField &U,Field &unsmeared,Field &smeared) { - typedef CovariantLaplacianCshift Laplacian_t; + typedef CovariantLaplacianCshift Laplacian_t; Laplacian_t Laplacian(U); Integer Iterations = 40; @@ -287,15 +297,10 @@ int main (int argc, char ** argv) GridDefaultMpi()); GridRedBlackCartesian * UrbGrid = SpaceTimeGrid::makeFourDimRedBlackGrid(UGrid); - ////////////////////////////////////////////////////////////////////// - // You can manage seeds however you like. - // Recommend SeedUniqueString. - ////////////////////////////////////////////////////////////////////// - std::vector seeds4({1,2,3,4}); - GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds4); LatticeGaugeField Umu(UGrid); - LatticeGaugeField Ufixed(UGrid); + LatticeGaugeField Utmp(UGrid); + LatticeGaugeField Usmr(UGrid); std::string config; if( argc > 1 && argv[1][0] != '-' ) { @@ -308,13 +313,17 @@ int main (int argc, char ** argv) { std::cout<::ColdConfiguration(Umu); - // SU::HotConfiguration(RNG4,Umu); - config="HotConfig"; + config="ColdConfig"; } - GaugeFix(Umu,Ufixed); - Umu=Ufixed; - + GaugeFix(Umu,Utmp); + Umu=Utmp; + int nsmr=3; + RealD rho=0.1; + LinkSmear(nsmr,rho,Umu,Usmr); + + + std::vector smeared_link({ 0,0,1} ); std::vector masses({ 0.004,0.02477,0.447} ); // u/d, s, c ?? std::vector M5s ({ 1.8,1.8,1.0} ); std::vector bs ({ 1.0,1.0,1.5} ); // DDM @@ -339,23 +348,29 @@ int main (int argc, char ** argv) RealD c = cs[m]; int Ls = Ls_s[m]; + if ( smeared_link[m] ) Utmp = Usmr; + else Utmp = Umu; + FGrids.push_back(SpaceTimeGrid::makeFiveDimGrid(Ls,UGrid)); FrbGrids.push_back(SpaceTimeGrid::makeFiveDimRedBlackGrid(Ls,UGrid)); - FermActs.push_back(new MobiusFermionR(Umu,*FGrids[m],*FrbGrids[m],*UGrid,*UrbGrid,mass,M5,b,c)); + FermActs.push_back(new MobiusFermionR(Utmp,*FGrids[m],*FrbGrids[m],*UGrid,*UrbGrid,mass,M5,b,c)); } - LatticePropagator point_source(UGrid); LatticePropagator z2wall_source(UGrid); LatticePropagator gfwall_source(UGrid); - Coordinate Origin({0,0,0,0}); - PointSource (Origin,point_source); - Z2WallSource (RNG4,0,z2wall_source); - GFWallSource (0,gfwall_source); - - std::vector PointProps(nmass,UGrid); - std::vector GaussProps(nmass,UGrid); + int tslice = 0; + ////////////////////////////////////////////////////////////////////// + // RNG seeded for Z2 wall + ////////////////////////////////////////////////////////////////////// + // You can manage seeds however you like. + // Recommend SeedUniqueString. + ////////////////////////////////////////////////////////////////////// + GridParallelRNG RNG4(UGrid); RNG4.SeedUniqueString("Study2-Source_Z2_p_0_0_0_t_0-880"); + Z2WallSource (RNG4,tslice,z2wall_source); + GFWallSource (tslice,gfwall_source); + std::vector Z2Props (nmass,UGrid); std::vector GFProps (nmass,UGrid);