CHROMA
unprec_one_flavor_ratio_rat_conv_monomial_w.cc
Go to the documentation of this file.
1 /*! @file
2  * @brief One-flavor collection of unpreconditioned 4D ferm monomials
3  */
4 
7 
10 
13 
14 namespace Chroma
15 {
16 
17  namespace UnprecOneFlavorWilsonTypeFermRatioRatConvMonomialEnv
18  {
19  namespace
20  {
21  //! Does the work
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_UNPREC_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 Unprec OneFlavorWilsonFermRatioRatConvMonomialEnv
49 
50 
51  // Constructor
54  {
55  START_CODE();
56 
57  QDPIO::cout << "Constructor: " << __func__ << std::endl;
58 
59  num_pf = param.num_pf;
62 
63  //*********************************************************************
64  // Fermion action
65  {
66  std::istringstream is(param.numer.fermact.xml);
67  XMLReader fermact_reader(is);
68  QDPIO::cout << "Construct numer fermion action= " << param.numer.fermact.id << std::endl;
69 
70  WilsonTypeFermAct<T,P,Q>* tmp_act =
72  fermact_reader,
73  param.numer.fermact.path);
74 
75 #if 0
76  WilsonTypeFermAct<T,P,Q>* downcast=dynamic_cast<UnprecWilsonTypeFermAct<T,P,Q>*>(tmp_act);
77 
78  // Check success of the downcast
79  if( downcast == 0x0 )
80  {
81  QDPIO::cerr << "Unable to downcast FermAct to UnprecWilsonTypeFermAct in UnprecOneFlavorWilsonTypeFermRatioRatConvMonomial()" << std::endl;
82  QDP_abort(1);
83  }
84 #endif
85  fermact_num = tmp_act;
86  }
87 
88  //*********************************************************************
89  // Action rational approx
90  {
91  std::istringstream is(param.numer.action.ratApprox.xml);
92  XMLReader approx_reader(is);
93  QDPIO::cout << "Construct action rational approx= " << param.numer.action.ratApprox.id << std::endl;
94 
96  param.numer.action.ratApprox.id,
97  approx_reader,
98  param.numer.action.ratApprox.path));
99 
100  (*approx)(spfe_num, sipfe_num);
101  }
102 
103  //*********************************************************************
104  // Force rational approx
105  {
106  std::istringstream is(param.numer.force.ratApprox.xml);
107  XMLReader approx_reader(is);
108  QDPIO::cout << "Construct force rational approx= " << param.numer.force.ratApprox.id << std::endl;
109 
111  param.numer.force.ratApprox.id,
112  approx_reader,
113  param.numer.force.ratApprox.path));
114 
115  RemezCoeff_t fipfe_num; // discard
116  (*approx)(fpfe_num, fipfe_num);
117  }
118  //*********************************************************************
119 
120  //*********************************************************************
121  // Fermion action
122  {
123  std::istringstream is(param.denom.fermact.xml);
124  XMLReader fermact_reader(is);
125  QDPIO::cout << "Construct denom fermion action= " << param.denom.fermact.id << std::endl;
126 
127  WilsonTypeFermAct<T,P,Q>* tmp_act =
129  fermact_reader,
130  param.denom.fermact.path);
131 
132 #if 0
133  WilsonTypeFermAct<T,P,Q>* downcast=dynamic_cast<UnprecWilsonTypeFermAct<T,P,Q>*>(tmp_act);
134 
135  // Check success of the downcast
136  if( downcast == 0x0 )
137  {
138  QDPIO::cerr << "Unable to downcast FermAct to UnprecWilsonTypeFermAct in UnprecOneFlavorWilsonTypeFermRatioRatConvMonomial()" << std::endl;
139  QDP_abort(1);
140  }
141 #endif
142  fermact_den = tmp_act;
143  }
144  //*********************************************************************
145 
146  QDPIO::cout << "Finished constructing: " << __func__ << std::endl;
147 
148  END_CODE();
149  }
150 
151 
152 } //end namespace Chroma
153 
154 
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
Unpreconditioned Wilson-like fermion actions with derivatives.
Definition: fermact.orig.h:491
Wilson-like fermion actions.
Definition: fermact.orig.h:344
Fermion action factories.
All Wilson-type fermion actions.
Monomial factories.
static bool registered
Local registration flag.
Monomial< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > * createMonomial(XMLReader &xml, const std::string &path)
Callback function for the factory.
bool registerAll()
Register all the factories.
const std::string name("ONE_FLAVOR_UNPREC_FERM_RATIO_RAT_CONV_MONOMIAL")
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
One-flavor collection of unpreconditioned 4D ferm monomials.