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