CHROMA
character_gaugeact.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief gauge action as a sum of characters of the SU(3) irreps
4  */
5 
6 #ifndef __character_gaugeact_h__
7 #define __character_gaugeact_h__
8 
9 #include "gaugeact.h"
10 #include "gaugebc.h"
11 
12 namespace Chroma
13 {
14 
15  /*! @ingroup gaugeacts */
16  namespace CharacterGaugeActEnv
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  Real beta_S; // Coupling for sextet plaquette
33  };
34 
35 
36  //! Character gauge action
37  /*! \ingroup gaugeacts
38  *
39  * The standard gauge action as sum of Characters
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
51  cgs(cgs_), param(p) {}
52 
53  //! Return the set on which the gauge action is defined
54  /*! Defined on the even-off (red/black) set */
55  const Set& getSet() const {return rb;}
56 
57  //! Compute staple
58  /*! Default version. Derived class should override this if needed. */
59  void staple(LatticeColorMatrix& result,
60  const Handle< GaugeState<P,Q> >& state,
61  int mu, int cb) const;
62 
63  //! Compute dS/dU
64  void deriv(multi1d<LatticeColorMatrix>& result,
65  const Handle< GaugeState<P,Q> >& state) const;
66 
67  //! Compute the actions
68  Double S(const Handle< GaugeState<P,Q> >& state) const;
69 
70  //! Produce a gauge create state object
71  const CreateGaugeState<P,Q>& getCreateState() const {return *cgs;}
72 
73  //! Destructor is automatic
74  ~GaugeAct() {}
75 
76  protected:
77  //! Hide assignment
78  void operator=(const GaugeAct& a) {}
79 
80  //! Compute the site-level action
81  void siteAction(multi2d<LatticeColorMatrix>& site_act,
82  const Handle< GaugeState<P,Q> >& state) const;
83 
84  private:
85  Handle< CreateGaugeState<P,Q> > cgs; /*!< Create Gauge State */
86  Params param; /*!< The parameters */
87  };
88 
89  }
90 
91 }
92 
93 
94 #endif
void staple(LatticeColorMatrix &result, const Handle< GaugeState< P, Q > > &state, int mu, int cb) const
Compute staple.
multi1d< LatticeColorMatrix > P
void deriv(multi1d< LatticeColorMatrix > &result, const Handle< GaugeState< P, Q > > &state) const
Compute dS/dU.
Handle< CreateGaugeState< P, Q > > cgs
const Set & getSet() const
Return the set on which the gauge action is defined.
multi1d< LatticeColorMatrix > Q
const CreateGaugeState< P, Q > & getCreateState() const
Produce a gauge create state object.
GaugeAct(Handle< CreateGaugeState< P, Q > > cgs_, const Params &p)
void siteAction(multi2d< LatticeColorMatrix > &site_act, const Handle< GaugeState< P, Q > > &state) const
Compute the site-level action.
void operator=(const GaugeAct &a)
Hide assignment.
Double S(const Handle< GaugeState< P, Q > > &state) const
Compute the actions.
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
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