CHROMA
rndz2wall_source_const.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Random Z2 wall source construction
4  */
5 
6 #ifndef __rndz2wall_source_const_h__
7 #define __rndz2wall_source_const_h__
8 
10 
11 namespace Chroma
12 {
13 
14  //! Name and registration
15  /*! @ingroup sources */
16  namespace RandZ2WallQuarkSourceConstEnv
17  {
18  bool registerAll();
19 
20  //! Return the name
22 
23  //! Random Z2 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  Seed ran_seed; /*!< Set the seed to this value */
32 
33  int j_decay; /*!< decay direction */
34  int t_source; /*!< source time slice location */
35  };
36 
37 
38  //! Random Z2 wall source construction
39  /*! @ingroup sources
40  *
41  * Create a random z2 wall 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, RandZ2WallQuarkSourceConstEnv::Params& param);
67 
68  //! Writer
69  /*! @ingroup sources */
70  void write(XMLWriter& xml, const std::string& path, const RandZ2WallQuarkSourceConstEnv::Params& param);
71 
72 } // end namespace Chroma
73 
74 
75 #endif
Base class for quark source construction.
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.
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