mirror of
				https://github.com/paboyle/Grid.git
				synced 2025-11-04 14:04:32 +00:00 
			
		
		
		
	Add M and Mdag to WilsonTMFermion
This commit is contained in:
		@@ -63,6 +63,8 @@ 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);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user