25 bool init = GaugeFixing::Factory::Register(
"Coulomb", create_object);
34 const string str_vlevel = params.
get_string(
"verbose_level");
39 int Niter, Nnaive, Nmeas, Nreset;
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);
62 const int Nmeas,
const int Nreset,
63 const double Enorm,
const double wp)
101 const int Nvol = Uorg.
nvol();
102 const int Nex = Uorg.
nex();
105 const int Nvol2 = Nvol / 2;
116 const double plaq = staple.
plaquette(Uorg);
122 for (
int iter = 0; iter <
m_Niter; ++iter) {
123 std::valarray<double> sg(Lt);
124 std::valarray<double> Fval(Lt);
130 for (
int t = 0; t < Lt; ++t) {
131 if (sg[t] > sg_max) sg_max = sg[t];
136 for (
int t = 0; t < Lt; ++t) {
152 if (((iter % m_Nreset) == 0) && (iter > 0)) {
175 const double plaq2 = staple.
plaquette(Ufix);
176 const double plaq_diff = std::abs(plaq - plaq2);
181 if ( plaq_diff > sqrt(
m_Enorm) ) {
193 const int Nvol2 = Ue.
nvol();
199 for (
int ieo = 0; ieo < 2; ++ieo) {
208 for (
int site = 0; site < Nvol2; ++site) {
210 ut = Geo.
mat(site, 0);
233 assert(Geo.
nex() == 1);
234 assert(sg.size() == Lt);
236 for (
int t = 0; t < Nt; ++t) {
237 int tg = t + ipe_t * Nt;
240 for (
int z = 0; z < Nz; ++z) {
241 for (
int y = 0; y < Ny; ++y) {
242 for (
int x = 0; x < Nx2; ++x) {
252 for (
int z = 0; z < Nz; ++z) {
253 for (
int y = 0; y < Ny; ++y) {
254 for (
int x = 0; x < Nx2; ++x) {
270 const Field_G& Geo,
const int Ieo)
275 const int Nvol2 = Geo.
nvol();
281 for (
int mu = 0; mu < Ndim; ++mu) {
292 for (
int mu = 0; mu < Ndim; ++mu) {
308 std::valarray<double>& Fval,
317 const int Nvol2 = Nx2 * Ny * Nz * Nt;
321 assert(Ue.
nex() == Ndim);
322 assert(Ue.
nvol() == Nvol2);
323 assert(Uo.
nex() == Ndim);
324 assert(Uo.
nvol() == Nvol2);
329 std::valarray<double> sg_local(Nt);
332 for (
int ieo = 0; ieo < 2; ++ieo) {
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) {
343 ut = DLT.
mat(site, 0);
344 sg_local[t] += ut.
norm2();
352 for (
int t = 0; t < Lt; ++t) {
353 sg[t] = sg[t] / (Ndim * Nc * (2 * Nvol2 * NPE) / Lt);
357 std::valarray<double> Fval_local(Nt);
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) {
368 ut = Ue.
mat(site, mu);
369 Fval_local[t] +=
ReTr(ut);
370 ut = Uo.
mat(site, mu);
371 Fval_local[t] +=
ReTr(ut);
379 for (
int t = 0; t < Lt; ++t) {
380 Fval[t] = Fval[t] / (Ndim * (2 * Nvol2 * NPE) / Lt);
387 const std::valarray<double>& val_local)
393 assert(val_global.size() == Lt);
394 assert(val_local.size() == Nt);
396 for (
int t_global = 0; t_global < Lt; ++t_global) {
397 val_global[t_global] = 0.0;
400 for (
int t = 0; t < Nt; ++t) {
401 int t_global = t + ipe_t * Nt;
402 val_global[t_global] = val_local[t];
405 for (
int t_global = 0; t_global < Lt; ++t_global) {
406 double val = val_global[t_global];
417 const int Nvol2 = Ue.
nvol();
426 for (
int mu = 0; mu < Ndim - 1; ++mu) {
437 for (
int mu = 0; mu < Ndim - 1; ++mu) {
449 for (
int site = 0; site < Nvol2; ++site) {
452 u_tmp = DLT.
mat(site, 0);
465 const int Nvol2 = Ue.
nvol();
469 assert(Weo.
nex() == 1);
476 for (
int mu = 0; mu < Ndim - 1; ++mu) {
483 shift.forward_h(Ut2, Ut1, mu, 0);
484 for (
int site = 0; site < Nvol2; ++site) {
490 }
else if (Ieo == 1) {
491 for (
int mu = 0; mu < Ndim - 1; ++mu) {
498 shift.forward_h(Ut2, Ut1, mu, 1);
499 for (
int site = 0; site < Nvol2; ++site) {
517 const int Nvol2 = G0.
nvol();
524 for (
int site = 0; site < Nvol2; ++site) {
528 for (
int imt = 0; imt < Nmt; ++imt) {
540 const int Nvol2 = W.
nvol();
542 for (
int site = 0; site < Nvol2; ++site) {
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);
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)));
569 gt2 = G.
mat(site, 0);
580 const int Nvol2 = W.
nvol();
584 for (
int site = 0; site < Nvol2; ++site) {
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);
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)));
611 gt2 = G.
mat(site, 0);
622 const int Nvol2 = W.
nvol();
626 for (
int site = 0; site < Nvol2; ++site) {
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);
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)));
653 gt2 = G.
mat(site, 0);
void scal(Field &x, const double a)
scal(x, a): x = a * x
void detailed(const char *format,...)
Mat_SU_N & set_random(RandomNumbers *rand)
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)
int siteh(const int x2, const int y, const int z, const int t) const
void gauge_trans_eo(Field_G &Ue, Field_G &Uo, const Field_G &Geo, const int Ieo)
void general(const char *format,...)
int fetch_double(const string &key, double &value) const
double plaquette(const Field_G &)
calculates plaquette value.
void calc_DLT(Field_G &Weo, const Field_G &Ue, const Field_G &Uo, const int Ieo)
static int ipe(const int dir)
logical coordinate of current proc.
Mat_SU_N & at()
antihermitian traceless
void convertField(Field &eo, const Field &lex)
void addpart_ex(int ex, const Field &w, int exw)
void set_randomGaugeTrans(const std::valarray< double > &sg, Field_G &Geo)
void maxTr3(Field_G &, Field_G &)
int square_non_zero(const double v)
void sum_global_t(std::valarray< double > &val_global, const std::valarray< double > &val_local)
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
void maxTr2(Field_G &, Field_G &)
void paranoiac(const char *format,...)
Methods to shift the even-odd field.
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,...)
Bridge::VerboseLevel m_vl
void reverseField(Field &lex, const Field &eo)
int non_zero(const double v)
Mat_SU_N mat_dag(const int site, const int mn=0) const
int non_negative(const int v)
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)
static const std::string class_name
void set(int c, double re, const double &im)
void setpart_ex(int ex, const Field &w, int exw)
string get_string(const string &key) const
void set_mat(const int site, const int mn, const Mat_SU_N &U)
void calc_SG(std::valarray< double > &sg, std::valarray< double > &Fval, const Field_G &Ue, const Field_G &Uo)
void set_parameters(const Parameters ¶ms)
Mat_SU_N mat(const int site, const int mn=0) const
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)
void forward_h(Field &, const Field &, const int mu, const int ieo)
static VerboseLevel set_verbose_level(const std::string &str)
double ReTr(const Mat_SU_N &m)
void mult_Field_Gnd(Field_G &W, const int ex, const Field_G &U1, const int ex1, const Field_G &U2, const int ex2)