2015-06-05 10:02:36 +01:00
|
|
|
#ifndef QCD_UTILS_COVARIANT_CSHIFT_H
|
|
|
|
#define QCD_UTILS_COVARIANT_CSHIFT_H
|
|
|
|
namespace Grid {
|
|
|
|
namespace QCD {
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
// Low performance implementation of CovariantCshift API
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
2015-12-29 19:22:59 +00:00
|
|
|
// Make these members of an Impl class for BC's.
|
2015-06-05 10:02:36 +01:00
|
|
|
template<class covariant,class gauge> Lattice<covariant> CovShiftForward(const Lattice<gauge> &Link,
|
|
|
|
int mu,
|
|
|
|
const Lattice<covariant> &field)
|
|
|
|
{
|
|
|
|
return Link*Cshift(field,mu,1);// moves towards negative mu
|
|
|
|
}
|
|
|
|
template<class covariant,class gauge> Lattice<covariant> CovShiftBackward(const Lattice<gauge> &Link,
|
|
|
|
int mu,
|
|
|
|
const Lattice<covariant> &field)
|
|
|
|
{
|
|
|
|
Lattice<covariant> tmp(field._grid);
|
|
|
|
tmp = adj(Link)*field;
|
|
|
|
return Cshift(tmp,mu,-1);// moves towards positive mu
|
|
|
|
}
|
2015-12-29 19:22:59 +00:00
|
|
|
|
2015-06-05 10:02:36 +01:00
|
|
|
}}
|
2015-06-05 10:19:42 +01:00
|
|
|
#endif
|