CHROMA
periodic_gaugebc.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Periodic gauge boundary conditions
3  */
4 
5 #include "chromabase.h"
6 #include "gaugebc.h"
7 
10 
11 namespace Chroma
12 {
13 
14  namespace PeriodicGaugeBCEnv
15  {
16 
17  //! Callback function to register with the factory
18  GaugeBC< multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >* createGaugeBC(XMLReader& xml,
19  const std::string& path)
20  {
21  QDPIO::cout << "GaugeBC Callback: Creating PeriodicGaugeBC " << std::endl;
22  return new PeriodicGaugeBC< multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >();
23  }
24 
25 
26  GaugeBC< multi1d<LatticeColorMatrixF>, multi1d<LatticeColorMatrixF> >* createGaugeBCF(XMLReader& xml,
27  const std::string& path)
28  {
29  QDPIO::cout << "GaugeBC Callback: Creating PeriodicGaugeBC " << std::endl;
30  return new PeriodicGaugeBC< multi1d<LatticeColorMatrixF>, multi1d<LatticeColorMatrixF> >();
31  }
32 
33  GaugeBC< multi1d<LatticeColorMatrixD>, multi1d<LatticeColorMatrixD> >* createGaugeBCD(XMLReader& xml,
34  const std::string& path)
35  {
36  QDPIO::cout << "GaugeBC Callback: Creating PeriodicGaugeBC " << std::endl;
37  return new PeriodicGaugeBC< multi1d<LatticeColorMatrixD>, multi1d<LatticeColorMatrixD> >();
38  }
39 
40  const std::string name = "PERIODIC_GAUGEBC";
41 
42  //! Local registration flag
43  static bool registered = false;
44 
45  //! Register all the factories
46  bool registerAll()
47  {
48  bool success = true;
49  if (! registered)
50  {
51  success &= TheGaugeBCFactory::Instance().registerObject(name, createGaugeBC);
52  success &= TheGaugeBCFFactory::Instance().registerObject(name, createGaugeBCF);
53  success &= TheGaugeBCDFactory::Instance().registerObject(name, createGaugeBCD);
54 
55  registered = true;
56  }
57  return success;
58  }
59  }
60 
61 } // End namespace Chroma
Primary include file for CHROMA library code.
Base class for all gauge action boundary conditions.
Definition: gaugebc.h:30
static T & Instance()
Definition: singleton.h:432
Gauge boundary conditions.
Gauge boundary condition factories.
GaugeBC< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > * createGaugeBC(XMLReader &xml, const std::string &path)
Callback function to register with the factory.
static bool registered
Local registration flag.
GaugeBC< multi1d< LatticeColorMatrixF >, multi1d< LatticeColorMatrixF > > * createGaugeBCF(XMLReader &xml, const std::string &path)
GaugeBC< multi1d< LatticeColorMatrixD >, multi1d< LatticeColorMatrixD > > * createGaugeBCD(XMLReader &xml, const std::string &path)
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979
Periodic gauge boundary conditions.