CHROMA
unprec_twm_fermact_array_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 // $Id
3 /*! \file
4  * \brief Unpreconditioned Twisted mass treated as an array
5  */
6 
7 #error "THIS IS NOT YET FUNCTIONAL"
8 
9 #ifndef __unprec_dwf_fermact_array_w_h__
10 #define __unprec_dwf_fermact_array_w_h__
11 
13 #include "io/aniso_io.h"
15 
16 namespace Chroma
17 {
18  //! Name and registration
19  namespace UnprecDWFermActArrayEnv
20  {
21  extern const std::string name;
22  bool registerAll();
23  }
24 
25 
26  //! Params for DWF
28  {
30  UnprecDWFermActArrayParams(XMLReader& in, const std::string& path);
31 
32  Real OverMass;
33  Real Mass;
34  Real a5;
35  int N5;
37  };
38 
39 
40  // Reader/writers
41  void read(XMLReader& xml, const std::string& path, UnprecDWFermActArrayParams& param);
42  void write(XMLWriter& xml, const std::string& path, const UnprecDWFermActArrayParams& param);
43 
44 
45 
46  //! Unpreconditioned domain-wall fermion action
47  /*! \ingroup fermacts
48  *
49  * Unprecondition domain-wall fermion action. The conventions used here
50  * are specified in Phys.Rev.D63:094505,2001 (hep-lat/0005002).
51  */
52 
53  class UnprecDWFermActArray : public UnprecDWFermActBaseArray<LatticeFermion,
54  multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >
55  {
56  public:
57  // Typedefs to save typing
58  typedef LatticeFermion T;
59  typedef multi1d<LatticeColorMatrix> P;
60  typedef multi1d<LatticeColorMatrix> Q;
61 
62  //! General FermBC
64  const Real& OverMass_, const Real& Mass_, int N5_) :
65  cfs(cfs_)
66  {
67  param.a5=1;
68  param.OverMass = OverMass_;
69  param.Mass = Mass_;
70  param.N5 = N5_;
71  }
72 
73  //! General FermBC
76  cfs(cfs_), param(p) {}
77 
78  //! Copy constructor
80  cfs(a.cfs), param(a.param) {}
81 
82  //! Length of DW flavor index/space
83  int size() const {return param.N5;}
84 
85  //! Return the quark mass
86  Real getQuarkMass() const {return param.Mass;}
87 
88  //! Produce an unpreconditioned linear operator for this action with arbitrary quark mass
90  const Real& m_q) const;
91 
92  //! Destructor is automatic
94 
95  //! Given a complete propagator as a source, this does all the inversions needed
96  /*!
97  * This routine is actually generic to Domain Wall fermions (Array) fermions
98  *
99  * \param q_sol quark propagator ( Write )
100  * \param q_src source ( Read )
101  * \param xml_out diagnostic output ( Modify )
102  * \param state gauge connection state ( Read )
103  * \param t_src time slice of source ( Read )
104  * \param j_decay direction of decay ( Read )
105  * \param invParam inverter parameters ( Read )
106  * \param ncg_had number of CG iterations ( Write )
107  */
108  void quarkProp(LatticePropagator& q_sol, // Oops, need to make propagator type more general
109  XMLWriter& xml_out,
110  const LatticePropagator& q_src,
111  int t_src, int j_decay,
113  const GroupXML_t& invParam,
114  QuarkSpinType quarkSpinType,
115  bool obsvP,
116  int& ncg_had) const;
117 
118 
119  //! Produce a hermitian version of the linear operator
120  /*! This code is generic */
122  {
123  return new lg5RHermArray<T>(linOp(state));
124  }
125 
126  protected:
127  //! Return the fermion BC object for this action
128  const CreateFermState<T,P,Q>& getCreateState() const {return *cfs;}
129 
130  //! Partial constructor
132  //! Hide =
134 
135  private:
138  };
139 
140 }
141 
142 #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.
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.
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.
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.
UnprecDWFermActArrayParams(XMLReader &in, const std::string &path)
Base class for unpreconditioned domain-wall-like fermion actions.