2015-04-26 15:51:09 +01:00
|
|
|
#ifndef GRID_QCD_WILSON_DOP_H
|
2015-04-25 14:33:02 +01:00
|
|
|
#define GRID_QCD_WILSON_DOP_H
|
|
|
|
|
|
|
|
#include <Grid.h>
|
|
|
|
|
|
|
|
namespace Grid {
|
|
|
|
|
|
|
|
namespace QCD {
|
|
|
|
|
|
|
|
|
|
|
|
template<class vtype> class LinearOperatorBase {
|
|
|
|
public:
|
|
|
|
void multiply(const Lattice<vtype> &in, Lattice<vtype> &out){ assert(0);}
|
|
|
|
};
|
|
|
|
|
|
|
|
class WilsonMatrix : public LinearOperatorBase<LatticeFermion>
|
|
|
|
{
|
|
|
|
//NB r=1;
|
|
|
|
public:
|
|
|
|
double mass;
|
|
|
|
GridBase *grid;
|
|
|
|
|
|
|
|
// Copy of the gauge field
|
2015-04-26 15:51:09 +01:00
|
|
|
LatticeDoubledGaugeField Umu;
|
2015-04-25 14:33:02 +01:00
|
|
|
|
|
|
|
//Defines the stencil
|
|
|
|
CartesianStencil Stencil;
|
|
|
|
static const int npoint=9;
|
|
|
|
static const std::vector<int> directions ;
|
|
|
|
static const std::vector<int> displacements;
|
|
|
|
static const int Xp,Xm,Yp,Ym,Zp,Zm,Tp,Tm;
|
|
|
|
|
|
|
|
// Comms buffer
|
2015-04-26 15:51:09 +01:00
|
|
|
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > comm_buf;
|
2015-04-25 14:33:02 +01:00
|
|
|
|
|
|
|
// Constructor
|
2015-04-26 15:51:09 +01:00
|
|
|
WilsonMatrix(LatticeGaugeField &Umu,double mass);
|
|
|
|
|
|
|
|
// DoubleStore
|
|
|
|
void DoubleStore(LatticeDoubledGaugeField &Uds,const LatticeGaugeField &Umu);
|
2015-04-25 14:33:02 +01:00
|
|
|
|
|
|
|
// override multiply
|
|
|
|
void multiply(const LatticeFermion &in, LatticeFermion &out);
|
|
|
|
|
|
|
|
// non-hermitian hopping term; half cb or both
|
|
|
|
void Dhop(const LatticeFermion &in, LatticeFermion &out);
|
|
|
|
|
|
|
|
// m+4r -1/2 Dhop; both cb's
|
|
|
|
void Dw(const LatticeFermion &in, LatticeFermion &out);
|
|
|
|
|
2015-04-30 16:39:06 +01:00
|
|
|
typedef iScalar<iMatrix<vComplex, Nc> > matrix;
|
|
|
|
|
2015-04-25 14:33:02 +01:00
|
|
|
// half checkerboard operaions
|
|
|
|
void MpcDag (const LatticeFermion &in, LatticeFermion &out);
|
|
|
|
void Mpc (const LatticeFermion &in, LatticeFermion &out);
|
|
|
|
void MpcDagMpc(const LatticeFermion &in, LatticeFermion &out);
|
|
|
|
|
|
|
|
// full checkerboard hermitian
|
|
|
|
void MDagM (const LatticeFermion &in, LatticeFermion &out);
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|