20 const int mu,
const int nu,
const Field_G& U)
78 axpy(Fmunu_1x1, 1.0, v2);
83 scal(Fmunu_1x1, -0.25);
90 const int mu,
const int nu,
const Field_G& U)
176 axpy(Fmunu_1x2, 1.0, v);
196 axpy(Fmunu_1x2, 1.0, v);
217 axpy(Fmunu_1x2, 1.0, v);
238 axpy(Fmunu_1x2, 1.0, rect);
262 axpy(Fmunu_1x2, 1.0, v);
286 axpy(Fmunu_1x2, 1.0, v);
311 axpy(Fmunu_1x2, 1.0, v);
318 scal(Fmunu_1x2, -0.125);
325 const int mu,
const int nu,
const Field_G& U)
383 axpy(Fmunu_1x1, 1.0, v2);
389 scal(Fmunu_1x1, -0.25);
396 const int mu,
const int nu,
const Field_G& U)
481 axpy(Fmunu_1x2, 1.0, v);
501 axpy(Fmunu_1x2, 1.0, v);
522 axpy(Fmunu_1x2, 1.0, v);
543 axpy(Fmunu_1x2, 1.0, rect);
567 axpy(Fmunu_1x2, 1.0, v);
591 axpy(Fmunu_1x2, 1.0, v);
616 axpy(Fmunu_1x2, 1.0, v);
624 scal(Fmunu_1x2, -0.125);
631 const int mu,
const int nu,
const Field_G& U)
668 for (
int site = 0; site < Nvol; ++site) {
669 FF +=
ReTr(Fmunu_1.
mat(site) * Fmunu_2.
mat(site));
687 assert(corr_global.size() == Lt);
689 std::vector<double> corr_local(Nt, 0.0);
690 for (
int t = 0; t < Nt; ++t) {
691 for (
int z = 0; z < Nz; ++z) {
692 for (
int y = 0; y < Ny; ++y) {
693 for (
int x = 0; x < Nx; ++x) {
694 int site = x + Nx * (y + Ny * (z + Nz * t));
696 corr_local[t] +=
ReTr(Fmunu_1.
mat(site) * Fmunu_2.
mat(site));
709 const std::vector<int>& momentum_sink,
710 const std::vector<int>& source_position)
722 assert(corr_global.size() == Lt);
723 assert(momentum_sink.size() == ND - 1);
724 assert(source_position.size() ==
ND);
726 static const double PI = 4.0 * atan(1.0);
727 std::vector<double> p_unit(ND - 1);
728 p_unit[0] = (2.0 * PI / Lx) * momentum_sink[0];
729 p_unit[1] = (2.0 * PI / Ly) * momentum_sink[1];
730 p_unit[2] = (2.0 * PI / Lz) * momentum_sink[2];
732 std::vector<int> ipe(ND - 1);
737 std::vector<double> corr_local(Nt, 0);
738 for (
int t = 0; t < Nt; ++t) {
739 for (
int z = 0; z < Nz; ++z) {
740 for (
int y = 0; y < Ny; ++y) {
741 for (
int x = 0; x < Nx; ++x) {
742 int site = x + Nx * (y + Ny * (z + Nz * t));
743 int x_global = x + ipe[0] * Nx;
744 int y_global = y + ipe[1] * Ny;
745 int z_global = z + ipe[2] * Nz;
746 double p_x = p_unit[0] * (x_global - source_position[0]);
747 double p_y = p_unit[1] * (y_global - source_position[1]);
748 double p_z = p_unit[2] * (z_global - source_position[2]);
749 double cos_p_xyz = cos(p_x + p_y + p_z);
751 double FF =
ReTr(Fmunu_1.
mat(site) * Fmunu_2.
mat(site));
752 corr_local[t] += FF * cos_p_xyz;
772 assert(corr_global.size() == Lx);
774 std::vector<double> corr_local(Nx, 0.0);
775 for (
int x = 0; x < Nx; ++x) {
776 for (
int t = 0; t < Nt; ++t) {
777 for (
int z = 0; z < Nz; ++z) {
778 for (
int y = 0; y < Ny; ++y) {
779 int site = x + Nx * (y + Ny * (z + Nz * t));
781 corr_local[x] +=
ReTr(Fmunu_1.
mat(site) * Fmunu_2.
mat(site));
794 const std::vector<int>& momentum_sink,
795 const std::vector<int>& source_position)
807 assert(corr_global.size() == Lx);
808 assert(momentum_sink.size() == ND - 1);
809 assert(source_position.size() ==
ND);
811 static const double PI = 4.0 * atan(1.0);
812 std::vector<double> p_unit(ND - 1);
813 p_unit[0] = (2.0 * PI / Ly) * momentum_sink[0];
814 p_unit[1] = (2.0 * PI / Lz) * momentum_sink[1];
815 p_unit[2] = (2.0 * PI / Lt) * momentum_sink[2];
817 std::vector<int> ipe(ND);
823 std::vector<double> corr_local(Nx, 0);
824 for (
int x = 0; x < Nx; ++x) {
825 for (
int t = 0; t < Nt; ++t) {
826 for (
int z = 0; z < Nz; ++z) {
827 for (
int y = 0; y < Ny; ++y) {
828 int site = x + Nx * (y + Ny * (z + Nz * t));
829 int y_global = y + ipe[1] * Ny;
830 int z_global = z + ipe[2] * Nz;
831 int t_global = t + ipe[3] * Nt;
832 double p_y = p_unit[0] * (y_global - source_position[1]);
833 double p_z = p_unit[1] * (z_global - source_position[2]);
834 double p_t = p_unit[2] * (t_global - source_position[3]);
835 double cos_p_yzt = cos(p_t + p_y + p_z);
836 double FF =
ReTr(Fmunu_1.
mat(site) * Fmunu_2.
mat(site));
837 corr_local[x] += FF * cos_p_yzt;
857 assert(corr_global.size() == Ly);
859 std::vector<double> corr_local(Ny, 0.0);
860 for (
int y = 0; y < Ny; ++y) {
861 for (
int t = 0; t < Nt; ++t) {
862 for (
int z = 0; z < Nz; ++z) {
863 for (
int x = 0; x < Nx; ++x) {
864 int site = x + Nx * (y + Ny * (z + Nz * t));
866 corr_local[y] +=
ReTr(Fmunu_1.
mat(site) * Fmunu_2.
mat(site));
879 const std::vector<int>& momentum_sink,
880 const std::vector<int>& source_position)
892 assert(corr_global.size() == Ly);
893 assert(momentum_sink.size() == ND - 1);
894 assert(source_position.size() ==
ND);
896 static const double PI = 4.0 * atan(1.0);
897 std::vector<double> p_unit(ND - 1);
898 p_unit[0] = (2.0 * PI / Ly) * momentum_sink[0];
899 p_unit[1] = (2.0 * PI / Lz) * momentum_sink[1];
900 p_unit[2] = (2.0 * PI / Lt) * momentum_sink[2];
902 std::vector<int> ipe(ND);
908 std::vector<double> corr_local(Ny, 0);
909 for (
int y = 0; y < Ny; ++y) {
910 for (
int t = 0; t < Nt; ++t) {
911 for (
int z = 0; z < Nz; ++z) {
912 for (
int x = 0; x < Nx; ++x) {
913 int site = x + Nx * (y + Ny * (z + Nz * t));
914 int x_global = x + ipe[0] * Nx;
915 int z_global = z + ipe[2] * Nz;
916 int t_global = t + ipe[3] * Nt;
917 double p_x = p_unit[0] * (x_global - source_position[0]);
918 double p_z = p_unit[1] * (z_global - source_position[2]);
919 double p_t = p_unit[2] * (t_global - source_position[3]);
920 double cos_p_xzt = cos(p_t + p_x + p_z);
921 double FF =
ReTr(Fmunu_1.
mat(site) * Fmunu_2.
mat(site));
922 corr_local[y] += FF * cos_p_xzt;
942 assert(corr_global.size() == Lz);
944 std::vector<double> corr_local(Nz, 0.0);
945 for (
int z = 0; z < Nz; ++z) {
946 for (
int t = 0; t < Nt; ++t) {
947 for (
int y = 0; y < Ny; ++y) {
948 for (
int x = 0; x < Nx; ++x) {
949 int site = x + Nx * (y + Ny * (z + Nz * t));
951 corr_local[z] +=
ReTr(Fmunu_1.
mat(site) * Fmunu_2.
mat(site));
964 const std::vector<int>& momentum_sink,
965 const std::vector<int>& source_position)
977 assert(corr_global.size() == Lz);
978 assert(momentum_sink.size() == ND - 1);
979 assert(source_position.size() ==
ND);
981 static const double PI = 4.0 * atan(1.0);
982 std::vector<double> p_unit(ND - 1);
983 p_unit[0] = (2.0 * PI / Ly) * momentum_sink[0];
984 p_unit[1] = (2.0 * PI / Lz) * momentum_sink[1];
985 p_unit[2] = (2.0 * PI / Lt) * momentum_sink[2];
987 std::vector<int> ipe(ND);
993 std::vector<double> corr_local(Nz, 0);
994 for (
int z = 0; z < Nz; ++z) {
995 for (
int t = 0; t < Nt; ++t) {
996 for (
int y = 0; y < Ny; ++y) {
997 for (
int x = 0; x < Nx; ++x) {
998 int site = x + Nx * (y + Ny * (z + Nz * t));
999 int x_global = x + ipe[0] * Nx;
1000 int y_global = y + ipe[1] * Ny;
1001 int t_global = t + ipe[3] * Nt;
1002 double p_x = p_unit[0] * (x_global - source_position[0]);
1003 double p_y = p_unit[1] * (y_global - source_position[1]);
1004 double p_t = p_unit[2] * (t_global - source_position[3]);
1005 double cos_p_xyt = cos(p_t + p_x + p_y);
1006 double FF =
ReTr(Fmunu_1.
mat(site) * Fmunu_2.
mat(site));
1007 corr_local[z] += FF * cos_p_xyt;
1018 const std::vector<double>& corr_local)
1023 assert(corr_global.size() == Lx);
1024 assert(corr_local.size() == Nx);
1028 std::vector<double> corr_tmp(Lx, 0.0);
1030 for (
int x = 0; x < Nx; ++x) {
1031 int x_global = x + ipe_x * Nx;
1032 corr_tmp[x_global] = corr_local[x];
1035 for (
int x_global = 0; x_global < Lx; ++x_global) {
1037 corr_global[x_global] = cr_r;
1044 const std::vector<double>& corr_local)
1049 assert(corr_global.size() == Ly);
1050 assert(corr_local.size() == Ny);
1054 std::vector<double> corr_tmp(Ly, 0.0);
1056 for (
int y = 0; y < Ny; ++y) {
1057 int y_global = y + ipe_y * Ny;
1058 corr_tmp[y_global] = corr_local[y];
1061 for (
int y_global = 0; y_global < Ly; ++y_global) {
1063 corr_global[y_global] = cr_r;
1070 const std::vector<double>& corr_local)
1075 assert(corr_global.size() == Lz);
1076 assert(corr_local.size() == Nz);
1080 std::vector<double> corr_tmp(Lz, 0.0);
1082 for (
int z = 0; z < Nz; ++z) {
1083 int z_global = z + ipe_z * Nz;
1084 corr_tmp[z_global] = corr_local[z];
1087 for (
int z_global = 0; z_global < Lz; ++z_global) {
1089 corr_global[z_global] = cr_r;
1096 const std::vector<double>& corr_local)
1101 assert(corr_global.size() == Lt);
1102 assert(corr_local.size() == Nt);
1106 std::vector<double> corr_tmp(Lt, 0.0);
1108 for (
int t = 0; t < Nt; ++t) {
1109 int t_global = t + ipe_t * Nt;
1110 corr_tmp[t_global] = corr_local[t];
1113 for (
int t_global = 0; t_global < Lt; ++t_global) {
1115 corr_global[t_global] = cr_r;
void contract_at_y(std::vector< double > &corr_global, const Field_G &Fmunu_1, const Field_G &Fmunu_2)
Calculate corr[y]= . Intended to be used to calculate correlations function of the topological charge...
void scal(Field &x, const double a)
scal(x, a): x = a * x
void construct_Fmunu_1x2(Field_G &Fmunu, const int mu, const int nu, const Field_G &U)
Constructs the anti-Hermitian field strength with eight 1x2 rectangular clover leaves.
void ah_Field_G(Field_G &W, const int ex)
void contract_at_z(std::vector< double > &corr_global, const Field_G &Fmunu_1, const Field_G &Fmunu_2)
Calculate corr[z]= . Intended to be used to calculate correlations function of the topological charge...
void multadd_Field_Gnd(Field_G &W, const int ex, const Field_G &U1, const int ex1, const Field_G &U2, const int ex2, const double ff)
void at_Field_G(Field_G &W, const int ex)
void mult_Field_Gdn(Field_G &W, const int ex, const Field_G &U1, const int ex1, const Field_G &U2, const int ex2)
static const std::string class_name
void global_corr_t(std::vector< double > &corr_global, const std::vector< double > &corr_local)
transform node-local correlator in t into global.
static int ipe(const int dir)
logical coordinate of current proc.
void construct_Fmunu_1x1_traceless(Field_G &Fmunu, const int mu, const int nu, const Field_G &U)
Constructs the anti-Hermitian traceless field strength with four 1x1 plquette clover leaves...
void lower(Field_G &, const Field_G &, const int mu, const int nu)
constructs lower staple in mu-nu plane.
void contract_at_t(std::vector< double > &corr_global, const Field_G &Fmunu_1, const Field_G &Fmunu_2)
Calculate corr[t]= . Intended to be used to calculate correlations function of the topological charge...
void global_corr_y(std::vector< double > &corr_global, const std::vector< double > &corr_local)
transform node-local correlator in y into global.
void construct_Fmunu_1x1(Field_G &Fmunu, const int mu, const int nu, const Field_G &U)
Constructs the anti-Hermitian field strength with four 1x1 plquette clover leaves.
void mult_Field_Gdd(Field_G &W, const int ex, const Field_G &U1, const int ex1, const Field_G &U2, const int ex2)
void backward(Field &, const Field &, const int mu)
void construct_Fmunu_plaq_traceless(Field_G &Fmunu, const int mu, const int nu, const Field_G &U)
Constructs the anti-Hermitian traceless field strength with an imaginary part of the plaquette...
void upper(Field_G &, const Field_G &, const int mu, const int nu)
constructs upper staple in mu-nu plane.
void axpy(Field &y, const double a, const Field &x)
axpy(y, a, x): y := a * x + y
void mult_Field_Gnn(Field_G &W, const int ex, const Field_G &U1, const int ex1, const Field_G &U2, const int ex2)
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 global_corr_z(std::vector< double > &corr_global, const std::vector< double > &corr_local)
transform node-local correlator in z into global.
void construct_Fmunu_1x2_traceless(Field_G &Fmunu, const int mu, const int nu, const Field_G &U)
Constructs the anti-Hermitian traceless field strength with eight 1x2 rectangular clover leaves...
void global_corr_x(std::vector< double > &corr_global, const std::vector< double > &corr_local)
transform node-local correlator in x into global.
void setpart_ex(int ex, const Field &w, int exw)
double contract(const Field_G &Fmunu_1, const Field_G &Fmunu_2)
Calculate and returns its value. Intended to be used for the topological charge and energy momentum ...
void contract_at_x(std::vector< double > &corr_global, const Field_G &Fmunu_1, const Field_G &Fmunu_2)
Calculate corr[x]= . Intended to be used to calculate correlations function of the topological charge...
Mat_SU_N mat(const int site, const int mn=0) const
double ReTr(const Mat_SU_N &m)
void multadd_Field_Gdn(Field_G &W, const int ex, const Field_G &U1, const int ex1, const Field_G &U2, const int ex2, const double ff)
void forward(Field &, const Field &, const int mu)
void mult_Field_Gnd(Field_G &W, const int ex, const Field_G &U1, const int ex1, const Field_G &U2, const int ex2)