1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-17 15:27:06 +01:00

Correcting sign for shGordon action

This commit is contained in:
Guido Cossu
2018-01-19 08:33:11 +00:00
parent 6347904160
commit 422dbc80cd
3 changed files with 6 additions and 4 deletions

View File

@ -29,7 +29,9 @@ class ScalarImplTypes {
static inline Field projectForce(Field& P){return P;}
static inline void update_field(Field& P, Field& U, double ep) {
std::cout << GridLogDebug << "P:\n" << P << std::endl;
U += P*ep;
std::cout << GridLogDebug << "U:\n" << U << std::endl;
}
static inline RealD FieldSquareNorm(Field& U) {

View File

@ -55,7 +55,7 @@ class shGordonAction : public QCD::Action<typename Impl::Field> {
virtual void refresh(const Field &U, GridParallelRNG &pRNG) {} // noop as no pseudoferms
virtual RealD S(const Field &phi) {
return QCD::Nd * ScalarObs<Impl>::sumphisquared(phi) + ScalarObs<Impl>::sumphider(phi) - 0.5*mass_square/(g*g)*sum(trace(exp(g*phi) + exp(-g*phi))) ;
return QCD::Nd * ScalarObs<Impl>::sumphisquared(phi) + ScalarObs<Impl>::sumphider(phi) + 0.5*mass_square/(g*g)*sum(trace(exp(g*phi) + exp(-g*phi))) ;
};
virtual void deriv(const Field &phi,
@ -65,7 +65,7 @@ class shGordonAction : public QCD::Action<typename Impl::Field> {
for (int mu = 0; mu < QCD::Nd; mu++) tmp -= Cshift(phi, mu, 1) + Cshift(phi, mu, -1);
std::cout << GridLogDebug << "Phi norm : " << norm2(phi) << std::endl;
force+= tmp - 0.5*mass_square/g*(exp(g*phi) - exp(-g*phi));
force+= tmp + 0.5*mass_square/g*(exp(g*phi) - exp(-g*phi));
}
};