CHROMA
unprec_dwf_fermact_array_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Unpreconditioned domain-wall fermion action
4  */
5 
6 #ifndef __unprec_dwf_fermact_array_w_h__
7 #define __unprec_dwf_fermact_array_w_h__
8 
10 #include "io/aniso_io.h"
12 
13 namespace Chroma
14 {
15  //! Name and registration
16  namespace UnprecDWFermActArrayEnv
17  {
18  extern const std::string name;
19  bool registerAll();
20  }
21 
22 
23  //! Params for DWF
25  {
27  UnprecDWFermActArrayParams(XMLReader& in, const std::string& path);
28 
29  Real OverMass;
30  Real Mass;
31  Real a5;
32  int N5;
34  };
35 
36 
37  // Reader/writers
38  void read(XMLReader& xml, const std::string& path, UnprecDWFermActArrayParams& param);
39  void write(XMLWriter& xml, const std::string& path, const UnprecDWFermActArrayParams& param);
40 
41 
42 
43  //! Unpreconditioned domain-wall fermion action
44  /*! \ingroup fermacts
45  *
46  * Unprecondition domain-wall fermion action. The conventions used here
47  * are specified in Phys.Rev.D63:094505,2001 (hep-lat/0005002).
48  */
49 
50  class UnprecDWFermActArray : public UnprecDWFermActBaseArray<LatticeFermion,
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 FermBC
61  const Real& OverMass_, const Real& Mass_, int N5_) :
62  cfs(cfs_)
63  {
64  param.a5=1;
65  param.OverMass = OverMass_;
66  param.Mass = Mass_;
67  param.N5 = N5_;
68  }
69 
70  //! General FermBC
73  cfs(cfs_), param(p) {}
74 
75  //! Copy constructor
77  cfs(a.cfs), param(a.param) {}
78 
79  //! Length of DW flavor index/space
80  int size() const {return param.N5;}
81 
82  //! Return the quark mass
83  Real getQuarkMass() const {return param.Mass;}
84 
85  //! Produce an unpreconditioned 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 ncg_had number of CG iterations ( Write )
104  */
105  void quarkProp(LatticePropagator& q_sol, // Oops, need to make propagator type more general
106  XMLWriter& xml_out,
107  const LatticePropagator& q_src,
108  int t_src, int j_decay,
110  const GroupXML_t& invParam,
111  QuarkSpinType quarkSpinType,
112  bool obsvP,
113  int& ncg_had) const;
114 
115 
116  //! Produce a hermitian version of the linear operator
117  /*! This code is generic */
119  {
120  return new lg5RHermArray<T>(linOp(state));
121  }
122 
123  protected:
124  //! Return the fermion BC object for this action
125  const CreateFermState<T,P,Q>& getCreateState() const {return *cfs;}
126 
127  //! Partial constructor
129  //! Hide =
131 
132  private:
135  };
136 
137 }
138 
139 #endif
Anisotropy parameters.
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
Linear Operator to arrays.
Definition: linearop.h:61
Unpreconditioned domain-wall fermion action.
Real getQuarkMass() const
Return the quark mass.
void operator=(const UnprecDWFermActArray &a)
Hide =.
Handle< CreateFermState< T, P, Q > > cfs
const CreateFermState< T, P, Q > & getCreateState() const
Return the fermion BC object for this action.
UnprecDWFermActArray(const UnprecDWFermActArray &a)
Copy constructor.
LinearOperatorArray< T > * hermitianLinOp(Handle< FermState< T, P, Q > > state) const
Produce a hermitian version of the linear operator.
multi1d< LatticeColorMatrix > P
~UnprecDWFermActArray()
Destructor is automatic.
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.
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.
UnprecDWFermActArray(Handle< CreateFermState< T, P, Q > > cfs_, const Real &OverMass_, const Real &Mass_, int N5_)
General FermBC.
int size() const
Length of DW flavor index/space.
multi1d< LatticeColorMatrix > Q
UnprecDWFermActArray(Handle< CreateFermState< T, P, Q > > cfs_, const UnprecDWFermActArrayParams &p)
General FermBC.
Base class for unpreconditioned domain-wall-like fermion actions.
virtual UnprecDWLikeLinOpBaseArray< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > * linOp(Handle< FermState< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > state) const
Override to produce a DWF-link unprec. linear operator for this action.
Unpreconditioned domain-wall Dirac operator.
Gamma(5) R hermitian linear operator.
Definition: lg5Rherm_w.h:33
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.
Base class for unpreconditioned domain-wall-like fermion actions.