CHROMA
lovddag_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Internal Overlap-pole operator
4  */
5 
6 #ifndef __lovddag_w_h__
7 #define __lovddag_w_h__
8 
9 #include "linearop.h"
11 #include "meas/eig/eig_w.h"
12 
13 
14 namespace Chroma
15 {
16  //! Internal Overlap-pole operator
17  /*!
18  * \ingroup linop
19  *
20  * This routine is specific to Wilson fermions!
21  *
22  * Chi = (1/2)*((1+m_q) + (1-m_q) * gamma_5 * B) . Psi
23  * where B is the pole approx. to eps(H(m))
24  *
25  * Internally, it computes
26  * Chi = ((1+m_q)/(1-m_q) + gamma_5 * B) . Psi
27  * and then rescales at the end to the correct normalization
28  *
29  * NOTE: B is hermitian, so
30  * (1 + gamma_5 * B)^dag = (1 + B * gamma_5)
31  * = gamma_5 * (1 + gamma_5 * B) * gamma_5
32  */
33 
34  class lovddag : public DiffLinearOperator<LatticeFermion,
35  multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >
36  {
37  public:
38  // Typedefs to save typing
39  typedef LatticeFermion T;
40  typedef multi1d<LatticeColorMatrix> P;
41  typedef multi1d<LatticeColorMatrix> Q;
42 
43  //! Creation routine
44  /*!
45  * \ingroup linop
46  *
47  * \param _MdagM M^dag.M of underlying linop M (Read)
48  * \param _M Underlying linop M (Read)
49  * \param _m_q quark mass (Read)
50  * \param _numroot number of poles in expansion (Read)
51  * \param _constP constant coeff (Read)
52  * \param _resP numerator (Read)
53  * \param _rootQ denom (Read)
54  * \param _OperEigVec eigenvectors (Read)
55  * \param _EigValFunc eigenvalues (Read)
56  * \param _NEig number of eigenvalues (Read)
57  * \param _MaxCG MaxCG inner CG (Read)
58  * \param _RsdCG default residual for inner CG (Read)
59  */
62  const Real& _m_q, int _numroot,
63  const Real& _constP,
64  const multi1d<Real>& _resP,
65  const multi1d<Real>& _rootQ,
66  int _NEig,
67  const multi1d<Real>& _EigValFunc,
68  const multi1d<LatticeFermion>& _EigVec,
69  int _MaxCG,
70  const Real& _RsdCG,
71  const int _ReorthFreq,
72  const Chirality _ichiral) :
73  M(S_aux.linOp(state)), MdagM(S_aux.lMdagM(state)), fbc(state->getFermBC()),
74  m_q(_m_q), numroot(_numroot), constP(_constP),
75  rootQ(_rootQ), resP(_resP), EigVec(_EigVec), EigValFunc(_EigValFunc),
76  NEig(_NEig), MaxCG(_MaxCG), RsdCG(_RsdCG), ReorthFreq(_ReorthFreq), ichiral(_ichiral) {};
77 
78  //! Destructor is automatic
79  ~lovddag() {}
80 
81  //! Only defined on the entire lattice
82  const Subset& subset() const {return all;}
83 
84  //! Apply the operator onto a source std::vector
85  void operator() (LatticeFermion& chi, const LatticeFermion& psi, enum PlusMinus isign) const;
86 
87  //! Apply the operator onto a source std::vector, with user supplied epsilon
88  // for RsdCG
89  void operator() (LatticeFermion& chi, const LatticeFermion& psi, enum PlusMinus isign, Real epsilon) const;
90 
91  //! Return the fermion BC object for this linear operator
92  const FermBC<T,P,Q>& getFermBC() const {return *fbc;}
93 
94  private:
98 
99  // Copy all of these rather than reference them.
100  const Real m_q;
101  int numroot;
102  const Real constP;
103  const multi1d<Real> rootQ;
104  const multi1d<Real> resP;
105  const multi1d<LatticeFermion> EigVec;
106  const multi1d<Real> EigValFunc;
107  int NEig;
108  int MaxCG;
109  const Real RsdCG;
110  const int ReorthFreq;
112  };
113 
114 
115 } // End Namespace Chroma
116 
117 
118 #endif
Differentiable Linear Operator.
Definition: linearop.h:98
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
Unpreconditioned Wilson-like fermion actions with derivatives.
Definition: fermact.orig.h:491
Internal Overlap-pole operator.
Definition: lovddag_w.h:36
LatticeFermion T
Definition: lovddag_w.h:39
const Real m_q
Definition: lovddag_w.h:100
Handle< DiffLinearOperator< T, P, Q > > M
Definition: lovddag_w.h:95
Chirality ichiral
Definition: lovddag_w.h:111
const multi1d< LatticeFermion > EigVec
Definition: lovddag_w.h:105
~lovddag()
Destructor is automatic.
Definition: lovddag_w.h:79
multi1d< LatticeColorMatrix > Q
Definition: lovddag_w.h:41
Handle< FermBC< T, P, Q > > fbc
Definition: lovddag_w.h:97
const int ReorthFreq
Definition: lovddag_w.h:110
const FermBC< T, P, Q > & getFermBC() const
Return the fermion BC object for this linear operator.
Definition: lovddag_w.h:92
const Subset & subset() const
Only defined on the entire lattice.
Definition: lovddag_w.h:82
const Real constP
Definition: lovddag_w.h:102
const Real RsdCG
Definition: lovddag_w.h:109
multi1d< LatticeColorMatrix > P
Definition: lovddag_w.h:40
const multi1d< Real > rootQ
Definition: lovddag_w.h:103
const multi1d< Real > resP
Definition: lovddag_w.h:104
const multi1d< Real > EigValFunc
Definition: lovddag_w.h:106
Handle< DiffLinearOperator< T, P, Q > > MdagM
Definition: lovddag_w.h:96
Eigenvalue measurements.
void operator()(LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign) const
Apply the operator onto a source std::vector.
Definition: lovddag_w.cc:18
lovddag(const UnprecWilsonTypeFermAct< T, P, Q > &S_aux, Handle< FermState< T, P, Q > > state, const Real &_m_q, int _numroot, const Real &_constP, const multi1d< Real > &_resP, const multi1d< Real > &_rootQ, int _NEig, const multi1d< Real > &_EigValFunc, const multi1d< LatticeFermion > &_EigVec, int _MaxCG, const Real &_RsdCG, const int _ReorthFreq, const Chirality _ichiral)
Creation routine.
Definition: lovddag_w.h:60
Linear Operators.
int epsilon(int i, int j, int k)
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
Chirality
Definition: ischiral_w.h:8
multi1d< LatticeFermion > chi(Ncb)
LatticeFermion psi
Definition: mespbg5p_w.cc:35
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
Definition: pbg5p_w.cc:28
Wilson-like fermion actions.