CHROMA
two_flavor_multihasen_cancel_monomial_params_w.cc
Go to the documentation of this file.
1 /*! @file
2  * @brief Two flavor Monomials - gauge action or fermion binlinear contributions for HMC
3  */
5 
6 namespace Chroma
7 {
8  // Read the parameters
10  TwoFlavorMultihasenCancelMonomialParams(XMLReader& xml_in, const std::string& path)
11  {
12  // Get the top of the parameter XML tree
13  XMLReader paramtop(xml_in, path);
14  try{
15  // Read the inverter Parameters
16  read(paramtop, "ShiftedMass", mu);
17  inv_param = readXMLGroup(paramtop, "InvertParam", "invType");
18  fermact = readXMLGroup(paramtop, "FermionAction", "FermAct");
19 
20  if(paramtop.count("./ChronologicalPredictor") == 0)
21  {
22  predictor.xml = "";
23  }else{
24  predictor = readXMLGroup(paramtop, "ChronologicalPredictor", "Name");
25  }
26  }catch(const std::string& s){
27  QDPIO::cerr<<"Caught Exception while reading parameters: "<<s<<std::endl;
28  QDP_abort(1);
29  }
30 
31  QDPIO::cout<<"TwoFlavorMultihasenCancelMonomialParams: read \n"<<fermact.id<<std::endl;
32  }
33 
34  //! Read Parameters
35  void read(XMLReader& xml, const std::string& path,
37  {
39  params = tmp;
40  }
41 
42  //! Write Parameters
43  void write(XMLWriter& xml, const std::string& path,
45  {
46  write(xml, "ShiftedMass", params.mu);
47  xml<<params.fermact.xml;
48  xml<<params.inv_param.xml;
49  }
50 }
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 monomial params cancel term for multi-Hasenbusch prec.