CHROMA
eoprec_ht_contfrac5d_fermact_array_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Even-odd preconditioned Continued Fraction 5D
4  */
5 
6 #ifndef __prec_ht_contfrac5d_fermact_array_w_h__
7 #define __prec_ht_contfrac5d_fermact_array_w_h__
8 
13 
14 
15 namespace Chroma
16 {
17  //! Name and registration
18  namespace EvenOddPrecHtContFrac5DFermActArrayEnv
19  {
20  extern const std::string name;
21  bool registerAll();
22  }
23 
24 
25  //! Params for 5D overlap ferm acts
27  {
28  //! Default empty construction
30 
31  //! Read params from XML
32  EvenOddPrecHtContFrac5DFermActParams(XMLReader& in, const std::string& path);
33 
34  Real Mass; //!< Fermion Mass
35 
36  int RatPolyDeg; //!< Degree of the Rational Poly
37  CoeffType approximation_type; //!< ZOLOTAREV | TANH | Other approximation coeffs
38  // AuxFermAct is Gone. Use only Unprec Wilson (and the linOp creates its own Dslash
39  Real OverMass; //!< Mass of auxiliary Wilson action
40  Real ApproxMin; //!< Approximate min eigenvalue of H_T
41  Real ApproxMax; //!< Approximate max eigenvalue of H_T
42  Real b5; //!< b5 Moebius parameter
43  Real c5; //!< c5 Moebius parameter
44  };
45 
46 
47  // Reader/writers
48 
49  //! Read the Continued Fraction parameters
50  void read(XMLReader& xml, const std::string& path, EvenOddPrecHtContFrac5DFermActParams& param);
51 
52  //! Write the Continued Fraction parameters
53  void write(XMLWriter& xml, const std::string& path, const EvenOddPrecHtContFrac5DFermActParams& param);
54 
55 
56  //! 5D continued fraction overlap action (Borici,Wenger, Edwards)
57 
58  /*!
59  * \ingroup fermacts
60  *
61  * This operator applies the extended version of the hermitian overlap operator
62  * Chi = ((1+Mass)/(1-Mass)*gamma_5 + B) . Psi
63  * where B is the continued fraction of the zolotarev approx. to eps(H(m))
64  */
66  multi1d<LatticeColorMatrix>,
67  multi1d<LatticeColorMatrix> >
68  {
69  public:
70  // Typedefs to save typing
71  typedef LatticeFermion T;
72  typedef multi1d<LatticeColorMatrix> P;
73  typedef multi1d<LatticeColorMatrix> Q;
74 
75  // Construct the action out of a parameter structure
78 
79 
80  //! Copy constructor
83 
84  int size(void) const { return N5; }
85 
86  //! Return the quark mass
87  Real getQuarkMass() const {return params.Mass;}
88 
89  //! Produce a linear operator for this action
91 
92  //! Produce a Pauli-Villars linear operator for this action
94 
95  //! produce hermitian version of linOp
97  {
98  QDPIO::cerr << "Hermitian version of this operator is not yet implemented" << std::endl << std::flush;
99  QDP_abort(1);
100 
101  return 0;
102  }
103 
104  //! Produce an unpreconditioned linear operator projecting 5D to 4D (the inverse of qprop below)
106  const Real& m_q,
107  const GroupXML_t& invParam) const
108  {
109  QDPIO::cerr << "linOp4D not implemented" << std::endl;
110  QDP_abort(1);
111  return 0;
112  }
113 
114  //! Produce a DeltaLs = 1-epsilon^2(H) operator
116  const GroupXML_t& invParam) const
117  {
118  Handle< LinearOperator<T> > lin(linOp4D(state,Real(0),invParam));
119  return new lDeltaLs(lin);
120  }
121 
122  //! Compute quark propagator over base type
124  const GroupXML_t& invParam) const;
125 
126  //! Destructor is automatic
128 
129  protected:
130  //! Return the fermion BC object for this action
131  const CreateFermState<T,P,Q>& getCreateState() const {return *fs;}
132 
133  //! Helper in construction
134  void init(Real& scale_fac,
135  multi1d<Real>& alpha,
136  multi1d<Real>& beta) const;
137 
138  private:
139  // Hide partial constructor
141 
142  private:
145  int N5;
147  };
148 
149 }
150 
151 #endif
Create a fermion connection state.
Definition: create_state.h:69
Even-odd preconditioned linear operator including derivatives for arrays.
Even-odd preconditioned Wilson-like fermion actions including derivatives.
5D continued fraction overlap action (Borici,Wenger, Edwards)
SystemSolver< LatticeFermion > * qprop(Handle< FermState< T, P, Q > > state, const GroupXML_t &invParam) const
Compute quark propagator over base type.
LinearOperator< T > * DeltaLs(Handle< FermState< T, P, Q > > state, const GroupXML_t &invParam) const
Produce a DeltaLs = 1-epsilon^2(H) operator.
EvenOddPrecHtContFrac5DFermActArray(const EvenOddPrecHtContFrac5DFermActArray &a)
Copy constructor.
EvenOddPrecConstDetLinearOperatorArray< T, P, Q > * linOp(Handle< FermState< T, P, Q > > state) const
Produce a linear operator for this action.
int size(void) const
Expected length of array index.
LinearOperator< LatticeFermion > * linOp4D(Handle< FermState< T, P, Q > > state, const Real &m_q, const GroupXML_t &invParam) const
Produce an unpreconditioned linear operator projecting 5D to 4D (the inverse of qprop below)
LinearOperatorArray< T > * hermitianLinOp(Handle< FermState< T, P, Q > > state) const
produce hermitian version of linOp
void init(Real &scale_fac, multi1d< Real > &alpha, multi1d< Real > &beta) const
Helper in construction.
EvenOddPrecConstDetLinearOperatorArray< T, P, Q > * linOpPV(Handle< FermState< T, P, Q > > state) const
Produce a Pauli-Villars linear operator for this action.
const CreateFermState< T, P, Q > & getCreateState() const
Return the fermion BC object for this action.
Support class for fermion actions and linear operators.
Definition: state.h:94
Class for counted reference semantics.
Definition: handle.h:33
Linear Operator to arrays.
Definition: linearop.h:61
GW Defect operator.
Definition: lDeltaLs_w.h:19
Coeffs enum.
Even-odd const determinant Wilson-like fermact.
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.
CoeffType
Coeffs type.
static const LatticeInteger & beta(const int dim)
Definition: stag_phases_s.h:47
static const LatticeInteger & alpha(const int dim)
Definition: stag_phases_s.h:43
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
CoeffType approximation_type
ZOLOTAREV | TANH | Other approximation coeffs.
Hold group xml and type id.