CHROMA
plaq_plus_adjoint_gaugeact.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Plaquette plus adjoint (plaquette squared) gauge action
4  */
5 
6 #ifndef __plaq_plus_adjoint_gaugeact_h__
7 #define __plaq_plus_adjoint_gaugeact_h__
8 
9 #include "gaugeact.h"
10 #include "gaugebc.h"
11 
12 namespace Chroma
13 {
14 
15  /*! @ingroup gaugeacts */
16  namespace PlaqPlusAdjointGaugeActEnv
17  {
18  bool registerAll();
19 
20  //! Parameter structure
21  /*! @ingroup gaugeacts */
22  struct Params
23  {
24  //! Base Constructor
25  Params() {}
26 
27  //! Read params from some root path
28  Params(XMLReader& xml_in, const std::string& path);
29 
30  Real beta_F; // Coupling for fundamental plaquette
31  Real beta_A; // Coupling for adjoint plaquette
32  };
33 
34 
35  //! PlaqPlusAdjointuette gauge action
36  /*! \ingroup gaugeacts
37  *
38  * The standard PlaqPlusAdjointuette gauge action
39  */
40  class GaugeAct : public LinearGaugeAction
41  {
42  public:
43  // Typedefs to save typing
44  typedef multi1d<LatticeColorMatrix> P;
45  typedef multi1d<LatticeColorMatrix> Q;
46 
47  //! General CreateGaugeState<P,Q>
48  //! Read coeff from a param struct
50  cgs(cgs_), param(p) {}
51 
52  //! Return the set on which the gauge action is defined
53  /*! Defined on the even-off (red/black) set */
54  const Set& getSet() const {return rb;}
55 
56  //! Compute staple
57  /*! Default version. Derived class should override this if needed. */
58  void staple(LatticeColorMatrix& result,
59  const Handle< GaugeState<P,Q> >& state,
60  int mu, int cb) const;
61 
62  //! Compute dS/dU
63  void deriv(multi1d<LatticeColorMatrix>& result,
64  const Handle< GaugeState<P,Q> >& state) const;
65 
66  //! Compute the actions
67  Double S(const Handle< GaugeState<P,Q> >& state) const;
68 
69  //! Produce a gauge create state object
70  const CreateGaugeState<P,Q>& getCreateState() const {return *cgs;}
71 
72  //! Destructor is automatic
73  ~GaugeAct() {}
74 
75  protected:
76  //! Hide assignment
77  void operator=(const GaugeAct& a) {}
78 
79  //! Compute the site-level action
80  void siteAction(multi2d<LatticeComplex>& site_act, const Handle< GaugeState<P,Q> >& state) const;
81 
82  //! Compute dS/dU
83  void derivPlaqFun(multi1d<LatticeColorMatrix>& ds_u,
84  const Handle< GaugeState<P,Q> >& state) const;
85 
86  //! Compute dS/dU
87  void derivPlaqAdj(multi1d<LatticeColorMatrix>& ds_u,
88  const Handle< GaugeState<P,Q> >& state) const;
89 
90  private:
91  Handle< CreateGaugeState<P,Q> > cgs; /*!< Create Gauge State */
92  Params param; /*!< The parameters */
93  };
94 
95  }
96 
97 }
98 
99 
100 #endif
Create a gauge connection state.
Definition: create_state.h:47
Support class for fermion actions and linear operators.
Definition: state.h:74
Class for counted reference semantics.
Definition: handle.h:33
Base class for gauge actions with links appearing linearly in the action.
Definition: gaugeact.h:80
void derivPlaqFun(multi1d< LatticeColorMatrix > &ds_u, const Handle< GaugeState< P, Q > > &state) const
Compute dS/dU.
void deriv(multi1d< LatticeColorMatrix > &result, const Handle< GaugeState< P, Q > > &state) const
Compute dS/dU.
void staple(LatticeColorMatrix &result, const Handle< GaugeState< P, Q > > &state, int mu, int cb) const
Compute staple.
void derivPlaqAdj(multi1d< LatticeColorMatrix > &ds_u, const Handle< GaugeState< P, Q > > &state) const
Compute dS/dU.
void operator=(const GaugeAct &a)
Hide assignment.
GaugeAct(Handle< CreateGaugeState< P, Q > > cgs_, const Params &p)
const CreateGaugeState< P, Q > & getCreateState() const
Produce a gauge create state object.
void siteAction(multi2d< LatticeComplex > &site_act, const Handle< GaugeState< P, Q > > &state) const
Compute the site-level action.
Double S(const Handle< GaugeState< P, Q > > &state) const
Compute the actions.
const Set & getSet() const
Return the set on which the gauge action is defined.
int mu
Definition: cool.cc:24
Class structure for gauge actions.
Gauge boundary conditions.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
Complex a
Definition: invbicg.cc:95
int cb
Definition: invbicg.cc:120
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
Definition: pbg5p_w.cc:28
FloatingPoint< double > Double
Definition: gtest.h:7351
::std::string string
Definition: gtest.h:1979