CHROMA
enum_gaugeacttype_io.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Gauge action enum
4  */
5 #include "enum_gaugeacttype_io.h"
6 
7 /* *********!!!!!!!!!!!!!!!!!!! WARNING WARNING !!!!!!!!!!!!!!!! *********** */
8 // These actions are only relevant to Al Hart's topological code.
9 // The production HMC etc does not use these enums but works off its
10 // own factory
11 /* *********!!!!!!!!!!!!!!!!!!! WARNING WARNING !!!!!!!!!!!!!!!! *********** */
12 
13 #include <string>
14 
15 namespace Chroma {
16 
17  namespace GaugeActTypeEnv {
18 
19  bool registerAll(void)
20  {
21  bool success;
22  success = theGaugeActTypeMap::Instance().registerPair(std::string("WILSON"), GAUGE_ACT_WILSON );
23  success = theGaugeActTypeMap::Instance().registerPair(std::string("SYMZK_1X2"), GAUGE_ACT_SYMZK_1X2 );
24  success = theGaugeActTypeMap::Instance().registerPair(std::string("IWASAKI"), GAUGE_ACT_IWASAKI );
25  success = theGaugeActTypeMap::Instance().registerPair(std::string("DBW2"), GAUGE_ACT_DBW2 );
26  success = theGaugeActTypeMap::Instance().registerPair(std::string("3_LOOP_IMP"), GAUGE_ACT_3_LOOP_IMP );
27  success = theGaugeActTypeMap::Instance().registerPair(std::string("4_LOOP_IMP"), GAUGE_ACT_4_LOOP_IMP );
28  success = theGaugeActTypeMap::Instance().registerPair(std::string("5_LOOP_IMP"), GAUGE_ACT_5_LOOP_IMP );
29  return success;
30  }
31 
32  //! The number of different shaped loops in largest action
33  const int No_fmn = 5;
34 
35  const std::string typeIDString = "GaugeActType";
37  }
38  using namespace GaugeActTypeEnv;
39 
40  //! Read an GaugeActType enum
41  void read(XMLReader& xml_in, const std::string& path, GaugeActType& t) {
42  theGaugeActTypeMap::Instance().read(typeIDString, xml_in, path,t);
43  }
44 
45  //! Write an GaugeActType enum
46  void write(XMLWriter& xml_out, const std::string& path, const GaugeActType& t) {
47  theGaugeActTypeMap::Instance().write(typeIDString, xml_out, path, t);
48  }
49 }
static T & Instance()
Definition: singleton.h:432
Gauge action enum.
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.
GaugeActType
GaugeAct type.
int t
Definition: meslate.cc:37
const int No_fmn
The number of different shaped loops in largest action.
const std::string typeIDString
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979