CHROMA
eoprec_zolo_nef_fermact_array_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Unpreconditioned NEF domain-wall fermion action
4  */
5 
6 #ifndef __prec_zolo_nef_fermact_array_w_h__
7 #define __prec_zolo_nef_fermact_array_w_h__
8 
11 
12 
13 namespace Chroma
14 {
15  //! Name and registration
16  namespace EvenOddPrecZoloNEFFermActArrayEnv
17  {
18  extern const std::string name;
19  bool registerAll();
20  }
21 
22 
23  //! Params for NEFF
25  {
27  EvenOddPrecZoloNEFFermActArrayParams(XMLReader& in, const std::string& path);
28 
29  Real OverMass; //!< Mass of auxiliary Wilson action
30  Real Mass; //!< Fermion Mass
31  Real b5; //!< b5 in H_T expression
32  Real c5; //!< c5 in H_T expression
33  int N5; //!< Size of 5D extent
34  CoeffType approximation_type; //!< ZOLOTAREV | TANH | Other approximation coeffs
35  Real ApproxMin; //!< Approximate min eigenvalue of H_T
36  Real ApproxMax; //!< Approximate max eigenvalue of H_T
37  };
38 
39 
40  // Reader/writers
41  void read(XMLReader& xml, const std::string& path, EvenOddPrecZoloNEFFermActArrayParams& param);
42  void write(XMLWriter& xml, const std::string& path, const EvenOddPrecZoloNEFFermActArrayParams& param);
43 
44 
45  //! EvenOddPreconditioned NEF fermion action
46  /*! \ingroup fermacts
47  *
48  * EvenOddPrecondition NEF fermion action. The conventions used here
49  * are specified in Phys.Rev.D63:094505,2001 (hep-lat/0005002).
50  * See also Brower et.al. LATTICE04
51  */
53  multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >
54  {
55  public:
56  // Typedefs to save typing
57  typedef LatticeFermion T;
58  typedef multi1d<LatticeColorMatrix> P;
59  typedef multi1d<LatticeColorMatrix> Q;
60 
61  //! General FermBC
63  const EvenOddPrecZoloNEFFermActArrayParams& param_) :
64  cfs(cfs_), params(param_) {}
65 
66  //! Copy constructor
68  cfs(a.cfs), params(a.params) {}
69 
70  //! Length of DW flavor index/space
71  int size() const {return params.N5;}
72 
73  //! Return the quark mass
74  Real getQuarkMass() const {return params.Mass;}
75 
76  //! Produce an unpreconditioned linear operator for this action with arbitrary quark mass
78  const Real& m_q) const;
79 
80  //! Produce an even-odd preconditioned linear operator for this action with arbitrary quark mass
82  const Real& m_q) const;
83 
84  //! Destructor is automatic
86 
87  //! Given a complete propagator as a source, this does all the inversions needed
88  /*!
89  * This routine is actually generic to Domain Wall fermions (Array) fermions
90  *
91  * \param q_sol quark propagator ( Write )
92  * \param q_src source ( Read )
93  * \param xml_out diagnostic output ( Modify )
94  * \param state gauge connection state ( Read )
95  * \param t_src time slice of source ( Read )
96  * \param j_decay direction of decay ( Read )
97  * \param invParam inverter parameters ( Read )
98  * \param ncg_had number of CG iterations ( Write )
99  */
100  void quarkProp(LatticePropagator& q_sol, // Oops, need to make propagator type more general
101  XMLWriter& xml_out,
102  const LatticePropagator& q_src,
103  int t_src, int j_decay,
105  const GroupXML_t& invParam,
106  QuarkSpinType quarkSpinType,
107  bool obsvP,
108  int& ncg_had) const;
109 
110  protected:
111  //! Return the fermion BC object for this action
112  const CreateFermState<T,P,Q>& getCreateState() const {return *cfs;}
113 
114  //! Partial constructor
116  //! Assignment
118 
119  private:
120  void initCoeffs(multi1d<Real>& b5_arr,
121  multi1d<Real>& c5_arr) const;
122 
123  private:
126  };
127 
128 }
129 
130 #endif
Create a fermion connection state.
Definition: create_state.h:69
Base class for unpreconditioned domain-wall-like fermion actions.
4D Even Odd preconditioned domain-wall Dirac operator
EvenOddPreconditioned NEF fermion action.
EvenOddPrecZoloNEFFermActArray(Handle< CreateFermState< T, P, Q > > cfs_, const EvenOddPrecZoloNEFFermActArrayParams &param_)
General FermBC.
EvenOddPrecDWLikeLinOpBaseArray< T, P, Q > * precLinOp(Handle< FermState< T, P, Q > > state, const Real &m_q) const
Produce an even-odd preconditioned linear operator for this action with arbitrary quark mass.
Real getQuarkMass() const
Return the quark mass.
EvenOddPrecZoloNEFFermActArray(const EvenOddPrecZoloNEFFermActArray &a)
Copy constructor.
void quarkProp(LatticePropagator &q_sol, XMLWriter &xml_out, const LatticePropagator &q_src, int t_src, int j_decay, Handle< FermState< T, P, Q > > state, const GroupXML_t &invParam, QuarkSpinType quarkSpinType, bool obsvP, int &ncg_had) const
Given a complete propagator as a source, this does all the inversions needed.
void initCoeffs(multi1d< Real > &b5_arr, multi1d< Real > &c5_arr) const
const CreateFermState< T, P, Q > & getCreateState() const
Return the fermion BC object for this action.
void operator=(const EvenOddPrecZoloNEFFermActArray &a)
Assignment.
UnprecDWLikeLinOpBaseArray< T, P, Q > * unprecLinOp(Handle< FermState< T, P, Q > > state, const Real &m_q) const
Produce an unpreconditioned linear operator for this action with arbitrary quark mass.
int size() const
Length of DW flavor index/space.
Support class for fermion actions and linear operators.
Definition: state.h:94
Class for counted reference semantics.
Definition: handle.h:33
Unpreconditioned domain-wall Dirac operator.
Coeffs enum.
Base class for even-odd preconditioned domain-wall-like fermion actions.
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.
QuarkSpinType
Quark spin type.
CoeffType
Coeffs type.
int j_decay
Definition: meslate.cc:22
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.