mirror of
https://github.com/paboyle/Grid.git
synced 2026-04-29 15:06:00 +01:00
New automatic implementation of gamma matrices, Meson and SeqGamma are broken
This commit is contained in:
@@ -149,11 +149,11 @@ void WilsonFermion<Impl>::MeooeDag(const FermionField &in, FermionField &out) {
|
||||
|
||||
typedef Lattice<iSinglet<vector_type> > LatComplex;
|
||||
|
||||
Gamma::GammaMatrix Gmu [] = {
|
||||
Gamma::GammaX,
|
||||
Gamma::GammaY,
|
||||
Gamma::GammaZ,
|
||||
Gamma::GammaT
|
||||
Gamma::Algebra Gmu [] = {
|
||||
Gamma::Algebra::GammaX,
|
||||
Gamma::Algebra::GammaY,
|
||||
Gamma::Algebra::GammaZ,
|
||||
Gamma::Algebra::GammaT
|
||||
};
|
||||
|
||||
std::vector<int> latt_size = _grid->_fdimensions;
|
||||
|
||||
@@ -503,11 +503,11 @@ void WilsonFermion5D<Impl>::MomentumSpacePropagatorHt(FermionField &out,const Fe
|
||||
typedef iSinglet<ScalComplex> Tcomplex;
|
||||
typedef Lattice<iSinglet<vector_type> > LatComplex;
|
||||
|
||||
Gamma::GammaMatrix Gmu [] = {
|
||||
Gamma::GammaX,
|
||||
Gamma::GammaY,
|
||||
Gamma::GammaZ,
|
||||
Gamma::GammaT
|
||||
Gamma::Algebra Gmu [] = {
|
||||
Gamma::Algebra::GammaX,
|
||||
Gamma::Algebra::GammaY,
|
||||
Gamma::Algebra::GammaZ,
|
||||
Gamma::Algebra::GammaT
|
||||
};
|
||||
|
||||
std::vector<int> latt_size = _grid->_fdimensions;
|
||||
@@ -574,11 +574,11 @@ void WilsonFermion5D<Impl>::MomentumSpacePropagatorHt(FermionField &out,const Fe
|
||||
template<class Impl>
|
||||
void WilsonFermion5D<Impl>::MomentumSpacePropagatorHw(FermionField &out,const FermionField &in,RealD mass)
|
||||
{
|
||||
Gamma::GammaMatrix Gmu [] = {
|
||||
Gamma::GammaX,
|
||||
Gamma::GammaY,
|
||||
Gamma::GammaZ,
|
||||
Gamma::GammaT
|
||||
Gamma::Algebra Gmu [] = {
|
||||
Gamma::Algebra::GammaX,
|
||||
Gamma::Algebra::GammaY,
|
||||
Gamma::Algebra::GammaZ,
|
||||
Gamma::Algebra::GammaT
|
||||
};
|
||||
|
||||
GridBase *_grid = _FourDimGrid;
|
||||
|
||||
@@ -80,7 +80,7 @@ class Gamma5HermitianLinearOperator : public LinearOperatorBase<Field> {
|
||||
Matrix &_Mat;
|
||||
Gamma g5;
|
||||
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){
|
||||
HermOp(in,out);
|
||||
}
|
||||
|
||||
+36
-89
@@ -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>
|
||||
|
||||
namespace Grid {
|
||||
namespace QCD {
|
||||
|
||||
namespace QCD {
|
||||
#include "GammaMulTable.h"
|
||||
|
||||
Gamma::GammaMatrix Gamma::GammaMatrices [] = {
|
||||
Gamma::Identity,
|
||||
Gamma::GammaX,
|
||||
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 ",
|
||||
" "
|
||||
};
|
||||
|
||||
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;
|
||||
}
|
||||
const std::array<const char *, Gamma::nGamma> Gamma::name = {{
|
||||
"-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 "}};
|
||||
|
||||
// void sprojMul( vHalfSpinColourVector &out,vColourMatrix &u, vSpinColourVector &in){
|
||||
// vHalfSpinColourVector hspin;
|
||||
// spProjXp(hspin,in);
|
||||
// mult(&out,&u,&hspin);
|
||||
// }
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
||||
+1394
-609
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -47,7 +47,7 @@ void axpibg5x(Lattice<vobj> &z,const Lattice<vobj> &x,Coeff a,Coeff b)
|
||||
|
||||
GridBase *grid=x._grid;
|
||||
|
||||
Gamma G5(Gamma::Gamma5);
|
||||
Gamma G5(Gamma::Algebra::Gamma5);
|
||||
PARALLEL_FOR_LOOP
|
||||
for(int ss=0;ss<grid->oSites();ss++){
|
||||
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);
|
||||
GridBase *grid=x._grid;
|
||||
int Ls = grid->_rdimensions[0];
|
||||
Gamma G5(Gamma::Gamma5);
|
||||
Gamma G5(Gamma::Algebra::Gamma5);
|
||||
PARALLEL_FOR_LOOP
|
||||
for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
|
||||
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);
|
||||
GridBase *grid=x._grid;
|
||||
int Ls = grid->_rdimensions[0];
|
||||
Gamma G5(Gamma::Gamma5);
|
||||
Gamma G5(Gamma::Algebra::Gamma5);
|
||||
PARALLEL_FOR_LOOP
|
||||
for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
|
||||
vobj tmp;
|
||||
@@ -116,7 +116,7 @@ void ag5xpbg5y_ssp(Lattice<vobj> &z,Coeff a,const Lattice<vobj> &x,Coeff b,const
|
||||
conformable(x,z);
|
||||
GridBase *grid=x._grid;
|
||||
int Ls = grid->_rdimensions[0];
|
||||
Gamma G5(Gamma::Gamma5);
|
||||
Gamma G5(Gamma::Algebra::Gamma5);
|
||||
PARALLEL_FOR_LOOP
|
||||
for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
|
||||
vobj tmp1;
|
||||
@@ -168,7 +168,7 @@ void G5R5(Lattice<vobj> &z,const Lattice<vobj> &x)
|
||||
z.checkerboard = x.checkerboard;
|
||||
conformable(x,z);
|
||||
int Ls = grid->_rdimensions[0];
|
||||
Gamma G5(Gamma::Gamma5);
|
||||
Gamma G5(Gamma::Algebra::Gamma5);
|
||||
PARALLEL_FOR_LOOP
|
||||
for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
|
||||
vobj tmp;
|
||||
|
||||
Reference in New Issue
Block a user