CHROMA
eoprec_nef_fermact_array_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief 4D style even-odd preconditioned NEF fermion action
4  */
5 
6 #ifndef __prec_nef_fermact_array_w_h__
7 #define __prec_nef_fermact_array_w_h__
8 
10 
11 
12 namespace Chroma
13 {
14  //! Name and registration
15  namespace EvenOddPrecNEFFermActArrayEnv
16  {
17  extern const std::string name;
18  bool registerAll();
19  }
20 
21 
22  //! Params for NEFF
24  {
26  EvenOddPrecNEFFermActArrayParams(XMLReader& in, const std::string& path);
27 
28  Real OverMass;
29  Real b5;
30  Real c5;
31  Real Mass;
32  int N5;
33  };
34 
35 
36  // Reader/writers
37  void read(XMLReader& xml, const std::string& path, EvenOddPrecNEFFermActArrayParams& param);
38  void write(XMLWriter& xml, const std::string& path, const EvenOddPrecNEFFermActArrayParams& param);
39 
40 
41  //! 4D style even-odd preconditioned domain-wall fermion action
42  /*! \ingroup fermacts
43  *
44  * 4D style even-odd preconditioned domain-wall fermion action.
45  * Follows notes of Orginos (10/2003)
46  *
47  * Hopefully, the conventions used here
48  * are specified in Phys.Rev.D63:094505,2001 (hep-lat/0005002).
49  */
51  multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >
52  {
53  public:
54  // Typedefs to save typing
55  typedef LatticeFermion T;
56  typedef multi1d<LatticeColorMatrix> P;
57  typedef multi1d<LatticeColorMatrix> Q;
58 
59  //! General constructor
62  cfs(cfs_), params(p)
63  {
64  QDPIO::cout << "Construct EvenOddPrecNEFFermActArray: OverMass = " << params.OverMass
65  << " Mass = " << params.Mass
66  << " N5 = " << params.N5
67  << " b5 = " << params.b5
68  << " c5 = " << params.c5
69  << std::endl;
70  }
71 
72  //! Copy constructor
74  cfs(a.cfs), params(a.params) {}
75 
76  //! Length of DW flavor index/space
77  int size() const {return params.N5;}
78 
79  //! Return the quark mass
80  Real getQuarkMass() const {return params.Mass;}
81 
82  //! Produce an unpreconditioned linear operator for this action with arbitrary quark mass
84  const Real& m_q) const;
85 
86  //! Produce an even-odd preconditioned linear operator for this action with arbitrary quark mass
88  const Real& m_q) const;
89 
90  //! Destructor is automatic
92 
93  //! Given a complete propagator as a source, this does all the inversions needed
94  /*!
95  * This routine is actually generic to Domain Wall fermions (Array) fermions
96  *
97  * \param q_sol quark propagator ( Write )
98  * \param q_src source ( Read )
99  * \param xml_out diagnostic output ( Modify )
100  * \param state gauge connection state ( Read )
101  * \param t_src time slice of source ( Read )
102  * \param j_decay direction of decay ( Read )
103  * \param invParam inverter parameters ( Read )
104  * \param obsvP compute currents and residual mass ( Read )
105  * \param ncg_had number of CG iterations ( Write )
106  */
107  void quarkProp(LatticePropagator& q_sol, // Oops, need to make propagator type more general
108  XMLWriter& xml_out,
109  const LatticePropagator& q_src,
110  int t_src, int j_decay,
112  const GroupXML_t& invParam,
113  QuarkSpinType quarkSpinType,
114  bool obsvP,
115  int& ncg_had) const;
116 
117  protected:
118  //! Return the fermion BC object for this action
119  const CreateFermState<T,P,Q>& getCreateState() const {return *cfs;}
120 
121  //! Partial constructor
123  //! Hide =
125 
126  private:
129  };
130 
131 }
132 
133 #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
4D style even-odd preconditioned domain-wall fermion action
EvenOddPrecNEFFermActArrayParams params
const CreateFermState< T, P, Q > & getCreateState() const
Return the fermion BC object for this 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.
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.
~EvenOddPrecNEFFermActArray()
Destructor is automatic.
void operator=(const EvenOddPrecNEFFermActArray &a)
Hide =.
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.
EvenOddPrecNEFFermActArray(const EvenOddPrecNEFFermActArray &a)
Copy constructor.
EvenOddPrecNEFFermActArray(Handle< CreateFermState< T, P, Q > > cfs_, const EvenOddPrecNEFFermActArrayParams &p)
General constructor.
Real getQuarkMass() const
Return the quark mass.
Handle< CreateFermState< T, P, Q > > cfs
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.
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
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.