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:
parent
4bca2c17ce
commit
7c3f400fc5
@ -5,3 +5,4 @@ using namespace Hadrons;
|
||||
using namespace MSource;
|
||||
|
||||
template class Grid::Hadrons::MSource::TGauss<FIMPL>;
|
||||
template class Grid::Hadrons::MSource::TGauss<ScalarImplCR>;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user