CHROMA
no_link_smearing.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief No link smearing
3  */
4 
5 #include "chromabase.h"
6 
9 
10 namespace Chroma
11 {
12 
13  // Read parameters
14  void read(XMLReader& xml, const std::string& path, NoLinkSmearingEnv::Params& param)
15  {
16  NoLinkSmearingEnv::Params tmp(xml, path);
17  param = tmp;
18  }
19 
20  //! Parameters for running code
21  void write(XMLWriter& xml, const std::string& path, const NoLinkSmearingEnv::Params& param)
22  {
23  param.writeXML(xml, path);
24  }
25 
26 
27  //! Hooks to register the class
28  namespace NoLinkSmearingEnv
29  {
30  namespace
31  {
32  //! Callback function
33  LinkSmearing* createSource(XMLReader& xml_in,
34  const std::string& path)
35  {
36  return new LinkSmear(Params(xml_in, path));
37  }
38 
39  //! Local registration flag
40  bool registered = false;
41 
42  //! Name to be used
43  const std::string name = "NONE";
44  }
45 
46  //! Return the name
47  std::string getName() {return name;}
48 
49  //! Register all the factories
50  bool registerAll()
51  {
52  bool success = true;
53  if (! registered)
54  {
55  success &= Chroma::TheLinkSmearingFactory::Instance().registerObject(name, createSource);
56  registered = true;
57  }
58  return success;
59  }
60 
61 
62  //! Parameters for running code
63  Params::Params(XMLReader& xml, const std::string& path)
64  {
65  }
66 
67 
68  //! Parameters for running code
69  void Params::writeXML(XMLWriter& xml, const std::string& path) const
70  {
71  push(xml, path);
72 
73  int version = 1;
74  write(xml, "version", version);
75  write(xml, "LinkSmearingType", name);
76 
77  pop(xml);
78  }
79 
80 
81  //! Smear the links
82  void
83  LinkSmear::operator()(multi1d<LatticeColorMatrix>& u) const
84  {
85  }
86 
87  }
88 }
Primary include file for CHROMA library code.
Base class for link smearing.
Definition: link_smearing.h:19
void operator()(multi1d< LatticeColorMatrix > &u) const
Smear the links.
static T & Instance()
Definition: singleton.h:432
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.
static bool registered
Local registration flag.
const std::string name
Name to be used.
GaugeInit * createSource(XMLReader &xml_in, const std::string &path)
Callback function.
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
LatticeFermion tmp
Definition: mespbg5p_w.cc:36
push(xml_out,"Condensates")
pop(xml_out)
::std::string string
Definition: gtest.h:1979
Params for No link smearing.
void writeXML(XMLWriter &in, const std::string &path) const
Parameters for running code.