2015-08-18 16:58:56 +01:00
|
|
|
#include "Grid.h"
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
using namespace Grid;
|
|
|
|
using namespace Grid::QCD;
|
|
|
|
|
2015-12-22 11:19:25 +00:00
|
|
|
namespace Grid {
|
|
|
|
namespace QCD {
|
2015-08-18 16:58:56 +01:00
|
|
|
|
2015-08-30 12:18:34 +01:00
|
|
|
|
2015-12-22 11:19:25 +00:00
|
|
|
class HmcRunner : public NerscHmcRunner {
|
|
|
|
public:
|
2015-08-30 12:18:34 +01:00
|
|
|
|
2015-12-22 11:19:25 +00:00
|
|
|
void BuildTheAction (int argc, char **argv)
|
2015-08-30 12:18:34 +01:00
|
|
|
|
2015-12-22 11:19:25 +00:00
|
|
|
{
|
|
|
|
typedef WilsonImplR ImplPolicy;
|
|
|
|
typedef WilsonFermionR FermionAction;
|
|
|
|
typedef typename FermionAction::FermionField FermionField;
|
2015-08-30 12:18:34 +01:00
|
|
|
|
2015-12-22 11:19:25 +00:00
|
|
|
UGrid = SpaceTimeGrid::makeFourDimGrid(GridDefaultLatt(), GridDefaultSimd(Nd,vComplex::Nsimd()),GridDefaultMpi());
|
|
|
|
UrbGrid = SpaceTimeGrid::makeFourDimRedBlackGrid(UGrid);
|
|
|
|
|
|
|
|
FGrid = UGrid;
|
|
|
|
FrbGrid = UrbGrid;
|
2015-08-18 16:58:56 +01:00
|
|
|
|
2015-12-22 11:19:25 +00:00
|
|
|
// temporarily need a gauge field
|
|
|
|
LatticeGaugeField U(UGrid);
|
2015-08-18 16:58:56 +01:00
|
|
|
|
2015-12-22 11:19:25 +00:00
|
|
|
// Gauge action
|
|
|
|
WilsonGaugeActionR Waction(5.6);
|
2015-08-18 16:58:56 +01:00
|
|
|
|
2015-12-22 11:19:25 +00:00
|
|
|
Real mass=-0.77;
|
|
|
|
FermionAction FermOp(U,*FGrid,*FrbGrid,mass);
|
2015-08-18 16:58:56 +01:00
|
|
|
|
2015-12-22 11:19:25 +00:00
|
|
|
// 1+1 flavour
|
|
|
|
OneFlavourRationalParams Params(1.0e-4,64.0,1000,1.0e-6);
|
|
|
|
OneFlavourRationalPseudoFermionAction<WilsonImplR> WilsonNf1a(FermOp,Params);
|
|
|
|
OneFlavourRationalPseudoFermionAction<WilsonImplR> WilsonNf1b(FermOp,Params);
|
2015-08-18 16:58:56 +01:00
|
|
|
|
2015-12-22 11:19:25 +00:00
|
|
|
//Collect actions
|
|
|
|
ActionLevel<LatticeGaugeField> Level1;
|
|
|
|
Level1.push_back(&WilsonNf1a);
|
|
|
|
Level1.push_back(&WilsonNf1b);
|
|
|
|
Level1.push_back(&Waction);
|
|
|
|
|
|
|
|
TheAction.push_back(Level1);
|
2015-08-18 16:58:56 +01:00
|
|
|
|
2015-12-22 11:19:25 +00:00
|
|
|
Run(argc,argv);
|
|
|
|
};
|
2015-08-18 16:58:56 +01:00
|
|
|
|
2015-12-22 11:19:25 +00:00
|
|
|
};
|
2015-08-18 16:58:56 +01:00
|
|
|
|
2015-12-22 11:19:25 +00:00
|
|
|
}}
|
2015-12-20 02:29:51 +00:00
|
|
|
|
2015-12-22 11:19:25 +00:00
|
|
|
int main (int argc, char ** argv)
|
|
|
|
{
|
|
|
|
Grid_init(&argc,&argv);
|
2015-08-18 16:58:56 +01:00
|
|
|
|
2015-12-22 11:19:25 +00:00
|
|
|
int threads = GridThread::GetThreads();
|
|
|
|
std::cout<<GridLogMessage << "Grid is setup to use "<<threads<<" threads"<<std::endl;
|
|
|
|
|
|
|
|
HmcRunner TheHMC;
|
|
|
|
|
|
|
|
TheHMC.BuildTheAction(argc,argv);
|
2015-08-18 16:58:56 +01:00
|
|
|
|
|
|
|
}
|
2015-12-22 11:19:25 +00:00
|
|
|
|