17 #if defined USE_GROUP_SU3
19 #elif defined USE_GROUP_SU2
21 #elif defined USE_GROUP_SU_N
27 #ifdef USE_FACTORY_AUTOREGISTER
29 bool init = Fopr_WilsonGeneral::register_factory();
80 }
else if (
m_repr ==
"Chiral") {
131 }
else if (
m_mode ==
"Ddag") {
134 }
else if (
m_mode ==
"DdagD") {
137 }
else if (
m_mode ==
"DDdag") {
140 }
else if (
m_mode ==
"H") {
185 const string str_vlevel = params.
get_string(
"verbose_level");
190 double kappa_s, kappa_t;
195 err += params.
fetch_double(
"hopping_parameter_spatial", kappa_s);
196 err += params.
fetch_double(
"hopping_parameter_temporal", kappa_t);
197 err += params.
fetch_double(
"dispersion_parameter_spatial", nu_s);
198 err += params.
fetch_double(
"Wilson_parameter_spatial", r_s);
212 const double kappa_t,
215 const std::vector<int> bc)
223 for (
int mu = 0; mu <
m_Ndim; ++mu) {
229 assert(bc.size() ==
m_Ndim);
240 for (
int idir = 0; idir <
m_Ndim; ++idir) {
256 for (
int mu = 0; mu < (
m_Ndim - 1); ++mu) {
263 const int mu = (
m_Ndim - 1);
284 for (
int mu = 0; mu < (
m_Ndim - 1); ++mu) {
291 const int mu = (
m_Ndim - 1);
309 }
else if (mu == 1) {
311 }
else if (mu == 2) {
313 }
else if (mu == 3) {
328 }
else if (mu == 1) {
330 }
else if (mu == 2) {
332 }
else if (mu == 3) {
343 const Field& f,
const int ex2)
346 const double *v1 = f.
ptr(Ninvol * ex2);
347 double *v2 = w.
ptr(Ninvol * ex1);
352 const int is =
m_Ntask * i_thread / Nthread;
353 const int ns =
m_Ntask * (i_thread + 1) / Nthread - is;
355 for (
int i = is; i < is + ns; ++i) {
369 const int idir_x = 0;
374 const int idir_y = 1;
379 const int idir_z = 2;
384 const int idir_t = 3;
392 for (
int i = is; i < is + ns; ++i) {
405 for (
int i = is; i < is + ns; ++i) {
428 const Field& f,
const int ex2)
431 const double *v1 = f.
ptr(Ninvol * ex2);
432 double *v2 = w.
ptr(Ninvol * ex1);
437 const int is =
m_Ntask * i_thread / Nthread;
438 const int ns =
m_Ntask * (i_thread + 1) / Nthread - is;
440 for (
int i = is; i < is + ns; ++i) {
454 const int idir_x = 0;
459 const int idir_y = 1;
464 const int idir_z = 2;
469 const int idir_t = 3;
477 for (
int i = is; i < is + ns; ++i) {
490 for (
int i = is; i < is + ns; ++i) {
535 const Field& v,
const int ex2,
542 }
else if (ipm == -1) {
560 const double fac,
const Field& f)
562 const double *v1 = f.
ptr(0);
563 double *v2 = w.
ptr(0);
568 const int is =
m_Ntask * i_thread / Nthread;
569 const int ns =
m_Ntask * (i_thread + 1) / Nthread - is;
571 for (
int i = is; i < is + ns; ++i) {
580 const double fac,
const Field& f)
582 const double *v1 = f.
ptr(0);
583 double *v2 = w.
ptr(0);
588 const int is =
m_Ntask * i_thread / Nthread;
589 const int ns =
m_Ntask * (i_thread + 1) / Nthread - is;
591 for (
int i = is; i < is + ns; ++i) {
602 double *v2 = w.
ptr(0);
607 const int is =
m_Ntask * i_thread / Nthread;
608 const int ns =
m_Ntask * (i_thread + 1) / Nthread - is;
610 for (
int i = is; i < is + ns; ++i) {
620 double *v2 = w.
ptr(0);
625 const int is =
m_Ntask * i_thread / Nthread;
626 const int ns =
m_Ntask * (i_thread + 1) / Nthread - is;
628 for (
int i = is; i < is + ns; ++i) {
638 const double *v1 = f.
ptr(0);
639 double *v2 = w.
ptr(0);
644 const int is =
m_Ntask * i_thread / Nthread;
645 const int ns =
m_Ntask * (i_thread + 1) / Nthread - is;
647 for (
int i = is; i < is + ns; ++i) {
657 const double *v1 = f.
ptr(0);
658 double *v2 = w.
ptr(0);
663 const int is =
m_Ntask * i_thread / Nthread;
664 const int ns =
m_Ntask * (i_thread + 1) / Nthread - is;
666 for (
int i = is; i < is + ns; ++i) {
676 const double *v1 = f.
ptr(0);
677 double *v2 = w.
ptr(0);
682 const int is =
m_Ntask * i_thread / Nthread;
683 const int ns =
m_Ntask * (i_thread + 1) / Nthread - is;
687 for (
int i = is; i < is + ns; ++i) {
694 const int idir_x = 0;
700 for (
int i = is; i < is + ns; ++i) {
704 for (
int i = is; i < is + ns; ++i) {
715 const double *v1 = f.
ptr(0);
716 double *v2 = w.
ptr(0);
721 const int is =
m_Ntask * i_thread / Nthread;
722 const int ns =
m_Ntask * (i_thread + 1) / Nthread - is;
726 for (
int i = is; i < is + ns; ++i) {
733 const int idir_x = 0;
739 for (
int i = is; i < is + ns; ++i) {
743 for (
int i = is; i < is + ns; ++i) {
754 const double *v1 = f.
ptr(0);
755 double *v2 = w.
ptr(0);
760 const int is =
m_Ntask * i_thread / Nthread;
761 const int ns =
m_Ntask * (i_thread + 1) / Nthread - is;
765 for (
int i = is; i < is + ns; ++i) {
772 const int idir_y = 1;
778 for (
int i = is; i < is + ns; ++i) {
782 for (
int i = is; i < is + ns; ++i) {
793 const double *v1 = f.
ptr(0);
794 double *v2 = w.
ptr(0);
799 const int is =
m_Ntask * i_thread / Nthread;
800 const int ns =
m_Ntask * (i_thread + 1) / Nthread - is;
804 for (
int i = is; i < is + ns; ++i) {
811 const int idir_y = 1;
817 for (
int i = is; i < is + ns; ++i) {
821 for (
int i = is; i < is + ns; ++i) {
832 const double *v1 = f.
ptr(0);
833 double *v2 = w.
ptr(0);
838 const int is =
m_Ntask * i_thread / Nthread;
839 const int ns =
m_Ntask * (i_thread + 1) / Nthread - is;
843 for (
int i = is; i < is + ns; ++i) {
850 const int idir_z = 2;
856 for (
int i = is; i < is + ns; ++i) {
860 for (
int i = is; i < is + ns; ++i) {
871 const double *v1 = f.
ptr(0);
872 double *v2 = w.
ptr(0);
877 const int is =
m_Ntask * i_thread / Nthread;
878 const int ns =
m_Ntask * (i_thread + 1) / Nthread - is;
882 for (
int i = is; i < is + ns; ++i) {
889 const int idir_z = 2;
895 for (
int i = is; i < is + ns; ++i) {
899 for (
int i = is; i < is + ns; ++i) {
910 const double *v1 = f.
ptr(0);
911 double *v2 = w.
ptr(0);
916 const int is =
m_Ntask * i_thread / Nthread;
917 const int ns =
m_Ntask * (i_thread + 1) / Nthread - is;
921 for (
int i = is; i < is + ns; ++i) {
928 const int idir_t = 3;
935 for (
int i = is; i < is + ns; ++i) {
939 for (
int i = is; i < is + ns; ++i) {
950 const double *v1 = f.
ptr(0);
951 double *v2 = w.
ptr(0);
956 const int is =
m_Ntask * i_thread / Nthread;
957 const int ns =
m_Ntask * (i_thread + 1) / Nthread - is;
961 for (
int i = is; i < is + ns; ++i) {
968 const int idir_t = 3;
975 for (
int i = is; i < is + ns; ++i) {
979 for (
int i = is; i < is + ns; ++i) {
990 const double *v1 = f.
ptr(0);
991 double *v2 = w.
ptr(0);
996 const int is =
m_Ntask * i_thread / Nthread;
997 const int ns =
m_Ntask * (i_thread + 1) / Nthread - is;
1001 for (
int i = is; i < is + ns; ++i) {
1008 const int idir_t = 3;
1015 for (
int i = is; i < is + ns; ++i) {
1019 for (
int i = is; i < is + ns; ++i) {
1030 const double *v1 = f.
ptr(0);
1031 double *v2 = w.
ptr(0);
1036 const int is =
m_Ntask * i_thread / Nthread;
1037 const int ns =
m_Ntask * (i_thread + 1) / Nthread - is;
1041 for (
int i = is; i < is + ns; ++i) {
1048 const int idir_t = 3;
1055 for (
int i = is; i < is + ns; ++i) {
1059 for (
int i = is; i < is + ns; ++i) {
1082 }
else if (
m_repr ==
"Chiral") {
1090 double gflop = flop_site * (Nvol * (NPE / 1.0e+9));
1092 if ((
m_mode ==
"DdagD") || (
m_mode ==
"DDdag")) gflop *= 2;
void(Fopr_WilsonGeneral::* m_mult_t_plus)(Field &, const Field &)
void mult_x_minus2_thread(const int, double *, const double *)
static int get_num_threads()
returns available number of threads.
void mult_z_minus_bulk_thread(const int, double *, const double *)
void DDdag(Field &w, const Field &f)
const double * ptr(const int jin, const int site, const int jex) const
void mult_x_plus_bulk_thread(const int, double *, const double *)
double * vcp1_x_plus
arrays for data transfer.
void clear_thread(const int, double *)
void D_dirac(Field &, const Field &)
void mult_x_plus2_thread(const int, double *, const double *)
void mult_z_minus1_thread(const int, double *, const double *)
void general(const char *format,...)
GammaMatrix get_GM(GMspecies spec)
void D_ex_chiral(Field &, const int ex1, const Field &, const int ex2)
void mult_t_minus2_chiral_thread(const int, double *, const double *)
Bridge::VerboseLevel m_vl
void(Fopr_WilsonGeneral::* m_mult)(Field &, const Field &)
static Bridge::VerboseLevel Vlevel()
void mult_z_minus2_thread(const int, double *, const double *)
Container of Field-type object.
void H(Field &w, const Field &f)
int fetch_double(const string &key, double &value) const
void mult_t_plus1_dirac_thread(const int, double *, const double *)
void mult_t_plus_dirac(Field &, const Field &)
std::string get_mode() const
only for Fopr_Overlap
void mult_t_plus2_dirac_thread(const int, double *, const double *)
void mult_x_plus(Field &, const Field &)
void mult_dn(const int mu, Field &, const Field &)
void mult_y_plus2_thread(const int, double *, const double *)
void set_mode(const std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
void mult_x_minus_bulk_thread(const int, double *, const double *)
void mult_x_plus1_thread(const int, double *, const double *)
static int ipe(const int dir)
logical coordinate of current proc.
double flop_count()
returns the flop in giga unit
void mult_t_minus2_dirac_thread(const int, double *, const double *)
void addpart_ex(int ex, const Field &w, int exw)
void gm5_dirac_thread(const int, double *, const double *)
static int get_thread_id()
returns thread id.
void mult_y_minus2_thread(const int, double *, const double *)
std::vector< GammaMatrix > m_GM
gamma matrices.
void mult_t_minus_dirac(Field &, const Field &)
void mult_t_minus1_dirac_thread(const int, double *, const double *)
void init(const std::string repr)
void mult_z_plus2_thread(const int, double *, const double *)
void DdagD(Field &w, const Field &f)
void daypx_thread(const int, double *, const double, const double *)
void mult_y_minus(Field &, const Field &)
void daxpy_thread(const int, double *, const double, const double *)
void scal_thread(const int, double *, const double)
void mult_undef(Field &, const Field &f)
void gm5_chiral_thread(const int, double *, const double *)
void mult_gm5(Field &v, const Field &f)
gamma_5 multiplication. [31 Mar 2017 H.Matsufuru]
void mult_z_plus_bulk_thread(const int, double *, const double *)
const Field_G * m_U
gauge configuration.
void mult_y_minus1_thread(const int, double *, const double *)
Field m_w2
temporary fields.
void mult_z_plus1_thread(const int, double *, const double *)
static void sync_barrier_all()
barrier among all the threads and nodes.
void mult_x_minus(Field &, const Field &)
void mult_t_plus_chiral(Field &, const Field &)
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...
void mult_t_minus_chiral(Field &, const Field &)
void daypx(Field &, const double, const Field &)
void mult_t_minus1_chiral_thread(const int, double *, const double *)
void reset(const int Nin, const int Nvol, const int Nex, const element_type cmpl=Element_type::COMPLEX)
void(Fopr_WilsonGeneral::* m_mult_dag)(Field &, const Field &)
void mult_x_minus1_thread(const int, double *, const double *)
const Field_F mult_gm5p(const int mu, const Field_F &w)
void mult_y_plus(Field &, const Field &)
void mult_t_plus_bulk_chiral_thread(const int, double *, const double *)
void crucial(const char *format,...)
std::vector< double > m_boundary_each_node
b.c. for each node.
void mult_y_plus_bulk_thread(const int, double *, const double *)
void daxpy(Field &, const double, const Field &)
void(Fopr_WilsonGeneral::* m_mult_t_minus)(Field &, const Field &)
void(Fopr_WilsonGeneral::* m_D_ex)(Field &, const int, const Field &, const int)
void mult_t_minus_bulk_dirac_thread(const int, double *, const double *)
void mult_t_minus_bulk_chiral_thread(const int, double *, const double *)
static const std::string class_name
void gm5_chiral(Field &, const Field &)
void set_parameters(const Parameters ¶ms)
void mult_t_plus1_chiral_thread(const int, double *, const double *)
void proj_chiral(Field &w, const int ex1, const Field &v, const int ex2, const int ipm)
void Ddag(Field &w, const Field &f)
void mult_t_plus2_chiral_thread(const int, double *, const double *)
void(Fopr_WilsonGeneral::* m_gm5)(Field &, const Field &)
void D_ex_dirac(Field &, const int ex1, const Field &, const int ex2)
void D(Field &v, const Field &f)
void mult_z_minus(Field &, const Field &)
void setpart_ex(int ex, const Field &w, int exw)
string get_string(const string &key) const
int fetch_int_vector(const string &key, vector< int > &value) const
void scal(Field &, const double)
void mult_t_plus_bulk_dirac_thread(const int, double *, const double *)
std::vector< int > m_boundary
boundary condition.
void mult_z_plus(Field &, const Field &)
void gm5_dirac(Field &, const Field &)
void(Fopr_WilsonGeneral::* m_D)(Field &, const Field &)
void mult_y_minus_bulk_thread(const int, double *, const double *)
static VerboseLevel set_verbose_level(const std::string &str)
void mult_up(const int mu, Field &, const Field &)
nearest neighbor hopping term: temporary entry [H.Matsufuru]
void mult_y_plus1_thread(const int, double *, const double *)
void D_chiral(Field &, const Field &)