mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-12 20:27:06 +01:00
Global edit on HMC sector -- making GaugeField a template parameter and
preparing to pass integrator, smearing, bc's as policy classes to hmc. Propose to unify "integrator" and integrator algorithm in a base/derived way to override step. Want to read through ForceGradient to ensure that abstraction covers the force gradient case.
This commit is contained in:
@ -17,7 +17,9 @@ int main (int argc, char ** argv)
|
||||
GridCartesian * FGrid = SpaceTimeGrid::makeFiveDimGrid(Ls,UGrid);
|
||||
GridRedBlackCartesian * FrbGrid = SpaceTimeGrid::makeFiveDimRedBlackGrid(Ls,UGrid);
|
||||
|
||||
GridSerialRNG sRNG;
|
||||
GridParallelRNG pRNG(UGrid);
|
||||
sRNG.SeedRandomDevice();
|
||||
pRNG.SeedRandomDevice();
|
||||
|
||||
LatticeLorentzColourMatrix U(UGrid);
|
||||
@ -25,7 +27,7 @@ int main (int argc, char ** argv)
|
||||
SU3::HotConfiguration(pRNG, U);
|
||||
|
||||
// simplify template declaration? Strip the lorentz from the second template
|
||||
WilsonGaugeAction<LatticeLorentzColourMatrix, LatticeColourMatrix> Waction(5.6);
|
||||
WilsonGaugeActionR Waction(5.6);
|
||||
|
||||
Real mass=0.04;
|
||||
Real pv =1.0;
|
||||
@ -38,21 +40,21 @@ int main (int argc, char ** argv)
|
||||
TwoFlavourEvenOddRatioPseudoFermionAction<WilsonImplR> Nf2(NumOp, DenOp,CG,CG);
|
||||
|
||||
//Collect actions
|
||||
ActionLevel Level1;
|
||||
ActionLevel<LatticeGaugeField> Level1;
|
||||
Level1.push_back(&Nf2);
|
||||
Level1.push_back(&Waction);
|
||||
ActionSet FullSet;
|
||||
ActionSet<LatticeGaugeField> FullSet;
|
||||
FullSet.push_back(Level1);
|
||||
|
||||
// Create integrator
|
||||
// typedef LeapFrog IntegratorAlgorithm;// change here to change the algorithm
|
||||
typedef MinimumNorm2 IntegratorAlgorithm;// change here to change the algorithm
|
||||
typedef MinimumNorm2<LatticeGaugeField> IntegratorAlgorithm;// change here to change the algorithm
|
||||
IntegratorParameters MDpar(12,20,1.0);
|
||||
Integrator<IntegratorAlgorithm> MDynamics(UGrid,MDpar, FullSet);
|
||||
Integrator<LatticeGaugeField,IntegratorAlgorithm> MDynamics(UGrid,MDpar, FullSet);
|
||||
|
||||
// Create HMC
|
||||
HMCparameters HMCpar;
|
||||
HybridMonteCarlo<IntegratorAlgorithm> HMC(HMCpar, MDynamics);
|
||||
HybridMonteCarlo<LatticeGaugeField,IntegratorAlgorithm> HMC(HMCpar, MDynamics,sRNG,pRNG);
|
||||
|
||||
// Run it
|
||||
HMC.evolve(U);
|
||||
|
@ -15,15 +15,21 @@ 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);
|
||||
|
||||
std::vector<int> seeds({6,7,8,80});
|
||||
GridParallelRNG pRNG(&Fine);
|
||||
pRNG.SeedFixedIntegers(seeds);
|
||||
|
||||
std::vector<int> seedsS({1,2,3,4});
|
||||
GridSerialRNG sRNG;
|
||||
sRNG.SeedFixedIntegers(seedsS);
|
||||
|
||||
LatticeLorentzColourMatrix U(&Fine);
|
||||
|
||||
SU3::HotConfiguration(pRNG, U);
|
||||
|
||||
// simplify template declaration? Strip the lorentz from the second template
|
||||
WilsonGaugeAction<LatticeLorentzColourMatrix, LatticeColourMatrix> Waction(5.6);
|
||||
WilsonGaugeActionR Waction(5.6);
|
||||
|
||||
Real mass=-0.77;
|
||||
WilsonFermionR FermOp(U,Fine,RBFine,mass);
|
||||
@ -33,25 +39,25 @@ int main (int argc, char ** argv)
|
||||
TwoFlavourEvenOddPseudoFermionAction<WilsonImplR> WilsonNf2(FermOp,CG,CG);
|
||||
|
||||
//Collect actions
|
||||
ActionLevel Level1(1);
|
||||
ActionLevel Level2(4);
|
||||
ActionLevel<LatticeGaugeField> Level1(1);
|
||||
ActionLevel<LatticeGaugeField> Level2(4);
|
||||
Level1.push_back(&WilsonNf2);
|
||||
Level2.push_back(&Waction);
|
||||
|
||||
ActionSet FullSet;
|
||||
ActionSet<LatticeGaugeField> FullSet;
|
||||
FullSet.push_back(Level1);
|
||||
FullSet.push_back(Level2);
|
||||
|
||||
// Create integrator
|
||||
// typedef LeapFrog IntegratorAlgorithm;// change here to change the algorithm
|
||||
// IntegratorParameters MDpar(12,40,1.0);
|
||||
typedef MinimumNorm2 IntegratorAlgorithm;// change here to change the algorithm
|
||||
typedef MinimumNorm2<LatticeGaugeField> IntegratorAlgorithm;// change here to change the algorithm
|
||||
IntegratorParameters MDpar(12,10,1.0);
|
||||
Integrator<IntegratorAlgorithm> MDynamics(&Fine,MDpar, FullSet);
|
||||
Integrator<LatticeGaugeField,IntegratorAlgorithm> MDynamics(&Fine,MDpar, FullSet);
|
||||
|
||||
// Create HMC
|
||||
HMCparameters HMCpar;
|
||||
HybridMonteCarlo<IntegratorAlgorithm> HMC(HMCpar, MDynamics);
|
||||
HybridMonteCarlo<LatticeGaugeField,IntegratorAlgorithm> HMC(HMCpar, MDynamics,sRNG,pRNG);
|
||||
|
||||
HMC.evolve(U);
|
||||
|
||||
|
@ -15,14 +15,21 @@ int main (int argc, char ** argv)
|
||||
|
||||
GridCartesian Fine(latt_size,simd_layout,mpi_layout);
|
||||
GridRedBlackCartesian RBFine(latt_size,simd_layout,mpi_layout);
|
||||
|
||||
std::vector<int> seeds({6,7,8,80});
|
||||
GridParallelRNG pRNG(&Fine);
|
||||
pRNG.SeedRandomDevice();
|
||||
pRNG.SeedFixedIntegers(seeds);
|
||||
|
||||
std::vector<int> seedsS({1,2,3,4});
|
||||
GridSerialRNG sRNG;
|
||||
sRNG.SeedFixedIntegers(seedsS);
|
||||
|
||||
LatticeLorentzColourMatrix U(&Fine);
|
||||
|
||||
SU3::HotConfiguration(pRNG, U);
|
||||
|
||||
// simplify template declaration? Strip the lorentz from the second template
|
||||
WilsonGaugeAction<LatticeLorentzColourMatrix, LatticeColourMatrix> Waction(5.6);
|
||||
WilsonGaugeActionR Waction(5.6);
|
||||
|
||||
Real mass=-0.77;
|
||||
Real pv =0.0;
|
||||
@ -34,22 +41,22 @@ int main (int argc, char ** argv)
|
||||
TwoFlavourEvenOddRatioPseudoFermionAction<WilsonImplR> WilsonNf2(NumOp, DenOp,CG,CG);
|
||||
|
||||
//Collect actions
|
||||
ActionLevel Level1;
|
||||
ActionLevel<LatticeGaugeField> Level1;
|
||||
Level1.push_back(&WilsonNf2);
|
||||
Level1.push_back(&Waction);
|
||||
ActionSet FullSet;
|
||||
ActionSet<LatticeGaugeField> FullSet;
|
||||
FullSet.push_back(Level1);
|
||||
|
||||
|
||||
// Create integrator
|
||||
typedef MinimumNorm2 IntegratorAlgorithm;// change here to change the algorithm
|
||||
typedef MinimumNorm2<LatticeGaugeField> IntegratorAlgorithm;// change here to change the algorithm
|
||||
// typedef LeapFrog IntegratorAlgorithm;// change here to change the algorithm
|
||||
IntegratorParameters MDpar(12,20,1.0);
|
||||
Integrator<IntegratorAlgorithm> MDynamics(&Fine,MDpar, FullSet);
|
||||
Integrator<LatticeGaugeField,IntegratorAlgorithm> MDynamics(&Fine,MDpar, FullSet);
|
||||
|
||||
// Create HMC
|
||||
HMCparameters HMCpar;
|
||||
HybridMonteCarlo<IntegratorAlgorithm> HMC(HMCpar, MDynamics);
|
||||
HybridMonteCarlo<LatticeGaugeField,IntegratorAlgorithm> HMC(HMCpar, MDynamics,sRNG,pRNG);
|
||||
|
||||
HMC.evolve(U);
|
||||
|
||||
|
@ -15,16 +15,21 @@ 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);
|
||||
|
||||
std::vector<int> seeds({5,6,7,8});
|
||||
std::vector<int> seeds({6,7,8,80});
|
||||
GridParallelRNG pRNG(&Fine);
|
||||
pRNG.SeedFixedIntegers(seeds);
|
||||
|
||||
std::vector<int> seedsS({1,2,3,4});
|
||||
GridSerialRNG sRNG;
|
||||
sRNG.SeedFixedIntegers(seedsS);
|
||||
|
||||
LatticeLorentzColourMatrix U(&Fine);
|
||||
|
||||
SU3::HotConfiguration(pRNG, U);
|
||||
|
||||
// simplify template declaration? Strip the lorentz from the second template
|
||||
WilsonGaugeAction<LatticeLorentzColourMatrix, LatticeColourMatrix> Waction(5.6);
|
||||
WilsonGaugeActionR Waction(5.6);
|
||||
|
||||
Real mass=-0.77;
|
||||
WilsonFermionR FermOp(U,Fine,RBFine,mass);
|
||||
@ -34,25 +39,25 @@ int main (int argc, char ** argv)
|
||||
TwoFlavourPseudoFermionAction<WilsonImplR> WilsonNf2(FermOp,CG,CG);
|
||||
|
||||
//Collect actions
|
||||
ActionLevel Level1(1);
|
||||
ActionLevel Level2(4);
|
||||
ActionLevel<LatticeGaugeField> Level1(1);
|
||||
ActionLevel<LatticeGaugeField> Level2(4);
|
||||
Level1.push_back(&WilsonNf2);
|
||||
Level1.push_back(&Waction);
|
||||
// Level1.push_back(&Waction);
|
||||
|
||||
ActionSet FullSet;
|
||||
ActionSet<LatticeGaugeField> FullSet;
|
||||
FullSet.push_back(Level1);
|
||||
// FullSet.push_back(Level2);
|
||||
|
||||
// Create integrator
|
||||
typedef MinimumNorm2 IntegratorAlgorithm;// change here to change the algorithm
|
||||
typedef MinimumNorm2<LatticeGaugeField> IntegratorAlgorithm;// change here to change the algorithm
|
||||
// typedef LeapFrog IntegratorAlgorithm;// change here to change the algorithm
|
||||
IntegratorParameters MDpar(12,20,1.0);
|
||||
Integrator<IntegratorAlgorithm> MDynamics(&Fine,MDpar, FullSet);
|
||||
Integrator<LatticeGaugeField,IntegratorAlgorithm> MDynamics(&Fine,MDpar, FullSet);
|
||||
|
||||
// Create HMC
|
||||
HMCparameters HMCpar;
|
||||
HybridMonteCarlo<IntegratorAlgorithm> HMC(HMCpar, MDynamics);
|
||||
HybridMonteCarlo<LatticeGaugeField,IntegratorAlgorithm> HMC(HMCpar, MDynamics,sRNG,pRNG);
|
||||
|
||||
HMC.evolve(U);
|
||||
|
||||
|
@ -22,31 +22,37 @@ int main (int argc, char ** argv)
|
||||
double volume = latt_size[0]*latt_size[1]*latt_size[2]*latt_size[3];
|
||||
|
||||
GridCartesian Fine(latt_size,simd_layout,mpi_layout);
|
||||
|
||||
|
||||
std::vector<int> seeds({6,7,8,80});
|
||||
GridParallelRNG pRNG(&Fine);
|
||||
std::vector<int> seeds({1,2,3,4,5,6,7,8});
|
||||
pRNG.SeedFixedIntegers(seeds);
|
||||
|
||||
std::vector<int> seedsS({1,2,3,4});
|
||||
GridSerialRNG sRNG;
|
||||
sRNG.SeedFixedIntegers(seedsS);
|
||||
|
||||
LatticeGaugeField U(&Fine);
|
||||
|
||||
SU3::HotConfiguration(pRNG, U);
|
||||
|
||||
|
||||
// simplify template declaration? Strip the lorentz from the second template
|
||||
WilsonGaugeAction<LatticeGaugeField, LatticeColourMatrix> Waction(6.0);
|
||||
WilsonGaugeActionR Waction(6.0);
|
||||
|
||||
//Collect actions
|
||||
ActionLevel Level1;
|
||||
ActionLevel<LatticeGaugeField> Level1;
|
||||
Level1.push_back(&Waction);
|
||||
ActionSet FullSet;
|
||||
ActionSet<LatticeGaugeField> FullSet;
|
||||
FullSet.push_back(Level1);
|
||||
|
||||
// Create integrator
|
||||
typedef MinimumNorm2 IntegratorAlgorithm;// change here to modify the algorithm
|
||||
typedef MinimumNorm2<LatticeGaugeField> IntegratorAlgorithm;// change here to modify the algorithm
|
||||
IntegratorParameters MDpar(12,20,1.0);
|
||||
Integrator<IntegratorAlgorithm> MDynamics(&Fine,MDpar, FullSet);
|
||||
Integrator<LatticeGaugeField,IntegratorAlgorithm> MDynamics(&Fine,MDpar, FullSet);
|
||||
|
||||
// Create HMC
|
||||
HMCparameters HMCpar;
|
||||
HybridMonteCarlo<IntegratorAlgorithm> HMC(HMCpar, MDynamics);
|
||||
HybridMonteCarlo<LatticeGaugeField,IntegratorAlgorithm> HMC(HMCpar, MDynamics, sRNG, pRNG);
|
||||
|
||||
HMC.evolve(U);
|
||||
|
||||
|
@ -15,14 +15,21 @@ int main (int argc, char ** argv)
|
||||
|
||||
GridCartesian Fine(latt_size,simd_layout,mpi_layout);
|
||||
GridRedBlackCartesian RBFine(latt_size,simd_layout,mpi_layout);
|
||||
|
||||
std::vector<int> seeds({6,7,8,80});
|
||||
GridParallelRNG pRNG(&Fine);
|
||||
pRNG.SeedRandomDevice();
|
||||
pRNG.SeedFixedIntegers(seeds);
|
||||
|
||||
std::vector<int> seedsS({1,2,3,4});
|
||||
GridSerialRNG sRNG;
|
||||
sRNG.SeedFixedIntegers(seedsS);
|
||||
|
||||
LatticeLorentzColourMatrix U(&Fine);
|
||||
|
||||
SU3::HotConfiguration(pRNG, U);
|
||||
|
||||
// simplify template declaration? Strip the lorentz from the second template
|
||||
WilsonGaugeAction<LatticeLorentzColourMatrix, LatticeColourMatrix> Waction(5.6);
|
||||
WilsonGaugeActionR Waction(5.6);
|
||||
|
||||
Real mass=-0.77;
|
||||
Real pv =0.0;
|
||||
@ -34,22 +41,22 @@ int main (int argc, char ** argv)
|
||||
TwoFlavourRatioPseudoFermionAction<WilsonImplR> WilsonNf2(NumOp,FermOp,CG,CG);
|
||||
|
||||
//Collect actions
|
||||
ActionLevel Level1;
|
||||
ActionLevel<LatticeGaugeField> Level1;
|
||||
Level1.push_back(&WilsonNf2);
|
||||
Level1.push_back(&Waction);
|
||||
ActionSet FullSet;
|
||||
ActionSet<LatticeGaugeField> FullSet;
|
||||
FullSet.push_back(Level1);
|
||||
|
||||
|
||||
// Create integrator
|
||||
typedef MinimumNorm2 IntegratorAlgorithm;// change here to change the algorithm
|
||||
typedef MinimumNorm2<LatticeGaugeField> IntegratorAlgorithm;// change here to change the algorithm
|
||||
// typedef LeapFrog IntegratorAlgorithm;// change here to change the algorithm
|
||||
IntegratorParameters MDpar(12,20,1.0);
|
||||
Integrator<IntegratorAlgorithm> MDynamics(&Fine,MDpar, FullSet);
|
||||
Integrator<LatticeGaugeField,IntegratorAlgorithm> MDynamics(&Fine,MDpar, FullSet);
|
||||
|
||||
// Create HMC
|
||||
HMCparameters HMCpar;
|
||||
HybridMonteCarlo<IntegratorAlgorithm> HMC(HMCpar, MDynamics);
|
||||
HybridMonteCarlo<LatticeGaugeField,IntegratorAlgorithm> HMC(HMCpar, MDynamics, sRNG, pRNG);
|
||||
|
||||
HMC.evolve(U);
|
||||
|
||||
|
@ -15,14 +15,22 @@ int main (int argc, char ** argv)
|
||||
|
||||
GridCartesian Fine(latt_size,simd_layout,mpi_layout);
|
||||
GridRedBlackCartesian RBFine(latt_size,simd_layout,mpi_layout);
|
||||
|
||||
|
||||
std::vector<int> seeds({6,7,8,80});
|
||||
GridParallelRNG pRNG(&Fine);
|
||||
pRNG.SeedRandomDevice();
|
||||
pRNG.SeedFixedIntegers(seeds);
|
||||
|
||||
std::vector<int> seedsS({1,2,3,4});
|
||||
GridSerialRNG sRNG;
|
||||
sRNG.SeedFixedIntegers(seedsS);
|
||||
|
||||
LatticeLorentzColourMatrix U(&Fine);
|
||||
|
||||
SU3::HotConfiguration(pRNG, U);
|
||||
|
||||
// simplify template declaration? Strip the lorentz from the second template
|
||||
WilsonGaugeAction<LatticeLorentzColourMatrix, LatticeColourMatrix> Waction(5.6);
|
||||
WilsonGaugeActionR Waction(5.6);
|
||||
|
||||
Real mass=-0.77;
|
||||
WilsonFermionR FermOp(U,Fine,RBFine,mass);
|
||||
@ -33,23 +41,23 @@ int main (int argc, char ** argv)
|
||||
OneFlavourEvenOddRationalPseudoFermionAction<WilsonImplR> WilsonNf1b(FermOp,Params);
|
||||
|
||||
//Collect actions
|
||||
ActionLevel Level1;
|
||||
ActionLevel<LatticeGaugeField> Level1;
|
||||
Level1.push_back(&WilsonNf1a);
|
||||
Level1.push_back(&WilsonNf1b);
|
||||
Level1.push_back(&Waction);
|
||||
|
||||
ActionSet FullSet;
|
||||
ActionSet<LatticeGaugeField> FullSet;
|
||||
FullSet.push_back(Level1);
|
||||
|
||||
// Create integrator
|
||||
typedef MinimumNorm2 IntegratorAlgorithm;// change here to change the algorithm
|
||||
typedef MinimumNorm2<LatticeGaugeField> IntegratorAlgorithm;// change here to change the algorithm
|
||||
|
||||
IntegratorParameters MDpar(12,20,1.0);
|
||||
Integrator<IntegratorAlgorithm> MDynamics(&Fine,MDpar, FullSet);
|
||||
Integrator<LatticeGaugeField,IntegratorAlgorithm> MDynamics(&Fine,MDpar, FullSet);
|
||||
|
||||
// Create HMC
|
||||
HMCparameters HMCpar;
|
||||
HybridMonteCarlo<IntegratorAlgorithm> HMC(HMCpar, MDynamics);
|
||||
HybridMonteCarlo<LatticeGaugeField,IntegratorAlgorithm> HMC(HMCpar, MDynamics, sRNG, pRNG);
|
||||
HMC.evolve(U);
|
||||
|
||||
}
|
||||
|
@ -15,14 +15,22 @@ int main (int argc, char ** argv)
|
||||
|
||||
GridCartesian Fine(latt_size,simd_layout,mpi_layout);
|
||||
GridRedBlackCartesian RBFine(latt_size,simd_layout,mpi_layout);
|
||||
|
||||
|
||||
std::vector<int> seeds({6,7,8,80});
|
||||
GridParallelRNG pRNG(&Fine);
|
||||
pRNG.SeedRandomDevice();
|
||||
pRNG.SeedFixedIntegers(seeds);
|
||||
|
||||
std::vector<int> seedsS({1,2,3,4});
|
||||
GridSerialRNG sRNG;
|
||||
sRNG.SeedFixedIntegers(seedsS);
|
||||
|
||||
LatticeLorentzColourMatrix U(&Fine);
|
||||
|
||||
SU3::HotConfiguration(pRNG, U);
|
||||
|
||||
// simplify template declaration? Strip the lorentz from the second template
|
||||
WilsonGaugeAction<LatticeLorentzColourMatrix, LatticeColourMatrix> Waction(5.6);
|
||||
WilsonGaugeActionR Waction(5.6);
|
||||
|
||||
Real mass=-0.77;
|
||||
Real pv =0.0;
|
||||
@ -35,23 +43,23 @@ int main (int argc, char ** argv)
|
||||
OneFlavourEvenOddRatioRationalPseudoFermionAction<WilsonImplR> WilsonNf1b(NumOp,DenOp,Params);
|
||||
|
||||
//Collect actions
|
||||
ActionLevel Level1;
|
||||
ActionLevel<LatticeGaugeField> Level1;
|
||||
Level1.push_back(&WilsonNf1a);
|
||||
Level1.push_back(&WilsonNf1b);
|
||||
Level1.push_back(&Waction);
|
||||
ActionSet FullSet;
|
||||
ActionSet<LatticeGaugeField> FullSet;
|
||||
FullSet.push_back(Level1);
|
||||
|
||||
|
||||
// Create integrator
|
||||
typedef MinimumNorm2 IntegratorAlgorithm;// change here to change the algorithm
|
||||
typedef MinimumNorm2<LatticeGaugeField> IntegratorAlgorithm;// change here to change the algorithm
|
||||
// typedef LeapFrog IntegratorAlgorithm;// change here to change the algorithm
|
||||
IntegratorParameters MDpar(12,20,1.0);
|
||||
Integrator<IntegratorAlgorithm> MDynamics(&Fine,MDpar, FullSet);
|
||||
Integrator<LatticeGaugeField,IntegratorAlgorithm> MDynamics(&Fine,MDpar, FullSet);
|
||||
|
||||
// Create HMC
|
||||
HMCparameters HMCpar;
|
||||
HybridMonteCarlo<IntegratorAlgorithm> HMC(HMCpar, MDynamics);
|
||||
HybridMonteCarlo<LatticeGaugeField,IntegratorAlgorithm> HMC(HMCpar, MDynamics, sRNG, pRNG);
|
||||
|
||||
HMC.evolve(U);
|
||||
|
||||
|
@ -15,14 +15,22 @@ int main (int argc, char ** argv)
|
||||
|
||||
GridCartesian Fine(latt_size,simd_layout,mpi_layout);
|
||||
GridRedBlackCartesian RBFine(latt_size,simd_layout,mpi_layout);
|
||||
|
||||
|
||||
std::vector<int> seeds({6,7,8,80});
|
||||
GridParallelRNG pRNG(&Fine);
|
||||
pRNG.SeedRandomDevice();
|
||||
pRNG.SeedFixedIntegers(seeds);
|
||||
|
||||
std::vector<int> seedsS({1,2,3,4});
|
||||
GridSerialRNG sRNG;
|
||||
sRNG.SeedFixedIntegers(seedsS);
|
||||
|
||||
LatticeLorentzColourMatrix U(&Fine);
|
||||
|
||||
SU3::HotConfiguration(pRNG, U);
|
||||
|
||||
// simplify template declaration? Strip the lorentz from the second template
|
||||
WilsonGaugeAction<LatticeLorentzColourMatrix, LatticeColourMatrix> Waction(5.6);
|
||||
WilsonGaugeActionR Waction(5.6);
|
||||
|
||||
Real mass=-0.77;
|
||||
WilsonFermionR FermOp(U,Fine,RBFine,mass);
|
||||
@ -33,23 +41,23 @@ int main (int argc, char ** argv)
|
||||
OneFlavourRationalPseudoFermionAction<WilsonImplR> WilsonNf1b(FermOp,Params);
|
||||
|
||||
//Collect actions
|
||||
ActionLevel Level1;
|
||||
ActionLevel<LatticeGaugeField> Level1;
|
||||
Level1.push_back(&WilsonNf1a);
|
||||
Level1.push_back(&WilsonNf1b);
|
||||
Level1.push_back(&Waction);
|
||||
|
||||
ActionSet FullSet;
|
||||
ActionSet<LatticeGaugeField> FullSet;
|
||||
FullSet.push_back(Level1);
|
||||
|
||||
// Create integrator
|
||||
typedef MinimumNorm2 IntegratorAlgorithm;// change here to change the algorithm
|
||||
typedef MinimumNorm2<LatticeGaugeField> IntegratorAlgorithm;// change here to change the algorithm
|
||||
|
||||
IntegratorParameters MDpar(12,20,1.0);
|
||||
Integrator<IntegratorAlgorithm> MDynamics(&Fine,MDpar, FullSet);
|
||||
Integrator<LatticeGaugeField,IntegratorAlgorithm> MDynamics(&Fine,MDpar, FullSet);
|
||||
|
||||
// Create HMC
|
||||
HMCparameters HMCpar;
|
||||
HybridMonteCarlo<IntegratorAlgorithm> HMC(HMCpar, MDynamics);
|
||||
HybridMonteCarlo<LatticeGaugeField,IntegratorAlgorithm> HMC(HMCpar, MDynamics, sRNG, pRNG);
|
||||
|
||||
HMC.evolve(U);
|
||||
|
||||
|
@ -15,14 +15,22 @@ int main (int argc, char ** argv)
|
||||
|
||||
GridCartesian Fine(latt_size,simd_layout,mpi_layout);
|
||||
GridRedBlackCartesian RBFine(latt_size,simd_layout,mpi_layout);
|
||||
|
||||
|
||||
std::vector<int> seeds({6,7,8,80});
|
||||
GridParallelRNG pRNG(&Fine);
|
||||
pRNG.SeedRandomDevice();
|
||||
pRNG.SeedFixedIntegers(seeds);
|
||||
|
||||
std::vector<int> seedsS({1,2,3,4});
|
||||
GridSerialRNG sRNG;
|
||||
sRNG.SeedFixedIntegers(seedsS);
|
||||
|
||||
LatticeLorentzColourMatrix U(&Fine);
|
||||
|
||||
SU3::HotConfiguration(pRNG, U);
|
||||
|
||||
// simplify template declaration? Strip the lorentz from the second template
|
||||
WilsonGaugeAction<LatticeLorentzColourMatrix, LatticeColourMatrix> Waction(5.6);
|
||||
WilsonGaugeActionR Waction(5.6);
|
||||
|
||||
Real mass=-0.77;
|
||||
Real pv =0.0;
|
||||
@ -35,23 +43,23 @@ int main (int argc, char ** argv)
|
||||
OneFlavourRatioRationalPseudoFermionAction<WilsonImplR> WilsonNf1b(NumOp,DenOp,Params);
|
||||
|
||||
//Collect actions
|
||||
ActionLevel Level1;
|
||||
ActionLevel<LatticeGaugeField> Level1;
|
||||
Level1.push_back(&WilsonNf1a);
|
||||
Level1.push_back(&WilsonNf1b);
|
||||
Level1.push_back(&Waction);
|
||||
ActionSet FullSet;
|
||||
ActionSet<LatticeGaugeField> FullSet;
|
||||
FullSet.push_back(Level1);
|
||||
|
||||
|
||||
// Create integrator
|
||||
typedef MinimumNorm2 IntegratorAlgorithm;// change here to change the algorithm
|
||||
typedef MinimumNorm2<LatticeGaugeField> IntegratorAlgorithm;// change here to change the algorithm
|
||||
// typedef LeapFrog IntegratorAlgorithm;// change here to change the algorithm
|
||||
IntegratorParameters MDpar(12,20,1.0);
|
||||
Integrator<IntegratorAlgorithm> MDynamics(&Fine,MDpar, FullSet);
|
||||
Integrator<LatticeGaugeField,IntegratorAlgorithm> MDynamics(&Fine,MDpar, FullSet);
|
||||
|
||||
// Create HMC
|
||||
HMCparameters HMCpar;
|
||||
HybridMonteCarlo<IntegratorAlgorithm> HMC(HMCpar, MDynamics);
|
||||
HybridMonteCarlo<LatticeGaugeField,IntegratorAlgorithm> HMC(HMCpar, MDynamics, sRNG, pRNG);
|
||||
|
||||
HMC.evolve(U);
|
||||
|
||||
|
Reference in New Issue
Block a user