CHROMA
unprec_nef_linop_array_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Unpreconditioned NEF domain-wall fermion linear operator
4  */
5 
6 #ifndef __unprec_nef_linop_array_w_h__
7 #define __unprec_nef_linop_array_w_h__
8 
9 #include "linearop.h"
12 
13 
14 namespace Chroma
15 {
16  //! Unpreconditioned domain-wall Dirac operator
17  /*!
18  * \ingroup linop
19  *
20  * This routine is specific to Wilson fermions!
21  */
22  class UnprecNEFDWLinOpArray : public UnprecDWLikeLinOpBaseArray<LatticeFermion,
23  multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >
24  {
25  public:
26  // Typedefs to save typing
27  typedef LatticeFermion T;
28  typedef multi1d<LatticeColorMatrix> P;
29  typedef multi1d<LatticeColorMatrix> Q;
30 
31  //! Full constructor
32  /*!
33  Set b5 = 1.0 and c5=0.0 to get Shamir DWF with a5=1.
34  Set b5 = 1.0 and c5=1.0 to get Borichi DWF.
35  */
37  const Real& WilsonMass_,
38  const multi1d<Real>& b5_, const multi1d<Real>& c5_,
39  const Real& m_q_, int N5_)
40  {create(fs,WilsonMass_,b5_,c5_,m_q_,N5_);}
41 
42  //! Creation routine
43  void create(Handle< FermState<T,P,Q> > fs,
44  const Real& WilsonMass_,
45  const multi1d<Real>& b5_, const multi1d<Real>& c5_,
46  const Real& m_q_, int N5_);
47 
48  //! Length of DW flavor index/space
49  inline int size() const {return N5;}
50 
51  //! Destructor is automatic
53 
54  //! Return the fermion BC object for this linear operator
55  const FermBC<T,P,Q>& getFermBC() const {return *fbc;}
56 
57  //! Only defined on the entire lattice
58  const Subset& subset() const {return all;}
59 
60  //! Apply the operator onto a source std::vector
61  void operator() (multi1d<LatticeFermion>& chi,
62  const multi1d<LatticeFermion>& psi,
63  enum PlusMinus isign) const;
64 
65  //! Apply the Dminus operator on a lattice fermion. See my notes ;-)
66  void Dminus(LatticeFermion& chi,
67  const LatticeFermion& psi,
68  enum PlusMinus isign,
69  int s5) const;
70 
71  //! Derivative
72  void deriv(multi1d<LatticeColorMatrix>& ds_u,
73  const multi1d<LatticeFermion>& chi, const multi1d<LatticeFermion>& psi,
74  enum PlusMinus isign) const;
75 
76  protected:
77  //! Partial constructor
79  //! Hide =
81 
82  private:
83  Real WilsonMass;
84  multi1d<Real> b5;
85  multi1d<Real> c5;
86  Real m_q;
87  int N5;
90 
91  multi1d<Real> fb5;
92  multi1d<Real> fc5;
93  };
94 
95 } // End Namespace Chroma
96 
97 
98 
99 #endif
Base class for all fermion action boundary conditions.
Definition: fermbc.h:20
Support class for fermion actions and linear operators.
Definition: state.h:94
Class for counted reference semantics.
Definition: handle.h:33
General Wilson-Dirac dslash.
Definition: lwldslash_w.h:48
Unpreconditioned domain-wall Dirac operator.
Unpreconditioned domain-wall Dirac operator.
int size() const
Length of DW flavor index/space.
const FermBC< T, P, Q > & getFermBC() const
Return the fermion BC object for this linear operator.
UnprecNEFDWLinOpArray(Handle< FermState< T, P, Q > > fs, const Real &WilsonMass_, const multi1d< Real > &b5_, const multi1d< Real > &c5_, const Real &m_q_, int N5_)
Full constructor.
void deriv(multi1d< LatticeColorMatrix > &ds_u, const multi1d< LatticeFermion > &chi, const multi1d< LatticeFermion > &psi, enum PlusMinus isign) const
Derivative.
Handle< FermBC< T, P, Q > > fbc
void operator=(const UnprecNEFDWLinOpArray &)
Hide =.
~UnprecNEFDWLinOpArray()
Destructor is automatic.
UnprecNEFDWLinOpArray()
Partial constructor.
void Dminus(LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign, int s5) const
Apply the Dminus operator on a lattice fermion. See my notes ;-)
multi1d< LatticeColorMatrix > Q
const Subset & subset() const
Only defined on the entire lattice.
multi1d< LatticeColorMatrix > P
Include possibly optimized Wilson dslash.
void operator()(multi1d< LatticeFermion > &chi, const multi1d< LatticeFermion > &psi, enum PlusMinus isign) const
Apply the operator onto a source std::vector.
void create(Handle< FermState< T, P, Q > > fs, const Real &WilsonMass_, const multi1d< Real > &b5_, const multi1d< Real > &c5_, const Real &m_q_, int N5_)
Creation routine.
Linear Operators.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
multi1d< LatticeFermion > chi(Ncb)
LatticeFermion psi
Definition: mespbg5p_w.cc:35
Base class for unpreconditioned domain-wall-like fermion linear operator.