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>
|
|
|
|
|
2015-05-13 10:59:22 +01:00
|
|
|
#include <algorithms/LinearOperator.h>
|
|
|
|
|
2015-04-25 14:33:02 +01:00
|
|
|
namespace Grid {
|
|
|
|
|
|
|
|
namespace QCD {
|
|
|
|
|
|
|
|
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
|
2015-05-13 10:59:22 +01:00
|
|
|
virtual void M (const LatticeFermion &in, LatticeFermion &out);
|
|
|
|
virtual void Mdag (const LatticeFermion &in, LatticeFermion &out);
|
|
|
|
virtual void MdagM(const LatticeFermion &in, LatticeFermion &out);
|
2015-04-25 14:33:02 +01:00
|
|
|
|
|
|
|
// 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
|