CHROMA
lovddag_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 __lovddag_double_pass_w_h__
7 #define __lovddag_double_pass_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_double_pass : 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 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
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
88  // specifying an accuracy. Here epsilon is the RsdCG for the shifted
89  // solve in the sign function
90  void operator() (LatticeFermion& chi, const LatticeFermion& psi, enum PlusMinus isign, Real epsilon) const;
91 
92  //! Return the fermion BC object for this linear operator
93  const FermBC<T,P,Q>& getFermBC() const {return *fbc;}
94 
95  private:
99 
100  // Copy all of these rather than reference them.
101  const Real m_q;
102  int numroot;
103  const Real constP;
104  const multi1d<Real> rootQ;
105  const multi1d<Real> resP;
106  const multi1d<LatticeFermion> EigVec;
107  const multi1d<Real> EigValFunc;
108  int NEig;
109  int MaxCG;
110  const Real RsdCG;
111  const int ReorthFreq;
113  };
114 
115 
116 } // End Namespace Chroma
117 
118 
119 #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.
const multi1d< LatticeFermion > EigVec
multi1d< LatticeColorMatrix > Q
Handle< DiffLinearOperator< T, P, Q > > M
~lovddag_double_pass()
Destructor is automatic.
const Subset & subset() const
Only defined on the entire lattice.
const FermBC< T, P, Q > & getFermBC() const
Return the fermion BC object for this linear operator.
Handle< FermBC< T, P, Q > > fbc
const multi1d< Real > EigValFunc
Handle< DiffLinearOperator< T, P, Q > > MdagM
multi1d< LatticeColorMatrix > P
Eigenvalue measurements.
lovddag_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, const Chirality _ichiral)
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
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.