CHROMA
norm_sh_source_const.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Normalized Shell source construction
4  */
5 
6 #ifndef __nsh_source_const_h__
7 #define __nsh_source_const_h__
8 
10 #include "io/xml_group_reader.h"
11 
12 namespace Chroma
13 {
14 
15 
16  //! Name and registration
17  /*! @ingroup sources */
18  namespace NormShellQuarkSourceConstEnv
19  {
20  bool registerAll();
21 
22  //! Return the name
24 
25 
26  //! Point source parameters
27  /*! @ingroup sources */
28  struct Params
29  {
30  Params();
31  Params(XMLReader& in, const std::string& path);
32  void writeXML(XMLWriter& out, const std::string& path) const;
33 
34  bool quark_smear_lastP; /*!< Flag controlling order of smearing */
35 
36  GroupXML_t quark_smearing; /*!< xml std::string holding smearing params */
37  GroupXML_t quark_displacement; /*!< displacement xml */
38  GroupXML_t link_smearing; /*!< link smearing xml */
39 
40  int j_decay; /*!< Decay direction */
41  multi1d<int> t_srce; /*!< source location */
42  bool site_normalized ; // not implemented
43  int Nhits ;
44  };
45 
46 
47  //! Shell source construction
48  /*! @ingroup sources
49  *
50  * Create a shell quark 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 NormShellQuarkSourceConstEnv
71 
72 
73  //! Reader
74  /*! @ingroup sources */
75  void read(XMLReader& xml, const std::string& path, NormShellQuarkSourceConstEnv::Params& param);
76 
77  //! Writer
78  /*! @ingroup sources */
79  void write(XMLWriter& xml, const std::string& path, const NormShellQuarkSourceConstEnv::Params& param);
80 
81 
82 } // end namespace Chroma
83 
84 
85 #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.
std::string getName()
Return the name.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
static multi1d< LatticeColorMatrix > u
LinOpSysSolverMGProtoClover::T T
static QDP_ColorVector * out
Constructor.
static QDP_ColorVector * in
::std::string string
Definition: gtest.h:1979
Source construction.
Hold group xml and type id.
void writeXML(XMLWriter &out, const std::string &path) const
Read an XML group as a std::string.