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

Fixing the plaquette computation

This commit is contained in:
Guido Cossu 2016-10-21 16:06:34 +01:00
parent 392130a537
commit e6acffdfc2
4 changed files with 29 additions and 25 deletions

View File

@ -99,7 +99,7 @@ class VariableWilsonGaugeAction : public Action<typename Gimpl::GaugeField> {
public:
VariableWilsonGaugeAction(std::vector<RealD> bulk, std::vector<RealD> xdim,
GridBase *_grid, bool openBC = false)
GridBase *_grid)
: b_bulk(bulk),
b_xdim(xdim),
grid(_grid),
@ -130,11 +130,6 @@ class VariableWilsonGaugeAction : public Action<typename Gimpl::GaugeField> {
beta_xdim = where(coor == tau, temp, beta_xdim);
}
if (!openBC) {
temp = b_xdim[Nex - 1];
beta_xdim = where(coor == Nex - 1, temp, beta_xdim);
}
beta_xdim_shifted = Cshift(beta_xdim, Ndim - 1, -1);
beta_bulk = zero;
@ -143,8 +138,7 @@ class VariableWilsonGaugeAction : public Action<typename Gimpl::GaugeField> {
beta_bulk = where(coor == tau, temp, beta_bulk);
}
std::cout << beta_xdim << std::endl;
std::cout << beta_xdim_shifted << std::endl;
};
virtual void refresh(const GaugeField &U,
@ -180,6 +174,7 @@ class VariableWilsonGaugeAction : public Action<typename Gimpl::GaugeField> {
}
}
double faces = (1.0 * (Nd - 1) * (Nd - 2)) / 2.0;
SumdirPlaq *= OneOnNc / (RealD(bulk_volume) * faces);

View File

@ -170,6 +170,7 @@ class SU {
ta()()(i2, i1) = 1.0;
ta = ta * 0.5;
}
template <class cplx>
static void generatorSigmaX(int su2Index, iSUnMatrix<cplx> &ta) {
ta = zero;
@ -194,6 +195,8 @@ class SU {
ta = ta * nrm;
}
////////////////////////////////////////////////////////////////////////
// Map a su2 subgroup number to the pair of rows that are non zero
////////////////////////////////////////////////////////////////////////

View File

@ -54,9 +54,21 @@ public:
// resolution throughout the usage in this file, and rather defeats the
// purpose of deriving
// from Gimpl.
/*
plaq = Gimpl::CovShiftBackward(
U[mu], mu, Gimpl::CovShiftBackward(
U[nu], nu, Gimpl::CovShiftForward(U[mu], mu, U[nu])));
*/
// _
//|< _|
plaq = Gimpl::CovShiftForward(U[mu],mu,
Gimpl::CovShiftForward(U[nu],nu,
Gimpl::CovShiftBackward(U[mu],mu,
Gimpl::CovShiftIdentityBackward(U[nu], nu))));
}
//////////////////////////////////////////////////
// trace of directed plaquette oriented in mu,nu plane

View File

@ -62,32 +62,26 @@ class HmcRunner : public BinaryHmcRunner {
void BuildTheAction(int argc, char **argv)
{
int Ndim=5;
typedef WilsonImplR ImplPolicy;
typedef WilsonFermionR FermionAction;
typedef typename FermionAction::FermionField FermionField;
UGrid = SpaceTimeGrid::makeFourDimGrid(
GridDefaultLatt(), GridDefaultSimd(Nd, vComplex::Nsimd()),
GridDefaultMpi());
UrbGrid = SpaceTimeGrid::makeFourDimRedBlackGrid(UGrid);
std::vector<int> simd = GridDefaultSimd(Ndim-1,vComplex::Nsimd());
simd.push_back(1);
FGrid = UGrid;
FrbGrid = UrbGrid;
// temporarily need a gauge field
LatticeGaugeField U(UGrid);
//UGrid = SpaceTimeGrid::makeFourDimGrid(GridDefaultLatt(), simd, GridDefaultMpi());
UGrid = new GridCartesian(GridDefaultLatt(),simd,GridDefaultMpi());
// Gauge action
int Ls = UGrid->_gdimensions[Nd - 1];
std::vector<RealD> betat(Ls);
std::vector<RealD> betas(Ls);
//betat={5,6,6,6,6,6,6,5};
betat={1,1,1,0,1,1,1,1};
//betas={5.2,5.5,5.8,6,6,5.8,5.5,5.2};
betas={0,0,0,0,0,0,0,0};
bool openBC = false;
int Ls = UGrid->_fdimensions[Nd - 1];
std::vector<RealD> betat(Ls,6.0);
std::vector<RealD> betas(Ls,5.6);
betat[Ls-1]= 0.0;
betas={5.2,5.5,5.8,6,6,5.8,5.5,5.2};
std:cout << GridLogMessage << "Betas: " << betas << std::endl;
VariableWilsonGaugeActionR Waction(betas, betat, UGrid, openBC);
VariableWilsonGaugeActionR Waction(betas, betat, UGrid);
//WilsonGaugeActionR Waction(5.6);
// Collect actions