CHROMA
ovext_const_div_by_resp_strategy.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Ovext rescale strategy
4  */
5 
6 #include "chromabase.h"
8 
9 using namespace QDP;
10 
11 namespace Chroma {
12  namespace OvExtConstDivByResPStrategyEnv {
13 
15  const std::string& path)
16  {
17  Real tuning_constant;
18  try {
19  XMLReader paramtop(xml_in, path);
20  read(paramtop, "./TuningConstant", tuning_constant);
21  }
22  catch(const std::string& e) {
23  QDPIO::cerr << "Caught Exception reading XML: " << e << std::endl;
24  QDP_abort(1);
25  }
26 
27  return new OvExtConstDivByResPStrategy(tuning_constant);
28  }
29 
30  const std::string name = "OVEXT_DIVIDE_BY_CONSTANT_TIMES_RESP_STRATEGY";
31 
32  //! Local registration flag
33  static bool registered = false;
34 
35  //! Register all the factories
36  bool registerAll()
37  {
38  bool success = true;
39  if (! registered)
40  {
41  success &= TheAbsOvExtTuningStrategyFactory::Instance().registerObject(name, createStrategy);
42  registered = true;
43  }
44  return success;
45  }
46 
47  } // end namespace OvExtTuningStrategy
48 } // end namespace Chroma
Primary include file for CHROMA library code.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams &param)
Read parameters.
AbsOvExtTuningStrategy * createStrategy(XMLReader &xml_in, const std::string &path)
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979
Ovext rescale strategy.