CHROMA
eoprec_ovdwf_linop_array_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief 4D Even Odd preconditioned Overlap-DWF (Borici) linear operator
4  */
5 
6 #ifndef __prec_ovdwf_linop_array_w_h__
7 #define __prec_ovdwf_linop_array_w_h__
8 
11 
12 
13 namespace Chroma
14 {
15  //! 4D Even Odd preconditioned Overlap-DWF (Borici) linear operator
16  /*!
17  * \ingroup linop
18  *
19  * This routine is specific to Wilson fermions!
20  */
21 
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
33  const Real& WilsonMass_, const Real& m_q, int N5_)
34  {create(fs,WilsonMass_,m_q,N5_);}
35 
36  //! Creation routine
37  void create(Handle< FermState<T,P,Q> > fs,
38  const Real& WilsonMass_, const Real& m_q_, int N5_);
39 
40  //! Destructor is automatic
42 
43  //! Length of DW flavor index/space
44  int size() const {return N5;}
45 
46  //! Return the fermion BC object for this linear operator
47  const FermBC<T,P,Q>& getFermBC() const {return D.getFermBC();}
48 
49  //! Apply the even-even block onto a source std::vector
50  inline
51  void evenEvenLinOp(multi1d<LatticeFermion>& chi,
52  const multi1d<LatticeFermion>& psi,
53  enum PlusMinus isign) const
54  {
55  applyDiag(chi, psi, isign, 0);
56  }
57 
58  //! Apply the inverse of the even-even block onto a source std::vector
59  inline
60  void evenEvenInvLinOp(multi1d<LatticeFermion>& chi,
61  const multi1d<LatticeFermion>& psi,
62  enum PlusMinus isign) const
63  {
64  applyDiagInv(chi, psi, isign, 0);
65  }
66 
67  //! Apply the the even-odd block onto a source std::vector
68  void evenOddLinOp(multi1d<LatticeFermion>& chi,
69  const multi1d<LatticeFermion>& psi,
70  enum PlusMinus isign) const
71  {
72  applyOffDiag(chi, psi, isign, 0);
73  }
74 
75  //! Apply the the odd-even block onto a source std::vector
76  void oddEvenLinOp(multi1d<LatticeFermion>& chi,
77  const multi1d<LatticeFermion>& psi,
78  enum PlusMinus isign) const
79  {
80  applyOffDiag(chi, psi, isign, 1);
81  }
82 
83  //! Apply the the odd-odd block onto a source std::vector
84  inline
85  void oddOddLinOp(multi1d<LatticeFermion>& chi,
86  const multi1d<LatticeFermion>& psi,
87  enum PlusMinus isign) const
88  {
89  applyDiag(chi, psi, isign, 1);
90  }
91 
92  //! Apply the inverse of the odd-odd block onto a source std::vector
93  inline
94  void oddOddInvLinOp(multi1d<LatticeFermion>& chi,
95  const multi1d<LatticeFermion>& psi,
96  enum PlusMinus isign) const
97  {
98  applyDiagInv(chi, psi, isign, 1);
99  }
100 
101  //! Apply the Dminus operator on a lattice fermion. See my notes ;-)
102  void Dminus(LatticeFermion& chi,
103  const LatticeFermion& psi,
104  enum PlusMinus isign,
105  int s5) const;
106 
107  protected:
108 
109  //! Apply the even-even (odd-odd) coupling piece of the Borici fermion operator
110  /*!
111  * \param chi result (Modify)
112  * \param psi source (Read)
113  * \param isign Flag ( PLUS | MINUS ) (Read)
114  * \param cb checkerboard ( 0 | 1 ) (Read)
115  */
116  void applyDiag(multi1d<LatticeFermion>& chi,
117  const multi1d<LatticeFermion>& psi,
118  enum PlusMinus isign,
119  const int cb) const;
120 
121  //! Apply the inverse even-even (odd-odd) coupling piece of the Borici fermion operator
122  /*!
123  * \param chi result (Modify)
124  * \param psi source (Read)
125  * \param isign Flag ( PLUS | MINUS ) (Read)
126  * \param cb checkerboard ( 0 | 1 ) (Read)
127  */
128  void applyDiagInv(multi1d<LatticeFermion>& chi,
129  const multi1d<LatticeFermion>& psi,
130  enum PlusMinus isign,
131  const int cb) const;
132 
133 
134  //! Apply the even-odd (odd-even) coupling piece of the Borici operator
135  /*!
136  * \param chi result (Modify)
137  * \param psi source (Read)
138  * \param isign Flag ( PLUS | MINUS ) (Read)
139  * \param cb checkerboard ( 0 | 1 ) (Read)
140  */
141  void applyOffDiag(multi1d<LatticeFermion>& chi,
142  const multi1d<LatticeFermion>& psi,
143  enum PlusMinus isign,
144  const int cb) const;
145 
146  protected:
147  //! Partial constructor
149  //! Hide =
151 
152  private:
154  Real m_q;
155  Real a5;
156  int N5;
157 
158  Real c5TwoKappa ;
160  Real b5TwoKappa ;
162 
163  Real TwoKappa ;
164  Real Kappa;
165  Real invDfactor ;
166 
168  };
169 
170 } // End Namespace Chroma
171 
172 
173 #endif
4D Even Odd preconditioned domain-wall Dirac operator
4D Even Odd preconditioned Overlap-DWF (Borici) linear operator
void evenEvenLinOp(multi1d< LatticeFermion > &chi, const multi1d< LatticeFermion > &psi, enum PlusMinus isign) const
Apply the even-even block onto a source std::vector.
void evenEvenInvLinOp(multi1d< LatticeFermion > &chi, const multi1d< LatticeFermion > &psi, enum PlusMinus isign) const
Apply the inverse of the even-even block onto a source std::vector.
void oddOddLinOp(multi1d< LatticeFermion > &chi, const multi1d< LatticeFermion > &psi, enum PlusMinus isign) const
Apply the the odd-odd block onto a source std::vector.
void Dminus(LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign, int s5) const
Apply the Dminus operator on a lattice fermion. See my notes ;-)
EvenOddPrecOvDWLinOpArray(Handle< FermState< T, P, Q > > fs, const Real &WilsonMass_, const Real &m_q, int N5_)
Full constructor.
void operator=(const EvenOddPrecOvDWLinOpArray &)
Hide =.
const FermBC< T, P, Q > & getFermBC() const
Return the fermion BC object for this linear operator.
void oddEvenLinOp(multi1d< LatticeFermion > &chi, const multi1d< LatticeFermion > &psi, enum PlusMinus isign) const
Apply the the odd-even block onto a source std::vector.
void oddOddInvLinOp(multi1d< LatticeFermion > &chi, const multi1d< LatticeFermion > &psi, enum PlusMinus isign) const
Apply the inverse of the odd-odd block onto a source std::vector.
void evenOddLinOp(multi1d< LatticeFermion > &chi, const multi1d< LatticeFermion > &psi, enum PlusMinus isign) const
Apply the the even-odd block onto a source std::vector.
~EvenOddPrecOvDWLinOpArray()
Destructor is automatic.
int size() const
Length of DW flavor index/space.
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
const FermBC< T, P, Q > & getFermBC() const
Return the fermion BC object for this linear operator.
Definition: lwldslash_w.h:92
Include possibly optimized Wilson dslash.
Base class for even-odd preconditioned domain-wall-like linops.
void create(Handle< FermState< T, P, Q > > fs, const Real &WilsonMass_, const Real &m_q_, int N5_)
Creation routine.
void applyOffDiag(multi1d< LatticeFermion > &chi, const multi1d< LatticeFermion > &psi, enum PlusMinus isign, const int cb) const
Apply the even-odd (odd-even) coupling piece of the Borici operator.
void applyDiag(multi1d< LatticeFermion > &chi, const multi1d< LatticeFermion > &psi, enum PlusMinus isign, const int cb) const
Apply the even-even (odd-odd) coupling piece of the Borici fermion operator.
void applyDiagInv(multi1d< LatticeFermion > &chi, const multi1d< LatticeFermion > &psi, enum PlusMinus isign, const int cb) const
Apply the inverse even-even (odd-odd) coupling piece of the Borici fermion operator.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
multi1d< LatticeFermion > chi(Ncb)
LatticeFermion psi
Definition: mespbg5p_w.cc:35
int cb
Definition: invbicg.cc:120