CHROMA
two_flavor_ratio_conv_rat_monomial_params_w.cc
Go to the documentation of this file.
1 /*! @file
2  * @brief Two-flavor ratio of conventional fermion action monomial params
3  */
4 
6 
7 namespace Chroma
8 {
9 
10  // Read the parameters
12  {
13  // Get the top of the parameter XML tree
14  XMLReader paramtop(xml_in, path);
15 
16  try
17  {
18  // Read the inverter Parameters
19  read(paramtop, "Action", numer);
20  read(paramtop, "PrecAction", denom);
21 
22  if( paramtop.count("./ChronologicalPredictor") == 0 )
23  {
24  predictor.xml = "";
25  }
26  else {
27  predictor = readXMLGroup(paramtop, "ChronologicalPredictor", "Name");
28  }
29 
30  }
31  catch(const std::string& s) {
32  QDPIO::cerr << "Caught Exception while reading parameters: " << s <<std::endl;
33  QDP_abort(1);
34  }
35  }
36 
37  //! Read Parameters
38  void read(XMLReader& xml, const std::string& path,
40  {
42  params = tmp;
43  }
44 
45  //! Write Parameters
46  void write(XMLWriter& xml, const std::string& path,
48  {
49  write(xml, "Action", params.numer);
50  write(xml, "PrecAction", params.denom);
51  xml << params.predictor.xml;
52  }
53 
54 } //end namespace Chroma
55 
56 
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.
GroupXML_t readXMLGroup(XMLReader &xml_in, const std::string &path, const std::string &type_name)
Read group and return as a std::string.
Params params
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
LatticeFermion tmp
Definition: mespbg5p_w.cc:36
multi1d< LatticeFermion > s(Ncb)
::std::string string
Definition: gtest.h:1979
Two-flavor ratio of conventional fermion action monomial params.