Go to the documentation of this file.
18 #ifdef USE_FACTORY_AUTOREGISTER
20 bool init = GaugeFixing_Coulomb::register_factory();
35 int Niter, Nnaive, Nmeas, Nreset;
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);
72 const int Nmeas,
const int Nreset,
73 const double Enorm,
const double wp)
111 const int Nvol = Uorg.
nvol();
112 const int Nex = Uorg.
nex();
115 const int Nvol2 = Nvol / 2;
127 const double plaq = staple.
plaquette(Uorg);
133 for (
int iter = 0; iter <
m_Niter; ++iter) {
134 std::valarray<double> sg(Lt);
135 std::valarray<double> Fval(Lt);
141 for (
int t = 0; t < Lt; ++t) {
142 if (sg[t] > sg_max) sg_max = sg[t];
147 for (
int t = 0; t < Lt; ++t) {
163 if (((iter %
m_Nreset) == 0) && (iter > 0)) {
186 const double plaq2 = staple.
plaquette(Ufix);
187 const double plaq_diff = std::abs(plaq - plaq2);
192 if (plaq_diff > sqrt(
m_Enorm)) {
204 const int Nvol2 = Ue.
nvol();
211 for (
int ieo = 0; ieo < 2; ++ieo) {
220 for (
int site = 0; site < Nvol2; ++site) {
222 ut = Geo.
mat(site, 0);
245 assert(Geo.
nex() == 1);
246 assert(sg.size() == Lt);
248 for (
int t = 0; t < Nt; ++t) {
249 int tg = t + ipe_t * Nt;
252 for (
int z = 0; z < Nz; ++z) {
253 for (
int y = 0; y < Ny; ++y) {
254 for (
int x = 0; x < Nx2; ++x) {
264 for (
int z = 0; z < Nz; ++z) {
265 for (
int y = 0; y < Ny; ++y) {
266 for (
int x = 0; x < Nx2; ++x) {
282 const Field_G& Geo,
const int Ieo)
287 const int Nvol2 = Geo.
nvol();
293 for (
int mu = 0; mu < Ndim; ++mu) {
304 for (
int mu = 0; mu < Ndim; ++mu) {
320 std::valarray<double>& Fval,
329 const int Nvol2 = Nx2 * Ny * Nz * Nt;
333 assert(Ue.
nex() == Ndim);
334 assert(Ue.
nvol() == Nvol2);
335 assert(Uo.
nex() == Ndim);
336 assert(Uo.
nvol() == Nvol2);
341 std::valarray<double> sg_local(Nt);
344 for (
int ieo = 0; ieo < 2; ++ieo) {
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) {
355 ut = DLT.
mat(site, 0);
356 sg_local[t] += ut.
norm2();
364 for (
int t = 0; t < Lt; ++t) {
365 sg[t] = sg[t] / (Ndim * Nc * (2 * Nvol2 * NPE) / Lt);
369 std::valarray<double> Fval_local(Nt);
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) {
380 ut = Ue.
mat(site, mu);
381 Fval_local[t] +=
ReTr(ut);
382 ut = Uo.
mat(site, mu);
383 Fval_local[t] +=
ReTr(ut);
391 for (
int t = 0; t < Lt; ++t) {
392 Fval[t] = Fval[t] / (Ndim * (2 * Nvol2 * NPE) / Lt);
399 const std::valarray<double>& val_local)
405 assert(val_global.size() == Lt);
406 assert(val_local.size() == Nt);
408 for (
int t_global = 0; t_global < Lt; ++t_global) {
409 val_global[t_global] = 0.0;
412 for (
int t = 0; t < Nt; ++t) {
413 int t_global = t + ipe_t * Nt;
414 val_global[t_global] = val_local[t];
417 for (
int t_global = 0; t_global < Lt; ++t_global) {
418 double val = val_global[t_global];
429 const int Nvol2 = Ue.
nvol();
438 for (
int mu = 0; mu < Ndim - 1; ++mu) {
449 for (
int mu = 0; mu < Ndim - 1; ++mu) {
461 for (
int site = 0; site < Nvol2; ++site) {
464 u_tmp = DLT.
mat(site, 0);
477 const int Nvol2 = Ue.
nvol();
481 assert(Weo.
nex() == 1);
488 for (
int mu = 0; mu < Ndim - 1; ++mu) {
496 for (
int site = 0; site < Nvol2; ++site) {
502 }
else if (Ieo == 1) {
503 for (
int mu = 0; mu < Ndim - 1; ++mu) {
511 for (
int site = 0; site < Nvol2; ++site) {
529 const int Nvol2 = G0.
nvol();
537 for (
int site = 0; site < Nvol2; ++site) {
541 for (
int imt = 0; imt < Nmt; ++imt) {
553 const int Nvol2 = W.
nvol();
555 for (
int site = 0; site < Nvol2; ++site) {
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);
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)));
582 gt2 = G.
mat(site, 0);
593 const int Nvol2 = W.
nvol();
597 for (
int site = 0; site < Nvol2; ++site) {
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);
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)));
624 gt2 = G.
mat(site, 0);
635 const int Nvol2 = W.
nvol();
639 for (
int site = 0; site < Nvol2; ++site) {
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);
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)));
666 gt2 = G.
mat(site, 0);
void forward_h(Field &, const Field &, const int mu, const int ieo)
void setpart_ex(int ex, const Field &w, int exw)
void maxTr1(Field_G &, Field_G &)
void set_string(const string &key, const string &value)
void gauge_trans_eo(Field_G &Ue, Field_G &Uo, const Field_G &Geo, const int Ieo)
void set(const int jin, const int site, const int jex, double v)
Mat_SU_N mat_dag(const int site, const int mn=0) const
double plaquette(const Field_G &)
calculates plaquette value.
void calc_W(Field_G &Weo, const Field_G &Ue, const Field_G &Uo, const int Ieo)
void set_double(const string &key, const double value)
void fix(Field_G &Ufix, const Field_G &Uorg)
void detailed(const char *format,...)
void set_mat(const int site, const int mn, const Mat_SU_N &U)
void add_mat(const int site, const int mn, const Mat_SU_N &U)
void maxTr3(Field_G &, Field_G &)
int non_negative(const int v)
void get_parameters(Parameters ¶ms) const
void paranoiac(const char *format,...)
void reverseField(Field &lex, const Field &eo)
void set(int c, const double &re, const double &im)
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 ...
void maxTr2(Field_G &, Field_G &)
void addpart_ex(int ex, const Field &w, int exw)
void convertField(Field &eo, const Field &lex)
void maxTr(Field_G &, Field_G &)
void backward_h(Field &, const Field &, const int mu, const int ieo)
int square_non_zero(const double v)
Mat_SU_N & at()
antihermitian traceless
void set_randomGaugeTrans(const std::valarray< double > &sg, Field_G &Geo)
void set_parameters(const Parameters ¶ms)
void calc_SG(std::valarray< double > &sg, std::valarray< double > &Fval, const Field_G &Ue, const Field_G &Uo)
Mat_SU_N & set_random(RandomNumbers *rand)
void sum_global_t(std::valarray< double > &val_global, const std::valarray< double > &val_local)
static VerboseLevel set_verbose_level(const std::string &str)
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 gfix_step(Field_G &Ue, Field_G &Uo, const double wp)
one step of gauge fixing with overrelaxation parameter wp.
int non_zero(const double v)
void set_int(const string &key, const int value)
void scal(Field &x, const double a)
scal(x, a): x = a * x
static int ipe(const int dir)
logical coordinate of current proc.
int fetch_string(const string &key, string &value) const
int fetch_double(const string &key, double &value) const
void crucial(const char *format,...)
int siteh(const int x2, const int y, const int z, const int t) const
double ReTr(const Mat_SU_N &m)
Bridge::VerboseLevel m_vl
Mat_SU_N mat(const int site, const int mn=0) const
void calc_DLT(Field_G &Weo, const Field_G &Ue, const Field_G &Uo, const int Ieo)
int fetch_int(const string &key, int &value) const
void general(const char *format,...)
void mult_Field_Gnd(Field_G &W, const int ex, const Field_G &U1, const int ex1, const Field_G &U2, const int ex2)
static const std::string class_name
static std::string get_verbose_level(const VerboseLevel vl)