Go to the documentation of this file.
24 #if defined USE_GROUP_SU3
26 #elif defined USE_GROUP_SU2
28 #elif defined USE_GROUP_SU_N
34 =
"Imp::Fopr_CloverTerm_eo";
57 vout.
crucial(
"Error in %s: irrelevant mult mode = %s\n",
130 params_solver.
set_string(
"solver_type",
"CG");
131 params_solver.
set_int(
"maximum_number_of_iteration", 100);
132 params_solver.
set_int(
"maximum_number_of_restart", 40);
133 params_solver.
set_double(
"convergence_criterion_squared", 1.0e-30);
134 params_solver.
set_string(
"use_initial_guess",
"false");
135 params_solver.
set_string(
"verbose_level",
"Crucial");
184 const std::vector<int> bc)
188 assert(bc.size() ==
m_Ndim);
200 for (
int mu = 0; mu <
m_Ndim; ++mu) {
298 if (ith == 0)
m_mode = mode;
310 }
else if (
m_mode ==
"odd") {
333 for (
int ispin = 0; ispin <
m_Nd; ++ispin) {
334 for (
int icolor = 0; icolor <
m_Nc; ++icolor) {
335 int spin_color = icolor +
m_Nc * ispin;
340 for (
int isite = 0; isite <
m_Nvol2; ++isite) {
368 int ith, nth, is, ns;
369 set_threadtask(ith, nth, is, ns,
m_Nvol2);
372 for (
int ics = 0; ics <
m_Nc *
m_Nd; ++ics) {
373 for (
int site = is; site < ns; ++site) {
374 for (
int id = 0;
id <
m_Nd; ++id) {
375 for (
int ic = 0; ic <
m_Nc; ++ic) {
395 const Field& w,
const int ieo)
400 }
else if (
m_repr ==
"Chiral") {
411 const int Nvc = 2 *
m_Nc;
413 const double *v1 = w.
ptr(0);
414 double *v2 = v.
ptr(0);
419 }
else if (ieo == 1) {
423 int ith, nth, is, ns;
424 set_threadtask(ith, nth, is, ns,
m_Nvol2);
428 const int Nd2 =
m_Nd / 2;
429 for (
int site = is; site < ns; ++site) {
430 for (
int icd = 0; icd <
m_Nc * Nd2; ++icd) {
431 int iv2 = 2 * icd +
m_NinF * site;
434 for (
int jd = 0; jd <
m_Nd; ++jd) {
436 int iv = jcd +
m_NinF * site;
439 v2[iv2] += mult_uv_r(&csw_inv[ig], &v1[iv],
m_Nc);
440 v2[iv2 + 1] += mult_uv_i(&csw_inv[ig], &v1[iv],
m_Nc);
444 for (
int icd = 0; icd <
m_Nc * Nd2; ++icd) {
445 int iv2 = 2 * (icd +
m_Nc * Nd2) +
m_NinF * site;
448 for (
int jd = 0; jd <
m_Nd; ++jd) {
449 int jd2 = (jd + Nd2) %
m_Nd;
450 int iv = Nvc * jd +
m_NinF * site;
453 v2[iv2] += mult_uv_r(&csw_inv[ig], &v1[iv],
m_Nc);
454 v2[iv2 + 1] += mult_uv_i(&csw_inv[ig], &v1[iv],
m_Nc);
467 const int Nvc = 2 *
m_Nc;
469 const double *v1 = w.
ptr(0);
470 double *v2 = v.
ptr(0);
475 }
else if (ieo == 1) {
479 int ith, nth, is, ns;
480 set_threadtask(ith, nth, is, ns,
m_Nvol2);
484 for (
int site = is; site < ns; ++site) {
485 for (
int icd = 0; icd <
m_Nc *
m_Nd / 2; ++icd) {
486 int iv2 = 2 * icd +
m_NinF * site;
490 for (
int jd = 0; jd <
m_Nd / 2; ++jd) {
492 int iv = jcd +
m_NinF * site;
495 v2[iv2] += mult_uv_r(&csw_inv[ig], &v1[iv],
m_Nc);
496 v2[iv2 + 1] += mult_uv_i(&csw_inv[ig], &v1[iv],
m_Nc);
501 int iv2 = 2 * icd +
m_NinF * site;
505 for (
int jd =
m_Nd / 2; jd <
m_Nd; ++jd) {
507 int iv = jcd +
m_NinF * site;
510 v2[iv2] += mult_uv_r(&csw_inv[ig], &v1[iv],
m_Nc);
511 v2[iv2 + 1] += mult_uv_i(&csw_inv[ig], &v1[iv],
m_Nc);
530 }
else if (
m_repr ==
"Chiral") {
541 const double *wp = w.
ptr(0);
542 double *vp = v.
ptr(0);
545 const int Nvc = 2 *
m_Nc;
546 const int Nd2 =
m_Nd / 2;
550 int ith, nth, is, ns;
551 set_threadtask(ith, nth, is, ns,
m_Nvol2);
555 for (
int site = is; site < ns; ++site) {
556 for (
int id = 0;
id < Nd2; ++id) {
557 for (
int ic = 0; ic <
m_Nc; ++ic) {
558 int icd = ic +
m_Nc * id;
560 int iv2 = 2 * icd + NinF * site;
563 for (
int jd = 0; jd <
m_Nd; ++jd) {
564 int iv = Nvc * jd + NinF * site;
565 int ig = Nvc * ic + NinG * (site +
m_Nvol * (
id *
m_Nd + jd));
567 vp[iv2] += mult_uv_r(&tp[ig], &wp[iv],
m_Nc);
568 vp[iv2 + 1] += mult_uv_i(&tp[ig], &wp[iv],
m_Nc);
574 for (
int jd = 0; jd <
m_Nd; ++jd) {
575 int jd2 = (2 + jd) %
m_Nd;
576 int iv = Nvc * jd + NinF * site;
577 int ig = Nvc * ic + NinG * (site +
m_Nvol * (
id *
m_Nd + jd2));
579 vp[iv2] += mult_uv_r(&tp[ig], &wp[iv],
m_Nc);
580 vp[iv2 + 1] += mult_uv_i(&tp[ig], &wp[iv],
m_Nc);
592 const Field& w,
const int ieo)
596 const double *wp = w.
ptr(0);
597 double *vp = v.
ptr(0);
600 const int Nvc = 2 *
m_Nc;
601 const int Nd2 =
m_Nd / 2;
605 int ith, nth, is, ns;
606 set_threadtask(ith, nth, is, ns,
m_Nvol2);
610 for (
int site = is; site < ns; ++site) {
611 for (
int id = 0;
id < Nd2; ++id) {
612 for (
int ic = 0; ic <
m_Nc; ++ic) {
613 int icd = ic +
m_Nc * id;
615 double *vp2 = &vp[NinF * site];
617 vp2[2 * icd + 1] = 0.0;
618 for (
int jd = 0; jd < Nd2; ++jd) {
619 int iv = Nvc * jd + NinF * site;
620 int ig = Nvc * ic + NinG * (site +
m_Nvol * (
id * Nd2 + jd));
621 vp2[2 * icd] += mult_uv_r(&tp[ig], &wp[iv],
m_Nc);
622 vp2[2 * icd + 1] += mult_uv_i(&tp[ig], &wp[iv],
m_Nc);
625 vp2 = &vp[Nvc * Nd2 + NinF * site];
627 vp2[2 * icd + 1] = 0.0;
628 for (
int jd = 0; jd < Nd2; ++jd) {
629 int iv = Nvc * (Nd2 + jd) + NinF * site;
630 int ig = Nvc * ic + NinG * (site +
m_Nvol * (
m_Nd +
id * Nd2 + jd));
631 vp2[2 * icd] += mult_uv_r(&tp[ig], &wp[iv],
m_Nc);
632 vp2[2 * icd + 1] += mult_uv_i(&tp[ig], &wp[iv],
m_Nc);
645 const int mu,
const int nu)
661 }
else if (
m_repr ==
"Chiral") {
840 const int mu,
const int nu)
842 int ith, nth, is, ns;
843 set_threadtask(ith, nth, is, ns,
m_Nvol);
856 for (
int site = is; site < ns; ++site) {
860 for (
int site = is; site < ns; ++site) {
868 for (
int site = is; site < ns; ++site) {
872 for (
int site = is; site < ns; ++site) {
885 for (
int site = is; site < ns; ++site) {
910 }
else if (
m_repr ==
"Chiral") {
914 const double gflop = flop_site * ((
m_Nvol / 2) * (NPE / 1.0e+9));
Set of Gamma Matrices: basis class.
Field_G m_Umu
working vectors
void get_parameters(Parameters ¶ms) const
gets parameters by a Parameter object: to be implemented in a subclass.
void forward(Field &, const Field &, const int mu)
Mat_SU_N & ah()
antihermitian
std::vector< GammaMatrix > m_GM
Gamma Matrix and Sigma_{mu,nu} = -i [Gamma_mu, Gamma_nu] /2.
void set_csw_chiral()
explicit implementation for Chiral representation (for Imp-version).
Methods to shift the even-odd field.
Field_G m_ut3
working vectors
void set_string(const string &key, const string &value)
Field_F m_Foo_inv
inverse of site-diagonal part
void mult_csw_inv(Field &, const Field &, const int ieo)
multiplies [ 1-csw kappa sigma_{mu nu} F_{mu nu} ]^{-1}
static int get_num_threads()
returns available number of threads.
double cmp_i(const int cc, const int s, const int site, const int e=0) const
void set_csw_dirac()
explicit implementation for Dirac representation (for Imp-version).
void set(const int jin, const int site, const int jex, double v)
Mat_SU_N mat_dag(const int site, const int mn=0) const
void set_double(const string &key, const double value)
void set_config_impl(Field *U)
double flop_count()
returns number of floating point operations.
void detailed(const char *format,...)
void set_config(Field *U)
sets the gauge configuration.
void set_mat(const int site, const int mn, const Mat_SU_N &U)
void set_config_omp(Field *U)
bool check_size(const int nin, const int nvol, const int nex) const
checking size parameters. [23 May 2016 H.Matsufuru]
void set_ri(const int cc, const int s, const int site, const int e, const double re, const double im)
void D_chiral(Field &v, const Field &f, const int ieo)
explicit implementation for Chiral representation (for Imp-version).
void axpy(Field &y, const double a, const Field &x)
axpy(y, a, x): y := a * x + y
Field_G m_Ueo
even-odd gauge configuration
void solve(Field &solution, const Field &source, int &Nconv, double &diff)
void D(Field &v, const Field &f, const int ieo)
multiplies 1-csw kappa sigma_{mu nu} F_{mu nu}
void copy(Field &y, const Field &x)
copy(y, x): y = x
std::vector< int > m_boundary
static double epsilon_criterion2()
void init(const std::string repr)
void mult_iGM(Field_F &y, const GammaMatrix &gm, const Field_F &x)
gamma matrix multiplication (i is multiplied)
void convertField(Field &eo, const Field &lex)
double cmp_r(const int cc, const int s, const int site, const int e=0) const
int fetch_int_vector(const string &key, vector< int > &value) const
void mult(Field &v, const Field &f)
return D = D^dag = 1-f_ee or 1-f_oo
void set_mode(const std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
void mult_csw_inv_chiral(Field &, const Field &, const int ieo)
void mult_csw_inv_dirac(Field &, const Field &, const int ieo)
void mult_dag(Field &v, const Field &f)
hermitian conjugate of mult.
void reset(const int Nvol, const int Nex)
void upper(Field_G &, const Field_G &, const int, const int)
constructs upper staple in mu-nu plane.
std::vector< GammaMatrix > m_SG
Field_F m_w2
working vectors
void set_int_vector(const string &key, const vector< int > &value)
ShiftField_eo * m_shift_eo
Bridge::VerboseLevel m_vl
const double * ptr(const int jin, const int site, const int jex) const
static Bridge::VerboseLevel Vlevel()
static VerboseLevel set_verbose_level(const std::string &str)
Field_G m_T
m_T = 1 - kappa c_SW sigma F / 2
static const std::string class_name
void setup_gamma_matrices()
void set_int(const string &key, const int value)
void scal(Field &x, const double a)
scal(x, a): x = a * x
int fetch_string(const string &key, string &value) const
Wilson-type fermion field.
int fetch_double(const string &key, double &value) const
Field_G m_Ft
working vectors
void set_parameters(const Parameters ¶ms)
GammaMatrix get_GM(GMspecies spec)
void crucial(const char *format,...)
Standard Conjugate Gradient solver algorithm.
Container of Field-type object.
void lower(Field_G &, const Field_G &, const int, const int)
constructs lower staple in mu-nu plane.
static int get_thread_id()
returns thread id.
Mat_SU_N mat(const int site, const int mn=0) const
void set_parameters(const Parameters ¶ms)
sets parameters by a Parameter object: to be implemented in a subclass.
void mult_isigma(Field_F &, const Field_F &, const int mu, const int nu)
int sg_index(const int mu, const int nu)
void set_fieldstrength(Field_G &, const int, const int)
void general(const char *format,...)
void reset(int Nvol, int Nex)
void D_dirac(Field &v, const Field &f, const int ieo)
explicit implementation for Dirac representation (for Imp-version).
static void assert_single_thread(const std::string &class_name)
assert currently running on single thread.
static std::string get_verbose_level(const VerboseLevel vl)