1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-03 18:55:56 +01:00
This commit is contained in:
Alessandro Lupo 2022-11-25 13:10:29 +00:00
parent 2de03e5172
commit 22064c7e4c
5 changed files with 25 additions and 25 deletions

View File

@ -29,7 +29,7 @@ public:
typedef typename Sp_TwoIndex<ncolour, S>::LatticeTwoIndexField LatticeField;
static const int Dimension = (ncolour * (ncolour + S) / 2) - 1;
static const bool isFundamental = false;
static const int nsp = Nc / 2;
//static const int nsp = Nc / 2;
LatticeField U;
explicit SpTwoIndexRep(GridBase *grid) : U(grid) {}
@ -43,7 +43,7 @@ public:
U = Zero();
LatticeColourMatrix tmp(Uin.Grid());
Vector<typename Sp<nsp>::Matrix> eij(Dimension);
Vector<typename Sp<ncolour>::Matrix> eij(Dimension);
for (int a = 0; a < Dimension; a++)
Sp_TwoIndex<ncolour, S>::base(a, eij[a]);
@ -71,7 +71,7 @@ public:
out_mu = Zero();
typename Sp<nsp>::LatticeAlgebraVector h(in.Grid());
typename Sp<ncolour>::LatticeAlgebraVector h(in.Grid());
projectOnAlgebra(h, in_mu, double(Nc + 2 * S)); // factor T(r)/T(fund)
FundamentalLieAlgebraMatrix(h, out_mu); // apply scale only once
pokeLorentz(out, out_mu, mu); // should be 2 for sp4 as. ok
@ -80,15 +80,15 @@ public:
}
private:
void projectOnAlgebra(typename Sp<nsp>::LatticeAlgebraVector &h_out,
void projectOnAlgebra(typename Sp<ncolour>::LatticeAlgebraVector &h_out,
const LatticeMatrix &in, Real scale = 1.0) const {
Sp_TwoIndex<ncolour, S>::projectOnAlgebra(h_out, in, scale);
}
void FundamentalLieAlgebraMatrix(
typename Sp<nsp>::LatticeAlgebraVector &h,
typename Sp<nsp>::LatticeMatrix &out, Real scale = 1.0) const {
Sp<nsp>::FundamentalLieAlgebraMatrix(h, out, scale);
typename Sp<ncolour>::LatticeAlgebraVector &h,
typename Sp<ncolour>::LatticeMatrix &out, Real scale = 1.0) const {
Sp<ncolour>::FundamentalLieAlgebraMatrix(h, out, scale);
}
};

View File

@ -14,12 +14,12 @@ template <int ncolour>
class SpFundamentalRep {
public:
static const int Dimension = ncolour;
static const int nSp = ncolour/2;
//static const int nSp = ncolour/2;
static const bool isFundamental = true;
// typdef to be used by the Representations class in HMC to get the
// types for the higher representation fields
typedef typename Sp<nSp>::LatticeMatrix LatticeMatrix;
typedef typename Sp<ncolour>::LatticeMatrix LatticeMatrix;
typedef LatticeGaugeField LatticeField;
explicit SpFundamentalRep(GridBase* grid) {} //do nothing

View File

@ -33,11 +33,11 @@ NAMESPACE_BEGIN(Grid);
//inline Real delta(int a, int b) { return (a == b) ? 1.0 : 0.0; }
template <int ncolour, TwoIndexSymmetry S>
class Sp_TwoIndex : public Sp<Config_nsp> {
class Sp_TwoIndex : public Sp<ncolour> {
public:
static const int nsp = ncolour/2;
static const int Dimension = nsp * (ncolour + S) - 1 ;
static const int NumGenerators = Sp<nsp>::AlgebraDimension;
static const int NumGenerators = Sp<ncolour>::AlgebraDimension;
template <typename vtype>
using iSp2nTwoIndexMatrix = iScalar<iScalar<iMatrix<vtype, Dimension> > >;
@ -175,21 +175,21 @@ public:
template <class cplx>
static void generator(int Index, iSp2nTwoIndexMatrix<cplx> &i2indTa) {
Vector<typename Sp<nsp>::template iSp2nMatrix<cplx> > ta(
Vector<typename Sp<ncolour>::template iSp2nMatrix<cplx> > ta(
NumGenerators);
Vector<typename Sp<nsp>::template iSp2nMatrix<cplx> > eij(Dimension);
typename Sp<nsp>::template iSp2nMatrix<cplx> tmp;
Vector<typename Sp<ncolour>::template iSp2nMatrix<cplx> > eij(Dimension);
typename Sp<ncolour>::template iSp2nMatrix<cplx> tmp;
i2indTa = Zero();
for (int a = 0; a < NumGenerators; a++)
Sp<nsp>::generator(a, ta[a]);
Sp<ncolour>::generator(a, ta[a]);
for (int a = 0; a < Dimension; a++) base(a, eij[a]);
for (int a = 0; a < Dimension; a++) {
tmp = transpose(ta[Index]) * adj(eij[a]) + adj(eij[a]) * ta[Index];
for (int b = 0; b < Dimension; b++) {
typename Sp<nsp>::template iSp2nMatrix<cplx> tmp1 =
typename Sp<ncolour>::template iSp2nMatrix<cplx> tmp1 =
tmp * eij[b];
Complex iTr = TensorRemove(timesI(trace(tmp1)));
i2indTa()()(a, b) = iTr;
@ -245,7 +245,7 @@ public:
}
static void TwoIndexLieAlgebraMatrix(
const typename Sp<nsp>::LatticeAlgebraVector &h,
const typename Sp<ncolour>::LatticeAlgebraVector &h,
LatticeTwoIndexMatrix &out, Real scale = 1.0) {
conformable(h, out);
GridBase *grid = out.Grid();
@ -264,7 +264,7 @@ public:
// Projects the algebra components
// of a lattice matrix ( of dimension ncol*ncol -1 )
static void projectOnAlgebra(
typename Sp<nsp>::LatticeAlgebraVector &h_out,
typename Sp<ncolour>::LatticeAlgebraVector &h_out,
const LatticeTwoIndexMatrix &in, Real scale = 1.0) {
conformable(h_out, in);
h_out = Zero();
@ -280,7 +280,7 @@ public:
// a projector that keeps the generators stored to avoid the overhead of
// recomputing them
static void projector(typename Sp<nsp>::LatticeAlgebraVector &h_out,
static void projector(typename Sp<ncolour>::LatticeAlgebraVector &h_out,
const LatticeTwoIndexMatrix &in, Real scale = 1.0) {
conformable(h_out, in);
// to store the generators

View File

@ -22,7 +22,7 @@ int main(int argc, char **argv) {
CheckpointerParameters CPparams;
CPparams.config_prefix = "ckpoint_lat";
CPparams.rng_prefix = "ckpoint_rng";
CPparams.saveInterval = 5;
CPparams.saveInterval = 100;
CPparams.format = "IEEE64BIG";
TheHMC.Resources.LoadNerscCheckpointer(CPparams);
@ -46,7 +46,7 @@ int main(int argc, char **argv) {
SpTwoIndexAntiSymmetricRepresentation::LatticeField U(GridPtr);
//LatticeGaugeField U(GridPtr);
RealD mass = -0.85;
RealD mass = -0.115;
std::vector<Complex> boundary = {-1,-1,-1,-1};

View File

@ -22,7 +22,7 @@ int main(int argc, char **argv) {
CheckpointerParameters CPparams;
CPparams.config_prefix = "ckpoint_lat";
CPparams.rng_prefix = "ckpoint_rng";
CPparams.saveInterval = 5;
CPparams.saveInterval = 100;
CPparams.format = "IEEE64BIG";
TheHMC.Resources.LoadNerscCheckpointer(CPparams);
@ -36,7 +36,7 @@ int main(int argc, char **argv) {
typedef PlaquetteMod<HMCWrapper::ImplPolicy> PlaqObs;
TheHMC.Resources.AddObservable<PlaqObs>();
RealD beta = 2.25 ;
RealD beta = 7.2 ;
SymplWilsonGaugeActionR Waction(beta);
@ -46,7 +46,7 @@ int main(int argc, char **argv) {
SpFundamentalRepresentation::LatticeField U(GridPtr);
//LatticeGaugeField U(GridPtr);
RealD mass = -0.95;
RealD mass = -0.76;
FermionAction FermOp(U, *GridPtr, *GridRBPtr, mass);
@ -66,7 +66,7 @@ int main(int argc, char **argv) {
TheHMC.TheAction.push_back(Level1);
TheHMC.TheAction.push_back(Level2);
TheHMC.Parameters.MD.MDsteps = 20;
TheHMC.Parameters.MD.MDsteps = 36;
TheHMC.Parameters.MD.trajL = 1.0;
TheHMC.ReadCommandLine(argc, argv);