CHROMA
wall_sink_smearing.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Wall sink smearing
4  */
5 
6 #ifndef __wall_sink_smearing_h__
7 #define __wall_sink_smearing_h__
8 
10 #include "io/xml_group_reader.h"
11 
12 namespace Chroma
13 {
14 
15  //! Name and registration
16  /*! @ingroup sinks */
17  namespace WallQuarkSinkSmearingEnv
18  {
19  bool registerAll();
20 
21  //! Return the name
23 
24 
25  //! Wall sink parameters
26  /*! @ingroup sinks */
27  struct Params
28  {
29  Params();
30  Params(XMLReader& in, const std::string& path);
31  void writeXML(XMLWriter& in, const std::string& path) const;
32 
33  int j_decay; /*! Direction of decay. The wall projection is orthog to this dir */
34  };
35 
36 
37  //! Wall sink smearing
38  /*! @ingroup sinks
39  *
40  * Make a wall propagator sink
41  */
42  template<typename T>
43  class SinkSmear : public QuarkSourceSink<T>
44  {
45  public:
46  //! Full constructor
47  /*! The gauge field is not used, so discard */
48  SinkSmear(const Params& p, const multi1d<LatticeColorMatrix>& u) : params(p) {}
49 
50  //! Smear the sink
51  void operator()(T& obj) const;
52 
53  private:
54  //! Hide partial constructor
55  SinkSmear() {}
56 
57  private:
58  Params params; /*!< sink params */
59  };
60 
61  } // end namespace
62 
63 
64  //! Reader
65  /*! @ingroup sinks */
66  void read(XMLReader& xml, const std::string& path, WallQuarkSinkSmearingEnv::Params& param);
67 
68  //! Writer
69  /*! @ingroup sinks */
70  void write(XMLWriter& xml, const std::string& path, const WallQuarkSinkSmearingEnv::Params& param);
71 
72 } // end namespace Chroma
73 
74 
75 #endif
Base class for quark source and sink smearing.
void operator()(T &obj) const
Smear the sink.
SinkSmear(const Params &p, const multi1d< LatticeColorMatrix > &u)
Full constructor.
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.
Handle< MapObject< int, EVPair< LatticeColorVector > > > obj
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 source or sink smearing.
void writeXML(XMLWriter &in, const std::string &path) const
Read an XML group as a std::string.