1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-14 01:35:36 +00:00

New automatic implementation of gamma matrices, Meson and SeqGamma are broken

This commit is contained in:
Antonin Portelli 2017-01-23 19:13:43 -08:00
parent d6401e6d2c
commit a37e71f362
41 changed files with 4129 additions and 882 deletions

View File

@ -37,11 +37,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
typedef WilsonFermion5D<DomainWallVec5dImplR> WilsonFermion5DR; typedef WilsonFermion5D<DomainWallVec5dImplR> WilsonFermion5DR;
@ -321,7 +321,7 @@ int main (int argc, char ** argv)
ref = zero; ref = zero;
for(int mu=0;mu<Nd;mu++){ for(int mu=0;mu<Nd;mu++){
// ref = src - Gamma(Gamma::GammaX)* src ; // 1+gamma_x // ref = src - Gamma(Gamma::Algebra::GammaX)* src ; // 1+gamma_x
tmp = U[mu]*Cshift(src,mu+1,1); tmp = U[mu]*Cshift(src,mu+1,1);
for(int i=0;i<ref._odata.size();i++){ for(int i=0;i<ref._odata.size();i++){
ref._odata[i]+= tmp._odata[i] + Gamma(Gmu[mu])*tmp._odata[i]; ; ref._odata[i]+= tmp._odata[i] + Gamma(Gmu[mu])*tmp._odata[i]; ;

View File

@ -37,11 +37,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
void benchDw(std::vector<int> & L, int Ls, int threads, int report =0 ); void benchDw(std::vector<int> & L, int Ls, int threads, int report =0 );

View File

@ -37,11 +37,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
bool overlapComms = false; bool overlapComms = false;
@ -106,7 +106,7 @@ int main (int argc, char ** argv)
{ // Naive wilson implementation { // Naive wilson implementation
ref = zero; ref = zero;
for(int mu=0;mu<Nd;mu++){ for(int mu=0;mu<Nd;mu++){
// ref = src + Gamma(Gamma::GammaX)* src ; // 1-gamma_x // ref = src + Gamma(Gamma::Algebra::GammaX)* src ; // 1-gamma_x
tmp = U[mu]*Cshift(src,mu,1); tmp = U[mu]*Cshift(src,mu,1);
for(int i=0;i<ref._odata.size();i++){ for(int i=0;i<ref._odata.size();i++){
ref._odata[i]+= tmp._odata[i] - Gamma(Gmu[mu])*tmp._odata[i]; ; ref._odata[i]+= tmp._odata[i] - Gamma(Gmu[mu])*tmp._odata[i]; ;
@ -159,7 +159,7 @@ int main (int argc, char ** argv)
ref = zero; ref = zero;
for(int mu=0;mu<Nd;mu++){ for(int mu=0;mu<Nd;mu++){
// ref = src - Gamma(Gamma::GammaX)* src ; // 1+gamma_x // ref = src - Gamma(Gamma::Algebra::GammaX)* src ; // 1+gamma_x
tmp = U[mu]*Cshift(src,mu,1); tmp = U[mu]*Cshift(src,mu,1);
for(int i=0;i<ref._odata.size();i++){ for(int i=0;i<ref._odata.size();i++){
ref._odata[i]+= tmp._odata[i] + Gamma(Gmu[mu])*tmp._odata[i]; ; ref._odata[i]+= tmp._odata[i] + Gamma(Gmu[mu])*tmp._odata[i]; ;

View File

@ -30,11 +30,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
bool overlapComms = false; bool overlapComms = false;

View File

@ -118,11 +118,11 @@ void TMeson<FImpl1, FImpl2>::execute(void)
std::vector<TComplex> buf; std::vector<TComplex> buf;
Result result; Result result;
g5 = makeGammaProd(Ns*Ns - 1); //g5 = makeGammaProd(Ns*Ns - 1);
result.corr.resize(Ns*Ns); result.corr.resize(Ns*Ns);
for (unsigned int i = 0; i < Ns*Ns; ++i) for (unsigned int i = 0; i < Ns*Ns; ++i)
{ {
g[i] = makeGammaProd(i); //g[i] = makeGammaProd(i);
} }
for (unsigned int iSink = 0; iSink < Ns*Ns; ++iSink) for (unsigned int iSink = 0; iSink < Ns*Ns; ++iSink)
{ {

View File

@ -144,7 +144,7 @@ void TSeqGamma<FImpl>::execute(void)
std::vector<Real> p; std::vector<Real> p;
Complex i(0.0,1.0); Complex i(0.0,1.0);
g = makeGammaProd(par().gamma); //g = makeGammaProd(par().gamma);
p = strToVec<Real>(par().mom); p = strToVec<Real>(par().mom);
ph = zero; ph = zero;
for(unsigned int mu = 0; mu < env().getNd(); mu++) for(unsigned int mu = 0; mu < env().getNd(); mu++)

View File

@ -149,11 +149,11 @@ void WilsonFermion<Impl>::MeooeDag(const FermionField &in, FermionField &out) {
typedef Lattice<iSinglet<vector_type> > LatComplex; typedef Lattice<iSinglet<vector_type> > LatComplex;
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
std::vector<int> latt_size = _grid->_fdimensions; std::vector<int> latt_size = _grid->_fdimensions;

View File

@ -503,11 +503,11 @@ void WilsonFermion5D<Impl>::MomentumSpacePropagatorHt(FermionField &out,const Fe
typedef iSinglet<ScalComplex> Tcomplex; typedef iSinglet<ScalComplex> Tcomplex;
typedef Lattice<iSinglet<vector_type> > LatComplex; typedef Lattice<iSinglet<vector_type> > LatComplex;
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
std::vector<int> latt_size = _grid->_fdimensions; std::vector<int> latt_size = _grid->_fdimensions;
@ -574,11 +574,11 @@ void WilsonFermion5D<Impl>::MomentumSpacePropagatorHt(FermionField &out,const Fe
template<class Impl> template<class Impl>
void WilsonFermion5D<Impl>::MomentumSpacePropagatorHw(FermionField &out,const FermionField &in,RealD mass) void WilsonFermion5D<Impl>::MomentumSpacePropagatorHw(FermionField &out,const FermionField &in,RealD mass)
{ {
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
GridBase *_grid = _FourDimGrid; GridBase *_grid = _FourDimGrid;

View File

@ -80,7 +80,7 @@ class Gamma5HermitianLinearOperator : public LinearOperatorBase<Field> {
Matrix &_Mat; Matrix &_Mat;
Gamma g5; Gamma g5;
public: public:
Gamma5HermitianLinearOperator(Matrix &Mat): _Mat(Mat), g5(Gamma::Gamma5) {}; Gamma5HermitianLinearOperator(Matrix &Mat): _Mat(Mat), g5(Gamma::Algebra::Gamma5) {};
void Op (const Field &in, Field &out){ void Op (const Field &in, Field &out){
HermOp(in,out); HermOp(in,out);
} }

View File

@ -1,95 +1,42 @@
/*************************************************************************************
Grid physics library, www.github.com/paboyle/Grid
Source file: ./lib/qcd/spin/Dirac.cc
Copyright (C) 2015
Author: Peter Boyle <paboyle@ph.ed.ac.uk>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
See the full license in the file "LICENSE" in the top level distribution directory
*************************************************************************************/
/* END LEGAL */
#include <Grid.h> #include <Grid.h>
namespace Grid { namespace Grid {
namespace QCD { namespace QCD {
Gamma::GammaMatrix Gamma::GammaMatrices [] = { #include "GammaMulTable.h"
Gamma::Identity,
Gamma::GammaX, const std::array<const char *, Gamma::nGamma> Gamma::name = {{
Gamma::GammaY,
Gamma::GammaZ,
Gamma::GammaT,
Gamma::Gamma5,
Gamma::MinusIdentity,
Gamma::MinusGammaX,
Gamma::MinusGammaY,
Gamma::MinusGammaZ,
Gamma::MinusGammaT,
Gamma::MinusGamma5
};
const char *Gamma::GammaMatrixNames[] = {
"Identity ",
"GammaX ",
"GammaY ",
"GammaZ ",
"GammaT ",
"Gamma5 ",
"-Identity",
"-GammaX ",
"-GammaY ",
"-GammaZ ",
"-GammaT ",
"-Gamma5 ", "-Gamma5 ",
" " "Gamma5 ",
}; "-GammaT ",
"GammaT ",
"-GammaTGamma5",
"GammaTGamma5 ",
"-GammaX ",
"GammaX ",
"-GammaXGamma5",
"GammaXGamma5 ",
"-GammaY ",
"GammaY ",
"-GammaYGamma5",
"GammaYGamma5 ",
"-GammaZ ",
"GammaZ ",
"-GammaZGamma5",
"GammaZGamma5 ",
"-Identity ",
"Identity ",
"-SigmaXT ",
"SigmaXT ",
"-SigmaXY ",
"SigmaXY ",
"-SigmaXZ ",
"SigmaXZ ",
"-SigmaYT ",
"SigmaYT ",
"-SigmaYZ ",
"SigmaYZ ",
"-SigmaZT ",
"SigmaZT "}};
SpinMatrix makeGammaProd(const unsigned int i) }}
{
SpinMatrix g;
g = 1.;
if (i & 0x1)
{
g = g*Gamma(Gamma::GammaMatrix::GammaX);
}
if (i & 0x2)
{
g = g*Gamma(Gamma::GammaMatrix::GammaY);
}
if (i & 0x4)
{
g = g*Gamma(Gamma::GammaMatrix::GammaZ);
}
if (i & 0x8)
{
g = g*Gamma(Gamma::GammaMatrix::GammaT);
}
return g;
}
// void sprojMul( vHalfSpinColourVector &out,vColourMatrix &u, vSpinColourVector &in){
// vHalfSpinColourVector hspin;
// spProjXp(hspin,in);
// mult(&out,&u,&hspin);
// }
}
}

File diff suppressed because it is too large Load Diff

1058
lib/qcd/spin/GammaMulTable.h Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -47,7 +47,7 @@ void axpibg5x(Lattice<vobj> &z,const Lattice<vobj> &x,Coeff a,Coeff b)
GridBase *grid=x._grid; GridBase *grid=x._grid;
Gamma G5(Gamma::Gamma5); Gamma G5(Gamma::Algebra::Gamma5);
PARALLEL_FOR_LOOP PARALLEL_FOR_LOOP
for(int ss=0;ss<grid->oSites();ss++){ for(int ss=0;ss<grid->oSites();ss++){
vobj tmp; vobj tmp;
@ -80,7 +80,7 @@ void ag5xpby_ssp(Lattice<vobj> &z,Coeff a,const Lattice<vobj> &x,Coeff b,const L
conformable(x,z); conformable(x,z);
GridBase *grid=x._grid; GridBase *grid=x._grid;
int Ls = grid->_rdimensions[0]; int Ls = grid->_rdimensions[0];
Gamma G5(Gamma::Gamma5); Gamma G5(Gamma::Algebra::Gamma5);
PARALLEL_FOR_LOOP PARALLEL_FOR_LOOP
for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
vobj tmp; vobj tmp;
@ -98,7 +98,7 @@ void axpbg5y_ssp(Lattice<vobj> &z,Coeff a,const Lattice<vobj> &x,Coeff b,const L
conformable(x,z); conformable(x,z);
GridBase *grid=x._grid; GridBase *grid=x._grid;
int Ls = grid->_rdimensions[0]; int Ls = grid->_rdimensions[0];
Gamma G5(Gamma::Gamma5); Gamma G5(Gamma::Algebra::Gamma5);
PARALLEL_FOR_LOOP PARALLEL_FOR_LOOP
for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
vobj tmp; vobj tmp;
@ -116,7 +116,7 @@ void ag5xpbg5y_ssp(Lattice<vobj> &z,Coeff a,const Lattice<vobj> &x,Coeff b,const
conformable(x,z); conformable(x,z);
GridBase *grid=x._grid; GridBase *grid=x._grid;
int Ls = grid->_rdimensions[0]; int Ls = grid->_rdimensions[0];
Gamma G5(Gamma::Gamma5); Gamma G5(Gamma::Algebra::Gamma5);
PARALLEL_FOR_LOOP PARALLEL_FOR_LOOP
for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
vobj tmp1; vobj tmp1;
@ -168,7 +168,7 @@ void G5R5(Lattice<vobj> &z,const Lattice<vobj> &x)
z.checkerboard = x.checkerboard; z.checkerboard = x.checkerboard;
conformable(x,z); conformable(x,z);
int Ls = grid->_rdimensions[0]; int Ls = grid->_rdimensions[0];
Gamma G5(Gamma::Gamma5); Gamma G5(Gamma::Algebra::Gamma5);
PARALLEL_FOR_LOOP PARALLEL_FOR_LOOP
for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
vobj tmp; vobj tmp;

View File

@ -4,9 +4,9 @@ home=`pwd`
# library Make.inc # library Make.inc
cd $home/lib cd $home/lib
HFILES=`find . -type f -name '*.h' -not -path '*/Old/*' -not -path '*/Eigen/*'` HFILES=`find . -type f -name '*.h' -not -path '*/gamma-gen/*' -not -path '*/Old/*' -not -path '*/Eigen/*'`
HFILES="$HFILES" HFILES="$HFILES"
CCFILES=`find . -type f -name '*.cc' -not -name '*ommunicator*.cc'` CCFILES=`find . -type f -name '*.cc' -not -path '*/gamma-gen/*' -not -name '*ommunicator*.cc'`
echo HFILES=$HFILES > Make.inc echo HFILES=$HFILES > Make.inc
echo >> Make.inc echo >> Make.inc
echo CCFILES=$CCFILES >> Make.inc echo CCFILES=$CCFILES >> Make.inc

View File

@ -36,11 +36,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
typedef DomainWallFermion<DomainWallVec5dImplR> DomainWallVecFermionR; typedef DomainWallFermion<DomainWallVec5dImplR> DomainWallVecFermionR;
@ -339,7 +339,7 @@ void TestMoo(This & Dw, That &sDw)
LatticeFermion ndiff(ngrid); LatticeFermion ndiff(ngrid);
LatticeFermion sdiff(sgrid); LatticeFermion sdiff(sgrid);
Gamma g5( Gamma::Gamma5 ); Gamma g5( Gamma::Algebra::Gamma5 );
std::vector<int> seeds({1,2,3,4,5,7,8}); std::vector<int> seeds({1,2,3,4,5,7,8});
GridParallelRNG RNG5(ngrid); GridParallelRNG RNG5(ngrid);

View File

@ -36,11 +36,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
int main (int argc, char ** argv) int main (int argc, char ** argv)

View File

@ -36,11 +36,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
int main (int argc, char ** argv) int main (int argc, char ** argv)

View File

@ -37,11 +37,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
int toint(const char* str){ int toint(const char* str){

View File

@ -36,11 +36,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };

View File

@ -37,11 +37,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };

View File

@ -37,11 +37,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
typedef WilsonFermion5D<DomainWallVec5dImplR> WilsonFermion5DR; typedef WilsonFermion5D<DomainWallVec5dImplR> WilsonFermion5DR;

View File

@ -177,7 +177,7 @@ int main (int argc, char ** argv)
const int sdir=0; const int sdir=0;
RealD mass=0.01; RealD mass=0.01;
RealD M5 =1.0; RealD M5 =1.0;
Gamma G5(Gamma::Gamma5); Gamma G5(Gamma::Algebra::Gamma5);
GridCartesian * FGrid = SpaceTimeGrid::makeFiveDimGrid(Ls,&GRID); GridCartesian * FGrid = SpaceTimeGrid::makeFiveDimGrid(Ls,&GRID);
GridRedBlackCartesian * FrbGrid = SpaceTimeGrid::makeFiveDimRedBlackGrid(Ls,&GRID); GridRedBlackCartesian * FrbGrid = SpaceTimeGrid::makeFiveDimRedBlackGrid(Ls,&GRID);
@ -218,12 +218,12 @@ int main (int argc, char ** argv)
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// work out the predicted from Fourier // work out the predicted from Fourier
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT, Gamma::Algebra::GammaT,
Gamma::Gamma5 Gamma::Algebra::Gamma5
}; };
LatticeFermionD Kinetic(FGrid); Kinetic = zero; LatticeFermionD Kinetic(FGrid); Kinetic = zero;
LatticeComplexD kmu(FGrid); LatticeComplexD kmu(FGrid);
@ -311,7 +311,7 @@ int main (int argc, char ** argv)
std::cout << " Solving by FFT and Feynman rules" <<std::endl; std::cout << " Solving by FFT and Feynman rules" <<std::endl;
Ddwf.FreePropagator(src,ref,mass) ; Ddwf.FreePropagator(src,ref,mass) ;
Gamma G5(Gamma::Gamma5); Gamma G5(Gamma::Algebra::Gamma5);
LatticeFermionD src5(FGrid); src5=zero; LatticeFermionD src5(FGrid); src5=zero;
LatticeFermionD tmp5(FGrid); LatticeFermionD tmp5(FGrid);
@ -391,7 +391,7 @@ int main (int argc, char ** argv)
std::cout << " Solving by FFT and Feynman rules" <<std::endl; std::cout << " Solving by FFT and Feynman rules" <<std::endl;
Dov.FreePropagator(src,ref,mass) ; Dov.FreePropagator(src,ref,mass) ;
Gamma G5(Gamma::Gamma5); Gamma G5(Gamma::Algebra::Gamma5);
LatticeFermionD src5(FGrid); src5=zero; LatticeFermionD src5(FGrid); src5=zero;
LatticeFermionD tmp5(FGrid); LatticeFermionD tmp5(FGrid);

View File

@ -81,7 +81,7 @@ int main (int argc, char ** argv)
ident()(a,a) = ComplexF(1.0); ident()(a,a) = ComplexF(1.0);
} }
const Gamma::GammaMatrix *g = Gamma::GammaMatrices; const Gamma::Algebra *g = Gamma::GammaMatrices;
const char **list = Gamma::GammaMatrixNames; const char **list = Gamma::GammaMatrixNames;
result =ll*Gamma(g[0])*rr; result =ll*Gamma(g[0])*rr;
@ -152,70 +152,70 @@ int main (int argc, char ** argv)
double mag; double mag;
spProjXp(hsm,rv); spProjXp(hsm,rv);
spReconXp(recon,hsm); spReconXp(recon,hsm);
full = rv + Gamma(Gamma::GammaX) *rv; full = rv + Gamma(Gamma::Algebra::GammaX) *rv;
mag = TensorRemove(norm2(full-recon)); mag = TensorRemove(norm2(full-recon));
std::cout << "Xp "<< mag<<std::endl; std::cout << "Xp "<< mag<<std::endl;
// Xm // Xm
spProjXm(hsm,rv); spProjXm(hsm,rv);
spReconXm(recon,hsm); spReconXm(recon,hsm);
full = rv - Gamma(Gamma::GammaX) *rv; full = rv - Gamma(Gamma::Algebra::GammaX) *rv;
mag = TensorRemove(norm2(full-recon)); mag = TensorRemove(norm2(full-recon));
std::cout << "Xm "<< mag<<std::endl; std::cout << "Xm "<< mag<<std::endl;
// Yp // Yp
spProjYp(hsm,rv); spProjYp(hsm,rv);
spReconYp(recon,hsm); spReconYp(recon,hsm);
full = rv + Gamma(Gamma::GammaY) *rv; full = rv + Gamma(Gamma::Algebra::GammaY) *rv;
mag = TensorRemove(norm2(full-recon)); mag = TensorRemove(norm2(full-recon));
std::cout << "Yp "<< mag<<std::endl; std::cout << "Yp "<< mag<<std::endl;
// Ym // Ym
spProjYm(hsm,rv); spProjYm(hsm,rv);
spReconYm(recon,hsm); spReconYm(recon,hsm);
full = rv - Gamma(Gamma::GammaY) *rv; full = rv - Gamma(Gamma::Algebra::GammaY) *rv;
mag = TensorRemove(norm2(full-recon)); mag = TensorRemove(norm2(full-recon));
std::cout << "Ym "<< mag<<std::endl; std::cout << "Ym "<< mag<<std::endl;
// Zp // Zp
spProjZp(hsm,rv); spProjZp(hsm,rv);
spReconZp(recon,hsm); spReconZp(recon,hsm);
full = rv + Gamma(Gamma::GammaZ) *rv; full = rv + Gamma(Gamma::Algebra::GammaZ) *rv;
mag = TensorRemove(norm2(full-recon)); mag = TensorRemove(norm2(full-recon));
std::cout << "Zp "<< mag<<std::endl; std::cout << "Zp "<< mag<<std::endl;
// Zm // Zm
spProjZm(hsm,rv); spProjZm(hsm,rv);
spReconZm(recon,hsm); spReconZm(recon,hsm);
full = rv - Gamma(Gamma::GammaZ) *rv; full = rv - Gamma(Gamma::Algebra::GammaZ) *rv;
mag = TensorRemove(norm2(full-recon)); mag = TensorRemove(norm2(full-recon));
std::cout << "Zm "<< mag<<std::endl; std::cout << "Zm "<< mag<<std::endl;
// Tp // Tp
spProjTp(hsm,rv); spProjTp(hsm,rv);
spReconTp(recon,hsm); spReconTp(recon,hsm);
full = rv + Gamma(Gamma::GammaT) *rv; full = rv + Gamma(Gamma::Algebra::GammaT) *rv;
mag = TensorRemove(norm2(full-recon)); mag = TensorRemove(norm2(full-recon));
std::cout << "Tp "<< mag<<std::endl; std::cout << "Tp "<< mag<<std::endl;
// Tm // Tm
spProjTm(hsm,rv); spProjTm(hsm,rv);
spReconTm(recon,hsm); spReconTm(recon,hsm);
full = rv - Gamma(Gamma::GammaT) *rv; full = rv - Gamma(Gamma::Algebra::GammaT) *rv;
mag = TensorRemove(norm2(full-recon)); mag = TensorRemove(norm2(full-recon));
std::cout << "Tm "<< mag<<std::endl; std::cout << "Tm "<< mag<<std::endl;
// 5p // 5p
spProj5p(hsm,rv); spProj5p(hsm,rv);
spRecon5p(recon,hsm); spRecon5p(recon,hsm);
full = rv + Gamma(Gamma::Gamma5) *rv; full = rv + Gamma(Gamma::Algebra::Gamma5) *rv;
mag = TensorRemove(norm2(full-recon)); mag = TensorRemove(norm2(full-recon));
std::cout << "5p "<< mag<<std::endl; std::cout << "5p "<< mag<<std::endl;
// 5m // 5m
spProj5m(hsm,rv); spProj5m(hsm,rv);
spRecon5m(recon,hsm); spRecon5m(recon,hsm);
full = rv - Gamma(Gamma::Gamma5) *rv; full = rv - Gamma(Gamma::Algebra::Gamma5) *rv;
mag = TensorRemove(norm2(full-recon)); mag = TensorRemove(norm2(full-recon));
std::cout << "5m "<< mag<<std::endl; std::cout << "5m "<< mag<<std::endl;

View File

@ -37,11 +37,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
int main (int argc, char ** argv) int main (int argc, char ** argv)

View File

@ -36,11 +36,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
int main (int argc, char ** argv) int main (int argc, char ** argv)

View File

@ -37,11 +37,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
template<class What> template<class What>

View File

@ -38,11 +38,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
int main (int argc, char ** argv) int main (int argc, char ** argv)

View File

@ -36,11 +36,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };

View File

@ -36,11 +36,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
int main (int argc, char ** argv) int main (int argc, char ** argv)

View File

@ -36,11 +36,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };

View File

@ -37,8 +37,8 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu[] = {Gamma::GammaX, Gamma::GammaY, Gamma::GammaZ, Gamma::Algebra Gmu[] = {Gamma::Algebra::GammaX, Gamma::Algebra::GammaY, Gamma::Algebra::GammaZ,
Gamma::GammaT}; Gamma::Algebra::GammaT};
int main(int argc, char** argv) { int main(int argc, char** argv) {
Grid_init(&argc, &argv); Grid_init(&argc, &argv);

View File

@ -36,11 +36,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
int main (int argc, char ** argv) int main (int argc, char ** argv)

View File

@ -36,11 +36,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
int main (int argc, char ** argv) int main (int argc, char ** argv)

View File

@ -37,11 +37,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
int main (int argc, char ** argv) int main (int argc, char ** argv)

View File

@ -38,11 +38,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
int main (int argc, char ** argv) int main (int argc, char ** argv)

View File

@ -504,7 +504,7 @@ int main (int argc, char ** argv)
GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds4); GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds4);
GridParallelRNG CRNG(Coarse5d);CRNG.SeedFixedIntegers(cseeds); GridParallelRNG CRNG(Coarse5d);CRNG.SeedFixedIntegers(cseeds);
Gamma g5(Gamma::Gamma5); Gamma g5(Gamma::Algebra::Gamma5);
LatticeFermion src(FGrid); gaussian(RNG5,src);// src=src+g5*src; LatticeFermion src(FGrid); gaussian(RNG5,src);// src=src+g5*src;
LatticeFermion result(FGrid); result=zero; LatticeFermion result(FGrid); result=zero;

View File

@ -36,11 +36,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
int main (int argc, char ** argv) int main (int argc, char ** argv)

View File

@ -36,11 +36,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
int main (int argc, char ** argv) int main (int argc, char ** argv)

View File

@ -37,11 +37,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
int main (int argc, char ** argv) int main (int argc, char ** argv)

View File

@ -36,11 +36,11 @@ struct scal {
d internal; d internal;
}; };
Gamma::GammaMatrix Gmu [] = { Gamma::Algebra Gmu [] = {
Gamma::GammaX, Gamma::Algebra::GammaX,
Gamma::GammaY, Gamma::Algebra::GammaY,
Gamma::GammaZ, Gamma::Algebra::GammaZ,
Gamma::GammaT Gamma::Algebra::GammaT
}; };
int main (int argc, char ** argv) int main (int argc, char ** argv)