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) {
238 int Nvol2 = Geo.
nvol();
244 Field_G Ut(Nvol2, 1), Gt(Nvol2, 1);
248 for (
int mu = 0; mu < Ndim; ++mu) {
257 for (
int mu = 0; mu < Ndim; ++mu) {
275 int Nvol2 = Ue.
nvol();
284 for (
int ieo = 0; ieo < 2; ++ieo) {
286 double tsg = DLT.
norm2();
289 sg = sg / (Nex * Nc * 2 * Nvol2 * NPE);
291 for (
int mu = 0; mu < Nex; ++mu) {
292 for (
int site = 0; site < Nvol2; ++site) {
293 ut = Ue.
mat(site, mu);
295 ut = Uo.
mat(site, mu);
300 Fval = Fval / (Nex * 2 * Nvol2 * NPE);
308 int Nvol2 = Ue.
nvol();
314 Field_G Ut1(Nvol2, 1), Ut2(Nvol2, 1);
320 for (
int mu = 0; mu < Ndim; ++mu) {
322 Ut1.setpart_ex(0, Uo, mu);
327 for (
int mu = 0; mu < Ndim; ++mu) {
329 Ut1.setpart_ex(0, Ue, mu);
335 for (
int site = 0; site < Nvol2; ++site) {
336 u_tmp = DLT.
mat(site, 0);
348 int Nvol2 = Ue.
nvol();
352 assert(Weo.
nex() == 1);
356 Field_G Ut1(Nvol2, 1), Ut2(Nvol2, 1);
362 for (
int mu = 0; mu < Ndim; ++mu) {
364 Ut1.setpart_ex(0, Uo, mu);
365 shift.forward_h(Ut2, Ut1, mu, 0);
366 for (
int site = 0; site < Nvol2; ++site) {
371 }
else if (Ieo == 1) {
372 for (
int mu = 0; mu < Ndim; ++mu) {
374 Ut1.setpart_ex(0, Ue, mu);
375 shift.forward_h(Ut2, Ut1, mu, 1);
376 for (
int site = 0; site < Nvol2; ++site) {
394 int Nvol2 = G0.
nvol();
402 for (
int site = 0; site < Nvol2; ++site) {
406 for (
int imt = 0; imt < Nmt; ++imt) {
418 int Nvol2 = W.
nvol();
420 Mat_SU_N gt(Nc), wt(Nc), gt2(Nc), wt2(Nc);
422 for (
int site = 0; site < Nvol2; ++site) {
431 double fn1 = (wt.r(0) + wt.r(4)) * (wt.r(0) + wt.r(4))
432 + (wt.i(0) - wt.i(4)) * (wt.i(0) - wt.i(4));
433 double fn2 = (wt.r(1) - wt.r(3)) * (wt.r(1) - wt.r(3))
434 + (wt.i(1) + wt.i(3)) * (wt.i(1) + wt.i(3));
435 double fn = 1.0 / sqrt(fn1 + fn2);
437 gt.set(0, fn * (wt.r(0) + wt.r(4)), fn * (-wt.i(0) + wt.i(4)));
438 gt.set(1, fn * (-wt.r(1) + wt.r(3)), fn * (-wt.i(1) - wt.i(3)));
439 gt.set(3, fn * (wt.r(1) - wt.r(3)), fn * (-wt.i(1) - wt.i(3)));
440 gt.set(4, fn * (wt.r(0) + wt.r(4)), fn * (wt.i(0) - wt.i(4)));
444 gt2 = G.
mat(site, 0);
455 int Nvol2 = W.
nvol();
457 Mat_SU_N gt(Nc), wt(Nc), gt2(Nc), wt2(Nc);
459 for (
int site = 0; site < Nvol2; ++site) {
468 double fn1 = (wt.r(8) + wt.r(0)) * (wt.r(8) + wt.r(0))
469 + (wt.i(8) - wt.i(0)) * (wt.i(8) - wt.i(0));
470 double fn2 = (wt.r(2) - wt.r(6)) * (wt.r(2) - wt.r(6))
471 + (wt.i(2) + wt.i(6)) * (wt.i(2) + wt.i(6));
472 double fn = 1.0 / sqrt(fn1 + fn2);
474 gt.set(0, fn * (wt.r(8) + wt.r(0)), fn * (wt.i(8) - wt.i(0)));
475 gt.set(2, fn * (wt.r(6) - wt.r(2)), fn * (-wt.i(6) - wt.i(2)));
476 gt.set(6, fn * (-wt.r(6) + wt.r(2)), fn * (-wt.i(6) - wt.i(2)));
477 gt.set(8, fn * (wt.r(8) + wt.r(0)), fn * (-wt.i(8) + wt.i(0)));
481 gt2 = G.
mat(site, 0);
492 int Nvol2 = W.
nvol();
494 Mat_SU_N gt(Nc), wt(Nc), gt2(Nc), wt2(Nc);
496 for (
int site = 0; site < Nvol2; ++site) {
505 double fn1 = (wt.r(4) + wt.r(8)) * (wt.r(4) + wt.r(8))
506 + (wt.i(4) - wt.i(8)) * (wt.i(4) - wt.i(8));
507 double fn2 = (wt.r(7) - wt.r(5)) * (wt.r(7) - wt.r(5))
508 + (wt.i(7) + wt.i(5)) * (wt.i(7) + wt.i(5));
509 double fn = 1.0 / sqrt(fn1 + fn2);
511 gt.set(4, fn * (wt.r(4) + wt.r(8)), fn * (-wt.i(4) + wt.i(8)));
512 gt.set(5, fn * (-wt.r(5) + wt.r(7)), fn * (-wt.i(5) - wt.i(7)));
513 gt.set(7, fn * (wt.r(5) - wt.r(7)), fn * (-wt.i(5) - wt.i(7)));
514 gt.set(8, fn * (wt.r(4) + wt.r(8)), fn * (wt.i(4) - wt.i(8)));
518 gt2 = G.
mat(site, 0);
void Register_string(const string &, const string &)
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)
Mat_SU_N & set_random(RandomNumbers *rnd)
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)