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