1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-17 07:17:06 +01:00

Hadrons: module RNG uniquely seeded with <run id> + <module name> + <trajectory>

This commit is contained in:
2018-08-10 18:27:00 +01:00
parent 133d5c2e34
commit ac69f042b1
16 changed files with 84 additions and 33 deletions

View File

@ -67,5 +67,5 @@ void TRandom::execute(void)
LOG(Message) << "Generating random gauge configuration" << std::endl;
auto &U = envGet(LatticeGaugeField, getName());
SU3::HotConfiguration(*env().get4dRng(), U);
SU3::HotConfiguration(rng4d(), U);
}

View File

@ -81,5 +81,5 @@ void TStochEm::execute(void)
<< par().zmScheme << ")..." << std::endl;
photon.StochasticWeight(w);
}
photon.StochasticField(a, *env().get4dRng(), w);
photon.StochasticField(a, rng4d(), w);
}

View File

@ -65,5 +65,5 @@ void TUnit::execute(void)
LOG(Message) << "Creating unit gauge configuration" << std::endl;
auto &U = envGet(LatticeGaugeField, getName());
SU3::ColdConfiguration(*env().get4dRng(), U);
SU3::ColdConfiguration(rng4d(), U);
}

View File

@ -102,7 +102,7 @@ void TTimeDilutedSpinColorDiagonal<FImpl>::execute(void)
auto &noise = envGet(DilutedNoise<FImpl>, getName());
LOG(Message) << "Generating time-diluted, spin-color diagonal noise" << std::endl;
noise.generateNoise(*env().get4dRng());
noise.generateNoise(rng4d());
}
END_MODULE_NAMESPACE

View File

@ -128,7 +128,7 @@ void TStochFreeField<SImpl>::execute(void)
const unsigned int Nadj = Group::AdjointDimension;
auto &phi = envGet(Field, getName());
auto &w = envGet(ComplexField, "_" + getName() + "_weight");
auto &rng = *env().get4dRng();
auto &rng = rng4d();
double trphi2;
FFT fft(env().getGrid());
Integer vol;

View File

@ -149,7 +149,7 @@ void TZ2<FImpl>::execute(void)
hasT_ = true;
}
envGetTmp(LatticeComplex, eta);
bernoulli(*env().get4dRng(), eta);
bernoulli(rng4d(), eta);
eta = (2.*eta - shift)*(1./::sqrt(2.));
eta = where((t >= par().tA) and (t <= par().tB), eta, 0.*eta);
src = 1.;

View File

@ -83,7 +83,7 @@ void TRandomVectors<Field>::execute(void)
for (unsigned int i = 0; i < vec.size(); ++i)
{
random(*env().get4dRng(), vec[i]);
random(rng4d(), vec[i]);
}
}