CHROMA
cern_gauge_init.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Read a CERN config
4  */
5 
6 #ifndef __cern_gauge_init_h__
7 #define __cern_gauge_init_h__
8 
10 
11 namespace Chroma
12 {
13 
14  //! Name and registration
15  namespace CERNGaugeInitEnv
16  {
17  extern const std::string name;
18  bool registerAll();
19 
20 
21  //! Params for initializing config
22  /*! @ingroup gauge */
23  struct Params
24  {
25  Params() {}
26  Params(XMLReader& in, const std::string& path);
27  void writeXML(XMLWriter& in, const std::string& path) const;
28 
29  std::string cfg_file; /*!< File name */
30  };
31 
32 
33 
34  //! Gauge initialization
35  /*! @ingroup gauge
36  *
37  * CERN reader
38  */
39  class GaugeIniter : public GaugeInit
40  {
41  public:
42  //! Full constructor
43  GaugeIniter(const Params& p) : params(p) {}
44 
45  //! Initialize the gauge field
46  void operator()(XMLReader& gauge_file_xml,
47  XMLReader& gauge_xml,
48  multi1d<LatticeColorMatrix>& u) const;
49 
50  private:
51  //! Hide partial constructor
53 
54  private:
56  };
57 
58  } // end namespace
59 
60 
61  //! Reader
62  /*! @ingroup gauge */
63  void read(XMLReader& xml, const std::string& path, CERNGaugeInitEnv::Params& param);
64 
65  //! Writer
66  /*! @ingroup gauge */
67  void write(XMLWriter& xml, const std::string& path, const CERNGaugeInitEnv::Params& param);
68 
69 } // end namespace Chroma
70 
71 
72 #endif
void operator()(XMLReader &gauge_file_xml, XMLReader &gauge_xml, multi1d< LatticeColorMatrix > &u) const
Initialize the gauge field.
GaugeIniter(const Params &p)
Full constructor.
GaugeIniter()
Hide partial constructor.
Base class for gauge initialization.
Definition: gauge_init.h:19
Gauge initialization.
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.
const std::string name
Name to be used.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
static multi1d< LatticeColorMatrix > u
static QDP_ColorVector * in
::std::string string
Definition: gtest.h:1979
Params for initializing config.
void writeXML(XMLWriter &in, const std::string &path) const
Parameters for running code.