49 RealD _shift,
int _pm,
RealD _M5,
const ImplParams &p) :
51 FourDimGrid, FourDimRedBlackGrid, _mq1, _mq2, _mq3,
52 _shift, _pm, _M5, 1.0, 0.0, p)
55 Approx::zolotarev_data *zdata = Approx::higham(eps,this->
Ls);
56 assert(zdata->n == this->Ls);
58 std::cout <<
GridLogMessage <<
"DomainWallEOFAFermion with Ls=" << this->
Ls << std::endl;
61 Approx::zolotarev_free(zdata);
75 if((sign == 1) && (dag == 0)){
axpby_ssp(Din, 0.0, psi, 1.0, psi,
Ls-1, 0); }
76 else if((sign == -1) && (dag == 0)){
axpby_ssp(Din, 0.0, psi, 1.0, psi, 0, 0); }
77 else if((sign == 1 ) && (dag == 1)){
axpby_ssp(Din, 0.0, psi, 1.0, psi, 0,
Ls-1); }
78 else if((sign == -1) && (dag == 1)){
axpby_ssp(Din, 0.0, psi, 1.0, psi, 0, 0); }
94 FermionField Din(psi.Grid());
98 axpby(chi, 1.0, 1.0, chi, psi);
105 FermionField Din(psi.Grid());
110 axpby(chi, 1.0, 1.0, chi, psi);
128 Coeff_t shiftp(0.0), shiftm(0.0);
134 std::vector<Coeff_t> diag(
Ls,1.0);
135 std::vector<Coeff_t> upper(
Ls,-1.0); upper[
Ls-1] =
mq1 + shiftm;
136 std::vector<Coeff_t> lower(
Ls,-1.0); lower[0] =
mq1 + shiftp;
139 std::cout <<
GridLogMessage <<
"DomainWallEOFAFermion::M5D(FF&,FF&):" << std::endl;
140 for(
int i=0; i<diag.size(); ++i){
141 std::cout <<
GridLogMessage <<
"diag[" << i <<
"] =" << diag[i] << std::endl;
143 for(
int i=0; i<upper.size(); ++i){
144 std::cout <<
GridLogMessage <<
"upper[" << i <<
"] =" << upper[i] << std::endl;
146 for(
int i=0; i<lower.size(); ++i){
147 std::cout <<
GridLogMessage <<
"lower[" << i <<
"] =" << lower[i] << std::endl;
151 this->
M5D(psi, chi, chi, lower, diag, upper);
165 Coeff_t shiftp(0.0), shiftm(0.0);
171 std::vector<Coeff_t> diag(
Ls,1.0);
172 std::vector<Coeff_t> upper(
Ls,-1.0); upper[
Ls-1] =
mq1 + shiftp;
173 std::vector<Coeff_t> lower(
Ls,-1.0); lower[0] =
mq1 + shiftm;
175 this->
M5Ddag(psi, chi, chi, lower, diag, upper);
184 std::vector<Coeff_t> diag = this->
bee;
185 std::vector<Coeff_t> upper(
Ls);
186 std::vector<Coeff_t> lower(
Ls);
188 for(
int s=0; s<
Ls; s++){
189 upper[s] = -this->
cee[s];
190 lower[s] = -this->
cee[s];
192 upper[
Ls-1] = this->
dm;
195 this->
M5D(psi, psi, chi, lower, diag, upper);
203 std::vector<Coeff_t> diag = this->
bee;
204 std::vector<Coeff_t> upper(
Ls);
205 std::vector<Coeff_t> lower(
Ls);
207 for(
int s=0; s<
Ls; s++){
208 upper[s] = -this->
cee[s];
209 lower[s] = -this->
cee[s];
211 upper[
Ls-1] = this->
dp;
214 this->
M5Ddag(psi, psi, chi, lower, diag, upper);
235 this->
aee.resize(
Ls);
236 this->
aeo.resize(
Ls);
237 this->
bee.resize(
Ls);
238 this->
beo.resize(
Ls);
239 this->
cee.resize(
Ls);
240 this->
ceo.resize(
Ls);
242 for(
int i=0; i<
Ls; ++i){
243 this->
bee[i] = 4.0 - this->
M5 + 1.0;
247 for(
int i=0; i<
Ls; ++i){
248 this->
aee[i] = this->
cee[i];
249 this->
bs[i] = this->
beo[i] = 1.0;
250 this->
cs[i] = this->
ceo[i] = 0.0;
259 }
else if(this->pm == -1) {
264 this->
dm =
mq1*this->cee[
Ls-1];
270 this->
dee.resize(
Ls+1);
271 this->
lee.resize(
Ls);
273 this->
uee.resize(
Ls);
276 for(
int i=0; i<
Ls; ++i){
280 this->
lee[i] = -this->
cee[i+1]/this->
bee[i];
283 for(
int j=0; j<i; j++){ this->
leem[i] *= this->
aee[j]/this->
bee[j]; }
285 this->
dee[i] = this->
bee[i];
287 this->
uee[i] = -this->
aee[i]/this->
bee[i];
290 for(
int j=1; j<=i; j++){ this->
ueem[i] *= this->
cee[j]/this->
bee[j]; }
303 Coeff_t delta_d = 1.0 / this->
bee[0];
304 for(
int j=1; j<
Ls-1; j++){ delta_d *= this->
cee[j] / this->
bee[j]; }
314 this->
shift = new_shift;
315 Approx::zolotarev_data *zdata = Approx::higham(1.0, this->
Ls);
void axpby(Lattice< vobj > &ret, sobj a, sobj b, const Lattice< vobj > &x, const Lattice< vobj > &y)
void axpby_ssp(Lattice< vobj > &z, Coeff a, const Lattice< vobj > &x, Coeff b, const Lattice< vobj > &y, int s, int sp)
GridLogger GridLogMessage(1, "Message", GridLogColours, "NORMAL")
#define NAMESPACE_BEGIN(A)
static constexpr int DaggerYes
static constexpr int DaggerNo
AbstractEOFAFermion(GaugeField &_Umu, GridCartesian &FiveDimGrid, GridRedBlackCartesian &FiveDimRedBlackGrid, GridCartesian &FourDimGrid, GridRedBlackCartesian &FourDimRedBlackGrid, RealD _mq1, RealD _mq2, RealD _mq3, RealD _shift, int _pm, RealD _M5, RealD _b, RealD _c, const ImplParams &p=ImplParams())
void Meooe5D(const FermionField &in, FermionField &out)
std::vector< Coeff_t > leem
std::vector< Coeff_t > lee
std::vector< Coeff_t > bee
std::vector< Coeff_t > dee
std::vector< Coeff_t > cs
std::vector< Coeff_t > beo
std::vector< Coeff_t > bs
void MeooeDag5D(const FermionField &in, FermionField &out)
std::vector< Coeff_t > aeo
virtual void SetCoefficientsTanh(Approx::zolotarev_data *zdata, RealD b, RealD c)
std::vector< Coeff_t > ceo
std::vector< Coeff_t > ueem
std::vector< Coeff_t > cee
std::vector< Coeff_t > aee
std::vector< Coeff_t > uee
virtual void M5D(const FermionField &psi, FermionField &chi)
virtual void Dtilde(const FermionField &in, FermionField &out)
virtual void M5Ddag(const FermionField &psi, FermionField &chi)
virtual void M(const FermionField &in, FermionField &out)
virtual void Mooee(const FermionField &in, FermionField &out)
virtual void DtildeInv(const FermionField &in, FermionField &out)
virtual void RefreshShiftCoefficients(RealD new_shift)
void SetCoefficientsInternal(RealD zolo_hi, std::vector< Coeff_t > &gamma, RealD b, RealD c)
virtual void Mdag(const FermionField &in, FermionField &out)
DomainWallEOFAFermion(GaugeField &_Umu, GridCartesian &FiveDimGrid, GridRedBlackCartesian &FiveDimRedBlackGrid, GridCartesian &FourDimGrid, GridRedBlackCartesian &FourDimRedBlackGrid, RealD _mq1, RealD _mq2, RealD _mq3, RealD _shift, int pm, RealD _M5, const ImplParams &p=ImplParams())
virtual void Omega(const FermionField &in, FermionField &out, int sign, int dag)
virtual void MooeeDag(const FermionField &in, FermionField &out)
void DW(const FermionField &in, FermionField &out, int dag)