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