CHROMA
unprec_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 __unprec_nef_fermact_array_w_h__
7 #define __unprec_nef_fermact_array_w_h__
8 
11 
12 
13 namespace Chroma
14 {
15  //! Name and registration
16  namespace UnprecNEFFermActArrayEnv
17  {
18  extern const std::string name;
19  bool registerAll();
20  }
21 
22 
23  //! Params for NEFF
25  {
27  UnprecNEFFermActArrayParams(XMLReader& in, const std::string& path);
28 
29  Real OverMass;
30  Real b5;
31  Real c5;
32  Real Mass;
33  int N5;
34  };
35 
36 
37  // Reader/writers
38  void read(XMLReader& xml, const std::string& path, UnprecNEFFermActArrayParams& param);
39  void write(XMLWriter& xml, const std::string& path, const UnprecNEFFermActArrayParams& param);
40 
41 
42  //! Unpreconditioned NEF fermion action
43  /*! \ingroup fermacts
44  *
45  * Unprecondition NEF fermion action. The conventions used here
46  * are specified in Phys.Rev.D63:094505,2001 (hep-lat/0005002).
47  * See also Brower et.al. LATTICE04
48  */
49  class UnprecNEFFermActArray : public UnprecDWFermActBaseArray<LatticeFermion,
50  multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >
51  {
52  public:
53  // Typedefs to save typing
54  typedef LatticeFermion T;
55  typedef multi1d<LatticeColorMatrix> P;
56  typedef multi1d<LatticeColorMatrix> Q;
57 
58  //! General FermBC
60  const Real& OverMass_,
61  const Real& b5_, const Real& c5_,
62  const Real& Mass_, int N5_) :
63  cfs(cfs_), OverMass(OverMass_), b5(b5_),c5(c5_), Mass(Mass_), N5(N5_) {}
64 
65  //! General FermBC
67  const UnprecNEFFermActArrayParams& param) :
68  cfs(cfs_), OverMass(param.OverMass), b5(param.b5), c5(param.c5), Mass(param.Mass), N5(param.N5) {}
69 
70  //! Copy constructor
72  cfs(a.cfs), OverMass(a.OverMass), b5(a.b5), c5(a.c5),
73  Mass(a.Mass), 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  //! Destructor is automatic
87 
88  //! Given a complete propagator as a source, this does all the inversions needed
89  /*!
90  * This routine is actually generic to Domain Wall fermions (Array) fermions
91  *
92  * \param q_sol quark propagator ( Write )
93  * \param q_src source ( Read )
94  * \param xml_out diagnostic output ( Modify )
95  * \param state gauge connection state ( Read )
96  * \param t_src time slice of source ( Read )
97  * \param j_decay direction of decay ( Read )
98  * \param invParam inverter parameters ( Read )
99  * \param ncg_had number of CG iterations ( Write )
100  */
101  void quarkProp(LatticePropagator& q_sol,
102  XMLWriter& xml_out,
103  const LatticePropagator& q_src,
104  int t_src, int j_decay,
106  const GroupXML_t& invParam,
107  QuarkSpinType quarkSpinType,
108  bool obsvP,
109  int& ncg_had) const;
110 
111  protected:
112  //! Return the fermion BC object for this action
113  const CreateFermState<T,P,Q>& getCreateState() const {return *cfs;}
114 
115  private:
116  //! Partial constructor
118  //! Hide =
120 
121  private:
123  Real OverMass;
124  Real b5;
125  Real c5;
126  Real Mass;
127  int N5;
128  };
129 
130 }
131 
132 #endif
Create a fermion connection state.
Definition: create_state.h:69
Support class for fermion actions and linear operators.
Definition: state.h:94
Class for counted reference semantics.
Definition: handle.h:33
Base class for unpreconditioned domain-wall-like fermion actions.
Unpreconditioned domain-wall Dirac operator.
Unpreconditioned NEF fermion action.
multi1d< LatticeColorMatrix > P
~UnprecNEFFermActArray()
Destructor is automatic.
UnprecNEFFermActArray(Handle< CreateFermState< T, P, Q > > cfs_, const Real &OverMass_, const Real &b5_, const Real &c5_, const Real &Mass_, int N5_)
General FermBC.
Handle< CreateFermState< T, P, Q > > cfs
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.
UnprecNEFFermActArray(const UnprecNEFFermActArray &a)
Copy constructor.
Real getQuarkMass() const
Return the quark mass.
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.
const CreateFermState< T, P, Q > & getCreateState() const
Return the fermion BC object for this action.
multi1d< LatticeColorMatrix > Q
UnprecNEFFermActArray(Handle< CreateFermState< T, P, Q > > cfs_, const UnprecNEFFermActArrayParams &param)
General FermBC.
void operator=(const UnprecNEFFermActArray &a)
Hide =.
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
bool registerAll()
Register all the factories.
const std::string name
Name to be used.
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.
Base class for unpreconditioned domain-wall-like fermion actions.
Wilson-like fermion actions.