CHROMA
rndzNwall_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 __rndzNwall_source_const_h__
7 #define __rndzNwall_source_const_h__
8 
10 #include "io/xml_group_reader.h"
11 
12 namespace Chroma
13 {
14 
15  //! Name and registration
16  /*! @ingroup sources */
17  namespace RandZNWallQuarkSourceConstEnv
18  {
19  bool registerAll();
20 
21  //! Return the name
23 
24  //! Random ZN wall source parameters
25  /*! @ingroup sources */
26  struct Params
27  {
28  Params();
29  Params(XMLReader& in, const std::string& path);
30  void writeXML(XMLWriter& in, const std::string& path) const;
31 
32  Seed ran_seed; /*!< Set the seed to this value */
33 
34  int j_decay; /*!< decay direction */
35  int t_source; /*!< source time slice location */
36  int N ; /*!< allow arbitrary Z_N */
37 
38  bool quark_smear_lastP; /*!< Flag controlling order of smearing */
39 
40  GroupXML_t quark_smearing; /*!< xml std::string holding smearing params */
41  GroupXML_t quark_displacement; /*!< displacement xml */
42  GroupXML_t link_smearing; /*!< link smearing xml */
43  };
44 
45 
46  //! Random ZN wall source construction
47  /*! @ingroup sources
48  *
49  * Create a random z2 wall source
50  */
51  template<typename T>
53  {
54  public:
55  //! Full constructor
56  SourceConst(const Params& p) : params(p) {}
57 
58  //! Construct the source
59  T operator()(const multi1d<LatticeColorMatrix>& u) const;
60 
61  private:
62  //! Hide partial constructor
64 
65  private:
66  Params params; /*!< source params */
67  };
68 
69  } // end namespace
70 
71 
72  //! Reader
73  /*! @ingroup sources */
74  void read(XMLReader& xml, const std::string& path, RandZNWallQuarkSourceConstEnv::Params& param);
75 
76  //! Writer
77  /*! @ingroup sources */
78  void write(XMLWriter& xml, const std::string& path, const RandZNWallQuarkSourceConstEnv::Params& param);
79 
80 } // end namespace Chroma
81 
82 
83 #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.
Hold group xml and type id.
void writeXML(XMLWriter &in, const std::string &path) const
Read an XML group as a std::string.