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