mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-25 05:05:56 +01:00
Allow dimensions to be periodic
This commit is contained in:
parent
c18025c0b8
commit
84e246a963
@ -55,15 +55,16 @@ struct DirichletFilter: public MomentumFilterBase<MomentaField>
|
||||
////////////////////////////////////////////////////
|
||||
LatticeInteger coor(grid);
|
||||
LatticeColourMatrix zz(grid); zz = Zero();
|
||||
Coordinate Global=grid->GlobalDimensions();
|
||||
for(int mu=0;mu<Nd;mu++) {
|
||||
|
||||
// If costly could provide Grid earlier and precompute masks
|
||||
LatticeCoordinate(coor,mu);
|
||||
if ( (Block[mu] <= Global[mu]) && (Block[mu]>1) ) {
|
||||
// If costly could provide Grid earlier and precompute masks
|
||||
LatticeCoordinate(coor,mu);
|
||||
|
||||
auto P_mu = PeekIndex<LorentzIndex>(P, mu);
|
||||
P_mu = where(mod(coor,Block[mu])==Integer(Block[mu]-1),zz,P_mu);
|
||||
PokeIndex<LorentzIndex>(P, P_mu, mu);
|
||||
|
||||
auto P_mu = PeekIndex<LorentzIndex>(P, mu);
|
||||
P_mu = where(mod(coor,Block[mu])==Integer(Block[mu]-1),zz,P_mu);
|
||||
PokeIndex<LorentzIndex>(P, P_mu, mu);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user