18 #ifdef USE_FACTORY_AUTOREGISTER
20 bool init = GaugeFixing_Landau::register_factory();
29 const string str_vlevel = params.
get_string(
"verbose_level");
34 int Niter, Nnaive, Nmeas, Nreset;
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);
56 const int Nmeas,
const int Nreset,
57 const double Enorm,
const double wp)
95 const int Nvol = Uorg.
nvol();
96 const int Nex = Uorg.
nex();
98 const int Nvol2 = Nvol / 2;
110 const double plaq = staple.
plaquette(Uorg);
116 for (
int iter = 0; iter <
m_Niter; ++iter) {
136 if (((iter % m_Nreset) == 0) && (iter > 0)) {
158 const double plaq2 = staple.
plaquette(Ufix);
159 const double plaq_diff = abs(plaq - plaq2);
164 if (plaq_diff > sqrt(
m_Enorm)) {
177 const int Nvol2 = Ue.
nvol();
184 for (
int ieo = 0; ieo < 2; ++ieo) {
193 for (
int site = 0; site < Nvol2; ++site) {
195 ut = Geo.
mat(site, 0);
209 const int Nvol = Geo.
nvol();
210 const int Nex = Geo.
nex();
214 for (
int ex = 0; ex < Nex; ++ex) {
215 for (
int site = 0; site < Nvol; ++site) {
226 const Field_G& Geo,
const int Ieo)
231 const int Nvol2 = Geo.
nvol();
237 for (
int mu = 0; mu < Ndim; ++mu) {
248 for (
int mu = 0; mu < Ndim; ++mu) {
268 const int Nvol2 = Ue.
nvol();
269 const int Nex = Ue.
nex();
274 for (
int ieo = 0; ieo < 2; ++ieo) {
277 double tsg = DLT.
norm2();
280 sg = sg / (Nex * Nc * 2 * Nvol2 * NPE);
282 for (
int mu = 0; mu < Nex; ++mu) {
283 for (
int site = 0; site < Nvol2; ++site) {
285 ut = Ue.
mat(site, mu);
288 ut = Uo.
mat(site, mu);
293 Fval = Fval / (Nex * 2 * Nvol2 * NPE);
302 const int Nvol2 = Ue.
nvol();
311 for (
int mu = 0; mu < Ndim; ++mu) {
322 for (
int mu = 0; mu < Ndim; ++mu) {
334 for (
int site = 0; site < Nvol2; ++site) {
336 u_tmp = DLT.
mat(site, 0);
349 const int Nvol2 = Ue.
nvol();
353 assert(Weo.
nex() == 1);
360 for (
int mu = 0; mu < Ndim; ++mu) {
367 shift.forward_h(Ut2, Ut1, mu, 0);
368 for (
int site = 0; site < Nvol2; ++site) {
374 }
else if (Ieo == 1) {
375 for (
int mu = 0; mu < Ndim; ++mu) {
382 shift.forward_h(Ut2, Ut1, mu, 1);
383 for (
int site = 0; site < Nvol2; ++site) {
401 const int Nvol2 = G0.
nvol();
409 for (
int site = 0; site < Nvol2; ++site) {
413 for (
int imt = 0; imt < Nmt; ++imt) {
425 const int Nvol2 = W.
nvol();
427 for (
int site = 0; site < Nvol2; ++site) {
438 double fn1 = (wt.
r(0) + wt.
r(4)) * (wt.
r(0) + wt.
r(4))
439 + (wt.
i(0) - wt.
i(4)) * (wt.
i(0) - wt.
i(4));
440 double fn2 = (wt.
r(1) - wt.
r(3)) * (wt.
r(1) - wt.
r(3))
441 + (wt.
i(1) + wt.
i(3)) * (wt.
i(1) + wt.
i(3));
442 double fn = 1.0 / sqrt(fn1 + fn2);
444 gt.
set(0, fn * (wt.
r(0) + wt.
r(4)), fn * (-wt.
i(0) + wt.
i(4)));
445 gt.
set(1, fn * (-wt.
r(1) + wt.
r(3)), fn * (-wt.
i(1) - wt.
i(3)));
446 gt.
set(3, fn * (wt.
r(1) - wt.
r(3)), fn * (-wt.
i(1) - wt.
i(3)));
447 gt.
set(4, fn * (wt.
r(0) + wt.
r(4)), fn * (wt.
i(0) - wt.
i(4)));
454 gt2 = G.
mat(site, 0);
465 const int Nvol2 = W.
nvol();
467 for (
int site = 0; site < Nvol2; ++site) {
478 double fn1 = (wt.
r(8) + wt.
r(0)) * (wt.
r(8) + wt.
r(0))
479 + (wt.
i(8) - wt.
i(0)) * (wt.
i(8) - wt.
i(0));
480 double fn2 = (wt.
r(2) - wt.
r(6)) * (wt.
r(2) - wt.
r(6))
481 + (wt.
i(2) + wt.
i(6)) * (wt.
i(2) + wt.
i(6));
482 double fn = 1.0 / sqrt(fn1 + fn2);
484 gt.
set(0, fn * (wt.
r(8) + wt.
r(0)), fn * (wt.
i(8) - wt.
i(0)));
485 gt.
set(2, fn * (wt.
r(6) - wt.
r(2)), fn * (-wt.
i(6) - wt.
i(2)));
486 gt.
set(6, fn * (-wt.
r(6) + wt.
r(2)), fn * (-wt.
i(6) - wt.
i(2)));
487 gt.
set(8, fn * (wt.
r(8) + wt.
r(0)), fn * (-wt.
i(8) + wt.
i(0)));
494 gt2 = G.
mat(site, 0);
505 const int Nvol2 = W.
nvol();
509 for (
int site = 0; site < Nvol2; ++site) {
520 double fn1 = (wt.
r(4) + wt.
r(8)) * (wt.
r(4) + wt.
r(8))
521 + (wt.
i(4) - wt.
i(8)) * (wt.
i(4) - wt.
i(8));
522 double fn2 = (wt.
r(7) - wt.
r(5)) * (wt.
r(7) - wt.
r(5))
523 + (wt.
i(7) + wt.
i(5)) * (wt.
i(7) + wt.
i(5));
524 double fn = 1.0 / sqrt(fn1 + fn2);
526 gt.
set(4, fn * (wt.
r(4) + wt.
r(8)), fn * (-wt.
i(4) + wt.
i(8)));
527 gt.
set(5, fn * (-wt.
r(5) + wt.
r(7)), fn * (-wt.
i(5) - wt.
i(7)));
528 gt.
set(7, fn * (wt.
r(5) - wt.
r(7)), fn * (-wt.
i(5) - wt.
i(7)));
529 gt.
set(8, fn * (wt.
r(4) + wt.
r(8)), fn * (wt.
i(4) - wt.
i(8)));
536 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 set(const int jin, const int site, const int jex, double v)
void maxTr2(Field_G &, Field_G &)
void general(const char *format,...)
static const std::string class_name
int fetch_double(const string &key, double &value) const
double plaquette(const Field_G &)
calculates plaquette value.
Mat_SU_N & at()
antihermitian traceless
void convertField(Field &eo, const Field &lex)
void addpart_ex(int ex, const Field &w, int exw)
void gauge_trans_eo(Field_G &Ue, Field_G &Uo, const Field_G &Geo, const int Ieo)
int square_non_zero(const double v)
void maxTr1(Field_G &, Field_G &)
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 maxTr3(Field_G &, Field_G &)
void set_parameters(const Parameters ¶ms)
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)
void calc_W(Field_G &Weo, const Field_G &Ue, const Field_G &Uo, const int Ieo)
void set(int c, double re, const double &im)
void fix(Field_G &Ufix, const Field_G &Uorg)
void setpart_ex(int ex, const Field &w, int exw)
void maxTr(Field_G &, Field_G &)
string get_string(const string &key) const
void set_mat(const int site, const int mn, const Mat_SU_N &U)
Mat_SU_N mat(const int site, const int mn=0) const
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)
void calc_SG(double &sg, double &Fval, const Field_G &Ue, const Field_G &Uo)
double ReTr(const Mat_SU_N &m)
void gfix_step(Field_G &Ue, Field_G &Uo, const double wp)
one step of gauge fixing with overrelaxation parameter wp.
void set_randomGaugeTrans(Field_G &Geo)
void mult_Field_Gnd(Field_G &W, const int ex, const Field_G &U1, const int ex1, const Field_G &U2, const int ex2)