CHROMA
const_gauge_monomial.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Generic gauge action monomial wrapper
4  */
5 
6 #include "chromabase.h"
7 
12 
13 namespace Chroma
14 {
15  namespace ConstGaugeMonomialEnv
16  {
17  namespace
18  {
19  //! Callback function for the factory
21  multi1d<LatticeColorMatrix> >*
22  createMonomial(XMLReader& xml, const std::string& path)
23  {
24  QDPIO::cout << "Create monomial: " << name << std::endl;
25 
26  return new ConstGaugeMonomial(GaugeMonomialParams(xml, path));
27  }
28 
29  //! Local registration flag
30  bool registered = false;
31  }
32 
33  const std::string name("CONST_GAUGE_MONOMIAL");
34 
35  //! Register all the factories
36  bool registerAll()
37  {
38  bool success = true;
39  if (! registered)
40  {
41  success &= GaugeActsEnv::registerAll();
42  success &= TheMonomialFactory::Instance().registerObject(name, createMonomial);
43  registered = true;
44  }
45  return success;
46  }
47  } //end namespace ConstGaugeMonomialEnv
48 
49 } //end namespace Chroma
50 
51 
Primary include file for CHROMA library code.
Wrapper class for gauge monomials.
An abstract monomial class, for inexact algorithms.
Definition: abs_monomial.h:43
static T & Instance()
Definition: singleton.h:432
Generic gauge action monomial wrapper.
Fermion action factories.
All gauge actions.
Monomial factories.
static bool registered
Local registration flag.
bool registerAll()
Register all the factories.
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
::std::string string
Definition: gtest.h:1979