CHROMA
eoprec_logdet_ee_monomial_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Even-odd preconditioned log(det(A_ee))
3  */
4 
7 
10 
11 namespace Chroma
12 {
13 
14  namespace EvenOddPrecLogDetEvenEvenMonomial4DEnv
15  {
16  namespace
17  {
18  //! Callback function for the factory
20  multi1d<LatticeColorMatrix> >* createMonomial(XMLReader& xml, const std::string& path)
21  {
23  }
24 
25  //! Local registration flag
26  bool registered = false;
27  }
28 
29  const std::string name = std::string("N_FLAVOR_LOGDET_EVEN_EVEN_FERM_MONOMIAL");
30 
31  //! Register all the factories
32  bool registerAll()
33  {
34  bool success = true;
35  if (! registered)
36  {
37  success &= TheMonomialFactory::Instance().registerObject(name, createMonomial);
38  registered = true;
39  }
40  return success;
41  }
42  }
43 
44 
45 
47  {
48  XMLReader paramtop(in, path);
49 
50  fermact = readXMLGroup(paramtop, "FermionAction", "FermAct");
51  read(paramtop,"num_flavors", num_flavors);
52 
53  QDPIO::cout << "EvenOddPrecLogDetEvenEvenMonomialParams: read \n" << fermact.id << std::endl;
54  }
55 
56  void read(XMLReader& r, const std::string& path, EvenOddPrecLogDetEvenEvenMonomialParams& p)
57  {
59  p = tmp;
60  }
61 
62  void write(XMLWriter& xml, const std::string& path, const EvenOddPrecLogDetEvenEvenMonomialParams& p)
63  {
64  // Not implemented
65  }
66 
67 
69  num_flavors(p.num_flavors)
70  {
71  START_CODE();
72 
73  // Grok the fermact out of the XML
74  std::istringstream is(p.fermact.xml);
75  XMLReader fermact_reader(is);
76  QDPIO::cout << "EvanOddPrecLogDetTwoFlavorWilsonTypeFermMonomial: construct " << p.fermact.id << std::endl;
77 
78  WilsonTypeFermAct<T,P,Q>* tmp_act =
79  TheWilsonTypeFermActFactory::Instance().createObject(p.fermact.id, fermact_reader, p.fermact.path);
80 
82  dynamic_cast<EvenOddPrecLogDetWilsonTypeFermAct<T,P,Q>*>(tmp_act);
83 
84  // Check success of the downcast
85  if( downcast == 0x0 )
86  {
87  QDPIO::cerr << "Unable to downcast FermAct to EvenOddPrecLogDetWilsonTypeFermAct in "
88  << __func__ << std::endl;
89  QDP_abort(1);
90  }
91 
92  fermact = downcast;
93 
94  END_CODE();
95  }
96 
97 
98 } // End namespace
A Monomial For Just the EvenEven part of EvenOddPrecLogDetWilsonTypeFermActs – concretely a 4D one.
EvenOddPrecLogDetEvenEvenMonomial4D(const EvenOddPrecLogDetEvenEvenMonomialParams &p)
Construct from param struct.
Handle< EvenOddPrecLogDetWilsonTypeFermAct< T, P, Q > > fermact
Even-odd preconditioned Wilson-like fermion action, specialised to clover like (gauge dependent diago...
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
Even-odd preconditioned log(det(A_ee))
Fermion action factories.
All Wilson-type fermion actions.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams &param)
Read parameters.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams &param)
Writer parameters.
GroupXML_t readXMLGroup(XMLReader &xml_in, const std::string &path, const std::string &type_name)
Read group and return as a std::string.
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.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
LatticeFermion tmp
Definition: mespbg5p_w.cc:36
START_CODE()
static QDP_ColorVector * in
::std::string string
Definition: gtest.h:1979