1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

MSource::Gauss add parameters tA and tB

This commit is contained in:
Nils Asmussen 2019-06-02 00:12:15 +01:00
parent 4bca2c17ce
commit 7c3f400fc5
2 changed files with 6 additions and 0 deletions

View File

@ -5,3 +5,4 @@ using namespace Hadrons;
using namespace MSource;
template class Grid::Hadrons::MSource::TGauss<FIMPL>;
template class Grid::Hadrons::MSource::TGauss<ScalarImplCR>;

View File

@ -24,6 +24,8 @@ public:
GRID_SERIALIZABLE_CLASS_MEMBERS(GaussPar,
std::string, position,
std::string, mom,
int, tA,
int, tB,
double, width);
};
@ -152,6 +154,9 @@ void TGauss<FImpl>::execute(void)
//time component of momentum phase
LatticeCoordinate(component, dim);
ScalarRho+=(i*(mom_.at(dim)*2*M_PI/env().getDim(dim)))*component;
ScalarRho=where((component>=par().tA && component<=tB),
ScalarRho,
0.*ScalarRho);
rho=(exp(ScalarRho)*Complex(std::pow(sqrt(2*M_PI)*par().width,dim)))*idMat;
}