CHROMA
mom_source_const.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Fixed momentum (wall) source construction
4  */
5 
6 #ifndef __mom_source_const_h__
7 #define __mom_source_const_h__
8 
10 
11 namespace Chroma
12 {
13 
14  //! Name and registration
15  /*! @ingroup sources */
16  namespace MomWallQuarkSourceConstEnv
17  {
18  bool registerAll();
19 
20  //! Return the name
22 
23  //! MomWall 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  multi1d<int> mom ; /*<! prototype momentum */
32  int j_decay; /*<! time direction */
33  multi1d<int> t_srce ; /*<! the origin for the FT */
34  bool av_mom ; /*<! average equivalent momenta */
35  };
36 
37 
38  //! MomWall source construction
39  /*! @ingroup sources
40  *
41  * Create a momentum wall propagator source
42  */
43  template<typename T>
45  {
46  public:
47  //! Full constructor
48  SourceConst(const Params& p) : params(p) {}
49 
50  //! Construct the source
51  T operator()(const multi1d<LatticeColorMatrix>& u) const;
52 
53  private:
54  //! Hide partial constructor
56 
57  private:
58  Params params; /*!< source params */
59  };
60 
61  } // end namespace
62 
63 
64  //! Reader
65  /*! @ingroup sources */
66  void read(XMLReader& xml, const std::string& path, MomWallQuarkSourceConstEnv::Params& param);
67 
68  //! Writer
69  /*! @ingroup sources */
70  void write(XMLWriter& xml, const std::string& path, const MomWallQuarkSourceConstEnv::Params& param);
71 
72 } // end namespace Chroma
73 
74 
75 #endif
T operator()(const multi1d< LatticeColorMatrix > &u) const
Construct the source.
SourceConst(const Params &p)
Full constructor.
Base class for quark source construction.
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