16 #ifdef USE_PARAMETERS_FACTORY
28 bool init = GaugeFixing::Factory::Register(
"Landau", create_object);
47 #ifdef USE_PARAMETERS_FACTORY
62 const string str_vlevel = params.
get_string(
"verbose_level");
67 int Niter, Nnaive, Nmeas, Nreset;
71 err += params.
fetch_int(
"maximum_number_of_iteration", Niter);
72 err += params.
fetch_int(
"number_of_naive_iteration", Nnaive);
73 err += params.
fetch_int(
"interval_of_measurement", Nmeas);
74 err += params.
fetch_int(
"iteration_to_reset", Nreset);
75 err += params.
fetch_double(
"convergence_criterion_squared", Enorm);
76 err += params.
fetch_double(
"overrelaxation_parameter", wp);
90 const int Nmeas,
const int Nreset,
91 const double Enorm,
const double wp)
129 int Nvol = Uorg.
nvol();
130 int Nex = Uorg.
nex();
132 int Nvol2 = Nvol / 2;
133 Field_G Ue(Nvol2, Nex), Uo(Nvol2, Nex);
135 Field_G Ge(Nvol2, 1), Go(Nvol2, 1);
143 for (
int iter = 0; iter <
m_Niter; ++iter) {
163 if (((iter % m_Nreset) == 0) && (iter > 0)) {
185 int Nvol2 = Ue.
nvol();
188 Field_G Weo(Nvol2, 1), Geo(Nvol2, 1);
194 for (
int ieo = 0; ieo < 2; ++ieo) {
200 for (
int site = 0; site < Nvol2; ++site) {
201 ut = Geo.
mat(site, 0);
215 int Nvol = Geo.
nvol();
221 for (
int ex = 0; ex < Nex; ++ex) {
222 for (
int site = 0; site < Nvol; ++site) {
237 int Nvol2 = Geo.
nvol();
243 Field_G Ut(Nvol2, 1), Gt(Nvol2, 1);
247 for (
int mu = 0; mu < Ndim; ++mu) {
256 for (
int mu = 0; mu < Ndim; ++mu) {
274 int Nvol2 = Ue.
nvol();
283 for (
int ieo = 0; ieo < 2; ++ieo) {
285 double tsg = DLT.
norm2();
288 sg = sg / (Nex * Nc * 2 * Nvol2 * NPE);
290 for (
int mu = 0; mu < Nex; ++mu) {
291 for (
int site = 0; site < Nvol2; ++site) {
292 ut = Ue.
mat(site, mu);
294 ut = Uo.
mat(site, mu);
299 Fval = Fval / (Nex * 2 * Nvol2 * NPE);
307 int Nvol2 = Ue.
nvol();
313 Field_G Ut1(Nvol2, 1), Ut2(Nvol2, 1);
319 for (
int mu = 0; mu < Ndim; ++mu) {
321 Ut1.setpart_ex(0, Uo, mu);
326 for (
int mu = 0; mu < Ndim; ++mu) {
328 Ut1.setpart_ex(0, Ue, mu);
334 for (
int site = 0; site < Nvol2; ++site) {
335 u_tmp = DLT.
mat(site, 0);
347 int Nvol2 = Ue.
nvol();
351 assert(Weo.
nex() == 1);
355 Field_G Ut1(Nvol2, 1), Ut2(Nvol2, 1);
361 for (
int mu = 0; mu < Ndim; ++mu) {
363 Ut1.setpart_ex(0, Uo, mu);
364 shift.forward_h(Ut2, Ut1, mu, 0);
365 for (
int site = 0; site < Nvol2; ++site) {
370 }
else if (Ieo == 1) {
371 for (
int mu = 0; mu < Ndim; ++mu) {
373 Ut1.setpart_ex(0, Ue, mu);
374 shift.forward_h(Ut2, Ut1, mu, 1);
375 for (
int site = 0; site < Nvol2; ++site) {
393 int Nvol2 = G0.
nvol();
401 for (
int site = 0; site < Nvol2; ++site) {
405 for (
int imt = 0; imt < Nmt; ++imt) {
417 int Nvol2 = W.
nvol();
419 Mat_SU_N gt(Nc), wt(Nc), gt2(Nc), wt2(Nc);
421 for (
int site = 0; site < Nvol2; ++site) {
430 double fn1 = (wt.r(0) + wt.r(4)) * (wt.r(0) + wt.r(4))
431 + (wt.i(0) - wt.i(4)) * (wt.i(0) - wt.i(4));
432 double fn2 = (wt.r(1) - wt.r(3)) * (wt.r(1) - wt.r(3))
433 + (wt.i(1) + wt.i(3)) * (wt.i(1) + wt.i(3));
434 double fn = 1.0 / sqrt(fn1 + fn2);
436 gt.set(0, fn * (wt.r(0) + wt.r(4)), fn * (-wt.i(0) + wt.i(4)));
437 gt.set(1, fn * (-wt.r(1) + wt.r(3)), fn * (-wt.i(1) - wt.i(3)));
438 gt.set(3, fn * (wt.r(1) - wt.r(3)), fn * (-wt.i(1) - wt.i(3)));
439 gt.set(4, fn * (wt.r(0) + wt.r(4)), fn * (wt.i(0) - wt.i(4)));
443 gt2 = G.
mat(site, 0);
454 int Nvol2 = W.
nvol();
456 Mat_SU_N gt(Nc), wt(Nc), gt2(Nc), wt2(Nc);
458 for (
int site = 0; site < Nvol2; ++site) {
467 double fn1 = (wt.r(8) + wt.r(0)) * (wt.r(8) + wt.r(0))
468 + (wt.i(8) - wt.i(0)) * (wt.i(8) - wt.i(0));
469 double fn2 = (wt.r(2) - wt.r(6)) * (wt.r(2) - wt.r(6))
470 + (wt.i(2) + wt.i(6)) * (wt.i(2) + wt.i(6));
471 double fn = 1.0 / sqrt(fn1 + fn2);
473 gt.set(0, fn * (wt.r(8) + wt.r(0)), fn * (wt.i(8) - wt.i(0)));
474 gt.set(2, fn * (wt.r(6) - wt.r(2)), fn * (-wt.i(6) - wt.i(2)));
475 gt.set(6, fn * (-wt.r(6) + wt.r(2)), fn * (-wt.i(6) - wt.i(2)));
476 gt.set(8, fn * (wt.r(8) + wt.r(0)), fn * (-wt.i(8) + wt.i(0)));
480 gt2 = G.
mat(site, 0);
491 int Nvol2 = W.
nvol();
493 Mat_SU_N gt(Nc), wt(Nc), gt2(Nc), wt2(Nc);
495 for (
int site = 0; site < Nvol2; ++site) {
504 double fn1 = (wt.r(4) + wt.r(8)) * (wt.r(4) + wt.r(8))
505 + (wt.i(4) - wt.i(8)) * (wt.i(4) - wt.i(8));
506 double fn2 = (wt.r(7) - wt.r(5)) * (wt.r(7) - wt.r(5))
507 + (wt.i(7) + wt.i(5)) * (wt.i(7) + wt.i(5));
508 double fn = 1.0 / sqrt(fn1 + fn2);
510 gt.set(4, fn * (wt.r(4) + wt.r(8)), fn * (-wt.i(4) + wt.i(8)));
511 gt.set(5, fn * (-wt.r(5) + wt.r(7)), fn * (-wt.i(5) - wt.i(7)));
512 gt.set(7, fn * (wt.r(5) - wt.r(7)), fn * (-wt.i(5) - wt.i(7)));
513 gt.set(8, fn * (wt.r(4) + wt.r(8)), fn * (wt.i(4) - wt.i(8)));
517 gt2 = G.
mat(site, 0);
void scal(Field &x, const double a)
scal(x, a): x = a * x
Mat_SU_N & set_random(RandomNumbers *rand)
void Register_string(const string &, const string &)
void set(const int jin, const int site, const int jex, double v)
void maxTr2(Field_G &, Field_G &)
void general(const char *format,...)
void Register_int(const string &, const int)
static const std::string class_name
Mat_SU_N & at()
antihermitian traceless
void convertField(Field &eo, const Field &lex)
void addpart_ex(int ex, const Field &w, int exw)
int square_non_zero(const double v)
void calc_DLT(Field_G &Weo, Field_G &Ue, Field_G &Uo, int Ieo)
void maxTr1(Field_G &, Field_G &)
void mult_Field_Gnd(Field_G &w, const int ex, const Field_G &u1, const int ex1, const Field_G &u2, const int ex2)
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 maxTr3(Field_G &, Field_G &)
void set_parameters(const Parameters ¶ms)
void calc_W(Field_G &Weo, Field_G &Ue, Field_G &Uo, int Ieo)
void paranoiac(const char *format,...)
Methods to shift the even-odd field.
void crucial(const char *format,...)
Parameters_GaugeFixing_Landau()
Bridge::VerboseLevel m_vl
static bool Register(const std::string &realm, const creator_callback &cb)
Base class of random number generators.
void gfix_step(Field_G &Ue, Field_G &Uo, double wp)
one step of gauge fixing with overrelaxation parameter wp.
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 Register_double(const string &, const double)
void backward_h(Field &, const Field &, const int mu, const int ieo)
void calc_SG(double &sg, double &Fval, Field_G &Ue, Field_G &Uo)
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)
int fetch_double(const string &key, double &val) const
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)
void gauge_trans_eo(Field_G &Ue, Field_G &Uo, Field_G &Geo, int Ieo)
Mat_SU_N mat(const int site, const int mn=0) const
int fetch_int(const string &key, int &val) 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)
double ReTr(const Mat_SU_N &m)
void set_randomGaugeTrans(Field_G &Geo)