1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-14 13:57:07 +01:00

One more function to generalise the HMC integrator

This commit is contained in:
Guido Cossu
2016-10-03 15:50:04 +01:00
parent e415260961
commit 257f69f931
2 changed files with 12 additions and 11 deletions

View File

@ -96,6 +96,17 @@ public:
}
static inline RealD FieldSquareNorm(Field& U){
LatticeComplex Hloc(U._grid);
Hloc = zero;
for (int mu = 0; mu < Nd; mu++) {
auto Umu = PeekIndex<LorentzIndex>(U, mu);
Hloc += trace(Umu * Umu);
}
Complex Hsum = sum(Hloc);
return Hsum.real();
}
};
// Composition with smeared link, bc's etc.. probably need multiple inheritance