#include namespace Grid { namespace QCD { void ContinuedFractionFermion5D::SetCoefficientsTanh(Approx::zolotarev_data *zdata,RealD scale) { SetCoefficientsZolotarev(1.0/scale,zdata); } void ContinuedFractionFermion5D::SetCoefficientsZolotarev(RealD zolo_hi,Approx::zolotarev_data *zdata) { // How to check Ls matches?? // std::cout<n << " - n"<da << " -da "<db << " -db"<dn << " -dn"<dd << " -dd"<db==Ls);// Beta has Ls coeffs R=(1+this->mass)/(1-this->mass); Beta.resize(Ls); cc.resize(Ls); cc_d.resize(Ls); sqrt_cc.resize(Ls); for(int i=0; i < Ls ; i++){ Beta[i] = zdata -> beta[i]; cc[i] = 1.0/Beta[i]; cc_d[i]=sqrt(cc[i]); } cc_d[Ls-1]=1.0; for(int i=0; i < Ls-1 ; i++){ sqrt_cc[i]= sqrt(cc[i]*cc[i+1]); } sqrt_cc[Ls-2]=sqrt(cc[Ls-2]); ZoloHiInv =1.0/zolo_hi; dw_diag = (4.0-M5)*ZoloHiInv; See.resize(Ls); Aee.resize(Ls); int sign=1; for(int s=0;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) { assert((Ls&0x1)==1); // Odd Ls required } } }