#include namespace Grid { namespace QCD { template CayleyFermion5D::CayleyFermion5D(GaugeField &_Umu, GridCartesian &FiveDimGrid, GridRedBlackCartesian &FiveDimRedBlackGrid, GridCartesian &FourDimGrid, GridRedBlackCartesian &FourDimRedBlackGrid, RealD _mass,RealD _M5) : WilsonFermion5D(_Umu, FiveDimGrid, FiveDimRedBlackGrid, FourDimGrid, FourDimRedBlackGrid,_M5), mass(_mass) { } template void CayleyFermion5D::Meooe5D (const FermionField &psi, FermionField &Din) { // Assemble Din int Ls=this->Ls; for(int s=0;s void CayleyFermion5D::MeooeDag5D (const FermionField &psi, FermionField &Din) { int Ls=this->Ls; for(int s=0;s RealD CayleyFermion5D::M (const FermionField &psi, FermionField &chi) { int Ls=this->Ls; FermionField Din(psi._grid); // Assemble Din /* for(int s=0;sDW(Din,chi,DaggerNo); // ((b D_W + D_w hop terms +1) on s-diag axpby(chi,1.0,1.0,chi,psi); // Call Mooee?? for(int s=0;s RealD CayleyFermion5D::Mdag (const FermionField &psi, FermionField &chi) { // Under adjoint //D1+ D1- P- -> D1+^dag P+ D2-^dag //D2- P+ D2+ P-D1-^dag D2+dag FermionField Din(psi._grid); // Apply Dw this->DW(psi,Din,DaggerYes); Meooe5D(Din,chi); int Ls=this->Ls; for(int s=0;s void CayleyFermion5D::Meooe (const FermionField &psi, FermionField &chi) { int Ls=this->Ls; FermionField tmp(psi._grid); // Assemble the 5d matrix Meooe5D(psi,tmp); #if 0 std::cout << "Meooe Test replacement norm2 tmp = " <