CHROMA
szinqio_gauge_init.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Read a SZINQIO config
4  */
5 
6 #ifndef __szinqio_gauge_init_h__
7 #define __szinqio_gauge_init_h__
8 
10 
11 namespace Chroma
12 {
13 
14  //! Name and registration
15  namespace SZINQIOGaugeInitEnv
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  QDP_serialparallel_t cfg_pario; /*!< QIO Parallel IO flag */
31  bool reunitP; /*!< Reunitarize after read */
32  };
33 
34 
35  //! Returns a link smearing group with these params
37 
38 
39  //! Gauge initialization
40  /*! @ingroup gauge
41  *
42  * SZINQIO reader
43  */
44  class GaugeIniter : public GaugeInit
45  {
46  public:
47  //! Full constructor
48  GaugeIniter(const Params& p) : params(p) {}
49 
50  //! Initialize the gauge field
51  void operator()(XMLReader& gauge_file_xml,
52  XMLReader& gauge_xml,
53  multi1d<LatticeColorMatrix>& u) const;
54 
55  private:
56  //! Hide partial constructor
58 
59  private:
61  };
62 
63  } // end namespace
64 
65 
66  //! Reader
67  /*! @ingroup gauge */
68  void read(XMLReader& xml, const std::string& path, SZINQIOGaugeInitEnv::Params& param);
69 
70  //! Writer
71  /*! @ingroup gauge */
72  void write(XMLWriter& xml, const std::string& path, const SZINQIOGaugeInitEnv::Params& param);
73 
74 } // end namespace Chroma
75 
76 
77 #endif
Base class for gauge initialization.
Definition: gauge_init.h:19
GaugeIniter(const Params &p)
Full constructor.
void operator()(XMLReader &gauge_file_xml, XMLReader &gauge_xml, multi1d< LatticeColorMatrix > &u) const
Initialize the gauge field.
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.
const std::string name
Name to be used.
GroupXML_t createXMLGroup(const Params &p)
Returns a link smearing group with these params.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
static multi1d< LatticeColorMatrix > u
static QDP_ColorVector * in
::std::string string
Definition: gtest.h:1979
Hold group xml and type id.
Params for initializing config.
void writeXML(XMLWriter &in, const std::string &path) const
Parameters for running code.