mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01: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;
|
using namespace MSource;
|
||||||
|
|
||||||
template class Grid::Hadrons::MSource::TGauss<FIMPL>;
|
template class Grid::Hadrons::MSource::TGauss<FIMPL>;
|
||||||
|
template class Grid::Hadrons::MSource::TGauss<ScalarImplCR>;
|
||||||
|
@ -24,6 +24,8 @@ public:
|
|||||||
GRID_SERIALIZABLE_CLASS_MEMBERS(GaussPar,
|
GRID_SERIALIZABLE_CLASS_MEMBERS(GaussPar,
|
||||||
std::string, position,
|
std::string, position,
|
||||||
std::string, mom,
|
std::string, mom,
|
||||||
|
int, tA,
|
||||||
|
int, tB,
|
||||||
double, width);
|
double, width);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -152,6 +154,9 @@ void TGauss<FImpl>::execute(void)
|
|||||||
//time component of momentum phase
|
//time component of momentum phase
|
||||||
LatticeCoordinate(component, dim);
|
LatticeCoordinate(component, dim);
|
||||||
ScalarRho+=(i*(mom_.at(dim)*2*M_PI/env().getDim(dim)))*component;
|
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;
|
rho=(exp(ScalarRho)*Complex(std::pow(sqrt(2*M_PI)*par().width,dim)))*idMat;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user