CHROMA
eoprec_kno_fermact_array_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief preconditioned KNO domain-wall fermion action
4  */
5 
6 #ifndef __prec_kno_fermact_array_w_h__
7 #define __prec_kno_fermact_array_w_h__
8 
10 
11 
12 namespace Chroma
13 {
14  //! Name and registration
15  namespace EvenOddPrecKNOFermActArrayEnv
16  {
17  extern const std::string name;
18  bool registerAll();
19  }
20 
21 
22  //! Params for NEFF
24  {
26  EvenOddPrecKNOFermActArrayParams(XMLReader& in, const std::string& path);
27 
28  Real OverMass;
29  Real Mass;
30  Real a5 ;
31  multi1d<Real> coefs;
32  int N5;
33  };
34 
35 
36  // Reader/writers
37  void read(XMLReader& xml, const std::string& path, EvenOddPrecKNOFermActArrayParams& param);
38  void write(XMLWriter& xml, const std::string& path, const EvenOddPrecKNOFermActArrayParams& param);
39 
40 
41  //! EvenOddPreconditioned NEF fermion action
42  /*! \ingroup fermacts
43  *
44  * EvenOddPrecondition NEF fermion action. The conventions used here
45  * are specified in Phys.Rev.D63:094505,2001 (hep-lat/0005002).
46  * See also Brower et.al. LATTICE04
47  */
49  multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >
50  {
51  public:
52  // Typedefs to save typing
53  typedef LatticeFermion T;
54  typedef multi1d<LatticeColorMatrix> P;
55  typedef multi1d<LatticeColorMatrix> Q;
56 
57  //! General FermBC
59  const Real& OverMass_,
60  const Real& Mass_,
61  const Real& a5_,
62  const multi1d<Real>& c_,
63  int N5_) :
64  cfs(cfs_), OverMass(OverMass_), Mass(Mass_), a5(a5_), coefs(c_), N5(N5_) {init();}
65 
66  //! General FermBC
68  const EvenOddPrecKNOFermActArrayParams& param) :
69  cfs(cfs_), OverMass(param.OverMass), Mass(param.Mass), a5(param.a5), coefs(param.coefs), N5(param.N5) {init();}
70 
71  //! Copy constructor
73  cfs(a.cfs), OverMass(a.OverMass), Mass(a.Mass), a5(a.a5), coefs(a.coefs), N5(a.N5) {}
74 
75  //! Length of DW flavor index/space
76  int size() const {return N5;}
77 
78  //! Return the quark mass
79  Real getQuarkMass() const {return Mass;}
80 
81  //! Produce an unpreconditioned linear operator for this action with arbitrary quark mass
83  const Real& m_q) const;
84 
85  //! Produce an even-odd preconditioned linear operator for this action with arbitrary quark mass
87  const Real& m_q) const;
88 
89  //! Destructor is automatic
91 
92  //! Given a complete propagator as a source, this does all the inversions needed
93  /*!
94  * This routine is actually generic to Domain Wall fermions (Array) fermions
95  *
96  * \param q_sol quark propagator ( Write )
97  * \param q_src source ( Read )
98  * \param xml_out diagnostic output ( Modify )
99  * \param state gauge connection state ( Read )
100  * \param t_src time slice of source ( Read )
101  * \param j_decay direction of decay ( Read )
102  * \param invParam inverter parameters ( Read )
103  * \param obsvP compute currents and residual mass ( Read )
104  * \param ncg_had number of CG iterations ( Write )
105  */
106  void quarkProp(LatticePropagator& q_sol,
107  XMLWriter& xml_out,
108  const LatticePropagator& q_src,
109  int t_src, int j_decay,
111  const GroupXML_t& invParam,
112  QuarkSpinType quarkSpinType,
113  bool obsvP,
114  int& ncg_had) const;
115 
116  protected:
117  //! Return the fermion create state object for this action
118  const CreateFermState<T,P,Q>& getCreateState() const {return *cfs;}
119 
120  //! Partial constructor
122  //! Hide =
124 
125  private:
126  void init();
127  void initCoeffs(multi1d<Real>& b5_arr, multi1d<Real>& c5_arr) const;
128 
129  private:
131  Real OverMass;
132  Real Mass;
133  Real a5 ;
134  multi1d<Real> coefs;
135  int N5;
136  };
137 
138 }
139 
140 #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.
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 operator=(const EvenOddPrecKNOFermActArray &a)
Hide =.
EvenOddPrecKNOFermActArray(Handle< CreateFermState< T, P, Q > > cfs_, const Real &OverMass_, const Real &Mass_, const Real &a5_, const multi1d< Real > &c_, int N5_)
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.
int size() const
Length of DW flavor index/space.
EvenOddPrecKNOFermActArray(Handle< CreateFermState< T, P, Q > > cfs_, const EvenOddPrecKNOFermActArrayParams &param)
General FermBC.
void initCoeffs(multi1d< Real > &b5_arr, multi1d< Real > &c5_arr) const
~EvenOddPrecKNOFermActArray()
Destructor is automatic.
Real getQuarkMass() const
Return the quark mass.
Handle< CreateFermState< T, P, Q > > cfs
EvenOddPrecKNOFermActArray(const EvenOddPrecKNOFermActArray &a)
Copy constructor.
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.
const CreateFermState< T, P, Q > & getCreateState() const
Return the fermion create state 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
Unpreconditioned domain-wall Dirac operator.
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.
int j_decay
Definition: meslate.cc:22
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.