diff --git a/Grid/qcd/action/momentum/DDHMCfilter.h b/Grid/qcd/action/momentum/DDHMCfilter.h index e4772039..716cce1d 100644 --- a/Grid/qcd/action/momentum/DDHMCfilter.h +++ b/Grid/qcd/action/momentum/DDHMCfilter.h @@ -36,12 +36,12 @@ NAMESPACE_BEGIN(Grid); template struct DDHMCFilter: public MomentumFilterBase { - typedef typename MomentaField::vector_type vector_type; //SIMD-vectorized complex type - typedef typename MomentaField::scalar_type scalar_type; //scalar complex type - typedef iVector >, Nd > LorentzScalarType; //complex phase for each site/direction - typedef iScalar > > ScalarType; //complex phase for each site - typedef Lattice LatticeLorentzScalarType; - typedef Lattice LatticeScalarType; + // typedef typename MomentaField::vector_type vector_type; //SIMD-vectorized complex type + // typedef typename MomentaField::scalar_type scalar_type; //scalar complex type + // typedef iVector >, Nd > LorentzScalarType; //complex phase for each site/direction + // typedef iScalar > > ScalarType; //complex phase for each site + // typedef Lattice LatticeLorentzScalarType; + // typedef Lattice LatticeScalarType; Coordinate Block; int Width; @@ -72,35 +72,34 @@ struct DDHMCFilter: public MomentumFilterBase LatticeInteger coor(grid); for(int mu=0;mu0) ) { -#if 0 - LatticeCoordinate(coor,mu); - auto P_mu = PeekIndex(P, mu); - P_mu = where(mod(coor,Block[mu])==Integer(Block[mu]-1),zz,P_mu); - PokeIndex(P, P_mu, mu); - - for(int nu=0;nu(P, nu); - P_nu = where(mod(coor,Block[mu])==Integer(Block[mu]-1),zz,P_nu); - P_nu = where(mod(coor,Block[mu])==Integer(0) ,zz,P_nu); - PokeIndex(P, P_nu, nu); - } - } -#else LatticeCoordinate(coor,mu); +#if 1 + P = where(mod(coor,Block[mu])==Integer(Block[mu]-3),zzz,P); //width 4 P = where(mod(coor,Block[mu])==Integer(Block[mu]-2),zzz,P); //width 4 P = where(mod(coor,Block[mu])==Integer(Block[mu]-1),zzz,P); //width 2 P = where(mod(coor,Block[mu])==Integer(0),zzz,P); //width 2 - auto P_mu = PeekIndex(P,mu); P = where(mod(coor,Block[mu])==Integer(1),zzz,P); //width 4 + auto P_mu = PeekIndex(P,mu); + P = where(mod(coor,Block[mu])==Integer(2),zzz,P); //width 6 PokeIndex(P, P_mu, mu); -#endif - - - } - +#else + P = where(mod(coor,Block[mu])==Integer(Block[mu]-1),zzz,P); //width 2 + auto P_mu = PeekIndex(P,mu); + P = where(mod(coor,Block[mu])==Integer(0),zzz,P); //width 6 + PokeIndex(P, P_mu, mu); +#endif + } } +#ifdef PROJECT_DOMAIN + LatticeInteger domaincb(grid); domaincb=Zero(); + for(int d=0;d