1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-24 12:45:56 +01:00

Luscher's filter - will tune this later

This commit is contained in:
Quadro 2021-05-18 16:35:39 -04:00
parent a918955020
commit c18025c0b8

View File

@ -70,32 +70,25 @@ struct DDHMCFilter: public MomentumFilterBase<MomentaField>
Coordinate Global=grid->GlobalDimensions(); Coordinate Global=grid->GlobalDimensions();
LatticeInteger coor(grid); LatticeInteger coor(grid);
for(int mu=0;mu<Nd;mu++) { for(int mu=0;mu<Nd;mu++) {
if ( Block[mu] <= Global[mu] ) {
if ( (Block[mu] <= Global[mu])&&(Block[mu]>0) ) {
LatticeCoordinate(coor,mu); LatticeCoordinate(coor,mu);
auto P_mu = PeekIndex<LorentzIndex>(P, mu); auto P_mu = PeekIndex<LorentzIndex>(P, mu);
P_mu = where(mod(coor,Block[mu])==Integer(Block[mu]-1),zz,P_mu); P_mu = where(mod(coor,Block[mu])==Integer(Block[mu]-1),zz,P_mu);
/* if(Width>=2) {
P_mu = where(mod(coor,Block[mu])==Integer(0),zz,P_mu);
P_mu = where(mod(coor,Block[mu])==Integer(Block[mu]-2),zz,P_mu);
}*/
PokeIndex<LorentzIndex>(P, P_mu, mu); PokeIndex<LorentzIndex>(P, P_mu, mu);
for(int nu=0;nu<Nd;nu++){ for(int nu=0;nu<Nd;nu++){
if ( (mu!=nu) && Block[mu] <= Global[mu]){ if ( mu!=nu ){
auto P_nu = PeekIndex<LorentzIndex>(P, nu); auto P_nu = PeekIndex<LorentzIndex>(P, nu);
if ( Width>=1 ){
P_nu = where(mod(coor,Block[mu])==Integer(Block[mu]-1),zz,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); P_nu = where(mod(coor,Block[mu])==Integer(0) ,zz,P_nu);
}
/* if ( Width>=2 ){
P_nu = where(mod(coor,Block[mu])==Integer(Block[mu]-2),zz,P_nu);
P_nu = where(mod(coor,Block[mu])==Integer(1) ,zz,P_nu);
}*/
PokeIndex<LorentzIndex>(P, P_nu, nu); PokeIndex<LorentzIndex>(P, P_nu, nu);
} }
} }
} }
} }
} }
}; };