CHROMA
wilson_gaugeact.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Wilson gauge action
3  */
4 
5 #include "chromabase.h"
9 
10 namespace Chroma
11 {
12 
13  namespace WilsonGaugeActEnv
14  {
15  GaugeAction< multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >* createGaugeAct(XMLReader& xml,
16  const std::string& path)
17  {
18  return new WilsonGaugeAct(CreateGaugeStateEnv::reader(xml, path),
19  WilsonGaugeActParams(xml, path));
20  }
21 
22  const std::string name = "WILSON_GAUGEACT";
23 
24  //! Local registration flag
25  static bool registered = false;
26 
27  //! Register all the factories
28  bool registerAll()
29  {
30  bool success = true;
31  if (! registered)
32  {
33  success &= TheGaugeActFactory::Instance().registerObject(name, createGaugeAct);
34  registered = true;
35  }
36  return success;
37  }
38  }
39 
40 
41  // Private initializer
42  void
44  {
45  START_CODE();
46 
47  // Fold in normalizations and create action
48  Real coeff = param.beta;
49  plaq = new PlaqGaugeAct(cgs,coeff,param.aniso);
50 
51  END_CODE();
52  }
53 
54 }
55 
Primary include file for CHROMA library code.
Create a gauge connection state.
Definition: create_state.h:47
Abstract base class for gauge actions.
Definition: gaugeact.h:25
Class for counted reference semantics.
Definition: handle.h:33
static T & Instance()
Definition: singleton.h:432
Wilson gauge action.
void init(Handle< CreateGaugeState< P, Q > > cgs)
Private initializer.
Handle< PlaqGaugeAct > plaq
WilsonGaugeActParams param
All gauge create-state method.
Fermion action factories.
Handle< CreateGaugeState< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > reader(XMLReader &xml_in, const std::string &path)
Helper function for the CreateGaugeState readers.
GaugeAction< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > * createGaugeAct(XMLReader &xml, const std::string &path)
static bool registered
Local registration flag.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
START_CODE()
::std::string string
Definition: gtest.h:1979
Wilson gauge action.