CHROMA
sf_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 __sf_plaq_plus_adjoint_gaugeact_h__
7 #define __sf_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 SFPlaqPlusAdjointGaugeActEnv
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  int decay_dir; /*! Decay direction */
33  };
34 
35 
36  //! PlaqPlusAdjointuette gauge action
37  /*! \ingroup gaugeacts
38  *
39  * The standard PlaqPlusAdjointuette gauge action
40  */
41  class GaugeAct : public LinearGaugeAction
42  {
43  public:
44  // Typedefs to save typing
45  typedef multi1d<LatticeColorMatrix> P;
46  typedef multi1d<LatticeColorMatrix> Q;
47 
48  //! General CreateGaugeState<P,Q>
49  //! Read coeff from a param struct
50  GaugeAct(Handle< CreateGaugeState<P,Q> > cgs_, const Params& 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  multi2d<LatticeReal> plaq_weight; /*! SF weights for the plaquettes */
94  };
95 
96  }
97 
98 }
99 
100 
101 #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
const Set & getSet() const
Return the set on which the gauge action is defined.
void operator=(const GaugeAct &a)
Hide assignment.
void staple(LatticeColorMatrix &result, const Handle< GaugeState< P, Q > > &state, int mu, int cb) const
Compute staple.
Double S(const Handle< GaugeState< P, Q > > &state) const
Compute the actions.
void siteAction(multi2d< LatticeComplex > &site_act, const Handle< GaugeState< P, Q > > &state) const
Compute the site-level action.
void derivPlaqAdj(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.
GaugeAct(Handle< CreateGaugeState< P, Q > > cgs_, const Params &p)
const CreateGaugeState< P, Q > & getCreateState() const
Produce a gauge create state object.
void derivPlaqFun(multi1d< LatticeColorMatrix > &ds_u, const Handle< GaugeState< P, Q > > &state) const
Compute dS/dU.
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