Bridge++  Ver. 1.1.x
 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 "index_eo.h"
20 #include "shiftField_eo.h"
21 
22 #include "randomNumbers.h"
23 
24 #include "bridgeIO.h"
25 using Bridge::vout;
26 
27 //- parameters class
29 {
30  public:
32 };
33 //- end
34 
36 
37 /*
38  This class fix the gauge of configuration to the Coulomb gauge.
39  The implementation assumes that the dimension is 4 and the
40  Coulomb gauge fixing is performed within each time slice.
41  The algorithm is that developed by the Los Alamos group [see the
42  implementation note].
43  Overrelaxation is incorporated.
44  To escape the Gribov copy, if convergence is not reached on some
45  timeslices within the iterations specified by Nreset, random
46  gauge transformation is performed to reset the configuration on
47  that timeslice.
48  This is the reason that random number generator is needed at the
49  construction of this class.
50 
51  The implementation is not complete:
52  - only applies to SU(3) case: because of specific implementation
53  of maxTr function (Cabibbo-Marinari maximization).
54  - unnecessary arithmetic operations exist for the timeslices
55  on which the gauge is already fixed to good precision.
56  These should be improved in the version beyond test phase.
57  [16 Feb 2012 H.Matsufuru]
58  (Coding history will be recovered from trac.)
59  YAML is implemented. [14 Nov 2012 Y.Namekawa]
60 */
61 
63 {
64  private:
65 
66  int m_Niter; // max iteration number
67  int m_Nnaive; // number of naive iterations
68  int m_Nmeas; // interval of measurements
69  int m_Nreset; // Number of iteration to reset the config.
70  double m_Enorm; // convergence criterion
71  double m_wp; // overrelaxation parameter
74 
75  public:
77  : GaugeFixing(), m_Niter(0), m_rand(rand) {}
78 
80 
81  void set_parameters(const Parameters& params);
82  void set_parameters(const int Niter, const int Nnaive,
83  const int Nmeas, const int Nreset,
84  const double Enorm, const double wp);
85 
86  void fix(Field_G& Ufix, const Field_G& Uorg);
87 
88  void gauge_trans_eo(Field_G& Ue, Field_G& Uo, Field_G& Geo, int Ieo);
89 
90  void set_randomGaugeTrans(std::valarray<double>& sg, Field_G& Geo);
91 
93  void gfix_step(std::valarray<double>& sg,
94  Field_G& Ue, Field_G& Uo, double wp);
95 
96  void calc_SG(std::valarray<double>& sg, std::valarray<double>& Fval,
97  Field_G& Ue, Field_G& Uo);
98  void calc_W(Field_G& Weo, Field_G& Ue, Field_G& Uo, int Ieo);
99  void calc_DLT(Field_G& Weo, Field_G& Ue, Field_G& Uo, int Ieo);
100 
101  void maxTr(Field_G&, Field_G&);
102  void maxTr1(Field_G&, Field_G&);
103  void maxTr2(Field_G&, Field_G&);
104  void maxTr3(Field_G&, Field_G&);
105 
106  void sum_global_t(std::valarray<double>& val_global,
107  std::valarray<double>& val_local);
108 };
109 #endif