2015-07-03 18:43:14 +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();
|
|
|
|
|
|
|
|
latt_size.resize(4);
|
|
|
|
|
|
|
|
latt_size[0] = 8;
|
|
|
|
latt_size[1] = 8;
|
|
|
|
latt_size[2] = 8;
|
|
|
|
latt_size[3] = 8;
|
|
|
|
double volume = latt_size[0]*latt_size[1]*latt_size[2]*latt_size[3];
|
|
|
|
|
|
|
|
GridCartesian Fine(latt_size,simd_layout,mpi_layout);
|
2015-07-05 18:24:58 +01:00
|
|
|
GridParallelRNG pRNG(&Fine);
|
2015-08-29 17:18:43 +01:00
|
|
|
std::vector<int> seeds({1,2,3,4,5,6,7,8});
|
|
|
|
pRNG.SeedFixedIntegers(seeds);
|
2015-07-21 03:52:15 +01:00
|
|
|
LatticeGaugeField U(&Fine);
|
2015-07-05 18:24:58 +01:00
|
|
|
|
2015-07-06 04:58:49 +01:00
|
|
|
SU3::HotConfiguration(pRNG, U);
|
2015-07-05 18:24:58 +01:00
|
|
|
|
|
|
|
|
2015-07-06 08:17:32 +01:00
|
|
|
// simplify template declaration? Strip the lorentz from the second template
|
2015-07-21 03:52:15 +01:00
|
|
|
WilsonGaugeAction<LatticeGaugeField, LatticeColourMatrix> Waction(6.0);
|
2015-07-04 09:47:50 +01:00
|
|
|
|
2015-07-03 18:43:14 +01:00
|
|
|
//Collect actions
|
2015-07-04 09:47:50 +01:00
|
|
|
ActionLevel Level1;
|
|
|
|
Level1.push_back(&Waction);
|
|
|
|
ActionSet FullSet;
|
|
|
|
FullSet.push_back(Level1);
|
|
|
|
|
|
|
|
// Create integrator
|
2015-07-06 10:32:20 +01:00
|
|
|
typedef MinimumNorm2 IntegratorAlgorithm;// change here to modify the algorithm
|
2015-08-29 17:18:43 +01:00
|
|
|
IntegratorParameters MDpar(12,20,1.0);
|
2015-07-06 10:32:20 +01:00
|
|
|
Integrator<IntegratorAlgorithm> MDynamics(&Fine,MDpar, FullSet);
|
2015-07-04 09:47:50 +01:00
|
|
|
|
|
|
|
// Create HMC
|
|
|
|
HMCparameters HMCpar;
|
2015-07-06 08:17:32 +01:00
|
|
|
HybridMonteCarlo<IntegratorAlgorithm> HMC(HMCpar, MDynamics);
|
2015-07-05 18:24:58 +01:00
|
|
|
|
|
|
|
HMC.evolve(U);
|
2015-07-03 18:43:14 +01:00
|
|
|
|
|
|
|
}
|