CHROMA
schr_triv_gaugebc.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Schroedinger functional trivial gauge BC
3  */
4 
7 
8 namespace Chroma
9 {
10 
11  namespace SchrTrivialGaugeBCEnv
12  {
13  //! Callback function to register with the factory
14  GaugeBC< multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >* createGaugeBC(XMLReader& xml,
15  const std::string& path)
16  {
17  return new SchrTrivialGaugeBC(SchrGaugeBCParams(xml, path));
18  }
19 
20  const std::string name = "SCHROEDINGER_TRIVIAL_GAUGEBC";
21 
22  //! Local registration flag
23  static bool registered = false;
24 
25  //! Register all the factories
26  bool registerAll()
27  {
28  bool success = true;
29  if (! registered)
30  {
31  success &= TheGaugeBCFactory::Instance().registerObject(name, createGaugeBC);
32  registered = true;
33  }
34  return success;
35  }
36  }
37 
38 
39  // Only full constructor
41  param(p)
42  {
43  // Initialize the phases
44  initPhases();
45 
46  // Initialize the boundary fields
47  initBnd(fld, mask);
48  }
49 
50 
51  // Initialize the phases
53  {
54  phases.lower.resize(Nc);
55  phases.upper.resize(Nc);
56 
57  switch (Nc)
58  {
59  case 2:
60  /* lower and upper boundary are trivial */
63  break;
64 
65  case 3:
66  /* lower and upper boundary are trivial */
69  break;
70 
71  default:
72  QDPIO::cerr << __func__ << ": unsupport number of colors" << std::endl;
73  QDP_abort(1);
74  }
75  }
76 
77 
78 }
Base class for all gauge action boundary conditions.
Definition: gaugebc.h:30
virtual void initBnd(multi1d< LatticeColorMatrix > &SFBndFld, multi1d< LatticeBoolean > &lSFmask) const
Construct the mask and boundary fields.
Concrete class for gauge action boundary conditions with Schroedinger BC.
void initPhases()
Initialize the phases.
multi1d< LatticeBoolean > mask
multi1d< LatticeColorMatrix > fld
static T & Instance()
Definition: singleton.h:432
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.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
Double zero
Definition: invbicg.cc:106
::std::string string
Definition: gtest.h:1979
Schroedinger functional trivial gauge boundary conditions.