Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gaugeFixing_Landau.h
Go to the documentation of this file.
1 
14 #ifndef GAUGEFIXING_LANDAU_INCLUDED
15 #define GAUGEFIXING_LANDAU_INCLUDED
16 
17 #include "gaugeFixing.h"
18 #include "Field/shiftField_eo.h"
19 #include "Tools/randomNumbers.h"
21 
22 #include "IO/bridgeIO.h"
23 using Bridge::vout;
24 
25 
27 
28 /*
29  This class fixes the gauge of configuration to the Landau gauge.
30  The algorithm is that developed by the Los Alamos group [see the
31  implementation note].
32  Overrelaxation is incorporated.
33  To escape the Gribov copy, if convergence is not reached within
34  the iterations specified by Nreset, random gauge transformation
35  is performed to reset the configuration.
36  This is the reason that random number generator is needed at the
37  construction of this class.
38 
39  The implementation is not complete:
40  - only applies to SU(3) case: because of specific implementation
41  of maxTr function (Cabibbo-Marinari maximization).
42  This should be improved in the version beyond test phase.
43  [16 Feb 2012 H.Matsufuru]
44  (Coding history will be recovered from trac.)
45  YAML is implemented. [14 Nov 2012 Y.Namekawa]
46  unique_ptr is introduced to avoid memory leaks
47  [21 Mar 2015 Y.Namekawa]
48  Staple and RandomNumbers are moved into gaugeFixing
49  [30 Mar 2016 Y.Namekawa]
50  */
51 
53 {
54  public:
55  static const std::string class_name;
56 
57  private:
58  int m_Niter; // max iteration number
59  int m_Nnaive; // number of naive iterations
60  int m_Nmeas; // interval of measurements
61  int m_Nreset; // Number of iteration to reset the config.
62  double m_Enorm; // convergence criterion
63  double m_wp; // overrelaxation parameter
64 
67 
68  public:
70  : GaugeFixing(),
71  m_rand(RandomNumberManager::getInstance())
72  {
73  }
74 
76  : GaugeFixing(),
77  m_rand(rand)
78  {
79  }
80 
82  : GaugeFixing(),
83  m_rand(rand.get())
84  {
85  }
86 
88 
89  void set_parameters(const Parameters& params);
90  void set_parameters(const int Niter, const int Nnaive, const int Nmeas,
91  const int Nreset, const double Enorm, const double wp);
92 
93  void fix(Field_G& Ufix, const Field_G& Uorg);
94 
95  private:
97  void gfix_step(Field_G& Ue, Field_G& Uo, const double wp);
98 
99  void set_randomGaugeTrans(Field_G& Geo);
100  void gauge_trans_eo(Field_G& Ue, Field_G& Uo,
101  const Field_G& Geo, const int Ieo);
102 
103  void calc_SG(double& sg, double& Fval,
104  const Field_G& Ue, const Field_G& Uo);
105  void calc_W(Field_G& Weo,
106  const Field_G& Ue, const Field_G& Uo, const int Ieo);
107  void calc_DLT(Field_G& Weo,
108  const Field_G& Ue, const Field_G& Uo, const int Ieo);
109 
110  void maxTr(Field_G&, Field_G&);
111  void maxTr1(Field_G&, Field_G&);
112  void maxTr2(Field_G&, Field_G&);
113  void maxTr3(Field_G&, Field_G&);
114 
115 #ifdef USE_FACTORY
116  private:
117  static GaugeFixing *create_object()
118  {
119  return new GaugeFixing_Landau();
120  }
121 
122  public:
123  static bool register_factory()
124  {
125  return GaugeFixing::Factory::Register("Landau", create_object);
126  }
127 #endif
128 };
129 #endif
BridgeIO vout
Definition: bridgeIO.cpp:503
void maxTr2(Field_G &, Field_G &)
static const std::string class_name
Class for parameters.
Definition: parameters.h:46
Even-odd site index.
Definition: index_eo.h:40
GaugeFixing_Landau(unique_ptr< RandomNumbers > &rand)
void gauge_trans_eo(Field_G &Ue, Field_G &Uo, const Field_G &Geo, const int Ieo)
SU(N) gauge field.
Definition: field_G.h:38
void maxTr1(Field_G &, Field_G &)
void calc_DLT(Field_G &Weo, const Field_G &Ue, const Field_G &Uo, const int Ieo)
void maxTr3(Field_G &, Field_G &)
void set_parameters(const Parameters &params)
Manager class for RandomNumbers.
Base class of random number generators.
Definition: randomNumbers.h:43
RandomNumbers * m_rand
Landau gauge fixing.
void calc_W(Field_G &Weo, const Field_G &Ue, const Field_G &Uo, const int Ieo)
gauge fixing.
Definition: gaugeFixing.h:36
void fix(Field_G &Ufix, const Field_G &Uorg)
void maxTr(Field_G &, Field_G &)
GaugeFixing_Landau(RandomNumbers *rand)
void calc_SG(double &sg, double &Fval, const Field_G &Ue, const Field_G &Uo)
void gfix_step(Field_G &Ue, Field_G &Uo, const double wp)
one step of gauge fixing with overrelaxation parameter wp.
void set_randomGaugeTrans(Field_G &Geo)