mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
MSource::Gauss Integer is unsigned...
This commit is contained in:
parent
fc6e584f2c
commit
4bfe678218
@ -24,8 +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,
|
Integer, tA,
|
||||||
int, tB,
|
Integer, tB,
|
||||||
double, width);
|
double, width);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -115,8 +115,6 @@ void TGauss<FImpl>::execute(void)
|
|||||||
const Real fact=-0.5/std::pow(par().width,2);
|
const Real fact=-0.5/std::pow(par().width,2);
|
||||||
const Complex i(0.0, 1.0);
|
const Complex i(0.0, 1.0);
|
||||||
const SitePropagator idMat=[](){ SitePropagator s; s=1.; return s; }();
|
const SitePropagator idMat=[](){ SitePropagator s; s=1.; return s; }();
|
||||||
const vTInteger vTtA=par().tA;
|
|
||||||
const vTInteger vTtB=par().tB;
|
|
||||||
|
|
||||||
ScalarRho=zero;
|
ScalarRho=zero;
|
||||||
for(int mu=0; mu<dim; mu++) {
|
for(int mu=0; mu<dim; mu++) {
|
||||||
@ -126,8 +124,6 @@ void TGauss<FImpl>::execute(void)
|
|||||||
const int Lmu=env().getDim(mu);
|
const int Lmu=env().getDim(mu);
|
||||||
const int LmuHalf=Lmu/2;
|
const int LmuHalf=Lmu/2;
|
||||||
const int posMu=position_[mu];
|
const int posMu=position_[mu];
|
||||||
const vTInteger vTLmuHalf=LmuHalf;
|
|
||||||
const vTInteger vTposMu=posMu;
|
|
||||||
|
|
||||||
LatticeCoordinate(component, mu);
|
LatticeCoordinate(component, mu);
|
||||||
LatticeCoordinate(compHelper, mu);
|
LatticeCoordinate(compHelper, mu);
|
||||||
@ -137,16 +133,15 @@ void TGauss<FImpl>::execute(void)
|
|||||||
|
|
||||||
//Gauss distribution
|
//Gauss distribution
|
||||||
component-=Complex(posMu);
|
component-=Complex(posMu);
|
||||||
compHelper-=vTposMu;
|
if(posMu<LmuHalf)
|
||||||
if(posMu<Lmu/2)
|
|
||||||
{
|
{
|
||||||
component=where((compHelper>vTLmuHalf),
|
component=where((compHelper>Integer(posMu+LmuHalf)),
|
||||||
component-Complex(Lmu),
|
component-Complex(Lmu),
|
||||||
component);
|
component);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
component=where((compHelper<=-vTLmuHalf),
|
component=where((compHelper<=Integer(posMu-LmuHalf)),
|
||||||
component+Complex(Lmu),
|
component+Complex(Lmu),
|
||||||
component);
|
component);
|
||||||
}
|
}
|
||||||
@ -162,7 +157,7 @@ void TGauss<FImpl>::execute(void)
|
|||||||
|
|
||||||
//select time slices
|
//select time slices
|
||||||
LatticeCoordinate(compHelper, dim);
|
LatticeCoordinate(compHelper, dim);
|
||||||
ScalarRho=where((compHelper>=vTtA && compHelper<=vTtB),
|
ScalarRho=where((compHelper>=par().tA && compHelper<=par().tB),
|
||||||
ScalarRho,
|
ScalarRho,
|
||||||
0.*ScalarRho);
|
0.*ScalarRho);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user