CHROMA
gaus_quark_smearing.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Gaussian smearing of color std::vector and propagator
4  */
5 
6 #ifndef __gaus_quark_smearing_h__
7 #define __gaus_quark_smearing_h__
8 
10 
11 namespace Chroma
12 {
13  //! Name and registration
14  /*! @ingroup smear */
15  namespace GausQuarkSmearingEnv
16  {
17  bool registerAll();
18 
19  //! Return the name
21 
22  //! Params for Gauss quark 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 wvf_param; /*!< Smearing width */
31  int wvfIntPar; /*!< Number of smearing hits */
32  int no_smear_dir; /*!< No smearing in this direction */
33  };
34 
35 
36  //! Gaussian quark smearing
37  /*! @ingroup smear
38  *
39  * Gaussian quark smearing object
40  */
41  template<typename T>
42  class QuarkSmear : public QuarkSmearing<T>
43  {
44  public:
45  //! Full constructor
46  QuarkSmear(const Params& p) : params(p) {}
47 
48  //! Smear the quark
49  void operator()(T& quark, const multi1d<LatticeColorMatrix>& u) const;
50 
51  private:
52  //! Hide partial constructor
54 
55  private:
56  Params params; /*!< smearing params */
57  };
58 
59  } // end namespace
60 
61  //! Reader
62  /*! @ingroup smear */
63  void read(XMLReader& xml, const std::string& path, GausQuarkSmearingEnv::Params& param);
64 
65  //! Writer
66  /*! @ingroup smear */
67  void write(XMLWriter& xml, const std::string& path, const GausQuarkSmearingEnv::Params& param);
68 
69 } // end namespace Chroma
70 
71 #endif
void operator()(T &quark, const multi1d< LatticeColorMatrix > &u) const
Smear the quark.
QuarkSmear(const Params &p)
Full constructor.
Base class for quark smearing.
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
LinOpSysSolverMGProtoClover::T T
static QDP_ColorVector * in
::std::string string
Definition: gtest.h:1979
Quark smearing.
Params for Gauss quark smearing.
void writeXML(XMLWriter &in, const std::string &path) const
Parameters for running code.