27 const string str_vlevel = params.
get_string(
"verbose_level");
35 err += params.
fetch_int(
"spatial_correlator_size", Nspc_size);
36 err += params.
fetch_int(
"number_of_correlator_type", Ntype);
82 m_Nvol_ext = m_Nx_ext * m_Ny_ext * m_Nz_ext * m_Nt_ext;
86 m_Nmax[0] = Nspc_size;
87 m_Nmax[1] = Nspc_size;
88 m_Nmax[2] = Nspc_size / 2;
89 m_Nmax[3] = Nspc_size;
90 m_Nmax[4] = Nspc_size / 2;
91 m_Nmax[5] = Nspc_size / 2;
108 const int Nvol_spc = Nx * Ny * Nz;
116 const int Ndim_spc = Ndim - 1;
118 m_Nunit.resize(m_Ntype_max);
119 m_Nmax.resize(m_Ntype_max);
121 for (
int i = 0; i < m_Ntype_max; ++i) {
122 m_Nunit[i].resize(Ndim_spc);
127 assert(m_Ntype_max >= 6);
167 std::ofstream log_file;
174 vout.
general(
m_vl,
"PolyakovLoop(Re,Im) = %20.16e %20.16e\n", real(ploop), imag(ploop));
196 const int Nvol = U.
nvol();
197 assert(Nvol == Nx * Ny * Nz * Nt);
199 const int Nvol_spc =
m_P.
nvol();
200 assert(Nvol_spc == Nx * Ny * Nz);
203 const Index_lex index_spc(Nx, Ny, Nz, 1);
208 if (Nthread > Nvol_spc) {
213 const int Ntask = Nvol_spc / Nthread;
215 if (Ntask * Nthread != Nvol_spc) {
216 vout.
crucial(
m_vl,
"Error at %s: Nvol_spc = %d does not match Nthread = %d\n",
221 const int is = Nvol_spc * i_thread / Nthread;
222 const int ns = Nvol_spc * (i_thread + 1) / Nthread - is;
233 for (
int site2 = is; site2 < is + ns; ++site2) {
235 int y = (site2 % (Nx * Ny) - x) / Nx;
236 int z = (site2 - Nx * y - x) / (Nx * Ny);
238 int site = index.
site(x, y, z, t);
249 for (
int t = 1; t < Nt; ++t) {
254 for (
int site2 = is; site2 < is + ns; ++site2) {
256 int y = (site2 % (Nx * Ny) - x) / Nx;
257 int z = (site2 - Nx * y - x) / (Nx * Ny);
259 int site = index.
site(x, y, z, t);
281 const int size_cp =
m_P.
nin() * Nvol_spc;
283 for (
int ipe_t = 1; ipe_t < Npe_t; ++ipe_t) {
309 for (
int site = is; site < is + ns; ++site) {
321 const double re_ploop = real(tr) / Nc / Lvol_spc / Npe_t;
322 const double im_ploop = imag(tr) / Nc / Lvol_spc / Npe_t;
327 ploop = cmplx(re_ploop, im_ploop);
virtual void set_parameters(const Parameters ¶ms)
setting parameters: only for Polyakov loop correlators.
static int get_num_threads()
returns available number of threads.
static int npe(const int dir)
logical grid extent
const double * ptr(const int jin, const int site, const int jex) const
int site(const int &x, const int &y, const int &z, const int &t) const
void general(const char *format,...)
void reset(const int Nvol, const int Nex)
dcomplex Tr(const Mat_SU_N &m)
void init(const std::string &filename)
static int get_thread_id()
returns thread id.
Bridge::VerboseLevel m_vl
int fetch_int(const string &key, int &value) const
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,...)
static void reduce_sum_global(dcomplex &value, const int i_thread, const int Nthread)
global reduction with summation: dcomplex values are assumed thread local.
void init()
initial setup independent of parameters.
std::string m_filename_output
static const std::string class_name
std::ostream & getStream()
int m_Nspc_size
parameters set by user
static int exchange(int count, dcomplex *recv_buf, dcomplex *send_buf, int idir, int ipm, int tag)
receive array of dcomplex from upstream specified by idir and ipm, and send array to downstream...
int non_negative(const int v)
int m_Ntype
number of measured loop-type
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)
Mat_SU_N mat(const int site, const int mn=0) const
void mult_nn(const Mat_SU_N &u1, const Mat_SU_N &u2)
static VerboseLevel set_verbose_level(const std::string &str)
void calc_ploop(dcomplex &ploop, const Field_G &U)
Polyakov loop correlator measurement (to be implemented).
dcomplex measure_ploop(const Field_G &U)
Polyakov loop measurement.