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