Bridge++  Ver. 1.2.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gaugeFixing_Coulomb.cpp
Go to the documentation of this file.
1 
14 #include "gaugeFixing_Coulomb.h"
15 
16 #ifdef USE_PARAMETERS_FACTORY
17 #include "parameters_factory.h"
18 #endif
19 
20 using std::valarray;
21 
22 #ifdef USE_FACTORY
23 namespace {
24  GaugeFixing *create_object(RandomNumbers *rand)
25  {
26  return new GaugeFixing_Coulomb(rand);
27  }
28 
29 
30  bool init = GaugeFixing::Factory::Register("Coulomb", create_object);
31 }
32 #endif
33 
34 //- parameter entry
35 namespace {
36  void append_entry(Parameters& param)
37  {
38  param.Register_int("maximum_number_of_iteration", 0);
39  param.Register_int("number_of_naive_iteration", 0);
40  param.Register_int("interval_of_measurement", 0);
41  param.Register_int("iteration_to_reset", 0);
42  param.Register_double("convergence_criterion_squared", 0.0);
43  param.Register_double("overrelaxation_parameter", 0.0);
44 
45  param.Register_string("verbose_level", "NULL");
46  }
47 
48 
49 #ifdef USE_PARAMETERS_FACTORY
50  bool init_param = ParametersFactory::Register("GaugeFixing.Coulomb", append_entry);
51 #endif
52 }
53 //- end
54 
55 //- parameters class
57 //- end
58 
59 const std::string GaugeFixing_Coulomb::class_name = "GaugeFixing_Coulomb";
60 
61 //====================================================================
63 {
64  const string str_vlevel = params.get_string("verbose_level");
65 
66  m_vl = vout.set_verbose_level(str_vlevel);
67 
68  //- fetch and check input parameters
69  int Niter, Nnaive, Nmeas, Nreset;
70  double Enorm, wp;
71 
72  int err = 0;
73  err += params.fetch_int("maximum_number_of_iteration", Niter);
74  err += params.fetch_int("number_of_naive_iteration", Nnaive);
75  err += params.fetch_int("interval_of_measurement", Nmeas);
76  err += params.fetch_int("iteration_to_reset", Nreset);
77  err += params.fetch_double("convergence_criterion_squared", Enorm);
78  err += params.fetch_double("overrelaxation_parameter", wp);
79 
80  if (err) {
81  vout.crucial(m_vl, "%s: fetch error, input parameter not found.\n", class_name.c_str());
82  abort();
83  }
84 
85 
86  set_parameters(Niter, Nnaive, Nmeas, Nreset, Enorm, wp);
87 }
88 
89 
90 //====================================================================
91 void GaugeFixing_Coulomb::set_parameters(const int Niter, const int Nnaive,
92  const int Nmeas, const int Nreset,
93  const double Enorm, const double wp)
94 {
95  //- print input parameters
96  vout.general(m_vl, "Parameters of %s:\n", class_name.c_str());
97  vout.general(m_vl, " Niter = %d\n", Niter);
98  vout.general(m_vl, " Nnaive = %d\n", Nnaive);
99  vout.general(m_vl, " Nmeas = %d\n", Nmeas);
100  vout.general(m_vl, " Nreset = %d\n", Nreset);
101  vout.general(m_vl, " Enorm = %12.4e\n", Enorm);
102  vout.general(m_vl, " wp = %8.4f\n", wp);
103 
104  //- range check
105  int err = 0;
106  err += ParameterCheck::non_negative(Niter);
107  err += ParameterCheck::non_negative(Nnaive);
108  err += ParameterCheck::non_negative(Nmeas);
109  err += ParameterCheck::non_negative(Nreset);
110  err += ParameterCheck::square_non_zero(Enorm);
111  err += ParameterCheck::non_zero(wp);
112 
113  if (err) {
114  vout.crucial(m_vl, "%s: parameter range check failed.\n", class_name.c_str());
115  abort();
116  }
117 
118  //- store values
119  m_Niter = Niter;
120  m_Nnaive = Nnaive;
121  m_Nmeas = Nmeas;
122  m_Nreset = Nreset;
123  m_Enorm = Enorm;
124  m_wp = wp;
125 }
126 
127 
128 //====================================================================
129 void GaugeFixing_Coulomb::fix(Field_G& Ufix, const Field_G& Uorg)
130 {
131  int Nvol = Uorg.nvol();
132  int Nex = Uorg.nex();
133  int Lt = CommonParameters::Lt();
134 
135  int Nvol2 = Nvol / 2;
136  Field_G Ue(Nvol2, Nex), Uo(Nvol2, Nex);
137 
138  Field_G Ge(Nvol2, 1), Go(Nvol2, 1);
139 
140  m_index.convertField(Ue, Uorg, 0);
141  m_index.convertField(Uo, Uorg, 1);
142 
143  int Nconv = -1;
144 
145  valarray<double> sg(Lt);
146  valarray<double> Fval(Lt);
147 
148  // gauge fixing iteration
149  for (int iter = 0; iter < m_Niter; ++iter) {
150  if ((iter % m_Nmeas) == 0) {
151  calc_SG(sg, Fval, Ue, Uo);
152 
153  double sg_max = 0.0;
154  vout.paranoiac(m_vl, " iter = %6d:\n", iter);
155  for (int t = 0; t < Lt; ++t) {
156  vout.paranoiac(m_vl, " t = %4d sg = %16.8e Fval = %16.8e\n",
157  t, sg[t], Fval[t]);
158  if (sg[t] > sg_max) sg_max = sg[t];
159  }
160 
161  if (sg_max < m_Enorm) {
162  Nconv = iter;
163  vout.general(m_vl, "converged at iter = %d\n", Nconv);
164  break;
165  }
166  }
167 
168  double wp2 = m_wp;
169  if ((iter % m_Nreset) < m_Nnaive) wp2 = 1.0;
170  gfix_step(sg, Ue, Uo, wp2);
171 
172  if (((iter % m_Nreset) == 0) && (iter > 0)) {
173  // random gauge transformation
174  vout.general(m_vl, " random gauge transformation performed.\n");
175  set_randomGaugeTrans(sg, Ge);
176  gauge_trans_eo(Ue, Uo, Ge, 0);
177  set_randomGaugeTrans(sg, Go);
178  gauge_trans_eo(Ue, Uo, Go, 1);
179  }
180  }
181 
182  m_index.reverseField(Ufix, Ue, 0);
183  m_index.reverseField(Ufix, Uo, 1);
184 }
185 
186 
187 //====================================================================
188 void GaugeFixing_Coulomb::gfix_step(valarray<double>& sg,
189  Field_G& Ue, Field_G& Uo, double wp)
190 {
191  int Nc = CommonParameters::Nc();
192  int Nvol2 = Ue.nvol();
193  int Nex = Ue.nex();
194 
195  Field_G Weo(Nvol2, 1), Geo(Nvol2, 1);
196  Mat_SU_N ut(Nc), uwp(Nc);
197 
198  uwp.unit();
199  uwp *= (1.0 - wp);
200 
201  for (int ieo = 0; ieo < 2; ++ieo) {
202  calc_W(Weo, Ue, Uo, ieo);
203  maxTr(Geo, Weo);
204  Geo *= wp;
205 
206  //double wp_sbt = 1.0-wp;
207  for (int site = 0; site < Nvol2; ++site) {
208  ut = Geo.mat(site, 0);
209  ut += uwp;
210  ut.reunit();
211  Geo.set_mat(site, 0, ut);
212  }
213 
214  gauge_trans_eo(Ue, Uo, Geo, ieo);
215  }
216 }
217 
218 
219 //====================================================================
221  Field_G& Geo)
222 {
223  int Lt = CommonParameters::Lt();
224  int Nt = CommonParameters::Nt();
225  int Nz = CommonParameters::Nz();
226  int Ny = CommonParameters::Ny();
227  int Nx2 = CommonParameters::Nx() / 2;
228  int Nc = CommonParameters::Nc();
229  int ipet = Communicator::ipe(3);
230 
231  int Nvol = Geo.nvol();
232 
233  assert(Geo.nex() == 1);
234  assert(sg.size() == Lt);
235 
236  Mat_SU_N gt(Nc);
237 
238  for (int t = 0; t < Nt; ++t) {
239  int tg = t + ipet * Nt;
240 
241  if (sg[tg] > m_Enorm) {
242  for (int z = 0; z < Nz; ++z) {
243  for (int y = 0; y < Ny; ++y) {
244  for (int x = 0; x < Nx2; ++x) {
245  int site = m_index.siteh(x, y, z, t);
246  gt.set_random(m_rand);
247  Geo.set_mat(site, 0, gt);
248  }
249  }
250  }
251  } else {
252  gt.unit();
253  for (int z = 0; z < Nz; ++z) {
254  for (int y = 0; y < Ny; ++y) {
255  for (int x = 0; x < Nx2; ++x) {
256  int site = m_index.siteh(x, y, z, t);
257  Geo.set_mat(site, 0, gt);
258  }
259  }
260  }
261  }
262  }
263 }
264 
265 
266 //====================================================================
268  Field_G& Geo, int Ieo)
269 {
270  // Ieo = 0: gauge transformation on even sites.
271  // Ieo = 1: on odd sites.
272 
273  int Nvol2 = Geo.nvol();
274  int Nex = Geo.nex();
275  int Ndim = CommonParameters::Ndim();
276 
278 
279  Field_G Ut(Nvol2, 1), Gt(Nvol2, 1);
280  Field_G Ut2(Nvol2, 1);
281 
282  if (Ieo == 0) {
283  for (int mu = 0; mu < Ndim; ++mu) {
284  mult_Field_Gnn(Ut, 0, Geo, 0, Ue, mu);
285  Ue.setpart_ex(mu, Ut, 0);
286 
287  shift.backward_h(Gt, Geo, mu, 1);
288  mult_Field_Gnd(Ut, 0, Uo, mu, Gt, 0);
289  Uo.setpart_ex(mu, Ut, 0);
290  }
291  } else {
292  for (int mu = 0; mu < Ndim; ++mu) {
293  mult_Field_Gnn(Ut, 0, Geo, 0, Uo, mu);
294  Uo.setpart_ex(mu, Ut, 0);
295 
296  shift.backward_h(Gt, Geo, mu, 0);
297  mult_Field_Gnd(Ut, 0, Ue, mu, Gt, 0);
298  Ue.setpart_ex(mu, Ut, 0);
299  }
300  }
301 }
302 
303 
304 //====================================================================
305 void GaugeFixing_Coulomb::calc_SG(valarray<double>& sg,
306  valarray<double>& Fval,
307  Field_G& Ue, Field_G& Uo)
308 {
309  int Nc = CommonParameters::Nc();
310  int Lt = CommonParameters::Lt();
311  int Nt = CommonParameters::Nt();
312  int Nz = CommonParameters::Nz();
313  int Ny = CommonParameters::Ny();
314  int Nx2 = CommonParameters::Nx() / 2;
315  int Nvol2 = Nx2 * Ny * Nz * Nt;
316  int Ndim = CommonParameters::Ndim();
317  int NPE = CommonParameters::NPE();
318 
319  assert(Ue.nex() == Ndim);
320  assert(Ue.nvol() == Nvol2);
321  assert(Uo.nex() == Ndim);
322  assert(Uo.nvol() == Nvol2);
323 
324  valarray<double> sg_local(Nt);
325  valarray<double> Fval_local(Nt);
326  Field_G DLT(Nvol2, 1);
327  Mat_SU_N ut(Nc);
328 
329  sg = 0.0;
330  Fval = 0.0;
331  sg_local = 0.0;
332  Fval_local = 0.0;
333 
334  for (int ieo = 0; ieo < 2; ++ieo) {
335  calc_DLT(DLT, Ue, Uo, ieo);
336 
337  for (int t = 0; t < Nt; ++t) {
338  for (int z = 0; z < Nz; ++z) {
339  for (int y = 0; y < Ny; ++y) {
340  for (int x = 0; x < Nx2; ++x) {
341  int site = m_index.siteh(x, y, z, t);
342  ut = DLT.mat(site, 0);
343  sg_local[t] += ut.norm2();
344  }
345  }
346  }
347  }
348  }
349 
350  sum_global_t(sg, sg_local);
351  for (int t = 0; t < Lt; ++t) {
352  sg[t] = sg[t] / (Ndim * Nc * (2 * Nvol2 * NPE) / Lt);
353  }
354 
355  for (int mu = 0; mu < Ndim - 1; ++mu) {
356  for (int t = 0; t < Nt; ++t) {
357  for (int z = 0; z < Nz; ++z) {
358  for (int y = 0; y < Ny; ++y) {
359  for (int x = 0; x < Nx2; ++x) {
360  int site = m_index.siteh(x, y, z, t);
361  ut = Ue.mat(site, mu);
362  Fval_local[t] += ReTr(ut);
363  ut = Uo.mat(site, mu);
364  Fval_local[t] += ReTr(ut);
365  }
366  }
367  }
368  }
369  }
370 
371  sum_global_t(Fval, Fval_local);
372  for (int t = 0; t < Lt; ++t) {
373  Fval[t] = Fval[t] / (Ndim * (2 * Nvol2 * NPE) / Lt);
374  }
375 }
376 
377 
378 //====================================================================
379 void GaugeFixing_Coulomb::sum_global_t(valarray<double>& val_global,
380  valarray<double>& val_local)
381 {
382  int Lt = CommonParameters::Lt();
383  int Nt = CommonParameters::Nt();
384  int ipet = Communicator::ipe(3);
385 
386  assert(val_global.size() == Lt);
387  assert(val_local.size() == Nt);
388 
389  for (int t = 0; t < Lt; ++t) {
390  val_global[t] = 0.0;
391  }
392 
393  for (int tl = 0; tl < Nt; ++tl) {
394  val_global[tl + ipet * Nt] = val_local[tl];
395  }
396 
397  for (int t = 0; t < Lt; ++t) {
398  double val = val_global[t];
399  val_global[t] = Communicator::reduce_sum(val);
400  }
401 }
402 
403 
404 //====================================================================
406  Field_G& Ue, Field_G& Uo, int Ieo)
407 {
408  int Nvol2 = Ue.nvol();
409  int Nc = CommonParameters::Nc();
410  int Ndim = CommonParameters::Ndim();
411 
413 
414  Field_G Ut1(Nvol2, 1), Ut2(Nvol2, 1);
415  Mat_SU_N u_tmp(Nc);
416 
417  DLT = 0.0;
418 
419  if (Ieo == 0) { // on even sites
420  for (int mu = 0; mu < Ndim - 1; ++mu) {
421  DLT.addpart_ex(0, Ue, mu, -1.0);
422  Ut1.setpart_ex(0, Uo, mu);
423  shift.forward_h(Ut2, Ut1, mu, 0);
424  DLT.addpart_ex(0, Ut2, 0);
425  }
426  } else { // on odd sites
427  for (int mu = 0; mu < Ndim - 1; ++mu) {
428  DLT.addpart_ex(0, Uo, mu, -1.0);
429  Ut1.setpart_ex(0, Ue, mu);
430  shift.forward_h(Ut2, Ut1, mu, 1);
431  DLT.addpart_ex(0, Ut2, 0);
432  }
433  }
434 
435  for (int site = 0; site < Nvol2; ++site) {
436  u_tmp = DLT.mat(site, 0);
437  u_tmp.at();
438  u_tmp *= 2.0;
439  DLT.set_mat(site, 0, u_tmp);
440  }
441 }
442 
443 
444 //====================================================================
446  Field_G& Ue, Field_G& Uo, int Ieo)
447 {
448  int Nvol2 = Ue.nvol();
449  int Nc = CommonParameters::Nc();
450  int Ndim = CommonParameters::Ndim();
451 
452  assert(Weo.nex() == 1);
453 
455 
456  Field_G Ut1(Nvol2, 1), Ut2(Nvol2, 1);
457  Mat_SU_N u_tmp(Nc);
458 
459  Weo = 0.0;
460 
461  if (Ieo == 0) { // on even sites
462  for (int mu = 0; mu < Ndim - 1; ++mu) {
463  Weo.addpart_ex(0, Ue, mu);
464  Ut1.setpart_ex(0, Uo, mu);
465  shift.forward_h(Ut2, Ut1, mu, 0);
466  for (int site = 0; site < Nvol2; ++site) {
467  u_tmp = Ut2.mat_dag(site, 0);
468  Weo.add_mat(site, 0, u_tmp);
469  }
470  }
471  } else if (Ieo == 1) { // on odd sites
472  for (int mu = 0; mu < Ndim - 1; ++mu) {
473  Weo.addpart_ex(0, Uo, mu);
474  Ut1.setpart_ex(0, Ue, mu);
475  shift.forward_h(Ut2, Ut1, mu, 1);
476  for (int site = 0; site < Nvol2; ++site) {
477  u_tmp = Ut2.mat_dag(site, 0);
478  Weo.add_mat(site, 0, u_tmp);
479  }
480  }
481  } else {
482  vout.crucial(m_vl, "%s: Wrong ieo.\n", class_name.c_str());
483  abort();
484  }
485 }
486 
487 
488 //====================================================================
490 {
491  // Present implementation only applys to SU(3) case.
492 
493  int Nc = CommonParameters::Nc();
494  int Nvol2 = G0.nvol();
495 
496  int Nmt = 1;
497 
498  Mat_SU_N unity(Nc);
499 
500  unity.unit();
501 
502  for (int site = 0; site < Nvol2; ++site) {
503  G0.set_mat(site, 0, unity);
504  }
505 
506  for (int imt = 0; imt < Nmt; ++imt) {
507  maxTr1(G0, W);
508  maxTr2(G0, W);
509  maxTr3(G0, W);
510  }
511 }
512 
513 
514 //====================================================================
516 {
517  int Nc = CommonParameters::Nc();
518  int Nvol2 = W.nvol();
519 
520  Mat_SU_N gt(Nc), wt(Nc), gt2(Nc), wt2(Nc);
521 
522  for (int site = 0; site < Nvol2; ++site) {
523  wt = W.mat(site, 0);
524 
525  gt.set(2, 0.0, 0.0);
526  gt.set(5, 0.0, 0.0);
527  gt.set(6, 0.0, 0.0);
528  gt.set(7, 0.0, 0.0);
529  gt.set(8, 1.0, 0.0);
530 
531  double fn1 = (wt.r(0) + wt.r(4)) * (wt.r(0) + wt.r(4))
532  + (wt.i(0) - wt.i(4)) * (wt.i(0) - wt.i(4));
533  double fn2 = (wt.r(1) - wt.r(3)) * (wt.r(1) - wt.r(3))
534  + (wt.i(1) + wt.i(3)) * (wt.i(1) + wt.i(3));
535  double fn = 1.0 / sqrt(fn1 + fn2);
536 
537  gt.set(0, fn * (wt.r(0) + wt.r(4)), fn * (-wt.i(0) + wt.i(4)));
538  gt.set(1, fn * (-wt.r(1) + wt.r(3)), fn * (-wt.i(1) - wt.i(3)));
539  gt.set(3, fn * (wt.r(1) - wt.r(3)), fn * (-wt.i(1) - wt.i(3)));
540  gt.set(4, fn * (wt.r(0) + wt.r(4)), fn * (wt.i(0) - wt.i(4)));
541 
542  wt2 = gt * wt;
543  W.set_mat(site, 0, wt2);
544  gt2 = G.mat(site, 0);
545  wt2 = gt * gt2;
546  G.set_mat(site, 0, wt2);
547  }
548 }
549 
550 
551 //====================================================================
553 {
554  int Nc = CommonParameters::Nc();
555  int Nvol2 = W.nvol();
556 
557  Mat_SU_N gt(Nc), wt(Nc), gt2(Nc), wt2(Nc);
558 
559  for (int site = 0; site < Nvol2; ++site) {
560  wt = W.mat(site, 0);
561 
562  gt.set(1, 0.0, 0.0);
563  gt.set(3, 0.0, 0.0);
564  gt.set(4, 1.0, 0.0);
565  gt.set(5, 0.0, 0.0);
566  gt.set(7, 0.0, 0.0);
567 
568  double fn1 = (wt.r(8) + wt.r(0)) * (wt.r(8) + wt.r(0))
569  + (wt.i(8) - wt.i(0)) * (wt.i(8) - wt.i(0));
570  double fn2 = (wt.r(2) - wt.r(6)) * (wt.r(2) - wt.r(6))
571  + (wt.i(2) + wt.i(6)) * (wt.i(2) + wt.i(6));
572  double fn = 1.0 / sqrt(fn1 + fn2);
573 
574  gt.set(0, fn * (wt.r(8) + wt.r(0)), fn * (wt.i(8) - wt.i(0)));
575  gt.set(2, fn * (wt.r(6) - wt.r(2)), fn * (-wt.i(6) - wt.i(2)));
576  gt.set(6, fn * (-wt.r(6) + wt.r(2)), fn * (-wt.i(6) - wt.i(2)));
577  gt.set(8, fn * (wt.r(8) + wt.r(0)), fn * (-wt.i(8) + wt.i(0)));
578 
579  wt2 = gt * wt;
580  W.set_mat(site, 0, wt2);
581  gt2 = G.mat(site, 0);
582  wt2 = gt * gt2;
583  G.set_mat(site, 0, wt2);
584  }
585 }
586 
587 
588 //====================================================================
590 {
591  int Nc = CommonParameters::Nc();
592  int Nvol2 = W.nvol();
593 
594  Mat_SU_N gt(Nc), wt(Nc), gt2(Nc), wt2(Nc);
595 
596  for (int site = 0; site < Nvol2; ++site) {
597  wt = W.mat(site, 0);
598 
599  gt.set(0, 1.0, 0.0);
600  gt.set(1, 0.0, 0.0);
601  gt.set(2, 0.0, 0.0);
602  gt.set(3, 0.0, 0.0);
603  gt.set(6, 0.0, 0.0);
604 
605  double fn1 = (wt.r(4) + wt.r(8)) * (wt.r(4) + wt.r(8))
606  + (wt.i(4) - wt.i(8)) * (wt.i(4) - wt.i(8));
607  double fn2 = (wt.r(7) - wt.r(5)) * (wt.r(7) - wt.r(5))
608  + (wt.i(7) + wt.i(5)) * (wt.i(7) + wt.i(5));
609  double fn = 1.0 / sqrt(fn1 + fn2);
610 
611  gt.set(4, fn * (wt.r(4) + wt.r(8)), fn * (-wt.i(4) + wt.i(8)));
612  gt.set(5, fn * (-wt.r(5) + wt.r(7)), fn * (-wt.i(5) - wt.i(7)));
613  gt.set(7, fn * (wt.r(5) - wt.r(7)), fn * (-wt.i(5) - wt.i(7)));
614  gt.set(8, fn * (wt.r(4) + wt.r(8)), fn * (wt.i(4) - wt.i(8)));
615 
616  wt2 = gt * wt;
617  W.set_mat(site, 0, wt2);
618  gt2 = G.mat(site, 0);
619  wt2 = gt * gt2;
620  G.set_mat(site, 0, wt2);
621  }
622 }
623 
624 
625 //====================================================================
626 //============================================================END=====
BridgeIO vout
Definition: bridgeIO.cpp:207
void Register_string(const string &, const string &)
Definition: parameters.cpp:352
void calc_DLT(Field_G &Weo, Field_G &Ue, Field_G &Uo, int Ieo)
Coulomb gauge fixing.
int siteh(const int x2, const int y, const int z, const int t) const
Definition: index_eo.h:147
void general(const char *format,...)
Definition: bridgeIO.cpp:38
void Register_int(const string &, const int)
Definition: parameters.cpp:331
int shift(void)
RandomNumbers * m_rand
int nvol() const
Definition: field.h:101
Class for parameters.
Definition: parameters.h:40
static int ipe(const int dir)
logical coordinate of current proc.
Mat_SU_N & at()
antihermitian traceless
Definition: mat_SU_N.h:329
void calc_W(Field_G &Weo, Field_G &Ue, Field_G &Uo, int Ieo)
void convertField(Field &eo, const Field &lex)
Definition: index_eo.cpp:20
void addpart_ex(int ex, const Field &w, int exw)
Definition: field.h:162
void maxTr3(Field_G &, Field_G &)
Mat_SU_N & reunit()
Definition: mat_SU_N.h:71
void gfix_step(std::valarray< double > &sg, Field_G &Ue, Field_G &Uo, double wp)
one step of gauge fixing with overrelaxation parameter wp.
int square_non_zero(const double v)
Definition: checker.cpp:41
SU(N) gauge field.
Definition: field_G.h:36
void maxTr1(Field_G &, Field_G &)
void maxTr(Field_G &, Field_G &)
void mult_Field_Gnd(Field_G &w, const int ex, const Field_G &u1, const int ex1, const Field_G &u2, const int ex2)
void fix(Field_G &Ufix, const Field_G &Uorg)
void mult_Field_Gnn(Field_G &w, const int ex, const Field_G &u1, const int ex1, const Field_G &u2, const int ex2)
int nex() const
Definition: field.h:102
void maxTr2(Field_G &, Field_G &)
void gauge_trans_eo(Field_G &Ue, Field_G &Uo, Field_G &Geo, int Ieo)
void paranoiac(const char *format,...)
Definition: bridgeIO.cpp:62
void set_randomGaugeTrans(std::valarray< double > &sg, Field_G &Geo)
Methods to shift the even-odd field.
Definition: shiftField_eo.h:45
void crucial(const char *format,...)
Definition: bridgeIO.cpp:26
double norm2()
Definition: mat_SU_N.h:155
Bridge::VerboseLevel m_vl
Definition: gaugeFixing.h:49
static bool Register(const std::string &realm, const creator_callback &cb)
Base class of random number generators.
Definition: randomNumbers.h:40
void reverseField(Field &lex, const Field &eo)
Definition: index_eo.cpp:110
int non_zero(const double v)
Definition: checker.cpp:31
void calc_SG(std::valarray< double > &sg, std::valarray< double > &Fval, Field_G &Ue, Field_G &Uo)
Mat_SU_N mat_dag(const int site, const int mn=0) const
Definition: field_G.h:123
int non_negative(const int v)
Definition: checker.cpp:21
Mat_SU_N & unit()
Definition: mat_SU_N.h:373
static int reduce_sum(int count, double *recv_buf, double *send_buf, int pattern=0)
make a global sum of an array of double over the communicator. pattern specifies the dimensions to be...
void Register_double(const string &, const double)
Definition: parameters.cpp:324
void backward_h(Field &, const Field &, const int mu, const int ieo)
static const std::string class_name
gauge fixing.
Definition: gaugeFixing.h:34
void set(int c, double re, const double &im)
Definition: mat_SU_N.h:133
void setpart_ex(int ex, const Field &w, int exw)
Definition: field.h:150
int fetch_double(const string &key, double &val) const
Definition: parameters.cpp:124
string get_string(const string &key) const
Definition: parameters.cpp:85
void set_mat(const int site, const int mn, const Mat_SU_N &U)
Definition: field_G.h:156
void set_parameters(const Parameters &params)
Mat_SU_N mat(const int site, const int mn=0) const
Definition: field_G.h:110
int fetch_int(const string &key, int &val) const
Definition: parameters.cpp:141
void add_mat(const int site, const int mn, const Mat_SU_N &U)
Definition: field_G.h:164
void forward_h(Field &, const Field &, const int mu, const int ieo)
void sum_global_t(std::valarray< double > &val_global, std::valarray< double > &val_local)
static VerboseLevel set_verbose_level(const std::string &str)
Definition: bridgeIO.cpp:191
double ReTr(const Mat_SU_N &m)
Definition: mat_SU_N.h:488
static int NPE()