CHROMA
plaq_plus_spatial_two_plaq_gaugeact.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Plaquette gauge action
4  */
5 
6 #ifndef __plaq_plus_spatial_two_plaq_gaugeact_h__
7 #define __plaq_plus_spatial_two_plaq_gaugeact_h__
8 
9 #include "gaugeact.h"
10 #include "gaugebc.h"
11 #include "io/aniso_io.h"
12 
13 namespace Chroma
14 {
15 
16  /*! @ingroup gaugeacts */
17  namespace PlaqPlusSpatialTwoPlaqGaugeActEnv
18  {
19  extern const std::string name;
20  bool registerAll();
21  extern double getTime();
22  }
23 
24  //! Parameter structure
25  /*! @ingroup gaugeacts */
27  {
28  // Base Constructor
30 
31  // Read params from some root path
32  PlaqPlusSpatialTwoPlaqGaugeActParams(XMLReader& xml_in, const std::string& path);
33 
36 
39  };
40 
41  /*! @ingroup gaugeacts */
42  void read(XMLReader& xml, const std::string& path, PlaqPlusSpatialTwoPlaqGaugeActParams& param);
43 
44 
45  //! Plaquette gauge action
46  /*! \ingroup gaugeacts
47  *
48  * The standard Plaquette gauge action
49  */
50 
52  {
53  public:
54  //! General CreateGaugeState<P,Q>
56  const Real& coeff_plaq_s_,
57  const Real& coeff_plaq_t_,
58  const Real& coeff_two_plaq_,
59  const AnisoParam_t& aniso) :
60  cgs(cgs_) {
61  param.coeff_plaq_s = coeff_plaq_s_;
62  param.coeff_plaq_t = coeff_plaq_t_;
63  param.coeff_two_plaq = coeff_two_plaq_;
64  param.aniso = aniso;
65  init();
66  }
67 
68  //! Read coeff from a param struct
71  cgs(cgs_), param(p) {init();}
72 
73  //! Is anisotropy used?
74  bool anisoP() const {return param.aniso.anisoP;}
75 
76  //! Anisotropy factor
77  const Real anisoFactor() const {return param.aniso.xi_0;}
78 
79  //! Anisotropic direction
80  int tDir() const {return param.aniso.t_dir;}
81 
82  //! Return the set on which the gauge action is defined
83  /*! Defined on the even-off (red/black) set */
84  const Set& getSet() const {return rb;}
85 
86  //! Compute staple
87  void staple(LatticeColorMatrix& result,
88  const Handle< GaugeState<P,Q> >& state,
89  int mu, int cb) const;
90 
91  //! Compute dS/dU
92  void deriv(multi1d<LatticeColorMatrix>& result,
93  const Handle< GaugeState<P,Q> >& state) const;
94 
95  //! Produce a gauge create state object
96  const CreateGaugeState<P,Q>& getCreateState() const {return *cgs;}
97 
98  //! Compute the actions
99  Double S(const Handle< GaugeState<P,Q> >& state) const;
100 
101  //! Destructor is automatic
103 
104  // Accessors -- non mutable members.
105  const Real getCoeffPlaqS(void) const {return param.coeff_plaq_s;}
106  const Real getCoeffPlaqT(void) const {return param.coeff_plaq_t;}
107  const Real getCoeffTwoPlaq(void) const {return param.coeff_two_plaq;}
108 
109  protected:
111  void operator=(const PlaqPlusSpatialTwoPlaqGaugeAct& a) {} //! Hide assignment
112 
113  //! Internal initializer
114  void init();
115 
116  private:
117  Handle< CreateGaugeState<P,Q> > cgs; // Create Gauge State
119 
120  };
121 
122 }
123 
124 
125 #endif
Anisotropy parameters.
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
Double S(const Handle< GaugeState< P, Q > > &state) const
Compute the actions.
PlaqPlusSpatialTwoPlaqGaugeAct(Handle< CreateGaugeState< P, Q > > cgs_, const Real &coeff_plaq_s_, const Real &coeff_plaq_t_, const Real &coeff_two_plaq_, const AnisoParam_t &aniso)
General CreateGaugeState<P,Q>
const Set & getSet() const
Return the set on which the gauge action is defined.
PlaqPlusSpatialTwoPlaqGaugeAct(Handle< CreateGaugeState< P, Q > > cgs_, const PlaqPlusSpatialTwoPlaqGaugeActParams &p)
Read coeff from a param struct.
const CreateGaugeState< P, Q > & getCreateState() const
Produce a gauge create state object.
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 operator=(const PlaqPlusSpatialTwoPlaqGaugeAct &a)
int mu
Definition: cool.cc:24
Class structure for gauge actions.
Gauge boundary conditions.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams &param)
Read parameters.
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
Parameters for anisotropy.
Definition: aniso_io.h:24