1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-04 19:25:56 +01:00

Hadrons: Momentum projection in meson module.

This commit is contained in:
Lanny91 2017-01-30 17:09:04 +00:00
parent 977f34dca6
commit c4d3672720
3 changed files with 22 additions and 3 deletions

View File

@ -6,6 +6,7 @@ Source file: extras/Hadrons/Modules/MContraction/Meson.hpp
Copyright (C) 2015
Copyright (C) 2016
Copyright (C) 2017
Author: Antonin Portelli <antonin.portelli@me.com>
Andrew Lawson <andrew.lawson1991@gmail.com>
@ -66,8 +67,9 @@ BEGIN_HADRONS_NAMESPACE
in a sequence (e.g. "[15 7][7 15][7 7]").
Special values: "all" - perform all possible contractions.
*/
- mom: momentum insertion, space-separated float sequence (e.g ".1 .2 1. 0."),
given as multiples of (2*pi) / L.
*/
/******************************************************************************
* TMeson *
@ -83,6 +85,7 @@ public:
std::string, q1,
std::string, q2,
std::string, gammas,
std::string, mom,
std::string, output);
};
@ -182,7 +185,19 @@ void TMeson<FImpl1, FImpl2>::execute(void)
std::vector<GammaPair> gammaList;
std::vector<TComplex> buf;
std::vector<Result> result;
std::vector<Real> p;
p = strToVec<Real>(par().mom);
LatticeComplex ph(env().getGrid()), coor(env().getGrid());
Complex i(0.0,1.0);
ph = zero;
for(unsigned int mu = 0; mu < env().getNd(); mu++)
{
LatticeCoordinate(coor, mu);
ph = ph + p[mu]*coor*((1./(env().getGrid()->_fdimensions[mu])));
}
ph = exp(-2*M_PI*i*ph);
g5 = makeGammaProd(Ns*Ns - 1);
for (int i = 0; i < Ns*Ns; ++i)
{
@ -193,7 +208,7 @@ void TMeson<FImpl1, FImpl2>::execute(void)
result.resize(gammaList.size());
for (unsigned int i = 0; i < result.size(); ++i)
{
c = trace(g[gammaList[i].first]*q1*g[gammaList[i].second]*g5*adj(q2)*g5);
c = trace(g[gammaList[i].first]*q1*g[gammaList[i].second]*g5*adj(q2)*g5*ph);
sliceSum(c, buf, Tp);
result[i].gamma_snk = gammaList[i].first;

View File

@ -131,6 +131,7 @@ int main(int argc, char *argv[])
mesPar.q1 = qName[i];
mesPar.q2 = qName[j];
mesPar.gammas = "all";
mesPar.mom = "0. 0. 0. 0.";
application.createModule<MContraction::Meson>("meson_Z2_"
+ std::to_string(t)
+ "_"
@ -149,6 +150,7 @@ int main(int argc, char *argv[])
mesPar.q1 = qName[i];
mesPar.q2 = seqName[j][mu];
mesPar.gammas = "all";
mesPar.mom = "0. 0. 0. 0.";
application.createModule<MContraction::Meson>("3pt_Z2_"
+ std::to_string(t)
+ "_"

View File

@ -97,6 +97,7 @@ int main(int argc, char *argv[])
mesPar.q1 = "Qpt_" + flavour[i];
mesPar.q2 = "Qpt_" + flavour[j];
mesPar.gammas = "all";
mesPar.mom = "0. 0. 0. 0.";
application.createModule<MContraction::Meson>("meson_pt_"
+ flavour[i] + flavour[j],
mesPar);
@ -104,6 +105,7 @@ int main(int argc, char *argv[])
mesPar.q1 = "QZ2_" + flavour[i];
mesPar.q2 = "QZ2_" + flavour[j];
mesPar.gammas = "all";
mesPar.mom = "0. 0. 0. 0.";
application.createModule<MContraction::Meson>("meson_Z2_"
+ flavour[i] + flavour[j],
mesPar);