CHROMA
eoprec_constdet_one_flavor_ratio_rat_conv_monomial_w.cc
Go to the documentation of this file.
1 /*! @file
2  * @brief One-flavor collection of even-odd preconditioned 4D ferm monomials
3  */
4 
7 
10 
13 
14 namespace Chroma
15 {
16 
17  namespace EvenOddPrecConstDetOneFlavorWilsonTypeFermRatioRatConvMonomialEnv
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_RATIO_RAT_CONV_MONOMIAL");
34 
35  //! Register all the factories
36  bool registerAll()
37  {
38  bool success = true;
39  if (! registered)
40  {
43  success &= TheMonomialFactory::Instance().registerObject(name, createMonomial);
44  registered = true;
45  }
46  return success;
47  }
48  } //end namespace EvenOddPrec OneFlavorWilsonFermRatioRatConvMonomialEnv
49 
50 
51 
52  // Constructor
55  {
56  START_CODE();
57 
58  QDPIO::cout << "Constructor: " << __func__ << std::endl;
59 
62  num_pf = param.num_pf;
63 
64  //*********************************************************************
65  // Fermion action
66  {
67  std::istringstream is(param.numer.fermact.xml);
68  XMLReader fermact_reader(is);
69  QDPIO::cout << "Construct fermion action= " << param.numer.fermact.id << std::endl;
70 
71  WilsonTypeFermAct<T,P,Q>* tmp_act =
72  TheWilsonTypeFermActFactory::Instance().createObject(param.numer.fermact.id, fermact_reader, param.numer.fermact.path);
73 
75  dynamic_cast<EvenOddPrecConstDetWilsonTypeFermAct<T,P,Q>*>(tmp_act);
76 
77  // Check success of the downcast
78  if( downcast == 0x0 ) {
79  QDPIO::cerr << __func__ << ": unable to downcast FermAct to EvenOddPrecConstDetWilsonTypeFermAct" << std::endl;
80  QDP_abort(1);
81  }
82 
83  fermact_num = downcast;
84  }
85 
86  //*********************************************************************
87  // Action rational approx
88  {
89  std::istringstream is(param.numer.action.ratApprox.xml);
90  XMLReader approx_reader(is);
91  QDPIO::cout << "Construct action rational approx= " << param.numer.action.ratApprox.id << std::endl;
92 
94  param.numer.action.ratApprox.id,
95  approx_reader,
96  param.numer.action.ratApprox.path));
97 
98  (*approx)(spfe_num, sipfe_num);
99  }
100 
101  //*********************************************************************
102  // Force rational approx
103  {
104  std::istringstream is(param.numer.force.ratApprox.xml);
105  XMLReader approx_reader(is);
106  QDPIO::cout << "Construct force rational approx= " << param.numer.force.ratApprox.id << std::endl;
107 
109  param.numer.force.ratApprox.id,
110  approx_reader,
111  param.numer.force.ratApprox.path));
112 
113  RemezCoeff_t fipfe_num; // discard
114  (*approx)(fpfe_num, fipfe_num);
115  }
116  //*********************************************************************
117 
118  //*********************************************************************
119  // Fermion action
120  {
121  std::istringstream is(param.denom.fermact.xml);
122  XMLReader fermact_reader(is);
123  QDPIO::cout << "Construct fermion action= " << param.denom.fermact.id << std::endl;
124 
125  WilsonTypeFermAct<T,P,Q>* tmp_act =
126  TheWilsonTypeFermActFactory::Instance().createObject(param.denom.fermact.id, fermact_reader, param.denom.fermact.path);
127 
129  dynamic_cast<EvenOddPrecConstDetWilsonTypeFermAct<T,P,Q>*>(tmp_act);
130 
131  // Check success of the downcast
132  if( downcast == 0x0 ) {
133  QDPIO::cerr << __func__ << ": unable to downcast FermAct to EvenOddPrecConstDetWilsonTypeFermAct" << std::endl;
134  QDP_abort(1);
135  }
136 
137  fermact_den = downcast;
138  }
139  //*********************************************************************
140 
141  QDPIO::cout << "Finished constructing: " << __func__ << std::endl;
142 
143  END_CODE();
144  }
145 
146 } //end namespace Chroma
147 
148 
Even-odd preconditioned Wilson-like fermion actions specialised to Wilson Like (gauge independent dia...
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:344
One-flavor collection of even-odd preconditioned 4D 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_RATIO_RAT_CONV_MONOMIAL")
Monomial< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > * createMonomial(XMLReader &xml, const std::string &path)
Callback function for the factory.
bool registerAll()
Register all the factories.
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:53
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