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

Hadrons: Z2 source code fix

This commit is contained in:
Antonin Portelli 2016-05-01 14:49:45 -07:00
parent 5e4b58ac40
commit 7905c5b8e5

View File

@ -119,17 +119,15 @@ void MSource::execute(Environment &env)
int tb = std::stoi(par_.arguments[1]);
Lattice<iScalar<vInteger>> t(env.getGrid());
LatticeComplex eta(env.getGrid());
LatticeComplex z(env.getGrid()), shift(env.getGrid());
LatticeFermion phi(env.getGrid());
Complex shift(1., 1.);
LatticeCoordinate(t, Tp);
bernoulli(*env.get4dRng(), eta);
shift = ComplexD(1., 1.);
z = zero;
eta = (2.*eta - shift)*(1./::sqrt(2.));
eta = where((t >= ta) and (t <= tb), eta, z);
*src_ = 1.;
*src_ *= eta;
eta = (2.*eta - shift)*(1./::sqrt(2.));
eta = where((t >= ta) and (t <= tb), eta, 0.*eta);
*src_ = 1.;
*src_ = (*src_)*eta;
break;
}