CHROMA
lg5eps_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 __lg5eps_double_pass_w_h__
7 #define __lg5eps_double_pass_w_h__
8 
9 #include "linearop.h"
11 
12 
13 
14 namespace Chroma
15 {
16  //! Internal Overlap-pole operator sign function
17  /*!
18  * \ingroup linop
19  *
20  * This routine is specific to Wilson fermions!
21  *
22  * Chi = (gamma_5 * B) . Psi
23  *
24  * NOTE: B is hermitian, so
25  * (1 + gamma_5 * B)^dag = (1 + B * gamma_5)
26  * = gamma_5 * (1 + gamma_5 * B) * gamma_5
27  */
28 
29  class lg5eps_double_pass : public LinearOperator<LatticeFermion>
30  {
31  public:
32  // Typedefs to save typing
33  typedef LatticeFermion T;
34  typedef multi1d<LatticeColorMatrix> P;
35  typedef multi1d<LatticeColorMatrix> Q;
36 
37  //! Creation routine
38  /*!
39  * \ingroup linop
40  *
41  * \param _MdagM M^dag.M of underlying linop M (Read)
42  * \param _M Underlying linop M (Read)
43  * \param _m_q quark mass (Read)
44  * \param _numroot number of poles in expansion (Read)
45  * \param _constP constant coeff (Read)
46  * \param _resP numerator (Read)
47  * \param _rootQ denom (Read)
48  * \param _OperEigVec eigenvectors (Read)
49  * \param _EigValFunc eigenvalues (Read)
50  * \param _NEig number of eigenvalues (Read)
51  * \param _MaxCG MaxCG inner CG (Read)
52  * \param _RsdCG residual for inner CG (Read)
53  */
56  int _numroot,
57  const Real& _constP,
58  const multi1d<Real>& _resP,
59  const multi1d<Real>& _rootQ,
60  int _NEig,
61  const multi1d<Real>& _EigValFunc,
62  const multi1d<LatticeFermion>& _EigVec,
63  int _MaxCG,
64  const Real& _RsdCG,
65  const int _ReorthFreq ) :
66  M(S_aux.linOp(state)), MdagM(S_aux.lMdagM(state)),
67  numroot(_numroot), constP(_constP),
68  resP(_resP), rootQ(_rootQ), EigVec(_EigVec), EigValFunc(_EigValFunc),
69  NEig(_NEig), MaxCG(_MaxCG), RsdCG(_RsdCG), ReorthFreq(_ReorthFreq) {}
70 
71  //! Destructor is automatic
73 
74  //! Only defined on the entire lattice
75  const Subset& subset() const {return all;}
76 
77  //! Apply the operator onto a source std::vector
78  void operator() (LatticeFermion& chi, const LatticeFermion& psi, enum PlusMinus isign) const;
79 
80  //! Apply the operator onto a source std::vector to given epsilon
81  // Here epsilon is the RsdCG for the inner solve
82  //
83  void operator() (LatticeFermion& chi, const LatticeFermion& psi, enum PlusMinus isign, Real epsilon) const;
84 
85  private:
88 
89  // Copy all of these rather than reference them.
90  int numroot;
91  const Real constP;
92  const multi1d<Real> resP;
93  const multi1d<Real> rootQ;
94  const multi1d<LatticeFermion> EigVec;
95  const multi1d<Real> EigValFunc;
96  int NEig;
97  int MaxCG;
98  const Real RsdCG;
99  const int ReorthFreq;
100  };
101 
102 
103 } // End Namespace Chroma
104 
105 
106 #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 sign function.
Handle< const LinearOperator< LatticeFermion > > M
~lg5eps_double_pass()
Destructor is automatic.
const multi1d< Real > EigValFunc
const multi1d< Real > rootQ
multi1d< LatticeColorMatrix > P
const Subset & subset() const
Only defined on the entire lattice.
multi1d< LatticeColorMatrix > Q
Handle< const LinearOperator< LatticeFermion > > MdagM
const multi1d< LatticeFermion > EigVec
const multi1d< Real > resP
void operator()(LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign) const
Apply the operator onto a source std::vector.
lg5eps_double_pass(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.
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.