mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-15 06:17:05 +01:00
Adding some wilson loop support
This commit is contained in:
22
lib/qcd/utils/CovariantCshift.h
Normal file
22
lib/qcd/utils/CovariantCshift.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef QCD_UTILS_COVARIANT_CSHIFT_H
|
||||
#define QCD_UTILS_COVARIANT_CSHIFT_H
|
||||
namespace Grid {
|
||||
namespace QCD {
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Low performance implementation of CovariantCshift API
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
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
|
||||
}
|
||||
}}
|
Reference in New Issue
Block a user