CHROMA
aniso_sym_spatial_gaugeact.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Spatial part of Tree level LW action
4  */
5 
6 #ifndef __aniso_sym_spatial_gaugeact_h__
7 #define __aniso_sym_spatial_gaugeact_h__
8 
9 #include "gaugeact.h"
10 #include "gaugebc.h"
14 
15 
16 namespace Chroma
17 {
18 
19  /*! @ingroup gaugeacts */
20  namespace AnisoSymSpatialGaugeActEnv
21  {
22  extern const std::string name;
23  bool registerAll();
24  }
25 
26  //! Spatial anisotropic Symanzik improved gauge action
27  /*! \ingroup gaugeacts
28  *
29  * Contains space-space plaquette and space space rectangle terms
30  * only. Useful for when one wants to split the spatial and temporal
31  * parts of the general Symanzik gauge action onto different timescales
32  * in an (R)HMC simulation.
33  */
34 
36  {
37  public:
38  // Typedefs to save typing
39  typedef multi1d<LatticeColorMatrix> P;
40  typedef multi1d<LatticeColorMatrix> Q;
41 
42  //! Read beta from a param struct
45  cgs(cgs_), param(p) {init();}
46 
47  //! Is anisotropy used?
48  bool anisoP() const {return param.aniso.anisoP; }
49 
50  //! Anisotropy factor
51  const Real anisoFactor() const {return param.aniso.xi_0;}
52 
53  //! Anisotropic direction
54  int tDir() const {return param.aniso.t_dir;}
55 
56  //! Return the set on which the gauge action is defined
57  /*! Defined on the even-off (red/black) set */
58  const Set& getSet() const {return rb;}
59 
60  //! Compute staple
61  /*! Default version. Derived class should override this if needed. */
62  void staple(LatticeColorMatrix& result,
63  const Handle< GaugeState<P,Q> >& state,
64  int mu, int cb) const
65  {
66  QDPIO::cerr << "This function is not implemented" << std::endl;
67  QDP_abort(1);
68 
69  }
70 
71  //! Compute dS/dU
72  void deriv(multi1d<LatticeColorMatrix>& result,
73  const Handle< GaugeState<P,Q> >& state) const;
74  /*
75  {
76  plaq->derivSpatial(result,state,param.aniso.t_dir);
77  multi1d<LatticeColorMatrix> tmp;
78  rect->derivSpatial(tmp,state);
79  result += tmp;
80  }
81  */
82  //! Compute the actions
83  Double S(const Handle< GaugeState<P,Q> >& state) const;
84  /*
85  {
86  return plaq->spatialS(state, param.aniso.t_dir) + rect->spatialS(state);
87  }
88  */
89 
90  //! Produce a gauge create state object
91  const CreateGaugeState<P,Q>& getCreateState() const {return *cgs;}
92 
93  //! Destructor is automatic
95 
96  // Accessors -- non mutable members.
97  const Real getBeta(void) const { return param.beta; }
98 
99  const Real getUS(void) const { return param.u_s; }
100 
101 
102  protected:
103  //! Private initializer
104  // void init(Handle< CreateGaugeState<P,Q> > cgs_);
105  void init(void);
106 
107  //! Hide assignment
109 
110  private:
112  AnisoSymSpatialGaugeActParams param; /*!< The couplings and anisotropy*/
113  // Handle<PlaqGaugeAct> plaq; /*!< Hold a plaquette gaugeact */
114  // Handle<RectGaugeAct> rect; /*!< Hold a rectangle gaugeact */
115 
116  Real plaq_c_s;
117  Real rect_c_s;
118 
119  };
120 
121 }
122 
123 
124 #endif
Params for Anisotropic Symanzik Gauge Action.
Spatial anisotropic Symanzik improved gauge action.
bool anisoP() const
Is anisotropy used?
void init(void)
Private initializer.
void deriv(multi1d< LatticeColorMatrix > &result, const Handle< GaugeState< P, Q > > &state) const
Compute dS/dU.
AnisoSymSpatialGaugeActParams param
const Set & getSet() const
Return the set on which the gauge action is defined.
AnisoSymSpatialGaugeAct(Handle< CreateGaugeState< P, Q > > cgs_, const AnisoSymSpatialGaugeActParams &p)
Read beta from a param struct.
int tDir() const
Anisotropic direction.
const Handle< CreateGaugeState< P, Q > > cgs
Double S(const Handle< GaugeState< P, Q > > &state) const
Compute the actions.
~AnisoSymSpatialGaugeAct()
Destructor is automatic.
const CreateGaugeState< P, Q > & getCreateState() const
Produce a gauge create state object.
void staple(LatticeColorMatrix &result, const Handle< GaugeState< P, Q > > &state, int mu, int cb) const
Compute staple.
const Real anisoFactor() const
Anisotropy factor.
void operator=(const AnisoSymSpatialGaugeAct &a)
Hide assignment.
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
Plaquette gauge action.
Rectangle gauge action.
AnisoParam_t aniso
The anisotropy parameters.