1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-24 12:45:56 +01:00
This commit is contained in:
Quadro 2021-06-08 20:59:00 -04:00
parent 990d976241
commit 216c178c16

View File

@ -47,7 +47,8 @@ public:
FermionOperator<Impl> & FermOp; FermionOperator<Impl> & FermOp;
// Constructor / bespoke // Constructor / bespoke
DirichletFermionOperator(FermionOperator<Impl> & _FermOp, Coordinate &_Block) : FermOp(_FermOp), Block(_Block), Filter(_Block) DirichletFermionOperator(FermionOperator<Impl> & _FermOp, Coordinate &_Block)
: FermOp(_FermOp), Block(_Block), Filter(Block)
{ {
// Save what the comms mode should be under normal BCs // Save what the comms mode should be under normal BCs
CommsMode = WilsonKernelsStatic::Comms; CommsMode = WilsonKernelsStatic::Comms;
@ -63,7 +64,7 @@ public:
assert(Block.size()==LocalDims.size()); assert(Block.size()==LocalDims.size());
for(int d=0;d<LocalDims.size();d++){ for(int d=0;d<LocalDims.size();d++){
if (Block[d]<=GlobalDims[d]){ if (Block[d]&&(Block[d]<=GlobalDims[d])){
int r = LocalDims[d] % Block[d]; int r = LocalDims[d] % Block[d];
assert(r == 0); assert(r == 0);
blocks_per_rank *= (LocalDims[d] / Block[d]); blocks_per_rank *= (LocalDims[d] / Block[d]);
@ -78,11 +79,11 @@ public:
void DirichletOn(void) { void DirichletOn(void) {
assert(WilsonKernelsStatic::Comms!= WilsonKernelsStatic::CommsDirichlet); assert(WilsonKernelsStatic::Comms!= WilsonKernelsStatic::CommsDirichlet);
WilsonKernelsStatic::Comms = WilsonKernelsStatic::CommsDirichlet; // WilsonKernelsStatic::Comms = WilsonKernelsStatic::CommsDirichlet;
} }
void DirichletOff(void) { void DirichletOff(void) {
assert(WilsonKernelsStatic::Comms== WilsonKernelsStatic::CommsDirichlet); // assert(WilsonKernelsStatic::Comms== WilsonKernelsStatic::CommsDirichlet);
WilsonKernelsStatic::Comms = CommsMode; // WilsonKernelsStatic::Comms = CommsMode;
} }
// Implement the full interface // Implement the full interface