CHROMA
eoprec_dwf_fermact_array_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief 4D style even-odd preconditioned domain-wall fermion action
4  */
5 
6 #ifndef __prec_dwf_fermact_array_w_h__
7 #define __prec_dwf_fermact_array_w_h__
8 
10 #include "io/aniso_io.h"
11 
12 namespace Chroma
13 {
14  //! Name and registration
15  namespace EvenOddPrecDWFermActArrayEnv
16  {
17  extern const std::string name;
18  bool registerAll();
19  }
20 
21 
22  //! Params for DWF
24  {
26  EvenOddPrecDWFermActArrayParams(XMLReader& in, const std::string& path);
27 
28  Real OverMass;
29  Real Mass;
30  Real a5;
31  int N5;
33  };
34 
35 
36  // Reader/writers
37  void read(XMLReader& xml, const std::string& path, EvenOddPrecDWFermActArrayParams& param);
38  void write(XMLReader& xml, const std::string& path, const EvenOddPrecDWFermActArrayParams& 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  */
50 
52  multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >
53  {
54  public:
55  // Typedefs to save typing
56  typedef LatticeFermion T;
57  typedef multi1d<LatticeColorMatrix> P;
58  typedef multi1d<LatticeColorMatrix> Q;
59 
60  //! General FermBC
62  const Real& OverMass_, const Real& Mass_, int N5_) :
63  cfs(cfs_)
64  {
65  param.a5=1;
66  param.OverMass = OverMass_;
67  param.Mass = Mass_;
68  param.N5 = N5_;
69  QDPIO::cout << "Construct EvenOddPrecDWFermActArray: OverMass = " << param.OverMass
70  << " Mass = " << param.Mass
71  << " N5 = " << param.N5
72  << " a5 = " << param.a5
73  << std::endl;
74  }
75 
76  //! General FermBC
79  cfs(cfs_), param(p) {}
80 
81  //! Copy constructor
83  cfs(a.cfs), param(a.param) {}
84 
85  //! Length of DW flavor index/space
86  int size() const {return param.N5;}
87 
88  //! Return the quark mass
89  Real getQuarkMass() const {return param.Mass;}
90 
91  //! Produce an unpreconditioned linear operator for this action with arbitrary quark mass
93  const Real& m_q) const;
94 
95  //! Produce an even-odd preconditioned linear operator for this action with arbitrary quark mass
97  const Real& m_q) const;
98 
99  //! Return possibly optimized quark prop solver, solution of preconditioned system
101  const GroupXML_t& invParam) const;
102 
103  //! Destructor is automatic
105 
106  //! Given a complete propagator as a source, this does all the inversions needed
107  /*!
108  * This routine is actually generic to Domain Wall fermions (Array) fermions
109  *
110  * \param q_sol quark propagator ( Write )
111  * \param q_src source ( Read )
112  * \param xml_out diagnostic output ( Modify )
113  * \param state gauge connection state ( Read )
114  * \param t_src time slice of source ( Read )
115  * \param j_decay direction of decay ( Read )
116  * \param invParam inverter parameters ( Read )
117  * \param ncg_had number of CG iterations ( Write )
118  */
120  XMLWriter& xml_out,
121  const PropTypeTraits<T>::Type_t& q_src,
122  int t_src, int j_decay,
124  const GroupXML_t& invParam,
125  QuarkSpinType quarkSpinType,
126  bool obsvP,
127  int& ncg_had) const;
128 
129  protected:
130  //! Return the fermion create state for this action
131  const CreateFermState<T,P,Q>& getCreateState() const {return *cfs;}
132 
133  private:
134  EvenOddPrecDWFermActArray() {} // Partial constructor
135  EvenOddPrecDWFermActArray& operator=(const EvenOddPrecDWFermActArray& a) { return *this; // satisfy return type
136  } // Hide =
137 
138  private:
141  };
142 
143 }
144 
145 #endif
Anisotropy parameters.
Create a fermion connection state.
Definition: create_state.h:69
4D style even-odd preconditioned domain-wall fermion action
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.
~EvenOddPrecDWFermActArray()
Destructor is automatic.
const CreateFermState< T, P, Q > & getCreateState() const
Return the fermion create state for this action.
Real getQuarkMass() const
Return the quark mass.
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.
EvenOddPrecDWFermActArray & operator=(const EvenOddPrecDWFermActArray &a)
SystemSolverArray< T > * qpropT(Handle< FermState< T, P, Q > > state, const GroupXML_t &invParam) const
Return possibly optimized quark prop solver, solution of preconditioned system.
EvenOddPrecDWFermActArray(const EvenOddPrecDWFermActArray &a)
Copy constructor.
EvenOddPrecDWFermActArrayParams param
EvenOddPrecDWFermActArray(Handle< CreateFermState< T, P, Q > > cfs_, const EvenOddPrecDWFermActArrayParams &p)
General FermBC.
int size() const
Length of DW flavor index/space.
EvenOddPrecDWFermActArray(Handle< CreateFermState< T, P, Q > > cfs_, const Real &OverMass_, const Real &Mass_, int N5_)
General FermBC.
void quarkProp(PropTypeTraits< T >::Type_t &q_sol, XMLWriter &xml_out, const PropTypeTraits< T >::Type_t &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.
Base class for unpreconditioned domain-wall-like fermion actions.
4D Even Odd preconditioned domain-wall Dirac operator
Support class for fermion actions and linear operators.
Definition: state.h:94
Class for counted reference semantics.
Definition: handle.h:33
Linear system solvers of arrays.
Definition: syssolver.h:62
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
Parameters for anisotropy.
Definition: aniso_io.h:24
Hold group xml and type id.