CHROMA
eoprec_constdet_one_flavor_rat_monomial5d_w.cc
Go to the documentation of this file.
1 /*! @file
2  * @brief One-flavor collection of even-odd preconditioned 5D ferm monomials
3  */
4 
7 
10 
13 
14 namespace Chroma
15 {
16 
17  namespace EvenOddPrecConstDetOneFlavorWilsonTypeFermRatMonomial5DEnv
18  {
19  namespace
20  {
21  //! Callback
23  multi1d<LatticeColorMatrix> >* createMonomial(XMLReader& xml, const std::string& path)
24  {
27  }
28 
29  //! Local registration flag
30  bool registered = false;
31  }
32 
33  const std::string name("ONE_FLAVOR_EOPREC_CONSTDET_FERM_RAT_MONOMIAL5D");
34 
35  //! Register all the factories
36  bool registerAll()
37  {
38  bool success = true;
39  if (! registered)
40  {
42  success &= TheMonomialFactory::Instance().registerObject(name, createMonomial);
43  registered = true;
44  }
45  return success;
46  }
47  } //end namespace EvenOddPrecConstDet OneFlavorWilsonFermRatMonomialEnv
48 
49 
50  // Constructor
53  {
54  START_CODE();
55 
56  QDPIO::cout << "Constructor: " << __func__ << std::endl;
57 
60  num_pf = param.num_pf;
61 
62  QDPIO::cout << "Number of pseudoferms= " << num_pf << std::endl;
63  //*********************************************************************
64  // Fermion action
65  {
66  std::istringstream is(param.numer.fermact.xml);
67  XMLReader fermact_reader(is);
68  QDPIO::cout << "Construct fermion action= " << param.numer.fermact.id << std::endl;
69 
71  param.numer.fermact.id,
72  fermact_reader,
73  param.numer.fermact.path);
74 
76  dynamic_cast<EvenOddPrecConstDetWilsonTypeFermAct5D<T,P,Q>*>(tmp_act);
77 
78  // Check success of the downcast
79  if( downcast == 0x0 ) {
80  QDPIO::cerr << "Unable to downcast FermAct to EvenOddPrecConstDetWilsonTypeFermAct5D in EvenOddPrecConstDetOneFlavorWilsonTypeFermRatMonomial5D()" << std::endl;
81  QDP_abort(1);
82  }
83 
84  fermact = downcast;
85  }
86 
87  //*********************************************************************
88  // Action rational approx
89  {
90  std::istringstream is(param.numer.action.ratApprox.xml);
91  XMLReader approx_reader(is);
92  QDPIO::cout << "Construct action rational approx= " << param.numer.action.ratApprox.id << std::endl;
93 
95  param.numer.action.ratApprox.id,
96  approx_reader,
97  param.numer.action.ratApprox.path));
98 
99  (*approx)(spfe, sipfe);
100  }
101 
102  //*********************************************************************
103  // Force rational approx
104  {
105  std::istringstream is(param.numer.force.ratApprox.xml);
106  XMLReader approx_reader(is);
107  QDPIO::cout << "Construct force rational approx= " << param.numer.force.ratApprox.id << std::endl;
108 
110  param.numer.force.ratApprox.id,
111  approx_reader,
112  param.numer.force.ratApprox.path));
113 
114  RemezCoeff_t fipfe; // discard
115  (*approx)(fpfe, fipfe);
116  }
117  //*********************************************************************
118 
119  QDPIO::cout << "Finished constructing: " << __func__ << std::endl;
120 
121  END_CODE();
122  }
123 
124 
125 } //end namespace Chroma
126 
127 
Handle< const EvenOddPrecConstDetWilsonTypeFermAct5D< T, P, Q > > fermact
Even-odd preconditioned Wilson-like fermion actions including derivatives.
Class for counted reference semantics.
Definition: handle.h:33
An abstract monomial class, for inexact algorithms.
Definition: abs_monomial.h:43
static T & Instance()
Definition: singleton.h:432
Wilson-like fermion actions.
Definition: fermact.orig.h:403
One-flavor collection of even-odd preconditioned 5D ferm monomials.
Fermion action factories.
All Wilson-type fermion actions.
Monomial factories.
static bool registered
Local registration flag.
const std::string name("ONE_FLAVOR_EOPREC_CONSTDET_FERM_RAT_MONOMIAL5D")
Monomial< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > * createMonomial(XMLReader &xml, const std::string &path)
Callback function for the factory.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
START_CODE()
::std::string string
Definition: gtest.h:1979
Rational approximation aggregator.
Rational approximation factories.
GroupXML_t fermact
Definition: comp_approx.h:36
TermApprox_t action
Definition: comp_approx.h:37
TermApprox_t force
Definition: comp_approx.h:38
Convenient structure to package Remez coeffs.
Definition: remez_coeff.h:19
GroupXML_t invParam
Definition: comp_approx.h:21
GroupXML_t ratApprox
Definition: comp_approx.h:20