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