mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-10 06:00:45 +01:00
Fixing #11
This commit is contained in:
parent
2de03e5172
commit
22064c7e4c
@ -29,7 +29,7 @@ public:
|
|||||||
typedef typename Sp_TwoIndex<ncolour, S>::LatticeTwoIndexField LatticeField;
|
typedef typename Sp_TwoIndex<ncolour, S>::LatticeTwoIndexField LatticeField;
|
||||||
static const int Dimension = (ncolour * (ncolour + S) / 2) - 1;
|
static const int Dimension = (ncolour * (ncolour + S) / 2) - 1;
|
||||||
static const bool isFundamental = false;
|
static const bool isFundamental = false;
|
||||||
static const int nsp = Nc / 2;
|
//static const int nsp = Nc / 2;
|
||||||
LatticeField U;
|
LatticeField U;
|
||||||
|
|
||||||
explicit SpTwoIndexRep(GridBase *grid) : U(grid) {}
|
explicit SpTwoIndexRep(GridBase *grid) : U(grid) {}
|
||||||
@ -43,7 +43,7 @@ public:
|
|||||||
U = Zero();
|
U = Zero();
|
||||||
LatticeColourMatrix tmp(Uin.Grid());
|
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++)
|
for (int a = 0; a < Dimension; a++)
|
||||||
Sp_TwoIndex<ncolour, S>::base(a, eij[a]);
|
Sp_TwoIndex<ncolour, S>::base(a, eij[a]);
|
||||||
@ -71,7 +71,7 @@ public:
|
|||||||
|
|
||||||
out_mu = Zero();
|
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)
|
projectOnAlgebra(h, in_mu, double(Nc + 2 * S)); // factor T(r)/T(fund)
|
||||||
FundamentalLieAlgebraMatrix(h, out_mu); // apply scale only once
|
FundamentalLieAlgebraMatrix(h, out_mu); // apply scale only once
|
||||||
pokeLorentz(out, out_mu, mu); // should be 2 for sp4 as. ok
|
pokeLorentz(out, out_mu, mu); // should be 2 for sp4 as. ok
|
||||||
@ -80,15 +80,15 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
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 {
|
const LatticeMatrix &in, Real scale = 1.0) const {
|
||||||
Sp_TwoIndex<ncolour, S>::projectOnAlgebra(h_out, in, scale);
|
Sp_TwoIndex<ncolour, S>::projectOnAlgebra(h_out, in, scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FundamentalLieAlgebraMatrix(
|
void FundamentalLieAlgebraMatrix(
|
||||||
typename Sp<nsp>::LatticeAlgebraVector &h,
|
typename Sp<ncolour>::LatticeAlgebraVector &h,
|
||||||
typename Sp<nsp>::LatticeMatrix &out, Real scale = 1.0) const {
|
typename Sp<ncolour>::LatticeMatrix &out, Real scale = 1.0) const {
|
||||||
Sp<nsp>::FundamentalLieAlgebraMatrix(h, out, scale);
|
Sp<ncolour>::FundamentalLieAlgebraMatrix(h, out, scale);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -14,12 +14,12 @@ template <int ncolour>
|
|||||||
class SpFundamentalRep {
|
class SpFundamentalRep {
|
||||||
public:
|
public:
|
||||||
static const int Dimension = ncolour;
|
static const int Dimension = ncolour;
|
||||||
static const int nSp = ncolour/2;
|
//static const int nSp = ncolour/2;
|
||||||
static const bool isFundamental = true;
|
static const bool isFundamental = true;
|
||||||
|
|
||||||
// typdef to be used by the Representations class in HMC to get the
|
// typdef to be used by the Representations class in HMC to get the
|
||||||
// types for the higher representation fields
|
// types for the higher representation fields
|
||||||
typedef typename Sp<nSp>::LatticeMatrix LatticeMatrix;
|
typedef typename Sp<ncolour>::LatticeMatrix LatticeMatrix;
|
||||||
typedef LatticeGaugeField LatticeField;
|
typedef LatticeGaugeField LatticeField;
|
||||||
|
|
||||||
explicit SpFundamentalRep(GridBase* grid) {} //do nothing
|
explicit SpFundamentalRep(GridBase* grid) {} //do nothing
|
||||||
|
@ -33,11 +33,11 @@ NAMESPACE_BEGIN(Grid);
|
|||||||
//inline Real delta(int a, int b) { return (a == b) ? 1.0 : 0.0; }
|
//inline Real delta(int a, int b) { return (a == b) ? 1.0 : 0.0; }
|
||||||
|
|
||||||
template <int ncolour, TwoIndexSymmetry S>
|
template <int ncolour, TwoIndexSymmetry S>
|
||||||
class Sp_TwoIndex : public Sp<Config_nsp> {
|
class Sp_TwoIndex : public Sp<ncolour> {
|
||||||
public:
|
public:
|
||||||
static const int nsp = ncolour/2;
|
static const int nsp = ncolour/2;
|
||||||
static const int Dimension = nsp * (ncolour + S) - 1 ;
|
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>
|
template <typename vtype>
|
||||||
using iSp2nTwoIndexMatrix = iScalar<iScalar<iMatrix<vtype, Dimension> > >;
|
using iSp2nTwoIndexMatrix = iScalar<iScalar<iMatrix<vtype, Dimension> > >;
|
||||||
@ -175,21 +175,21 @@ public:
|
|||||||
|
|
||||||
template <class cplx>
|
template <class cplx>
|
||||||
static void generator(int Index, iSp2nTwoIndexMatrix<cplx> &i2indTa) {
|
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);
|
NumGenerators);
|
||||||
Vector<typename Sp<nsp>::template iSp2nMatrix<cplx> > eij(Dimension);
|
Vector<typename Sp<ncolour>::template iSp2nMatrix<cplx> > eij(Dimension);
|
||||||
typename Sp<nsp>::template iSp2nMatrix<cplx> tmp;
|
typename Sp<ncolour>::template iSp2nMatrix<cplx> tmp;
|
||||||
i2indTa = Zero();
|
i2indTa = Zero();
|
||||||
|
|
||||||
for (int a = 0; a < NumGenerators; a++)
|
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++) base(a, eij[a]);
|
||||||
|
|
||||||
for (int a = 0; a < Dimension; a++) {
|
for (int a = 0; a < Dimension; a++) {
|
||||||
tmp = transpose(ta[Index]) * adj(eij[a]) + adj(eij[a]) * ta[Index];
|
tmp = transpose(ta[Index]) * adj(eij[a]) + adj(eij[a]) * ta[Index];
|
||||||
for (int b = 0; b < Dimension; b++) {
|
for (int b = 0; b < Dimension; b++) {
|
||||||
typename Sp<nsp>::template iSp2nMatrix<cplx> tmp1 =
|
typename Sp<ncolour>::template iSp2nMatrix<cplx> tmp1 =
|
||||||
tmp * eij[b];
|
tmp * eij[b];
|
||||||
Complex iTr = TensorRemove(timesI(trace(tmp1)));
|
Complex iTr = TensorRemove(timesI(trace(tmp1)));
|
||||||
i2indTa()()(a, b) = iTr;
|
i2indTa()()(a, b) = iTr;
|
||||||
@ -245,7 +245,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void TwoIndexLieAlgebraMatrix(
|
static void TwoIndexLieAlgebraMatrix(
|
||||||
const typename Sp<nsp>::LatticeAlgebraVector &h,
|
const typename Sp<ncolour>::LatticeAlgebraVector &h,
|
||||||
LatticeTwoIndexMatrix &out, Real scale = 1.0) {
|
LatticeTwoIndexMatrix &out, Real scale = 1.0) {
|
||||||
conformable(h, out);
|
conformable(h, out);
|
||||||
GridBase *grid = out.Grid();
|
GridBase *grid = out.Grid();
|
||||||
@ -264,7 +264,7 @@ public:
|
|||||||
// Projects the algebra components
|
// Projects the algebra components
|
||||||
// of a lattice matrix ( of dimension ncol*ncol -1 )
|
// of a lattice matrix ( of dimension ncol*ncol -1 )
|
||||||
static void projectOnAlgebra(
|
static void projectOnAlgebra(
|
||||||
typename Sp<nsp>::LatticeAlgebraVector &h_out,
|
typename Sp<ncolour>::LatticeAlgebraVector &h_out,
|
||||||
const LatticeTwoIndexMatrix &in, Real scale = 1.0) {
|
const LatticeTwoIndexMatrix &in, Real scale = 1.0) {
|
||||||
conformable(h_out, in);
|
conformable(h_out, in);
|
||||||
h_out = Zero();
|
h_out = Zero();
|
||||||
@ -280,7 +280,7 @@ public:
|
|||||||
|
|
||||||
// a projector that keeps the generators stored to avoid the overhead of
|
// a projector that keeps the generators stored to avoid the overhead of
|
||||||
// recomputing them
|
// 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) {
|
const LatticeTwoIndexMatrix &in, Real scale = 1.0) {
|
||||||
conformable(h_out, in);
|
conformable(h_out, in);
|
||||||
// to store the generators
|
// to store the generators
|
||||||
|
@ -22,7 +22,7 @@ int main(int argc, char **argv) {
|
|||||||
CheckpointerParameters CPparams;
|
CheckpointerParameters CPparams;
|
||||||
CPparams.config_prefix = "ckpoint_lat";
|
CPparams.config_prefix = "ckpoint_lat";
|
||||||
CPparams.rng_prefix = "ckpoint_rng";
|
CPparams.rng_prefix = "ckpoint_rng";
|
||||||
CPparams.saveInterval = 5;
|
CPparams.saveInterval = 100;
|
||||||
CPparams.format = "IEEE64BIG";
|
CPparams.format = "IEEE64BIG";
|
||||||
|
|
||||||
TheHMC.Resources.LoadNerscCheckpointer(CPparams);
|
TheHMC.Resources.LoadNerscCheckpointer(CPparams);
|
||||||
@ -46,7 +46,7 @@ int main(int argc, char **argv) {
|
|||||||
SpTwoIndexAntiSymmetricRepresentation::LatticeField U(GridPtr);
|
SpTwoIndexAntiSymmetricRepresentation::LatticeField U(GridPtr);
|
||||||
//LatticeGaugeField U(GridPtr);
|
//LatticeGaugeField U(GridPtr);
|
||||||
|
|
||||||
RealD mass = -0.85;
|
RealD mass = -0.115;
|
||||||
|
|
||||||
|
|
||||||
std::vector<Complex> boundary = {-1,-1,-1,-1};
|
std::vector<Complex> boundary = {-1,-1,-1,-1};
|
||||||
|
@ -22,7 +22,7 @@ int main(int argc, char **argv) {
|
|||||||
CheckpointerParameters CPparams;
|
CheckpointerParameters CPparams;
|
||||||
CPparams.config_prefix = "ckpoint_lat";
|
CPparams.config_prefix = "ckpoint_lat";
|
||||||
CPparams.rng_prefix = "ckpoint_rng";
|
CPparams.rng_prefix = "ckpoint_rng";
|
||||||
CPparams.saveInterval = 5;
|
CPparams.saveInterval = 100;
|
||||||
CPparams.format = "IEEE64BIG";
|
CPparams.format = "IEEE64BIG";
|
||||||
|
|
||||||
TheHMC.Resources.LoadNerscCheckpointer(CPparams);
|
TheHMC.Resources.LoadNerscCheckpointer(CPparams);
|
||||||
@ -36,7 +36,7 @@ int main(int argc, char **argv) {
|
|||||||
typedef PlaquetteMod<HMCWrapper::ImplPolicy> PlaqObs;
|
typedef PlaquetteMod<HMCWrapper::ImplPolicy> PlaqObs;
|
||||||
TheHMC.Resources.AddObservable<PlaqObs>();
|
TheHMC.Resources.AddObservable<PlaqObs>();
|
||||||
|
|
||||||
RealD beta = 2.25 ;
|
RealD beta = 7.2 ;
|
||||||
|
|
||||||
SymplWilsonGaugeActionR Waction(beta);
|
SymplWilsonGaugeActionR Waction(beta);
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ int main(int argc, char **argv) {
|
|||||||
SpFundamentalRepresentation::LatticeField U(GridPtr);
|
SpFundamentalRepresentation::LatticeField U(GridPtr);
|
||||||
//LatticeGaugeField U(GridPtr);
|
//LatticeGaugeField U(GridPtr);
|
||||||
|
|
||||||
RealD mass = -0.95;
|
RealD mass = -0.76;
|
||||||
|
|
||||||
FermionAction FermOp(U, *GridPtr, *GridRBPtr, mass);
|
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(Level1);
|
||||||
TheHMC.TheAction.push_back(Level2);
|
TheHMC.TheAction.push_back(Level2);
|
||||||
|
|
||||||
TheHMC.Parameters.MD.MDsteps = 20;
|
TheHMC.Parameters.MD.MDsteps = 36;
|
||||||
TheHMC.Parameters.MD.trajL = 1.0;
|
TheHMC.Parameters.MD.trajL = 1.0;
|
||||||
|
|
||||||
TheHMC.ReadCommandLine(argc, argv);
|
TheHMC.ReadCommandLine(argc, argv);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user