#include namespace Grid { namespace QCD { RealD ContinuedFractionFermion5D::M (const LatticeFermion &psi, LatticeFermion &chi) { LatticeFermion D(psi._grid); DW(psi,D,DaggerNo); int sign=1; for(int s=0;sM5)*scale; int sign=1; for(int s=0;smass)/(1-this->mass); ag5xpby_ssp(chi,Beta[s]*dw_diag,psi,sqrt_cc[s-1],psi,s,s-1); ag5xpby_ssp(chi,R,psi,1.0,chi,s,s); } else { ag5xpby_ssp(chi,cc[s]*Beta[s]*sign*dw_diag,psi,sqrt_cc[s],psi,s,s+1); axpby_ssp(chi,1.0,chi,sqrt_cc[s-1],psi,s,s-1); } sign=-sign; } } void ContinuedFractionFermion5D::MooeeDag (const LatticeFermion &psi, LatticeFermion &chi) { Mooee(psi,chi); } void ContinuedFractionFermion5D::MooeeInv (const LatticeFermion &psi, LatticeFermion &chi) { // Apply Linv axpby_ssp(chi,1.0/cc_d[0],psi,0.0,psi,0,0); for(int s=1;sLs-1,this->Ls-1); for(int s=Ls-2;s>=0;s--){ axpbg5y_ssp(chi,1.0/cc_d[s],chi,-1.0*cc_d[s+1]/See[s]/cc_d[s],chi,s,s+1); } } void ContinuedFractionFermion5D::MooeeInvDag (const LatticeFermion &psi, LatticeFermion &chi) { MooeeInv(psi,chi); } // Constructors ContinuedFractionFermion5D::ContinuedFractionFermion5D( LatticeGaugeField &_Umu, GridCartesian &FiveDimGrid, GridRedBlackCartesian &FiveDimRedBlackGrid, GridCartesian &FourDimGrid, GridRedBlackCartesian &FourDimRedBlackGrid, RealD _mass,RealD M5) : WilsonFermion5D(_Umu, FiveDimGrid, FiveDimRedBlackGrid, FourDimGrid, FourDimRedBlackGrid,M5), mass(_mass) { } } }