26 const string str_vlevel = params.
get_string(
"verbose_level");
30 int Nspc_size, Ntmp_size, Ntype;
33 err += params.
fetch_int(
"max_spatial_loop_size", Nspc_size);
34 err += params.
fetch_int(
"max_temporal_loop_size", Ntmp_size);
35 err += params.
fetch_int(
"number_of_loop_type", Ntype);
107 const int Ndim_spc = Ndim - 1;
118 assert(m_Ntype_max >= 6);
150 const int Ndim_spc = Ndim - 1;
167 for (
size_t i = 0, n = wloop.size(); i < n; ++i) {
172 for (
int i_type = 0; i_type <
m_Ntype; ++i_type) {
174 for (
int nu = 0; nu < Ndim_spc; ++nu) {
175 std::vector<int> unit_v(Ndim_spc);
176 unit_v[0] =
m_Nunit[i_type][nu % Ndim_spc];
177 unit_v[1] =
m_Nunit[i_type][(1 + nu) % Ndim_spc];
178 unit_v[2] =
m_Nunit[i_type][(2 + nu) % Ndim_spc];
180 int unit_v_max = unit_v[0];
181 if (unit_v_max < unit_v[1]) unit_v_max = unit_v[1];
182 if (unit_v_max < unit_v[2]) unit_v_max = unit_v[2];
185 for (
int site = 0; site <
m_Nvol_ext; ++site) {
189 int Nmax =
m_Nmax[i_type];
190 for (
int j = 0; j < Nmax; ++j) {
195 for (
int t_sep = 0; t_sep <
m_Ntmp_size; ++t_sep) {
198 i_type, nu, j + 1, t_sep + 1, wloop1);
199 wloop[
index_wloop(j, t_sep, i_type)] += wloop1 / 3.0;
207 std::ofstream log_file;
214 for (
int i_type = 0; i_type <
m_Ntype; ++i_type) {
215 int Nmax =
m_Nmax[i_type];
216 for (
int x_sep = 0; x_sep < Nmax; ++x_sep) {
217 for (
int t_sep = 0; t_sep <
m_Ntmp_size; ++t_sep) {
219 i_type + 1, x_sep + 1, t_sep + 1, wloop[
index_wloop(x_sep, t_sep, i_type)]);
250 double wloop_r = 0.0;
251 double wloop_i = 0.0;
253 for (
int t = 0; t < Nt; ++t) {
254 for (
int z = 0; z < Nz; ++z) {
255 for (
int y = 0; y < Ny; ++y) {
256 for (
int x = 0; x < Nx; ++x) {
257 int site1 = index_ext.
site(x, y, z, t);
258 int site2 = index_ext.
site(x, y, z, t + t_sep);
261 Utmp1 = Uspc.
mat(site1, 0);
264 Utmp2 = Uspc.
mat_dag(site2, 0);
267 Utmp3 = Utmp1 * Utmp2;
269 wloop_r +=
ReTr(Utmp3);
270 wloop_i +=
ImTr(Utmp3);
279 wloop_r = wloop_r / Nc / Nvol / NPE;
280 wloop_i = wloop_i / Nc / Nvol / NPE;
288 const int j,
const int nu,
const std::vector<int>& unit_v)
297 int unit_v_max = unit_v[0];
299 if (unit_v_max < unit_v[1]) unit_v_max = unit_v[1];
300 if (unit_v_max < unit_v[2]) unit_v_max = unit_v[2];
308 for (
int k = 0; k < 3 * unit_v_max; ++k) {
309 int kmod = (k + 3 - nu) % 3;
311 if ((kmod == 0) && (imx < unit_v[0])) {
312 for (
int t = 0; t <
m_Nt_ext; ++t) {
313 for (
int z = 0; z < Nz; ++z) {
314 for (
int y = 0; y < Ny; ++y) {
315 for (
int x = 0; x < Nx; ++x) {
316 int x2 = x + unit_v[0] * j + imx;
317 int y2 = y + unit_v[1] * j + imy;
318 int z2 = z + unit_v[2] * j + imz;
320 int site1 = index_ext.
site(x, y, z, t);
321 int site2 = index_ext.
site(x2, y2, z2, t);
324 Utmp1 = Uspc.
mat(site1, 0);
327 Utmp2 = Uext.
mat(site2, 0);
330 Utmp3 = Utmp1 * Utmp2;
340 if ((kmod == 1) && (imy < unit_v[1])) {
341 for (
int t = 0; t <
m_Nt_ext; ++t) {
342 for (
int z = 0; z < Nz; ++z) {
343 for (
int y = 0; y < Ny; ++y) {
344 for (
int x = 0; x < Nx; ++x) {
345 int x2 = x + unit_v[0] * j + imx;
346 int y2 = y + unit_v[1] * j + imy;
347 int z2 = z + unit_v[2] * j + imz;
349 int site1 = index_ext.
site(x, y, z, t);
350 int site2 = index_ext.
site(x2, y2, z2, t);
353 Utmp1 = Uspc.
mat(site1, 0);
356 Utmp2 = Uext.
mat(site2, 1);
359 Utmp3 = Utmp1 * Utmp2;
369 if ((kmod == 2) && (imz < unit_v[2])) {
370 for (
int t = 0; t <
m_Nt_ext; ++t) {
371 for (
int z = 0; z < Nz; ++z) {
372 for (
int y = 0; y < Ny; ++y) {
373 for (
int x = 0; x < Nx; ++x) {
374 int x2 = x + unit_v[0] * j + imx;
375 int y2 = y + unit_v[1] * j + imy;
376 int z2 = z + unit_v[2] * j + imz;
378 int site1 = index_ext.
site(x, y, z, t);
379 int site2 = index_ext.
site(x2, y2, z2, t);
382 Utmp1 = Uspc.
mat(site1, 0);
385 Utmp2 = Uext.
mat(site2, 2);
388 Utmp3 = Utmp1 * Utmp2;
409 const int NinG = Uorg.
nin();
417 for (
int it = 0; it < Nt; ++it) {
418 for (
int iz = 0; iz < Nz; ++iz) {
419 for (
int iy = 0; iy < Ny; ++iy) {
420 for (
int ix = 0; ix < Nx; ++ix) {
421 int site1 = index_lex.
site(ix, iy, iz, it);
422 int site2 = index_ext.
site(ix, iy, iz, it);
424 for (
int ex = 0; ex < Ndim; ++ex) {
444 const int size_ex = NinG * Nvol_cp * Ndim;
448 for (
int it_off = 0; it_off <
m_Ntmp_size + 1; ++it_off) {
449 for (
int iz = 0; iz <
m_Nz_ext; ++iz) {
450 for (
int iy = 0; iy <
m_Ny_ext; ++iy) {
451 for (
int ix = 0; ix <
m_Nx_ext; ++ix) {
452 int site1 = index_ext.
site(ix, iy, iz, it_off);
453 int site2 = ix + m_Nx_ext * (iy + m_Ny_ext * iz);
455 for (
int ex = 0; ex < Ndim; ++ex) {
464 for (
int iz = 0; iz <
m_Nz_ext; ++iz) {
465 for (
int iy = 0; iy <
m_Ny_ext; ++iy) {
466 for (
int ix = 0; ix <
m_Nx_ext; ++ix) {
467 int site1 = ix + m_Nx_ext * (iy + m_Ny_ext * iz);
468 int site2 = index_ext.
site(ix, iy, iz, Nt + it_off);
470 for (
int ex = 0; ex < Ndim; ++ex) {
479 for (
int iz_off = 0; iz_off <
m_Nspc_size + 1; ++iz_off) {
480 for (
int it = 0; it <
m_Nt_ext; ++it) {
481 for (
int iy = 0; iy <
m_Ny_ext; ++iy) {
482 for (
int ix = 0; ix <
m_Nx_ext; ++ix) {
483 int site1 = index_ext.
site(ix, iy, iz_off, it);
484 int site2 = ix + m_Nx_ext * (iy + m_Ny_ext * it);
486 for (
int ex = 0; ex < Ndim; ++ex) {
495 for (
int it = 0; it <
m_Nt_ext; ++it) {
496 for (
int iy = 0; iy <
m_Ny_ext; ++iy) {
497 for (
int ix = 0; ix <
m_Nx_ext; ++ix) {
498 int site1 = ix + m_Nx_ext * (iy + m_Ny_ext * it);
499 int site2 = index_ext.
site(ix, iy, Nz + iz_off, it);
501 for (
int ex = 0; ex < Ndim; ++ex) {
510 for (
int iy_off = 0; iy_off < m_Nspc_size + 1; ++iy_off) {
511 for (
int it = 0; it <
m_Nt_ext; ++it) {
512 for (
int iz = 0; iz <
m_Nz_ext; ++iz) {
513 for (
int ix = 0; ix <
m_Nx_ext; ++ix) {
514 int site1 = index_ext.
site(ix, iy_off, iz, it);
515 int site2 = ix + m_Nx_ext * (iz + m_Nz_ext * it);
517 for (
int ex = 0; ex < Ndim; ++ex) {
526 for (
int it = 0; it <
m_Nt_ext; ++it) {
527 for (
int iz = 0; iz <
m_Nz_ext; ++iz) {
528 for (
int ix = 0; ix <
m_Nx_ext; ++ix) {
529 int site1 = ix + m_Nx_ext * (iz + m_Nz_ext * it);
530 int site2 = index_ext.
site(ix, Ny + iy_off, iz, it);
532 for (
int ex = 0; ex < Ndim; ++ex) {
541 for (
int ix_off = 0; ix_off < m_Nspc_size + 1; ++ix_off) {
542 for (
int it = 0; it <
m_Nt_ext; ++it) {
543 for (
int iz = 0; iz <
m_Nz_ext; ++iz) {
544 for (
int iy = 0; iy <
m_Ny_ext; ++iy) {
545 int site1 = index_ext.
site(ix_off, iy, iz, it);
546 int site2 = iy + m_Ny_ext * (iz + m_Nz_ext * it);
548 for (
int ex = 0; ex < Ndim; ++ex) {
557 for (
int it = 0; it <
m_Nt_ext; ++it) {
558 for (
int iz = 0; iz <
m_Nz_ext; ++iz) {
559 for (
int iy = 0; iy <
m_Ny_ext; ++iy) {
560 int site1 = iy + m_Ny_ext * (iz + m_Nz_ext * it);
561 int site2 = index_ext.
site(Nx + ix_off, iy, iz, it);
563 for (
int ex = 0; ex < Ndim; ++ex) {
579 const int dir_t = Ndim - 1;
583 for (
int it = 1; it <
m_Nt_ext; ++it) {
584 for (
int iz = 0; iz <
m_Nz_ext; ++iz) {
585 for (
int iy = 0; iy <
m_Ny_ext; ++iy) {
586 for (
int ix = 0; ix <
m_Nx_ext; ++ix) {
587 int site0 = index_ext.
site(ix, iy, iz, it - 1);
590 Utrf1 = Uext.
mat(site0, dir_t);
593 Utrf2 = Uext.
mat_dag(site0, dir_t);
596 Utmp2 = Utrf1 * Utrf2;
600 int site1 = index_ext.
site(ix, iy, iz, it);
602 for (
int ex = 0; ex < Ndim; ++ex) {
604 Utmp = Uext.
mat(site1, ex);
605 Utmp2 = Utrf1 * Utmp;
606 Uext.
set_mat(site1, ex, Utmp2);
610 int site2 = index_ext.
site(ix - 1, iy, iz, it);
613 Utmp = Uext.
mat(site2, 0);
614 Utmp2 = Utmp * Utrf2;
619 int site2 = index_ext.
site(ix, iy - 1, iz, it);
622 Utmp = Uext.
mat(site2, 1);
623 Utmp2 = Utmp * Utrf2;
628 int site2 = index_ext.
site(ix, iy, iz - 1, it);
631 Utmp = Uext.
mat(site2, 2);
632 Utmp2 = Utmp * Utrf2;
void gfix_temporal(Field_G &Uext)
temporal gauge fixing of extended gauge field.
void detailed(const char *format,...)
const double * ptr(const int jin, const int site, const int jex) const
void set(const int jin, const int site, const int jex, double v)
int site(const int &x, const int &y, const int &z, const int &t) const
void general(const char *format,...)
int m_Ntype
number of measured loop-type
int m_Nvol_ext
volume of extended gauge config.
std::vector< unit_vec > m_Nunit
int m_Nspc_size
parameters set by user
int m_Nt_ext
size of extended gauge config.
void init(const std::string &filename)
void redef_Uspc(Field_G &Uspc, const Field_G &Uext, const int j, const int nu, const std::vector< int > &unit_v)
redefinition of product of spatial link variables.
double measure(const Field_G &U)
main function to measure Wilson loops.
int m_Ntmp_size
spatial size of loop
int m_Ntype_max
internal data members
double calc_wloop(const Field_G &Uspc, const int t_ext)
temporal gauge fixing of extended gauge field.
static const std::string class_name
std::string m_filename_output
void set_extfield(Field_G &Uext, const Field_G &Uorg)
setup of extended gauge field.
int fetch_int(const string &key, int &value) const
void init()
initial setup independent of parameters.
double ImTr(const Mat_SU_N &m)
std::vector< int > m_Nmax
static int exchange(int count, double *recv_buf, double *send_buf, int idir, int ipm, int tag)
receive array of double from upstream specified by idir and ipm, and send array to downstream...
int m_Nz_ext
size of extended gauge config.
void paranoiac(const char *format,...)
Bridge::VerboseLevel m_vl
void crucial(const char *format,...)
virtual void set_parameters(const Parameters ¶ms)
setting parameters.
std::ostream & getStream()
int index_wloop(const int i_spc, const int i_tmp, const int i_type)
index for Wilson loop variable.
Mat_SU_N mat_dag(const int site, const int mn=0) const
int non_negative(const int v)
int m_Ny_ext
size of extended gauge config.
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...
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
int m_Nx_ext
size of extended gauge config.
static VerboseLevel set_verbose_level(const std::string &str)
double ReTr(const Mat_SU_N &m)