From 651e1a7cbc2d6dd865d37b13d768f0532f9d01f5 Mon Sep 17 00:00:00 2001 From: Lanny91 Date: Mon, 30 Jan 2017 17:14:33 +0000 Subject: [PATCH] Hadrons: Momentum inserted as multiples of 2*pi/L --- extras/Hadrons/Modules/MSink/Wall.hpp | 6 +++--- extras/Hadrons/Modules/MSource/SeqGamma.hpp | 5 +++-- extras/Hadrons/Modules/MSource/Wall.hpp | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/extras/Hadrons/Modules/MSink/Wall.hpp b/extras/Hadrons/Modules/MSink/Wall.hpp index 64966218..761357a9 100644 --- a/extras/Hadrons/Modules/MSink/Wall.hpp +++ b/extras/Hadrons/Modules/MSink/Wall.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: extras/Hadrons/Modules/MSink/Wall.hpp -Copyright (C) 2016 +Copyright (C) 2017 Author: Andrew Lawson @@ -131,9 +131,9 @@ void TWall::execute(void) for(unsigned int mu = 0; mu < Nd; mu++) { LatticeCoordinate(coor, mu); - ph = ph + p[mu]*coor; + ph = ph + p[mu]*coor*((1./(env().getGrid()->_fdimensions[mu]))); } - ph = exp(-i*ph); + ph = exp(-2*M_PI*i*ph); sliceSum(ph*q, prop, Tp); } diff --git a/extras/Hadrons/Modules/MSource/SeqGamma.hpp b/extras/Hadrons/Modules/MSource/SeqGamma.hpp index 611b0108..814da273 100644 --- a/extras/Hadrons/Modules/MSource/SeqGamma.hpp +++ b/extras/Hadrons/Modules/MSource/SeqGamma.hpp @@ -6,6 +6,7 @@ Source file: extras/Hadrons/Modules/MSource/SeqGamma.hpp Copyright (C) 2015 Copyright (C) 2016 +Copyright (C) 2017 Author: Antonin Portelli @@ -150,9 +151,9 @@ void TSeqGamma::execute(void) for(unsigned int mu = 0; mu < env().getNd(); mu++) { LatticeCoordinate(coor, mu); - ph = ph + p[mu]*coor; + ph = ph + p[mu]*coor*((1./(env().getGrid()->_fdimensions[mu]))); } - ph = exp(i*ph); + ph = exp(2*M_PI*i*ph); LatticeCoordinate(t, Tp); src = where((t >= par().tA) and (t <= par().tB), g*ph*q, 0.*q); } diff --git a/extras/Hadrons/Modules/MSource/Wall.hpp b/extras/Hadrons/Modules/MSource/Wall.hpp index 9d22e23b..e94829bc 100644 --- a/extras/Hadrons/Modules/MSource/Wall.hpp +++ b/extras/Hadrons/Modules/MSource/Wall.hpp @@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid Source file: extras/Hadrons/Modules/MSource/Wall.hpp -Copyright (C) 2016 +Copyright (C) 2017 Author: Andrew Lawson @@ -132,9 +132,9 @@ void TWall::execute(void) for(unsigned int mu = 0; mu < Nd; mu++) { LatticeCoordinate(coor, mu); - ph = ph + p[mu]*coor; + ph = ph + p[mu]*coor*((1./(env().getGrid()->_fdimensions[mu]))); } - ph = exp(i*ph); + ph = exp(2*M_PI*i*ph); LatticeCoordinate(t, Tp); src = 1.; src = where((t == par().tW), src*ph, 0.*src);