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