1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

Don't alias the variables with a where statement.

This commit is contained in:
paboyle 2018-03-06 04:13:26 -08:00
parent e199ba7e88
commit 3cb1b545d0

View File

@ -95,11 +95,13 @@ namespace ConjugateBC {
Lattice<iScalar<vInteger> > coor(grid); LatticeCoordinate(coor,mu);
Lattice<covariant> field_bc = Cshift(field,mu,1);// moves towards negative mu;
Lattice<covariant> tmp1(grid);
Lattice<covariant> tmp2(grid);
field_bc = where(coor==Lmu,conjugate(field_bc),field_bc);
// std::cout<<"Gparity::CovCshiftForward mu="<<mu<<std::endl;
return Link*field_bc;
tmp1 = Cshift(field,mu,1);// moves towards negative mu;
tmp2 = where(coor==Lmu,conjugate(tmp1),tmp1);
return Link*tmp2;
}
template<class covariant,class gauge> Lattice<covariant> CovShiftBackward(const Lattice<gauge> &Link,
@ -114,12 +116,13 @@ namespace ConjugateBC {
Lattice<iScalar<vInteger> > coor(grid); LatticeCoordinate(coor,mu);
Lattice<covariant> tmp(grid);
Lattice<covariant> tmp1(grid);
Lattice<covariant> tmp2(grid);
tmp = adj(Link)*field;
tmp = where(coor==Lmu,conjugate(tmp),tmp);
// std::cout<<"Gparity::CovCshiftBackward mu="<<mu<<std::endl;
return Cshift(tmp,mu,-1);// moves towards positive mu
tmp1 = adj(Link)*field;
tmp2 = where(coor==Lmu,conjugate(tmp1),tmp1);
return Cshift(tmp2,mu,-1);// moves towards positive mu
}
}