1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-09-20 09:15:38 +01:00

sRNG parameter added

This commit is contained in:
Peter Boyle 2021-03-18 06:24:11 -04:00
parent 3c67d626ba
commit 9c2b37218a

View File

@ -93,13 +93,13 @@ public:
GeneralisedMomenta(GridBase* grid, Metric<MomentaField>& M): M(M), Mom(grid), AuxMom(grid), AuxField(grid){} GeneralisedMomenta(GridBase* grid, Metric<MomentaField>& M): M(M), Mom(grid), AuxMom(grid), AuxField(grid){}
// Correct // Correct
void MomentaDistribution(GridParallelRNG& pRNG){ void MomentaDistribution(GridSerialRNG & sRNG, GridParallelRNG& pRNG){
// Generate a distribution for // Generate a distribution for
// P^dag G P // P^dag G P
// where G = M^-1 // where G = M^-1
// Generate gaussian momenta // Generate gaussian momenta
Implementation::generate_momenta(Mom, pRNG); Implementation::generate_momenta(Mom, sRNG, pRNG);
// Modify the distribution with the metric // Modify the distribution with the metric
M.MSquareRoot(Mom); M.MSquareRoot(Mom);
@ -107,8 +107,8 @@ public:
// Auxiliary momenta // Auxiliary momenta
// do nothing if trivial, so hide in the metric // do nothing if trivial, so hide in the metric
MomentaField AuxMomTemp(Mom.Grid()); MomentaField AuxMomTemp(Mom.Grid());
Implementation::generate_momenta(AuxMom, pRNG); Implementation::generate_momenta(AuxMom, sRNG, pRNG);
Implementation::generate_momenta(AuxField, pRNG); Implementation::generate_momenta(AuxField, sRNG, pRNG);
// Modify the distribution with the metric // Modify the distribution with the metric
// Aux^dag M Aux // Aux^dag M Aux
M.MInvSquareRoot(AuxMom); // AuxMom = M^{-1/2} AuxMomTemp M.MInvSquareRoot(AuxMom); // AuxMom = M^{-1/2} AuxMomTemp