2015-07-29 09:53:39 +01:00
|
|
|
#include "Grid.h"
|
|
|
|
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
using namespace Grid;
|
|
|
|
using namespace Grid::QCD;
|
|
|
|
|
|
|
|
int main (int argc, char ** argv)
|
|
|
|
{
|
|
|
|
Grid_init(&argc,&argv);
|
|
|
|
|
|
|
|
std::vector<int> latt_size = GridDefaultLatt();
|
|
|
|
std::vector<int> simd_layout = GridDefaultSimd(4,vComplex::Nsimd());
|
|
|
|
std::vector<int> mpi_layout = GridDefaultMpi();
|
|
|
|
|
|
|
|
GridCartesian Fine(latt_size,simd_layout,mpi_layout);
|
|
|
|
GridRedBlackCartesian RBFine(latt_size,simd_layout,mpi_layout);
|
2015-08-29 17:18:43 +01:00
|
|
|
|
2015-08-30 12:18:34 +01:00
|
|
|
std::vector<int> seeds({6,7,8,80});
|
|
|
|
GridParallelRNG pRNG(&Fine);
|
2015-08-29 17:18:43 +01:00
|
|
|
pRNG.SeedFixedIntegers(seeds);
|
2015-08-30 12:18:34 +01:00
|
|
|
|
|
|
|
std::vector<int> seedsS({1,2,3,4});
|
|
|
|
GridSerialRNG sRNG;
|
|
|
|
sRNG.SeedFixedIntegers(seedsS);
|
|
|
|
|
2015-07-29 09:53:39 +01:00
|
|
|
LatticeLorentzColourMatrix U(&Fine);
|
|
|
|
|
|
|
|
SU3::HotConfiguration(pRNG, U);
|
|
|
|
|
|
|
|
// simplify template declaration? Strip the lorentz from the second template
|
2015-08-30 12:18:34 +01:00
|
|
|
WilsonGaugeActionR Waction(5.6);
|
2015-07-29 09:53:39 +01:00
|
|
|
|
2015-07-31 21:58:35 +01:00
|
|
|
Real mass=-0.77;
|
2015-08-10 20:47:44 +01:00
|
|
|
WilsonFermionR FermOp(U,Fine,RBFine,mass);
|
2015-07-29 09:53:39 +01:00
|
|
|
|
|
|
|
ConjugateGradient<LatticeFermion> CG(1.0e-8,10000);
|
|
|
|
|
2015-08-10 20:47:44 +01:00
|
|
|
TwoFlavourPseudoFermionAction<WilsonImplR> WilsonNf2(FermOp,CG,CG);
|
2015-07-29 09:53:39 +01:00
|
|
|
|
|
|
|
//Collect actions
|
2015-08-30 12:18:34 +01:00
|
|
|
ActionLevel<LatticeGaugeField> Level1(1);
|
|
|
|
ActionLevel<LatticeGaugeField> Level2(4);
|
2015-07-30 09:16:04 +01:00
|
|
|
Level1.push_back(&WilsonNf2);
|
2015-08-15 23:25:49 +01:00
|
|
|
Level1.push_back(&Waction);
|
2015-08-29 17:18:43 +01:00
|
|
|
// Level1.push_back(&Waction);
|
|
|
|
|
2015-08-30 12:18:34 +01:00
|
|
|
ActionSet<LatticeGaugeField> FullSet;
|
2015-07-29 09:53:39 +01:00
|
|
|
FullSet.push_back(Level1);
|
2015-08-15 23:25:49 +01:00
|
|
|
// FullSet.push_back(Level2);
|
2015-07-29 09:53:39 +01:00
|
|
|
|
|
|
|
// Create integrator
|
2015-08-30 12:18:34 +01:00
|
|
|
typedef MinimumNorm2<LatticeGaugeField> IntegratorAlgorithm;// change here to change the algorithm
|
2015-07-29 13:02:07 +01:00
|
|
|
// typedef LeapFrog IntegratorAlgorithm;// change here to change the algorithm
|
|
|
|
IntegratorParameters MDpar(12,20,1.0);
|
2015-08-30 12:18:34 +01:00
|
|
|
Integrator<LatticeGaugeField,IntegratorAlgorithm> MDynamics(&Fine,MDpar, FullSet);
|
2015-07-29 09:53:39 +01:00
|
|
|
|
|
|
|
// Create HMC
|
|
|
|
HMCparameters HMCpar;
|
2015-08-30 12:18:34 +01:00
|
|
|
HybridMonteCarlo<LatticeGaugeField,IntegratorAlgorithm> HMC(HMCpar, MDynamics,sRNG,pRNG);
|
2015-07-29 09:53:39 +01:00
|
|
|
|
|
|
|
HMC.evolve(U);
|
|
|
|
|
|
|
|
}
|