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