CHROMA
unprec_ovlap_contfrac5d_fermact_array_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Unpreconditioned extended-Overlap (5D) (Naryanan&Neuberger) action
4  */
5 
6 #ifndef __unprec_ovlap_contfrac5d_fermact_array_w_h__
7 #define __unprec_ovlap_contfrac5d_fermact_array_w_h__
8 
14 
15 namespace Chroma
16 {
17  //! Name and registration
18  namespace UnprecOvlapContFrac5DFermActArrayEnv
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  UnprecOvlapContFrac5DFermActParams(XMLReader& in, const std::string& path);
33 
34 
35  Real Mass; //!< Fermion Mass
36  int RatPolyDeg; //!< Degree of the Rational Poly
37  CoeffType approximation_type; //!< ZOLOTAREV | TANH | Other approximation coeffs
38  std::string AuxFermAct; //!< The auxiliary ferm act
39  std::string AuxFermActGrp; //!< The group name for the auxiliary fermion 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, UnprecOvlapContFrac5DFermActParams& param);
49 
50  //! Write the Continued Fraction parameters
51  void write(XMLWriter& xml, const std::string& path, const UnprecOvlapContFrac5DFermActParams& 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
75 
76  //! 5D size
77  int size(void) const { return N5; }
78 
79  //! Return the quark mass
80  Real getQuarkMass() const {return params.Mass;}
81 
82  //! Produce a linear operator for this action
84 
85  //! Produce a Pauli-Villars linear operator for this action
87 
88  //! Produce a linear operator for this action
90 
91  //! Produce a linear operator M^dag.M for this action
93 
94  //! Matrix is itself hermitian so just return linOp here.
96  {
97  return linOp(state);
98  }
99 
100  //! Produce an unpreconditioned linear operator projecting 5D to 4D (the inverse of qprop below)
102  const Real& m_q,
103  const GroupXML_t& invParam) const
104  {
105  QDPIO::cerr << "linOp4D not implemented" << std::endl;
106  QDP_abort(1);
107  return 0;
108  }
109 
110  //! Produce a DeltaLs = 1-epsilon^2(H) operator
112  const GroupXML_t& invParam) const
113  {
114  Handle< LinearOperator<T> > lin(linOp4D(state,Real(0),invParam));
115  return new lDeltaLs(lin);
116  }
117 
118  //! Compute quark propagator over base type
120  const GroupXML_t& invParam) const;
121 
122  //! Destructor is automatic
124 
125 
126  // Create state functions
127 
128  //! Create OverlapConnectState from XML
130  createState(const multi1d<LatticeColorMatrix>& u,
131  XMLReader& state_info_xml,
132  const std::string& state_info_path) const;
133 
134  //! Given links, create the state needed for the linear operators
135  /*! Override the parent */
136 
137  //! Create a ConnectState with just the gauge fields
139  createState(const multi1d<LatticeColorMatrix>& u_) const ;
140 
141  //! Create a ConnectState with just the gauge fields, and a lower
142  //! approximation bound
144  createState(const multi1d<LatticeColorMatrix>& u_,
145  const Real& approxMin_) const ;
146 
147 
148  //! Create a connect State with just approximation range bounds
150  createState(const multi1d<LatticeColorMatrix>& u_,
151  const Real& approxMin_,
152  const Real& approxMax_) const;
153 
154 
155  //! Create OverlapConnectState with eigenvalues/vectors
157  createState(const multi1d<LatticeColorMatrix>& u_,
158  const multi1d<Real>& lambda_lo_,
159  const multi1d<LatticeFermion>& evecs_lo_,
160  const Real& lambda_hi_) const;
161 
162 
163  //! Create from OverlapStateInfo Structure
165  createState(const multi1d<LatticeColorMatrix>& u_,
166  const OverlapStateInfo& state_info) const;
167 
168 
169  protected:
170  //! Return the fermion create state for this action
171  const CreateFermState<T,P,Q>& getCreateState() const {return *cfs;}
172 
173  //! Helper in construction
174  void init(Real& scale_fac,
175  multi1d<Real>& alpha,
176  multi1d<Real>& beta,
177  int& NEig,
178  multi1d<Real>& EigValFunc,
179  const OverlapConnectState& state) const;
180  private:
181  // Hide partial constructor
183  //! Hide =
185 
186  private:
187  Handle< FermBC<T,P,Q> > fbc; // fermion bc
188  Handle< CreateFermState<T,P,Q> > cfs; // fermion state creator
191  int N5;
193  };
194 
195 }
196 
197 #endif
Create a fermion connection state.
Definition: create_state.h:69
Base class for all fermion action boundary conditions.
Definition: fermbc.h:20
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
Overlap connection state.
Definition: overlap_state.h:26
Unpreconditioned linear operator including derivatives.
Definition: linearop.h:203
5D continued fraction overlap action (Borici,Wenger, Edwards)
OverlapConnectState * createState(const multi1d< LatticeColorMatrix > &u, XMLReader &state_info_xml, const std::string &state_info_path) const
Create OverlapConnectState from XML.
Handle< UnprecWilsonTypeFermAct< T, P, Q > > S_aux
UnprecLinearOperatorArray< T, P, Q > * linOp(Handle< FermState< T, P, Q > > state) const
Produce a linear operator for this action.
LinearOperatorArray< T > * lnonHermMdagM(Handle< FermState< T, P, Q > > state) const
Produce a linear operator M^dag.M for this action.
LinearOperatorArray< T > * lnonHermLinOp(Handle< FermState< T, P, Q > > state) const
Produce a linear operator for this action.
const CreateFermState< T, P, Q > & getCreateState() const
Return the fermion create state for this action.
void init(Real &scale_fac, multi1d< Real > &alpha, multi1d< Real > &beta, int &NEig, multi1d< Real > &EigValFunc, const OverlapConnectState &state) const
Helper in construction.
LinearOperatorArray< T > * hermitianLinOp(Handle< FermState< T, P, Q > > state) const
Matrix is itself hermitian so just return linOp here.
void operator=(const UnprecOvlapContFrac5DFermActArray &a)
Hide =.
UnprecLinearOperatorArray< T, P, Q > * linOpPV(Handle< FermState< T, P, Q > > state) const
Produce a Pauli-Villars linear operator for this action.
LinearOperator< T > * DeltaLs(Handle< FermState< T, P, Q > > state, const GroupXML_t &invParam) const
Produce a DeltaLs = 1-epsilon^2(H) operator.
SystemSolver< LatticeFermion > * qprop(Handle< FermState< T, P, Q > > state, const GroupXML_t &invParam) const
Compute quark propagator over base type.
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)
Unpreconditioned Wilson-like fermion actions in extra dims with derivatives.
Definition: fermact.orig.h:571
GW Defect operator.
Definition: lDeltaLs_w.h:19
Coeffs enum.
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
static multi1d< LatticeColorMatrix > u
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
Connection state holding eigenvectors.
Hold group xml and type id.
CoeffType approximation_type
ZOLOTAREV | TANH | Other approximation coeffs.
std::string AuxFermActGrp
The group name for the auxiliary fermion action.
Wilson-like fermion actions.