CHROMA
partwall_source_const.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Partial wall source construction
4  */
5 
6 #ifndef __partial_wall_source_const_h__
7 #define __partial_wall_source_const_h__
8 
10 
11 namespace Chroma
12 {
13 
14  //! Structure holding directions
15  /*! @ingroup sources */
16  struct FixedDir_t
17  {
18  int dir; /*!< Direction to hold fixed */
19  int coord; /*!< Coordinate along dir held fixed */
20  };
21 
22 
23  //! Name and registration
24  /*! @ingroup sources */
25  namespace PartialWallQuarkSourceConstEnv
26  {
27  bool registerAll();
28 
29  //! Return the name
31 
32  //! PartialWall source parameters
33  /*! @ingroup sources */
34  struct Params
35  {
36  Params();
37  Params(XMLReader& in, const std::string& path);
38  void writeXML(XMLWriter& in, const std::string& path) const;
39 
40 // int j_decay; /*!< decay direction */
41 // int t_source; /*!< source time slice location */
42 
43  multi1d<FixedDir_t> fixed_dirs;
44  };
45 
46 
47  //! PartialWall source construction
48  /*! @ingroup sources
49  *
50  * Create a wall propagator source
51  */
52  template<typename T>
54  {
55  public:
56  //! Full constructor
57  SourceConst(const Params& p) : params(p) {}
58 
59  //! Construct the source
60  T operator()(const multi1d<LatticeColorMatrix>& u) const;
61 
62  private:
63  //! Hide partial constructor
65 
66  private:
67  Params params; /*!< source params */
68  };
69 
70  } // end namespace
71 
72 
73  //! Reader
74  /*! @ingroup sources */
75  void read(XMLReader& xml, const std::string& path, PartialWallQuarkSourceConstEnv::Params& param);
76 
77  //! Writer
78  /*! @ingroup sources */
79  void write(XMLWriter& xml, const std::string& path, const PartialWallQuarkSourceConstEnv::Params& param);
80 
81 } // end namespace Chroma
82 
83 
84 #endif
T operator()(const multi1d< LatticeColorMatrix > &u) const
Construct the source.
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.
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.
Structure holding directions.
void writeXML(XMLWriter &in, const std::string &path) const