CHROMA
eoprec_ovlap_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_ovlap_contfrac5d_fermact_array_w_h__
7 #define __prec_ovlap_contfrac5d_fermact_array_w_h__
8 
13 
14 namespace Chroma
15 {
16  //! Name and registration
17  namespace EvenOddPrecOvlapContFrac5DFermActArrayEnv
18  {
19  extern const std::string name;
20  bool registerAll();
21  }
22 
23 
24  //! Params for 5D overlap ferm acts
26  {
27  //! Default empty construction
29 
30  //! Read params from XML
32 
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  };
43 
44 
45  // Reader/writers
46 
47  //! Read the Continued Fraction parameters
48  void read(XMLReader& xml, const std::string& path, EvenOddPrecOvlapContFrac5DFermActParams& param);
49 
50  //! Write the Continued Fraction parameters
51  void write(XMLWriter& xml, const std::string& path, const EvenOddPrecOvlapContFrac5DFermActParams& param);
52 
53 
54  //! 5D continued fraction overlap action (Borici,Wenger, Edwards)
55 
56  /*!
57  * \ingroup fermacts
58  *
59  * This operator applies the extended version of the hermitian overlap operator
60  * Chi = ((1+Mass)/(1-Mass)*gamma_5 + B) . Psi
61  * where B is the continued fraction of the zolotarev approx. to eps(H(m))
62  */
64  multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >
65  {
66  public:
67  // Typedefs to save typing
68  typedef LatticeFermion T;
69  typedef multi1d<LatticeColorMatrix> P;
70  typedef multi1d<LatticeColorMatrix> Q;
71 
72  //! Construct the action out of a parameter structure
76 
77  //! Copy constructor
80 
81  int size(void) const { return N5; }
82 
83  //! Return the quark mass
84  Real getQuarkMass() const {return params.Mass;}
85 
86  //! Produce a linear operator for this action
88 
89  //! Produce a Pauli-Villars linear operator for this action
91 
92  //! produce a hermitian version of this operator
93  // but it is already hermitian
95  {
96  return linOp(state);
97  }
98 
99  //! Produce an unpreconditioned linear operator projecting 5D to 4D (the inverse of qprop below)
101  const Real& m_q,
102  const GroupXML_t& invParam) const
103  {
104  QDPIO::cerr << "linOp4D not implemented" << std::endl;
105  QDP_abort(1);
106  return 0;
107  }
108 
109  //! Produce a DeltaLs = 1-epsilon^2(H) operator
111  const GroupXML_t& invParam) const
112  {
113  Handle< LinearOperator<T> > lin(linOp4D(state,Real(0),invParam));
114  return new lDeltaLs(lin);
115  }
116 
117  //! Compute quark propagator over base type
119  const GroupXML_t& invParam) const;
120 
121  //! Destructor is automatic
123 
124 
125  protected:
126  //! Return the fermion BC object for this action
127  const CreateFermState<T,P,Q>& getCreateState() const {return *cfs;}
128 
129  //! Helper in construction
130  void init(Real& scale_fac,
131  multi1d<Real>& alpha,
132  multi1d<Real>& beta) const;
133 
134  private:
135  // Hide partial constructor
137 
138  private:
141  int N5;
143  };
144 
145 }
146 
147 #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)
LinearOperator< T > * 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)
const CreateFermState< T, P, Q > & getCreateState() const
Return the fermion BC object for this action.
void init(Real &scale_fac, multi1d< Real > &alpha, multi1d< Real > &beta) const
Helper in construction.
EvenOddPrecConstDetLinearOperatorArray< T, P, Q > * linOp(Handle< FermState< T, P, Q > > state) const
Produce a linear operator for this action.
SystemSolver< LatticeFermion > * qprop(Handle< FermState< T, P, Q > > state, const GroupXML_t &invParam) const
Compute quark propagator over base type.
EvenOddPrecConstDetLinearOperatorArray< T, P, Q > * linOpPV(Handle< FermState< T, P, Q > > state) const
Produce a Pauli-Villars linear operator for this action.
EvenOddPrecOvlapContFrac5DFermActArray(const EvenOddPrecOvlapContFrac5DFermActArray &a)
Copy constructor.
LinearOperatorArray< T > * hermitianLinOp(Handle< FermState< T, P, Q > > state) const
produce a hermitian version of this operator
LinearOperator< T > * DeltaLs(Handle< FermState< T, P, Q > > state, const GroupXML_t &invParam) const
Produce a DeltaLs = 1-epsilon^2(H) operator.
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
Linear Operator.
Definition: linearop.h:27
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.