diff --git a/lib/qcd/action/gauge/WilsonGaugeAction.h b/lib/qcd/action/gauge/WilsonGaugeAction.h index 43d65750..e2b4e5fc 100644 --- a/lib/qcd/action/gauge/WilsonGaugeAction.h +++ b/lib/qcd/action/gauge/WilsonGaugeAction.h @@ -73,17 +73,19 @@ public: //GaugeLinkField Umu(U.Grid()); GaugeLinkField dSdU_mu(U.Grid()); for (int mu = 0; mu < Nd; mu++) { - //Umu = PeekIndex(U, mu); - // Staple in direction mu - //WilsonLoops::Staple(dSdU_mu, U, mu); - //dSdU_mu = Ta(Umu * dSdU_mu) * factor; + GaugeLinkField Umu(U.Grid()); + GaugeLinkField dSdU_mu(U.Grid()); + for (int mu = 0; mu < Nd; mu++) { + Umu = PeekIndex(U, mu); + + // Staple in direction mu + WilsonLoops::Staple(dSdU_mu, U, mu); + dSdU_mu = Ta(Umu * dSdU_mu) * factor; + + PokeIndex(dSdU, dSdU_mu, mu); - - WilsonLoops::StapleMult(dSdU_mu, U, mu); - dSdU_mu = Ta(dSdU_mu) * factor; - - PokeIndex(dSdU, dSdU_mu, mu); + } } } private: diff --git a/tests/forces/Test_gp_rect_force.cc b/tests/forces/Test_gp_rect_force.cc index e5626514..12b87610 100644 --- a/tests/forces/Test_gp_rect_force.cc +++ b/tests/forces/Test_gp_rect_force.cc @@ -57,9 +57,9 @@ int main (int argc, char ** argv) SU3::HotConfiguration(pRNG,U); double beta = 1.0; - - //GparityPlaqPlusRectangleActionR Action(beta,c1); - ConjugateWilsonGaugeActionR Action(beta); + double c1 = -1.0/12.0; + ConjugatePlaqPlusRectangleActionR Action(beta,c1); + //ConjugateWilsonGaugeActionR Action(beta); //WilsonGaugeActionR Action(beta); ComplexD S = Action.S(U); @@ -72,7 +72,7 @@ int main (int argc, char ** argv) //////////////////////////////////// // Modify the gauge field a little //////////////////////////////////// - RealD dt = 0.0001; + RealD dt = 0.001; LatticeColourMatrix mommu(&Grid); LatticeColourMatrix forcemu(&Grid);