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

Started a tidy up in the HMC sector. Now comfortable with the two level integrators;

to a little figure out what Guido had done & why -- but there is a neat saving of force
evaluations across the nesting time boundary making use of linearity of the leapP in dt.

I cleaned up the printing, reduced the volume of code, in the process sharing printing
between all integrators. Placed an assert that the total integration time for all integrators
must match at end of trajectory.

Have now verified e-dH = 1 for nested integrators in Wilson/Wilson runs with both
Omelyan and with Leapfrog so substantial confidence gained.
This commit is contained in:
Peter Boyle
2015-08-29 17:18:43 +01:00
parent dc814f30da
commit 76d752585b
12 changed files with 241 additions and 107 deletions

View File

@ -16,7 +16,8 @@ int main (int argc, char ** argv)
GridCartesian Fine(latt_size,simd_layout,mpi_layout);
GridRedBlackCartesian RBFine(latt_size,simd_layout,mpi_layout);
GridParallelRNG pRNG(&Fine);
pRNG.SeedRandomDevice();
std::vector<int> seeds({6,7,8,80});
pRNG.SeedFixedIntegers(seeds);
LatticeLorentzColourMatrix U(&Fine);
SU3::HotConfiguration(pRNG, U);
@ -28,22 +29,24 @@ int main (int argc, char ** argv)
WilsonFermionR FermOp(U,Fine,RBFine,mass);
ConjugateGradient<LatticeFermion> CG(1.0e-8,10000);
ConjugateGradient<LatticeFermion> CGmd(1.0e-6,10000);
TwoFlavourEvenOddPseudoFermionAction<WilsonImplR> WilsonNf2(FermOp,CG,CG);
//Collect actions
ActionLevel Level1;
ActionLevel Level1(1);
ActionLevel Level2(4);
Level1.push_back(&WilsonNf2);
Level1.push_back(&Waction);
Level2.push_back(&Waction);
ActionSet FullSet;
FullSet.push_back(Level1);
FullSet.push_back(Level2);
// Create integrator
// typedef MinimumNorm2 IntegratorAlgorithm;// change here to change the algorithm
typedef LeapFrog IntegratorAlgorithm;// change here to change the algorithm
IntegratorParameters MDpar(12,40,1.0);
std::vector<int> rel ={1};
// typedef LeapFrog IntegratorAlgorithm;// change here to change the algorithm
// IntegratorParameters MDpar(12,40,1.0);
typedef MinimumNorm2 IntegratorAlgorithm;// change here to change the algorithm
IntegratorParameters MDpar(12,10,1.0);
Integrator<IntegratorAlgorithm> MDynamics(&Fine,MDpar, FullSet);
// Create HMC

View File

@ -16,7 +16,9 @@ int main (int argc, char ** argv)
GridCartesian Fine(latt_size,simd_layout,mpi_layout);
GridRedBlackCartesian RBFine(latt_size,simd_layout,mpi_layout);
GridParallelRNG pRNG(&Fine);
pRNG.SeedRandomDevice();
std::vector<int> seeds({5,6,7,8});
pRNG.SeedFixedIntegers(seeds);
LatticeLorentzColourMatrix U(&Fine);
SU3::HotConfiguration(pRNG, U);
@ -28,14 +30,16 @@ int main (int argc, char ** argv)
WilsonFermionR FermOp(U,Fine,RBFine,mass);
ConjugateGradient<LatticeFermion> CG(1.0e-8,10000);
ConjugateGradient<LatticeFermion> CGmd(1.0e-6,10000);
TwoFlavourPseudoFermionAction<WilsonImplR> WilsonNf2(FermOp,CG,CG);
//Collect actions
ActionLevel Level1;
ActionLevel Level1(1);
ActionLevel Level2(4);
Level1.push_back(&WilsonNf2);
Level1.push_back(&Waction);
// Level1.push_back(&Waction);
ActionSet FullSet;
FullSet.push_back(Level1);
// FullSet.push_back(Level2);

View File

@ -23,7 +23,8 @@ int main (int argc, char ** argv)
GridCartesian Fine(latt_size,simd_layout,mpi_layout);
GridParallelRNG pRNG(&Fine);
pRNG.SeedRandomDevice();
std::vector<int> seeds({1,2,3,4,5,6,7,8});
pRNG.SeedFixedIntegers(seeds);
LatticeGaugeField U(&Fine);
SU3::HotConfiguration(pRNG, U);
@ -40,7 +41,7 @@ int main (int argc, char ** argv)
// Create integrator
typedef MinimumNorm2 IntegratorAlgorithm;// change here to modify the algorithm
IntegratorParameters MDpar(12,5,1.0);
IntegratorParameters MDpar(12,20,1.0);
Integrator<IntegratorAlgorithm> MDynamics(&Fine,MDpar, FullSet);
// Create HMC