CHROMA
poly_cheb_fermact_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Chebyshev polynomial fermion action
4  */
5 
6 #ifndef __poly_cheb_fermact_w_h__
7 #define __poly_cheb_fermact_w_h__
8 
11 
12 namespace Chroma
13 {
14  //! Name and registration
15  /*! \ingroup fermacts */
16  namespace PolyChebFermActEnv
17  {
18  extern const std::string name;
19  bool registerAll();
20  }
21 
22 
23  //! Params for Chebyshev polynomial preconditioner
24  /*! \ingroup fermacts */
26  {
28  PolyChebFermActParams(XMLReader& in, const std::string& path);
29 
30  struct PolyParams
31  {
32  int degree;
33  Real UpperBound ;
34  Real LowerBound ;
35  int order ;
37 
38  std::string AuxFermAct; /*!< std::string holding fermact xml */
39  };
40 
41  // Reader/writers
42  /*! \ingroup fermacts */
43  void read(XMLReader& xml, const std::string& path, PolyChebFermActParams& param);
44  /*! \ingroup fermacts */
45  void write(XMLWriter& xml, const std::string& path, const PolyChebFermActParams& param);
46 
47 
48  //! Chebyshev Polynomial fermion action
49  /*! \ingroup fermacts
50  *
51  */
52  class PolyChebFermAct : public PolyWilsonTypeFermAct<LatticeFermion,
53  multi1d<LatticeColorMatrix> ,
54  multi1d<LatticeColorMatrix> >
55  {
56  public:
57  // Typedefs to save typing
58  typedef LatticeFermion T;
59  typedef multi1d<LatticeColorMatrix> P;
60  typedef multi1d<LatticeColorMatrix> Q;
61 
62  //! General FermBC
64  const PolyChebFermActParams& param_);
65 
66  //! Produce a linear operator for this action
68  {
69  return fermact->linOp(state);
70  }
71 
72  //! Produce a linear operator M^dag.M for this action
74  {
75  return fermact->lMdagM(state);
76  }
77 
78  //! Produce the gamma_5 hermitian operator H_w
80  {
81  return fermact->hermitianLinOp(state);
82  }
83 
84  //! Produce a linear operator for this action
86 
87  //! Produce a linear operator M^dag.M for this action
89 
90  //! Return a linear operator solver for this action to solve M*psi=chi
91  /*! Default implementation provided */
93  const GroupXML_t& invParam) const;
94 
95  //! Destructor is automatic
97 
98  protected:
99  //! Return the factory object that produces a state
100  const CreateFermState<T,P,Q>& getCreateState() const {return *cfs;}
101 
102  /*! The user will supply the FermState in a derived class */
103  PolyChebFermAct() {} //hide default constructor
104  //! Assignment
105  void operator=(const PolyChebFermAct& a) {}
106 
107  private:
108  Handle< CreateFermState<T,P,Q> > cfs; /*!< fermion state creator */
110 
111  // A handle for the PrecWilsonFermAct
113  };
114 
115 }
116 
117 #endif
Create a fermion connection state.
Definition: create_state.h:69
Differentiable Linear Operator.
Definition: linearop.h:98
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
Chebyshev Polynomial fermion action.
Handle< WilsonTypeFermAct< T, P, Q > > fermact
LinearOperator< T > * hermitianLinOp(Handle< FermState< T, P, Q > > state) const
Produce the gamma_5 hermitian operator H_w.
PolyChebFermActParams param
Handle< CreateFermState< T, P, Q > > cfs
PolyLinearOperator< T, P, Q > * polyLinOp(Handle< FermState< T, P, Q > > state) const
Produce a linear operator M^dag.M for this action.
DiffLinearOperator< T, P, Q > * polyPrecLinOp(Handle< FermState< T, P, Q > > state) const
Produce a linear operator for this action.
DiffLinearOperator< T, P, Q > * lMdagM(Handle< FermState< T, P, Q > > state) const
Produce a linear operator M^dag.M for this action.
PolyPrecSystemSolver< T > * invPolyPrec(Handle< FermState< T, P, Q > > state, const GroupXML_t &invParam) const
Return a linear operator solver for this action to solve M*psi=chi.
void operator=(const PolyChebFermAct &a)
Assignment.
const CreateFermState< T, P, Q > & getCreateState() const
Return the factory object that produces a state.
~PolyChebFermAct()
Destructor is automatic.
multi1d< LatticeColorMatrix > P
multi1d< LatticeColorMatrix > Q
DiffLinearOperator< T, P, Q > * linOp(Handle< FermState< T, P, Q > > state) const
Produce a linear operator for this action.
Polynomial linear operator including derivatives.
Definition: polylinop.h:23
Polynomial Wilson-like fermion actions with derivatives.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams &param)
Read parameters.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams &param)
Writer parameters.
const std::string name
Name to be used.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
Complex a
Definition: invbicg.cc:95
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
Definition: pbg5p_w.cc:28
static QDP_ColorVector * in
::std::string string
Definition: gtest.h:1979
Hold group xml and type id.
Params for Chebyshev polynomial preconditioner.
struct Chroma::PolyChebFermActParams::PolyParams polyParams
SystemSolver disambiguator.
Class structure for polynomial fermion actions.