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

Added new StapleAll and RectStapleAll functions that return the staples for all mu as an array

Modified plaq+rectangle gauge actions to use the above
Added a test code to confirm the above changes
This commit is contained in:
Christopher Kelly
2023-06-26 15:48:47 -04:00
parent 4c6613d72c
commit 6f6844ccf1
4 changed files with 225 additions and 26 deletions

View File

@@ -79,27 +79,19 @@ public:
GridBase *grid = Umu.Grid();
std::vector<GaugeLinkField> U (Nd,grid);
std::vector<GaugeLinkField> U2(Nd,grid);
for(int mu=0;mu<Nd;mu++){
U[mu] = PeekIndex<LorentzIndex>(Umu,mu);
WilsonLoops<Gimpl>::RectStapleDouble(U2[mu],U[mu],mu);
}
std::vector<GaugeLinkField> RectStaple(Nd,grid), Staple(Nd,grid);
WilsonLoops<Gimpl>::StapleAll(Staple, U);
WilsonLoops<Gimpl>::RectStapleAll(RectStaple, U);
GaugeLinkField dSdU_mu(grid);
GaugeLinkField staple(grid);
for (int mu=0; mu < Nd; mu++){
// Staple in direction mu
WilsonLoops<Gimpl>::Staple(staple,Umu,mu);
dSdU_mu = Ta(U[mu]*staple)*factor_p;
WilsonLoops<Gimpl>::RectStaple(Umu,staple,U2,U,mu);
dSdU_mu = dSdU_mu + Ta(U[mu]*staple)*factor_r;
dSdU_mu = Ta(U[mu]*Staple[mu])*factor_p;
dSdU_mu = dSdU_mu + Ta(U[mu]*RectStaple[mu])*factor_r;
PokeIndex<LorentzIndex>(dSdU, dSdU_mu, mu);
}