From dd6b796a01131123274517eaca8631b3b2b5c3af Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Thu, 3 May 2018 16:19:17 +0100 Subject: [PATCH] Hadrons: scalar SU(N) volume factor fix --- extras/Hadrons/Modules/MScalarSUN/TwoPoint.hpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/extras/Hadrons/Modules/MScalarSUN/TwoPoint.hpp b/extras/Hadrons/Modules/MScalarSUN/TwoPoint.hpp index 1496edf9..8ee80242 100644 --- a/extras/Hadrons/Modules/MScalarSUN/TwoPoint.hpp +++ b/extras/Hadrons/Modules/MScalarSUN/TwoPoint.hpp @@ -83,7 +83,8 @@ private: // make 2-pt function template std::vector makeTwoPoint(const std::vector &sink, - const std::vector &source); + const std::vector &source, + const double factor = 1.); private: std::vector> mom_; }; @@ -200,7 +201,7 @@ void TTwoPoint::execute(void) { qt[nd - 1] = t; peekSite(buf, ftBuf, qt); - slicedOp[o][m][t] = TensorRemove(buf)/partVol; + slicedOp[o][m][t] = TensorRemove(buf); } } } @@ -213,7 +214,8 @@ void TTwoPoint::execute(void) r.sink = p.first; r.source = p.second; r.mom = mom_[m]; - r.data = makeTwoPoint(slicedOp[p.first][m], slicedOp[p.second][m]); + r.data = makeTwoPoint(slicedOp[p.first][m], slicedOp[p.second][m], + 1./partVol); result.push_back(r); } saveResult(par().output, "twopt", result); @@ -224,7 +226,8 @@ template template std::vector TTwoPoint::makeTwoPoint( const std::vector &sink, - const std::vector &source) + const std::vector &source, + const double factor) { assert(sink.size() == source.size()); @@ -237,7 +240,7 @@ std::vector TTwoPoint::makeTwoPoint( { res[dt] += sink[(t+dt)%nt]*adj(source[t]); } - res[dt] *= 1./static_cast(nt); + res[dt] *= factor/static_cast(nt); } return res;