CHROMA
wall_source_const.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Wall source construction
4  */
5 
6 #ifndef __wall_source_const_h__
7 #define __wall_source_const_h__
8 
10 
11 namespace Chroma
12 {
13 
14  //! Name and registration
15  /*! @ingroup sources */
16  namespace WallQuarkSourceConstEnv
17  {
18  bool registerAll();
19 
20  //! Return the name
22 
23  //! Wall source parameters
24  /*! @ingroup sources */
25  struct Params
26  {
27  Params();
28  Params(XMLReader& in, const std::string& path);
29  void writeXML(XMLWriter& in, const std::string& path) const;
30 
31  int j_decay; /*!< decay direction */
32  int t_source; /*!< source time slice location */
33  };
34 
35 
36  //! Wall source construction
37  /*! @ingroup sources
38  *
39  * Create a wall propagator source
40  */
41  template<typename T>
43  {
44  public:
45  //! Full constructor
46  SourceConst(const Params& p) : params(p) {}
47 
48  //! Construct the source
49  T operator()(const multi1d<LatticeColorMatrix>& u) const;
50 
51  private:
52  //! Hide partial constructor
54 
55  private:
56  Params params; /*!< source params */
57  };
58 
59  } // end namespace
60 
61 
62  //! Reader
63  /*! @ingroup sources */
64  void read(XMLReader& xml, const std::string& path, WallQuarkSourceConstEnv::Params& param);
65 
66  //! Writer
67  /*! @ingroup sources */
68  void write(XMLWriter& xml, const std::string& path, const WallQuarkSourceConstEnv::Params& param);
69 
70 } // end namespace Chroma
71 
72 
73 #endif
Base class for quark source construction.
SourceConst(const Params &p)
Full constructor.
T operator()(const multi1d< LatticeColorMatrix > &u) const
Construct the source.
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
LinOpSysSolverMGProtoClover::T T
static QDP_ColorVector * in
::std::string string
Definition: gtest.h:1979
Source construction.
void writeXML(XMLWriter &in, const std::string &path) const