CHROMA
stout_link_smearing.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Stout link smearing
4  */
5 
6 #ifndef __stout_link_smearing_h__
7 #define __stout_link_smearing_h__
8 
10 
11 namespace Chroma
12 {
13 
14  //! Name and registration
15  namespace StoutLinkSmearingEnv
16  {
17  bool registerAll();
18 
19  //! Return the name
21 
22  //! Params for Stout link smearing
23  /*! @ingroup smear */
24  struct Params
25  {
26  Params() {}
27  Params(XMLReader& in, const std::string& path);
28  void writeXML(XMLWriter& in, const std::string& path) const;
29 
30  Real link_smear_fact; /*!< Smearing parameters */
31  int link_smear_num; /*!< Number of smearing hits */
32  multi1d<bool> smear_dirs; /*!< Only allow smearing and staples in these directions */
33 
34  multi2d<Real> rho; /*!< Parameters actually used by stout::smear_links */
35  };
36 
37 
38 
39  //! Stout link smearing
40  /*! @ingroup smear
41  *
42  * Stout link smearing object
43  */
44  class LinkSmear : public LinkSmearing
45  {
46  public:
47  //! Full constructor
48  LinkSmear(const Params& p) : params(p) {}
49 
50  //! Smear the links
51  void operator()(multi1d<LatticeColorMatrix>& u) const;
52 
53  private:
54  //! Hide partial constructor
55  LinkSmear() {}
56 
57  private:
58  Params params; /*!< smearing params */
59  };
60 
61  } // end namespace
62 
63 
64  //! Reader
65  /*! @ingroup smear */
66  void read(XMLReader& xml, const std::string& path, StoutLinkSmearingEnv::Params& param);
67 
68  //! Writer
69  /*! @ingroup smear */
70  void write(XMLWriter& xml, const std::string& path, const StoutLinkSmearingEnv::Params& param);
71 
72 } // end namespace Chroma
73 
74 
75 #endif
Base class for link smearing.
Definition: link_smearing.h:19
LinkSmear(const Params &p)
Full constructor.
void operator()(multi1d< LatticeColorMatrix > &u) const
Smear the links.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams &param)
Read parameters.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams &param)
Writer parameters.
std::string getName()
Return the name.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
static multi1d< LatticeColorMatrix > u
static QDP_ColorVector * in
::std::string string
Definition: gtest.h:1979
Params for Stout link smearing.
void writeXML(XMLWriter &in, const std::string &path) const
Parameters for running code.