CHROMA
klein_gordon_fermact_s.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Klein-Gordon boson action masquerading action as a staggered action
4  */
5 
6 #ifndef __klein_gordon_fermact_s_h__
7 #define __klein_gordon_fermact_s_h__
8 
9 #include "stagtype_fermact_s.h"
10 #include "io/aniso_io.h"
11 
12 namespace Chroma
13 {
14  //! Name and registration
15  namespace KleinGordonFermActEnv
16  {
17  extern const std::string name;
18  bool registerAll();
19  }
20 
21  //! Params for klein-gordon action
22  /*! \ingroup fermacts */
24  {
26  KleinGordonFermActParams(XMLReader& in, const std::string& path);
27 
28  Real Mass;
30  };
31 
32 
33  // Reader/writers
34  /*! \ingroup fermacts */
35  void read(XMLReader& xml, const std::string& path, KleinGordonFermActParams& param);
36 
37  /*! \ingroup fermacts */
38  void write(XMLWriter& xml, const std::string& path, const KleinGordonFermActParams& param);
39 
40 
41  //! Klein-Gordon boson action
42  /*! \ingroup fermacts
43  *
44  */
46  LatticeStaggeredFermion, multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >
47  {
48  public:
49  // Typedefs to save typing
50  typedef LatticeStaggeredFermion T;
51  typedef multi1d<LatticeColorMatrix> P;
52  typedef multi1d<LatticeColorMatrix> Q;
53 
54  //! General CreateFermState
56  const KleinGordonFermActParams& p) :
57  cfs(cfs_), param(p) {}
58 
59  //! Copy constructor
61  cfs(a.cfs), param(a.param) {}
62 
63  //! Create state should apply the BC
64  FermState<T,P,Q>* createState(const Q& u_) const;
65 
66  //! Return the fermion BC object for this action
67  const FermBC<T,P,Q>& getFermBC() const {return cfs->getBC();}
68 
69  //! Produce a linear operator for this action
71 
72  //! Produce a linear operator M^dag.M for this action
74 
75  //! Return a linear operator solver for this action to solve MdagM*psi=chi
76  /*! Default implementation provided */
77 // MdagMSystemSolver<T>* invMdagM(Handle< FermState<T,P,Q> > state,
78 // const GroupXML_t& invParam) const;
79 
80  //! Return a multi-shift linear operator solver for this action to solve (MdagM+shift)*psi=chi
81 // MdagMMultiSystemSolver<T>* mInvMdagM(Handle< FermState<T,P,Q> > state,
82 // const GroupXML_t& invParam) const;
83 
84  //! Return quark prop solver, solution of unpreconditioned system
85  /*! This is already supplied in chroma/lib/actions/ferm/qprop/fermact_qprop.cc */
86 // SystemSolver<T>* qprop(Handle< FermState<T,P,Q> > state,
87 // const GroupXML_t& invParam) const;
88 
89  //! accessors
90  const Real getQuarkMass() const {return param.Mass;}
91 
92  //! Destructor is automatic
94 
95  protected:
96  //! Return the fermion BC object for this action
97  const CreateFermState<T,P,Q>& getCreateState() const {return *cfs;}
98 
99  private:
100  KleinGordonFermAct() {} //hide default constructor
101  void operator=(const KleinGordonFermAct& a) {} // Assignment
102 
103  private:
106  };
107 
108 
109 } // End Namespace Chroma
110 
111 #endif
Anisotropy parameters.
Create a fermion connection state.
Definition: create_state.h:69
Differentiable Linear Operator.
Definition: linearop.h:98
Base class for all fermion action boundary conditions.
Definition: fermbc.h:20
Support class for fermion actions and linear operators.
Definition: state.h:94
Class for counted reference semantics.
Definition: handle.h:33
Klein-Gordon boson action.
DiffLinearOperator< T, P, Q > * lMdagM(Handle< FermState< T, P, Q > > state_) const
Produce a linear operator M^dag.M for this action.
const Real getQuarkMass() const
Return a linear operator solver for this action to solve MdagM*psi=chi.
multi1d< LatticeColorMatrix > P
const CreateFermState< T, P, Q > & getCreateState() const
Return the fermion BC object for this action.
FermState< T, P, Q > * createState(const Q &u_) const
Create state should apply the BC.
UnprecLinearOperator< T, P, Q > * linOp(Handle< FermState< T, P, Q > > state_) const
Produce a linear operator for this action.
~KleinGordonFermAct()
Destructor is automatic.
KleinGordonFermAct(const KleinGordonFermAct &a)
Copy constructor.
Handle< CreateFermState< T, P, Q > > cfs
KleinGordonFermActParams param
KleinGordonFermAct(Handle< CreateFermState< T, P, Q > > cfs_, const KleinGordonFermActParams &p)
General CreateFermState.
multi1d< LatticeColorMatrix > Q
void operator=(const KleinGordonFermAct &a)
const FermBC< T, P, Q > & getFermBC() const
Return the fermion BC object for this action.
Unpreconditioned linear operator including derivatives.
Definition: linearop.h:185
Staggered-like fermion actions with derivatives.
Definition: fermact.orig.h:696
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.
const std::string name
Name to be used.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
LinOpSysSolverMGProtoClover::Q Q
Complex a
Definition: invbicg.cc:95
static QDP_ColorVector * in
::std::string string
Definition: gtest.h:1979
Staggered-like fermion actions.
Parameters for anisotropy.
Definition: aniso_io.h:24
Params for klein-gordon action.