mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Add M and Mdag to WilsonTMFermion
This commit is contained in:
parent
458c943987
commit
5f75735dab
@ -63,7 +63,9 @@ public:
|
|||||||
virtual void MooeeDag(const FermionField &in, FermionField &out) ;
|
virtual void MooeeDag(const FermionField &in, FermionField &out) ;
|
||||||
virtual void MooeeInv(const FermionField &in, FermionField &out) ;
|
virtual void MooeeInv(const FermionField &in, FermionField &out) ;
|
||||||
virtual void MooeeInvDag(const FermionField &in, FermionField &out) ;
|
virtual void MooeeInvDag(const FermionField &in, FermionField &out) ;
|
||||||
|
virtual void M(const FermionField &in, FermionField &out) ;
|
||||||
|
virtual void Mdag(const FermionField &in, FermionField &out) ;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RealD mu; // TwistedMass parameter
|
RealD mu; // TwistedMass parameter
|
||||||
|
|
||||||
|
@ -93,5 +93,25 @@ void WilsonTMFermion<Impl>::MooeeInvDag(const FermionField &in, FermionField &ou
|
|||||||
RealD b = tm /sq;
|
RealD b = tm /sq;
|
||||||
axpibg5x(out,in,a,b);
|
axpibg5x(out,in,a,b);
|
||||||
}
|
}
|
||||||
|
template<class Impl>
|
||||||
|
void WilsonTMFermion<Impl>::M(const FermionField &in, FermionField &out) {
|
||||||
|
out.Checkerboard() = in.Checkerboard();
|
||||||
|
this->Dhop(in, out, DaggerNo);
|
||||||
|
FermionField tmp(out.Grid());
|
||||||
|
RealD a = 4.0+this->mass;
|
||||||
|
RealD b = this->mu;
|
||||||
|
axpibg5x(tmp,in,a,b);
|
||||||
|
axpy(out, 1.0, tmp, out);
|
||||||
|
}
|
||||||
|
template<class Impl>
|
||||||
|
void WilsonTMFermion<Impl>::Mdag(const FermionField &in, FermionField &out) {
|
||||||
|
out.Checkerboard() = in.Checkerboard();
|
||||||
|
this->Dhop(in, out, DaggerYes);
|
||||||
|
FermionField tmp(out.Grid());
|
||||||
|
RealD a = 4.0+this->mass;
|
||||||
|
RealD b = -this->mu;
|
||||||
|
axpibg5x(tmp,in,a,b);
|
||||||
|
axpy(out, 1.0, tmp, out);
|
||||||
|
}
|
||||||
|
|
||||||
NAMESPACE_END(Grid);
|
NAMESPACE_END(Grid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user