CHROMA
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 __spatial_two_plaq_gaugeact_h__
7 #define __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 SpatialTwoPlaqGaugeActEnv
18  {
19  extern const std::string name;
20  bool registerAll();
21  }
22 
23  //! Parameter structure
24  /*! @ingroup gaugeacts */
26  {
27  // Base Constructor
29 
30  // Read params from some root path
31  SpatialTwoPlaqGaugeActParams(XMLReader& xml_in, const std::string& path);
32 
33  Real coeff;
35  };
36 
37  /*! @ingroup gaugeacts */
38  void read(XMLReader& xml, const std::string& path, SpatialTwoPlaqGaugeActParams& param);
39 
40 
41  //! Plaquette gauge action
42  /*! \ingroup gaugeacts
43  *
44  * The standard Plaquette gauge action
45  */
46 
48  {
49  public:
50  //! General CreateGaugeState<P,Q>
52  const Real& coeff,
53  const AnisoParam_t& aniso) :
54  cgs(cgs_) {param.coeff = coeff; param.aniso = aniso; init();}
55 
56  //! Read coeff from a param struct
59  cgs(cgs_), param(p) {init();}
60 
61  //! Is anisotropy used?
62  bool anisoP() const {return param.aniso.anisoP;}
63 
64  //! Anisotropy factor
65  const Real anisoFactor() const {return param.aniso.xi_0;}
66 
67  //! Anisotropic direction
68  int tDir() const {return param.aniso.t_dir;}
69 
70  //! Return the set on which the gauge action is defined
71  /*! Defined on the even-off (red/black) set */
72  const Set& getSet() const {return rb;}
73 
74  //! Compute staple
75  void staple(LatticeColorMatrix& result,
76  const Handle< GaugeState<P,Q> >& state,
77  int mu, int cb) const;
78 
79  //! Compute dS/dU
80  void deriv(multi1d<LatticeColorMatrix>& result,
81  const Handle< GaugeState<P,Q> >& state) const;
82 
83  //! Produce a gauge create state object
84  const CreateGaugeState<P,Q>& getCreateState() const {return *cgs;}
85 
86  //! Compute the actions
87  Double S(const Handle< GaugeState<P,Q> >& state) const;
88 
89  //! Destructor is automatic
91 
92  // Accessors -- non mutable members.
93  const Real getCoeff(void) const {return param.coeff;}
94 
95  protected:
97  void operator=(const SpatialTwoPlaqGaugeAct& a) {} //! Hide assignment
98 
99  //! Internal initializer
100  void init();
101 
102  private:
103  Handle< CreateGaugeState<P,Q> > cgs; // Create Gauge State
105 
106  };
107 
108 }
109 
110 
111 #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
Handle< CreateGaugeState< P, Q > > cgs
Double S(const Handle< GaugeState< P, Q > > &state) const
Compute the actions.
int tDir() const
Anisotropic direction.
SpatialTwoPlaqGaugeAct(Handle< CreateGaugeState< P, Q > > cgs_, const SpatialTwoPlaqGaugeActParams &p)
Read coeff from a param struct.
void operator=(const SpatialTwoPlaqGaugeAct &a)
const Real anisoFactor() const
Anisotropy factor.
const Set & getSet() const
Return the set on which the gauge action is defined.
~SpatialTwoPlaqGaugeAct()
Destructor is automatic.
void staple(LatticeColorMatrix &result, const Handle< GaugeState< P, Q > > &state, int mu, int cb) const
Compute staple.
void deriv(multi1d< LatticeColorMatrix > &result, const Handle< GaugeState< P, Q > > &state) const
Compute dS/dU.
SpatialTwoPlaqGaugeActParams param
bool anisoP() const
Is anisotropy used?
const CreateGaugeState< P, Q > & getCreateState() const
Produce a gauge create state object.
SpatialTwoPlaqGaugeAct(Handle< CreateGaugeState< P, Q > > cgs_, const Real &coeff, const AnisoParam_t &aniso)
General CreateGaugeState<P,Q>
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.
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
Parameters for anisotropy.
Definition: aniso_io.h:24