Generalise Polyakov loop and overload for temporal direction

This commit is contained in:
Alexis Provatas
2025-05-01 10:52:00 +01:00
parent d60a80c098
commit 496d1b914a
+18 -6
View File
@@ -177,9 +177,11 @@ public:
} }
////////////////////////////////////////////////// //////////////////////////////////////////////////
// average over all x,y,z the temporal loop // average Polyakov loop in any direction (spatial or temporal)
////////////////////////////////////////////////// //////////////////////////////////////////////////
static ComplexD avgPolyakovLoop(const GaugeField &Umu) { //assume Nd=4 static ComplexD avgPolyakovLoop(const GaugeField &Umu, const int mu) { //assume Nd=4
// TODO: Protect against mu<0 || mu>=4
GaugeMat Ut(Umu.Grid()), P(Umu.Grid()); GaugeMat Ut(Umu.Grid()), P(Umu.Grid());
ComplexD out; ComplexD out;
int T = Umu.Grid()->GlobalDimensions()[3]; int T = Umu.Grid()->GlobalDimensions()[3];
@@ -187,15 +189,25 @@ public:
int Y = Umu.Grid()->GlobalDimensions()[1]; int Y = Umu.Grid()->GlobalDimensions()[1];
int Z = Umu.Grid()->GlobalDimensions()[2]; int Z = Umu.Grid()->GlobalDimensions()[2];
Ut = peekLorentz(Umu,3); //Select temporal direction // Number of sites in mu direction
int L = Umu.Grid()->GlobalDimensions()[mu];
Ut = peekLorentz(Umu, mu); //Select direction
P = Ut; P = Ut;
for (int t=1;t<T;t++){ for (int t=1;t<L;t++){
P = Gimpl::CovShiftForward(Ut,3,P); P = Gimpl::CovShiftForward(Ut,mu,P);
} }
RealD norm = 1.0/(Nc*X*Y*Z*T); RealD norm = 1.0/(Nc*X*Y*Z*T);
out = sum(trace(P))*norm; out = sum(trace(P))*norm;
return out; return out;
} }
/////////////////////////////////////////////////
// overload for temporal loop
/////////////////////////////////////////////////
static ComplexD avgPolyakovLoop(const GaugeField &Umu) {
return avgPolyakovLoop(Umu, 3);
}
////////////////////////////////////////////////// //////////////////////////////////////////////////
// average over traced single links // average over traced single links