CHROMA
eoprec_constdet_two_flavor_polynomial_monomial_w.cc
Go to the documentation of this file.
1 /*! @file
2  * @brief Two-flavor collection of even-odd preconditioned 4D ferm monomials
3  */
4 
5 #include "chromabase.h"
8 
11 
14 
15 
16 namespace Chroma
17 {
18 
19  namespace EvenOddPrecConstDetTwoFlavorPolynomialWilsonTypeFermMonomialEnv
20  {
21  namespace
22  {
23  //! Callback function for the factory
25  multi1d<LatticeColorMatrix> >* createMonomial(XMLReader& xml, const std::string& path)
26  {
29  }
30 
31  //! Local registration flag
32  bool registered = false;
33  }
34 
35  //! Identifier
36  const std::string name = "TWO_FLAVOR_EOPREC_CONSTDET_POLYNOMIAL_FERM_MONOMIAL";
37 
38  //! Register all the factories
39  bool registerAll()
40  {
41  bool success = true;
42  if (! registered)
43  {
45  success &= TheMonomialFactory::Instance().registerObject(name, createMonomial);
46  registered = true;
47  }
48  return success;
49  }
50  } //end namespace EvenOddPrec TwoFlavorWilsonFermMonomialEnv
51 
52 
53  // Constructor
56  {
57  START_CODE();
58 
59  inv_param = param.inv_param;
60 
61  {
62  std::istringstream is(param.fermact.xml);
63  XMLReader fermact_reader(is);
64 
66  << ": construct " << param.fermact.id << std::endl;
67 
68  WilsonTypeFermAct<T,P,Q>* tmp_act =
69  TheWilsonTypeFermActFactory::Instance().createObject(param.fermact.id, fermact_reader, param.fermact.path);
70 
71  PolyWilsonTypeFermAct<T,P,Q>* downcast =
72  dynamic_cast<PolyWilsonTypeFermAct<T,P,Q>*>(tmp_act);
73 
74  // Check success of the downcast
75  if( downcast == 0x0 ) {
76  QDPIO::cerr << "Unable to downcast FermAct to PolyWilsonTypeFermAct in EvenOddPrecConstDetTwoFlavorPolynomialWilsonTypeFermMonomial()" << std::endl;
77  QDP_abort(1);
78  }
79 
80  fermact = downcast;
81  }
82 
83  END_CODE();
84  }
85 
86 } //end namespace Chroma
87 
88 
Primary include file for CHROMA library code.
Chronological predictor for HMC.
Monomial factories.
An abstract monomial class, for inexact algorithms.
Definition: abs_monomial.h:43
Polynomial Wilson-like fermion actions with derivatives.
static T & Instance()
Definition: singleton.h:432
Wilson-like fermion actions.
Definition: fermact.orig.h:344
Two-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.
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