CHROMA
lw_1loop_gaugeact.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief 1-loop tadpole-improved Luscher-Weisz gauge action
3  */
4 
5 #include "chromabase.h"
9 
10 namespace Chroma
11 {
12 
13  namespace LW1LoopGaugeActEnv
14  {
15  GaugeAction< multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >* createGaugeAct(XMLReader& xml,
16  const std::string& path)
17  {
18  return new LW1LoopGaugeAct(CreateGaugeStateEnv::reader(xml, path),
19  LW1LoopGaugeActParams(xml, path));
20  }
21 
22  const std::string name = "LW_1LOOP_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 
42  XMLReader paramtop(xml_in, path);
43 
44  try {
45  read(paramtop, "./beta", beta);
46  read(paramtop, "./u0", u0);
47  }
48  catch( const std::string& e ) {
49  QDPIO::cerr << "Error reading XML: " << e << std::endl;
50  QDP_abort(1);
51  }
52  }
53 
54  void read(XMLReader& xml, const std::string& path, LW1LoopGaugeActParams& p) {
55  LW1LoopGaugeActParams tmp(xml, path);
56  p=tmp;
57  }
58 
59 
60  // Private initializer
61  void
63  {
64  START_CODE();
65 
66  // Fold in normalizations and create action
67  // NOTE: the 5/3 is folded into beta, hence divided out of c1 and c2
68  AnisoParam_t aniso; // empty aniso
69  Real alpha_s = -4.0 * log(u0) / 3.06839;
70 
71  Real c0 = beta;
72  plaq = new PlaqGaugeAct(cgs,c0,aniso);
73 
74  Real c1 = -c0 * (1 + 0.4805*alpha_s) / (20*u0*u0);
75  rect = new RectGaugeAct(cgs,c1);
76 
77  Real c2 = -c0 * 0.03325 * alpha_s / (u0*u0);
78  pg = new PgGaugeAct(cgs,c2);
79 
80  END_CODE();
81  }
82 
83 }
84 
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
LW1Loop gauge action.
Handle< RectGaugeAct > rect
void init(Handle< CreateGaugeState< P, Q > > cgs)
Private initializer.
Handle< PlaqGaugeAct > plaq
Handle< PgGaugeAct > pg
Parallelogram gauge action.
Definition: pg_gaugeact.h:45
Rect gauge action.
Definition: rect_gaugeact.h:54
static T & Instance()
Definition: singleton.h:432
All gauge create-state method.
Fermion action factories.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams &param)
Read parameters.
1-loop tadpole-improved Luscher-Weisz gauge action
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
LatticeFermion tmp
Definition: mespbg5p_w.cc:36
START_CODE()
::std::string string
Definition: gtest.h:1979
Parameters for anisotropy.
Definition: aniso_io.h:24