19 #if defined USE_GROUP_SU3
21 #elif defined USE_GROUP_SU2
23 #elif defined USE_GROUP_SU_N
34 const std::string str_vlevel = params.
get_string(
"verbose_level");
58 const std::vector<int> bc)
64 for (
int mu = 0; mu <
m_Ndim; ++mu) {
70 assert(bc.size() ==
m_Ndim);
132 }
else if (
m_repr ==
"Chiral") {
149 (this->*
m_gm5)(v, f);
159 const double *v1 = f.
ptr(0);
160 double *v2 = w.
ptr(0);
164 const int id3 = Nvc * 2;
165 const int id4 = Nvc * 3;
171 const int is =
m_Nvol * i_thread / Nthread;
172 const int ns =
m_Nvol * (i_thread + 1) / Nthread - is;
174 for (
int site = is; site < is + ns; ++site) {
176 for (
int icc = 0; icc < Nvc; icc++) {
177 int in = Nvc * Nd * site;
179 v2[icc + id1 + in] = v1[icc + id3 + in];
180 v2[icc + id2 + in] = v1[icc + id4 + in];
181 v2[icc + id3 + in] = v1[icc + id1 + in];
182 v2[icc + id4 + in] = v1[icc + id2 + in];
194 const double *v1 = f.
ptr(0);
195 double *v2 = w.
ptr(0);
199 const int id3 = Nvc * 2;
200 const int id4 = Nvc * 3;
206 const int is =
m_Nvol * i_thread / Nthread;
207 const int ns =
m_Nvol * (i_thread + 1) / Nthread - is;
209 for (
int site = is; site < is + ns; ++site) {
211 for (
int icc = 0; icc < Nvc; icc++) {
212 int in = Nvc * Nd * site;
214 v2[icc + id1 + in] = v1[icc + id1 + in];
215 v2[icc + id2 + in] = v1[icc + id2 + in];
216 v2[icc + id3 + in] = -v1[icc + id3 + in];
217 v2[icc + id4 + in] = -v1[icc + id4 + in];
225 const int mu,
const int nu)
246 (this->*
m_csw)(v, w);
255 assert(w.
nex() == 1);
258 const int Nvc = 2 * Nc;
259 const int Ndf = 2 * Nc * Nc;
261 const int Nvol = w.
nvol();
265 const int id3 = Nvc * 2;
266 const int id4 = Nvc * 3;
270 const double *w2 = w.
ptr(0);
271 double *v2 = v.
ptr(0);
284 const int is =
m_Nvol * i_thread / Nthread;
285 const int ns =
m_Nvol * (i_thread + 1) / Nthread - is;
287 for (
int site = is; site < is + ns; ++site) {
288 int iv = Nvc * Nd * site;
291 for (
int ic = 0; ic < Nc; ++ic) {
294 int ic_g = ic * Nvc + ig;
296 v2[ic_r + id1 + iv] = 0.0;
297 v2[ic_i + id1 + iv] = 0.0;
298 v2[ic_r + id2 + iv] = 0.0;
299 v2[ic_i + id2 + iv] = 0.0;
301 v2[ic_r + id3 + iv] = 0.0;
302 v2[ic_i + id3 + iv] = 0.0;
303 v2[ic_r + id4 + iv] = 0.0;
304 v2[ic_i + id4 + iv] = 0.0;
307 v2[ic_r + id1 + iv] -= mult_uv_i(&Bx[ic_g], &w2[id2 + iv], Nc);
308 v2[ic_i + id1 + iv] += mult_uv_r(&Bx[ic_g], &w2[id2 + iv], Nc);
309 v2[ic_r + id2 + iv] -= mult_uv_i(&Bx[ic_g], &w2[id1 + iv], Nc);
310 v2[ic_i + id2 + iv] += mult_uv_r(&Bx[ic_g], &w2[id1 + iv], Nc);
312 v2[ic_r + id3 + iv] -= mult_uv_i(&Bx[ic_g], &w2[id4 + iv], Nc);
313 v2[ic_i + id3 + iv] += mult_uv_r(&Bx[ic_g], &w2[id4 + iv], Nc);
314 v2[ic_r + id4 + iv] -= mult_uv_i(&Bx[ic_g], &w2[id3 + iv], Nc);
315 v2[ic_i + id4 + iv] += mult_uv_r(&Bx[ic_g], &w2[id3 + iv], Nc);
318 v2[ic_r + id1 + iv] += mult_uv_r(&By[ic_g], &w2[id2 + iv], Nc);
319 v2[ic_i + id1 + iv] += mult_uv_i(&By[ic_g], &w2[id2 + iv], Nc);
320 v2[ic_r + id2 + iv] -= mult_uv_r(&By[ic_g], &w2[id1 + iv], Nc);
321 v2[ic_i + id2 + iv] -= mult_uv_i(&By[ic_g], &w2[id1 + iv], Nc);
323 v2[ic_r + id3 + iv] += mult_uv_r(&By[ic_g], &w2[id4 + iv], Nc);
324 v2[ic_i + id3 + iv] += mult_uv_i(&By[ic_g], &w2[id4 + iv], Nc);
325 v2[ic_r + id4 + iv] -= mult_uv_r(&By[ic_g], &w2[id3 + iv], Nc);
326 v2[ic_i + id4 + iv] -= mult_uv_i(&By[ic_g], &w2[id3 + iv], Nc);
329 v2[ic_r + id1 + iv] -= mult_uv_i(&Bz[ic_g], &w2[id1 + iv], Nc);
330 v2[ic_i + id1 + iv] += mult_uv_r(&Bz[ic_g], &w2[id1 + iv], Nc);
331 v2[ic_r + id2 + iv] += mult_uv_i(&Bz[ic_g], &w2[id2 + iv], Nc);
332 v2[ic_i + id2 + iv] -= mult_uv_r(&Bz[ic_g], &w2[id2 + iv], Nc);
334 v2[ic_r + id3 + iv] -= mult_uv_i(&Bz[ic_g], &w2[id3 + iv], Nc);
335 v2[ic_i + id3 + iv] += mult_uv_r(&Bz[ic_g], &w2[id3 + iv], Nc);
336 v2[ic_r + id4 + iv] += mult_uv_i(&Bz[ic_g], &w2[id4 + iv], Nc);
337 v2[ic_i + id4 + iv] -= mult_uv_r(&Bz[ic_g], &w2[id4 + iv], Nc);
340 v2[ic_r + id1 + iv] += mult_uv_i(&Ex[ic_g], &w2[id2 + iv], Nc);
341 v2[ic_i + id1 + iv] -= mult_uv_r(&Ex[ic_g], &w2[id2 + iv], Nc);
342 v2[ic_r + id2 + iv] += mult_uv_i(&Ex[ic_g], &w2[id1 + iv], Nc);
343 v2[ic_i + id2 + iv] -= mult_uv_r(&Ex[ic_g], &w2[id1 + iv], Nc);
345 v2[ic_r + id3 + iv] -= mult_uv_i(&Ex[ic_g], &w2[id4 + iv], Nc);
346 v2[ic_i + id3 + iv] += mult_uv_r(&Ex[ic_g], &w2[id4 + iv], Nc);
347 v2[ic_r + id4 + iv] -= mult_uv_i(&Ex[ic_g], &w2[id3 + iv], Nc);
348 v2[ic_i + id4 + iv] += mult_uv_r(&Ex[ic_g], &w2[id3 + iv], Nc);
351 v2[ic_r + id1 + iv] -= mult_uv_r(&Ey[ic_g], &w2[id2 + iv], Nc);
352 v2[ic_i + id1 + iv] -= mult_uv_i(&Ey[ic_g], &w2[id2 + iv], Nc);
353 v2[ic_r + id2 + iv] += mult_uv_r(&Ey[ic_g], &w2[id1 + iv], Nc);
354 v2[ic_i + id2 + iv] += mult_uv_i(&Ey[ic_g], &w2[id1 + iv], Nc);
356 v2[ic_r + id3 + iv] += mult_uv_r(&Ey[ic_g], &w2[id4 + iv], Nc);
357 v2[ic_i + id3 + iv] += mult_uv_i(&Ey[ic_g], &w2[id4 + iv], Nc);
358 v2[ic_r + id4 + iv] -= mult_uv_r(&Ey[ic_g], &w2[id3 + iv], Nc);
359 v2[ic_i + id4 + iv] -= mult_uv_i(&Ey[ic_g], &w2[id3 + iv], Nc);
362 v2[ic_r + id1 + iv] += mult_uv_i(&Ez[ic_g], &w2[id1 + iv], Nc);
363 v2[ic_i + id1 + iv] -= mult_uv_r(&Ez[ic_g], &w2[id1 + iv], Nc);
364 v2[ic_r + id2 + iv] -= mult_uv_i(&Ez[ic_g], &w2[id2 + iv], Nc);
365 v2[ic_i + id2 + iv] += mult_uv_r(&Ez[ic_g], &w2[id2 + iv], Nc);
367 v2[ic_r + id3 + iv] -= mult_uv_i(&Ez[ic_g], &w2[id3 + iv], Nc);
368 v2[ic_i + id3 + iv] += mult_uv_r(&Ez[ic_g], &w2[id3 + iv], Nc);
369 v2[ic_r + id4 + iv] += mult_uv_i(&Ez[ic_g], &w2[id4 + iv], Nc);
370 v2[ic_i + id4 + iv] -= mult_uv_r(&Ez[ic_g], &w2[id4 + iv], Nc);
373 v2[ic_r + id1 + iv] *= kappa_cSW;
374 v2[ic_i + id1 + iv] *= kappa_cSW;
375 v2[ic_r + id2 + iv] *= kappa_cSW;
376 v2[ic_i + id2 + iv] *= kappa_cSW;
378 v2[ic_r + id3 + iv] *= kappa_cSW;
379 v2[ic_i + id3 + iv] *= kappa_cSW;
380 v2[ic_r + id4 + iv] *= kappa_cSW;
381 v2[ic_i + id4 + iv] *= kappa_cSW;
393 assert(w.
nex() == 1);
396 const int Nvc = 2 * Nc;
397 const int Ndf = 2 * Nc * Nc;
399 const int Nvol = w.
nvol();
403 const int id3 = Nvc * 2;
404 const int id4 = Nvc * 3;
408 const double *w2 = w.
ptr(0);
409 double *v2 = v.
ptr(0);
422 const int is =
m_Nvol * i_thread / Nthread;
423 const int ns =
m_Nvol * (i_thread + 1) / Nthread - is;
425 for (
int site = is; site < is + ns; ++site) {
426 int iv = Nvc * Nd * site;
429 for (
int ic = 0; ic < Nc; ++ic) {
432 int ic_g = ic * Nvc + ig;
434 v2[ic_r + id1 + iv] = 0.0;
435 v2[ic_i + id1 + iv] = 0.0;
436 v2[ic_r + id2 + iv] = 0.0;
437 v2[ic_i + id2 + iv] = 0.0;
439 v2[ic_r + id3 + iv] = 0.0;
440 v2[ic_i + id3 + iv] = 0.0;
441 v2[ic_r + id4 + iv] = 0.0;
442 v2[ic_i + id4 + iv] = 0.0;
445 v2[ic_r + id1 + iv] -= mult_uv_i(&Bx[ic_g], &w2[id2 + iv], Nc);
446 v2[ic_i + id1 + iv] += mult_uv_r(&Bx[ic_g], &w2[id2 + iv], Nc);
447 v2[ic_r + id2 + iv] -= mult_uv_i(&Bx[ic_g], &w2[id1 + iv], Nc);
448 v2[ic_i + id2 + iv] += mult_uv_r(&Bx[ic_g], &w2[id1 + iv], Nc);
450 v2[ic_r + id3 + iv] -= mult_uv_i(&Bx[ic_g], &w2[id4 + iv], Nc);
451 v2[ic_i + id3 + iv] += mult_uv_r(&Bx[ic_g], &w2[id4 + iv], Nc);
452 v2[ic_r + id4 + iv] -= mult_uv_i(&Bx[ic_g], &w2[id3 + iv], Nc);
453 v2[ic_i + id4 + iv] += mult_uv_r(&Bx[ic_g], &w2[id3 + iv], Nc);
456 v2[ic_r + id1 + iv] += mult_uv_r(&By[ic_g], &w2[id2 + iv], Nc);
457 v2[ic_i + id1 + iv] += mult_uv_i(&By[ic_g], &w2[id2 + iv], Nc);
458 v2[ic_r + id2 + iv] -= mult_uv_r(&By[ic_g], &w2[id1 + iv], Nc);
459 v2[ic_i + id2 + iv] -= mult_uv_i(&By[ic_g], &w2[id1 + iv], Nc);
461 v2[ic_r + id3 + iv] += mult_uv_r(&By[ic_g], &w2[id4 + iv], Nc);
462 v2[ic_i + id3 + iv] += mult_uv_i(&By[ic_g], &w2[id4 + iv], Nc);
463 v2[ic_r + id4 + iv] -= mult_uv_r(&By[ic_g], &w2[id3 + iv], Nc);
464 v2[ic_i + id4 + iv] -= mult_uv_i(&By[ic_g], &w2[id3 + iv], Nc);
467 v2[ic_r + id1 + iv] -= mult_uv_i(&Bz[ic_g], &w2[id1 + iv], Nc);
468 v2[ic_i + id1 + iv] += mult_uv_r(&Bz[ic_g], &w2[id1 + iv], Nc);
469 v2[ic_r + id2 + iv] += mult_uv_i(&Bz[ic_g], &w2[id2 + iv], Nc);
470 v2[ic_i + id2 + iv] -= mult_uv_r(&Bz[ic_g], &w2[id2 + iv], Nc);
472 v2[ic_r + id3 + iv] -= mult_uv_i(&Bz[ic_g], &w2[id3 + iv], Nc);
473 v2[ic_i + id3 + iv] += mult_uv_r(&Bz[ic_g], &w2[id3 + iv], Nc);
474 v2[ic_r + id4 + iv] += mult_uv_i(&Bz[ic_g], &w2[id4 + iv], Nc);
475 v2[ic_i + id4 + iv] -= mult_uv_r(&Bz[ic_g], &w2[id4 + iv], Nc);
478 v2[ic_r + id1 + iv] += mult_uv_i(&Ex[ic_g], &w2[id4 + iv], Nc);
479 v2[ic_i + id1 + iv] -= mult_uv_r(&Ex[ic_g], &w2[id4 + iv], Nc);
480 v2[ic_r + id2 + iv] += mult_uv_i(&Ex[ic_g], &w2[id3 + iv], Nc);
481 v2[ic_i + id2 + iv] -= mult_uv_r(&Ex[ic_g], &w2[id3 + iv], Nc);
483 v2[ic_r + id3 + iv] += mult_uv_i(&Ex[ic_g], &w2[id2 + iv], Nc);
484 v2[ic_i + id3 + iv] -= mult_uv_r(&Ex[ic_g], &w2[id2 + iv], Nc);
485 v2[ic_r + id4 + iv] += mult_uv_i(&Ex[ic_g], &w2[id1 + iv], Nc);
486 v2[ic_i + id4 + iv] -= mult_uv_r(&Ex[ic_g], &w2[id1 + iv], Nc);
489 v2[ic_r + id1 + iv] -= mult_uv_r(&Ey[ic_g], &w2[id4 + iv], Nc);
490 v2[ic_i + id1 + iv] -= mult_uv_i(&Ey[ic_g], &w2[id4 + iv], Nc);
491 v2[ic_r + id2 + iv] += mult_uv_r(&Ey[ic_g], &w2[id3 + iv], Nc);
492 v2[ic_i + id2 + iv] += mult_uv_i(&Ey[ic_g], &w2[id3 + iv], Nc);
494 v2[ic_r + id3 + iv] -= mult_uv_r(&Ey[ic_g], &w2[id2 + iv], Nc);
495 v2[ic_i + id3 + iv] -= mult_uv_i(&Ey[ic_g], &w2[id2 + iv], Nc);
496 v2[ic_r + id4 + iv] += mult_uv_r(&Ey[ic_g], &w2[id1 + iv], Nc);
497 v2[ic_i + id4 + iv] += mult_uv_i(&Ey[ic_g], &w2[id1 + iv], Nc);
500 v2[ic_r + id1 + iv] += mult_uv_i(&Ez[ic_g], &w2[id3 + iv], Nc);
501 v2[ic_i + id1 + iv] -= mult_uv_r(&Ez[ic_g], &w2[id3 + iv], Nc);
502 v2[ic_r + id2 + iv] -= mult_uv_i(&Ez[ic_g], &w2[id4 + iv], Nc);
503 v2[ic_i + id2 + iv] += mult_uv_r(&Ez[ic_g], &w2[id4 + iv], Nc);
505 v2[ic_r + id3 + iv] += mult_uv_i(&Ez[ic_g], &w2[id1 + iv], Nc);
506 v2[ic_i + id3 + iv] -= mult_uv_r(&Ez[ic_g], &w2[id1 + iv], Nc);
507 v2[ic_r + id4 + iv] -= mult_uv_i(&Ez[ic_g], &w2[id2 + iv], Nc);
508 v2[ic_i + id4 + iv] += mult_uv_r(&Ez[ic_g], &w2[id2 + iv], Nc);
511 v2[ic_r + id1 + iv] *= kappa_cSW;
512 v2[ic_i + id1 + iv] *= kappa_cSW;
513 v2[ic_r + id2 + iv] *= kappa_cSW;
514 v2[ic_i + id2 + iv] *= kappa_cSW;
516 v2[ic_r + id3 + iv] *= kappa_cSW;
517 v2[ic_i + id3 + iv] *= kappa_cSW;
518 v2[ic_r + id4 + iv] *= kappa_cSW;
519 v2[ic_i + id4 + iv] *= kappa_cSW;
540 const int mu,
const int nu)
544 assert(Nthread == 1);
583 const double gflop = flop_site * (Nvol * (NPE / 1.0e+9));
void scal(Field &x, const double a)
scal(x, a): x = a * x
void ah_Field_G(Field_G &W, const int ex)
static int get_num_threads()
returns available number of threads.
const double * ptr(const int jin, const int site, const int jex) const
void general(const char *format,...)
GammaMatrix get_GM(GMspecies spec)
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)
Container of Field-type object.
int fetch_double(const string &key, double &value) const
void mult_Field_Gdn(Field_G &W, const int ex, const Field_G &U1, const int ex1, const Field_G &U2, const int ex2)
void(Fopr_CloverTerm::* m_csw)(Field &, const Field &)
void mult_csw_dirac(Field &, const Field &)
double flop_count()
this returns the number of floating point operations.
const Field_G * m_U
pointer to gauge configuration.
Field_G m_v2
for calculation of field strength.
void lower(Field_G &, const Field_G &, const int mu, const int nu)
constructs lower staple in mu-nu plane.
static int get_thread_id()
returns thread id.
Wilson-type fermion field.
void set_config(Field *U)
setting pointer to the gauge configuration.
static const std::string class_name
void mult_iGM(Field_F &y, const GammaMatrix &gm, const Field_F &x)
gamma matrix multiplication (i is multiplied)
void gm5_chiral(Field &, const Field &)
Bridge::VerboseLevel m_vl
std::vector< int > m_boundary
void mult_gm5(Field &v, const Field &w)
gamma_5 multiplication. [31 Mar 2017 H.Matsufuru]
void gm5_dirac(Field &, const Field &)
void upper(Field_G &, const Field_G &, const int mu, const int nu)
constructs upper staple in mu-nu plane.
void(Fopr_CloverTerm::* m_gm5)(Field &, const Field &)
void mult_isigma(Field_F &, const Field_F &, const int mu, const int nu)
Field_G m_Ez
field strength.
void axpy(Field &y, const double a, const Field &x)
axpy(y, a, x): y := a * x + y
void set_fieldstrength(Field_G &, const int, const int)
void crucial(const char *format,...)
int sg_index(const int mu, const int nu)
std::vector< GammaMatrix > m_SG
void mult_sigmaF(Field &, const Field &)
string get_string(const string &key) const
int fetch_int_vector(const string &key, vector< int > &value) const
void init(const std::string repr)
void set_parameters(const Parameters ¶ms)
static VerboseLevel set_verbose_level(const std::string &str)
void mult_csw(Field &, const Field &)
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)
void mult_csw_chiral(Field &, const Field &)