CHROMA
wilson_coarse_fine_gaugeact.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Wilson gauge action supporting 2+2 anisotropy.
4  *
5  * Wilson gauge action on a 2+2 lattice.
6  * Follows the conventions of hep-lat/0303005 (TrinLat)
7  */
8 
9 #ifndef __wilson_coarse_fine_gaugeact_h__
10 #define __wilson_coarse_fine_gaugeact_h__
11 
12 #include "gaugeact.h"
13 #include "gaugebc.h"
15 
16 namespace Chroma
17 {
18 
19  /*! @ingroup gaugeacts */
20  namespace WilsonCoarseFineGaugeActEnv
21  {
22  extern const std::string name;
23  bool registerAll();
24  }
25 
26  //! Parameter structure
27  /*! @ingroup gaugeacts */
29  {
30  //! Base Constructor
32 
33  //! Read params from some root path
34  WilsonCoarseFineGaugeActParams(XMLReader& xml_in, const std::string& path);
35 
36  multi1d<int> coarse_dirs; /*!< Directions for coarse lattice */
37  Real coeff_ff; /*!< General coefficient of fine-fine plaquette */
38  Real coeff_cf; /*!< General coefficient of coarse-fine plaquette */
39  Real coeff_cc; /*!< General coefficient of coarse-coare plaquette */
40  };
41 
42  /*! @ingroup gaugeacts */
43  void read(XMLReader& xml, const std::string& path, WilsonCoarseFineGaugeActParams& param);
44 
45 
46  //! WilsonCoarseFine gauge action
47  /*! \ingroup gaugeacts
48  *
49  * Wilson gauge action on a 2+2 lattice.
50  * Follows the conventions of hep-lat/0303005 (TrinLat)
51  */
52 
54  {
55  public:
56  //! Read beta from a param struct
59 
60  //! Return the set on which the gauge action is defined
61  /*! Defined on the even-off (red/black) set */
62  const Set& getSet() const {return rb;}
63 
64  //! Compute staple
65  /*! Default version. Derived class should override this if needed. */
66  void staple(LatticeColorMatrix& result,
67  const Handle< GaugeState<P,Q> >& state,
68  int mu, int cb) const
69  {
70  plaq->staple(result,state,mu,cb);
71  }
72 
73  //! Compute dS/dU
74  void deriv(multi1d<LatticeColorMatrix>& result,
75  const Handle< GaugeState<P,Q> >& state) const
76  {
77  plaq->deriv(result,state);
78  }
79 
80  //! Compute the actions
81  Double S(const Handle< GaugeState<P,Q> >& state) const
82  {
83  return plaq->S(state);
84  }
85 
86  //! Destructor is automatic
88 
89  //! Produce a gauge create state object
90  const CreateGaugeState<P,Q>& getCreateState() const {return plaq->getCreateState();}
91 
92  protected:
93  //! Private initializer
94  void init(Handle< CreateGaugeState<P,Q> > cgs);
95 
96  //! Partial constructor
98  //! Hide assignment
100 
101  private:
102  Handle<PlaqGaugeAct> plaq; /*!< Hold a plaquette gaugeact */
104  };
105 
106 } // end namespace Chroma
107 
108 
109 #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
void staple(LatticeColorMatrix &result, const Handle< GaugeState< P, Q > > &state, int mu, int cb) const
Compute staple.
void operator=(const WilsonCoarseFineGaugeAct &a)
Hide assignment.
Double S(const Handle< GaugeState< P, Q > > &state) const
Compute the actions.
void deriv(multi1d< LatticeColorMatrix > &result, const Handle< GaugeState< P, Q > > &state) const
Compute dS/dU.
const CreateGaugeState< P, Q > & getCreateState() const
Produce a gauge create state object.
~WilsonCoarseFineGaugeAct()
Destructor is automatic.
void init(Handle< CreateGaugeState< P, Q > > cgs)
Private initializer.
const Set & getSet() const
Return the set on which the gauge action is defined.
WilsonCoarseFineGaugeActParams param
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
Plaquette gauge action.