CHROMA
seoprec_constdet_one_flavor_rat_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 SymEvenOddPrecConstDetOneFlavorWilsonTypeFermRatMonomialEnv
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_SEOPREC_CONSTDET_FERM_RAT_MONOMIAL");
34 
35 //! Register all the factories
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 OneFlavorWilsonFermRatMonomialEnv
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 
72  param.numer.fermact.id,
73  fermact_reader,
74  param.numer.fermact.path);
75 
77  dynamic_cast<const SymEvenOddPrecWilsonTypeFermAct<T,P,Q>*>(tmp_act);
78 
79  // Check success of the downcast
80  if( downcast == 0x0 ) {
81  QDPIO::cerr << "Unable to downcast FermAct to SymEvenOddPrecWilsonTypeFermAct in SymEvenOddPrecOneFlavorWilsonTypeFermRatMonomial()" << std::endl;
82  QDP_abort(1);
83  }
84 
85  fermact = downcast;
86  }
87 
88 
89  //*********************************************************************
90  // Action rational approx
91  {
92  std::istringstream is(param.numer.action.ratApprox.xml);
93  XMLReader approx_reader(is);
94  QDPIO::cout << "Construct action rational approx= " << param.numer.action.ratApprox.id << std::endl;
95 
97  param.numer.action.ratApprox.id,
98  approx_reader,
99  param.numer.action.ratApprox.path));
100 
101  (*approx)(spfe, sipfe);
102  }
103 
104  //*********************************************************************
105  // Force rational approx
106  {
107  std::istringstream is(param.numer.force.ratApprox.xml);
108  XMLReader approx_reader(is);
109  QDPIO::cout << "Construct force rational approx= " << param.numer.force.ratApprox.id << std::endl;
110 
112  param.numer.force.ratApprox.id,
113  approx_reader,
114  param.numer.force.ratApprox.path));
115 
116  RemezCoeff_t fipfe; // discard
117  (*approx)(fpfe, fipfe);
118  }
119  //*********************************************************************
120 
121  QDPIO::cout << "Finished constructing: " << __func__ << std::endl;
122 
123  END_CODE();
124 }
125 
126 } //end namespace Chroma
127 
128 
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
Symmetric even-odd preconditioned Wilson-like fermion actions including derivatives.
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_SEOPREC_CONSTDET_FERM_RAT_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.
One-flavor collection of even-odd preconditioned 4D ferm monomials.
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