CHROMA
hyp_link_smearing.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief HYP link smearing
4  */
5 
6 #ifndef __hyp_link_smearing_h__
7 #define __hyp_link_smearing_h__
8 
10 
11 namespace Chroma
12 {
13 
14  //! Name and registration
15  namespace HypLinkSmearingEnv
16  {
17  bool registerAll();
18 
19  //! Return the name
21 
22  //! Params for Hyp 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 alpha1; /*!< staple coefficient "1" */
31  Real alpha2; /*!< staple coefficient "2" */
32  Real alpha3; /*!< staple coefficient "3" */
33  int num_smear; /*!< Number of smearing hits */
34  int no_smear_dir; /*!< Direction to not smear */
35  int BlkMax; /*!< Max number of iterations */
36  Real BlkAccu; /*!< Relative error to maximize trace */
37  };
38 
39 
40  //! Hyp link smearing
41  /*! @ingroup smear
42  *
43  * Hyp link smearing object
44  */
45  class LinkSmear : public LinkSmearing
46  {
47  public:
48  //! Full constructor
49  LinkSmear(const Params& p) : params(p) {}
50 
51  //! Smear the links
52  void operator()(multi1d<LatticeColorMatrix>& u) const;
53 
54  private:
55  //! Hide partial constructor
56  LinkSmear() {}
57 
58  private:
59  Params params; /*!< smearing params */
60  };
61 
62  } // end namespace
63 
64 
65  //! Reader
66  /*! @ingroup smear */
67  void read(XMLReader& xml, const std::string& path, HypLinkSmearingEnv::Params& param);
68 
69  //! Writer
70  /*! @ingroup smear */
71  void write(XMLWriter& xml, const std::string& path, const HypLinkSmearingEnv::Params& param);
72 
73 } // end namespace Chroma
74 
75 
76 #endif
LinkSmear(const Params &p)
Full constructor.
void operator()(multi1d< LatticeColorMatrix > &u) const
Smear the links.
LinkSmear()
Hide partial constructor.
Base class for link smearing.
Definition: link_smearing.h:19
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.
bool registerAll()
Register all the factories.
std::string getName()
Return the name.
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 Hyp link smearing.
void writeXML(XMLWriter &in, const std::string &path) const
Parameters for running code.