Bridge++  Ver. 2.0.2
fopr_Wilson_eo_impl.cpp
Go to the documentation of this file.
1 
14 #include "fopr_Wilson_eo_impl.h"
15 
16 #include "Fopr/fopr_thread-inc.h"
17 
18 #if defined USE_GROUP_SU3
20 #elif defined USE_GROUP_SU2
22 #elif defined USE_GROUP_SU_N
24 #endif
25 
27 
28 namespace Imp {
29 #ifdef USE_FACTORY_AUTOREGISTER
30  namespace {
31  bool init = Fopr_Wilson_eo::register_factory();
32  }
33 #endif
34 
35  const std::string Fopr_Wilson_eo::class_name = "Imp::Fopr_Wilson_eo";
36 
37 //====================================================================
38  void Fopr_Wilson_eo::init(const Parameters& params)
39  {
41 
43 
44  vout.general(m_vl, "%s: construction\n", class_name.c_str());
46 
47  setup();
48 
49  std::string repr;
50  if (!params.fetch_string("gamma_matrix_type", repr)) {
51  m_repr = repr;
52  } else {
53  m_repr = "Dirac"; // default gamma-matrix type
54  vout.general(m_vl, "gamma_matrix_type is not given: defalt = %s\n",
55  m_repr.c_str());
56  }
57 
58  if ((m_repr != "Dirac") && (m_repr != "Chiral")) {
59  vout.crucial("Error at %s: unsupported gamma-matrix type: %s\n",
60  class_name.c_str(), m_repr.c_str());
61  exit(EXIT_FAILURE);
62  }
63 
64  set_parameters(params);
65 
67  vout.general(m_vl, "%s: construction finished.\n",
68  class_name.c_str());
69  }
70 
71 
72 //====================================================================
73  void Fopr_Wilson_eo::init(const std::string repr)
74  {
76 
78 
79  vout.general(m_vl, "%s: construction (obsolete)\n",
80  class_name.c_str());
81 
82  setup();
83 
84  m_repr = repr;
85  if ((m_repr != "Dirac") && (m_repr != "Chiral")) {
86  vout.crucial(m_vl, "Error at %s: input repr is undefined.\n",
87  class_name.c_str());
88  exit(EXIT_FAILURE);
89  }
90 
91  vout.general(m_vl, " gamma-matrix type is set to %s\n",
92  m_repr.c_str());
93 
94  vout.general(m_vl, "%s: construction finished.\n",
95  class_name.c_str());
96  }
97 
98 
99 //====================================================================
101  {
104  m_Nvc = 2 * m_Nc;
105  m_Ndf = 2 * m_Nc * m_Nc;
106  const int Nvcd = m_Nvc * m_Nd;
107 
109  m_Nvol2 = m_Nvol / 2;
111 
116 
117  if ((m_Nx % 2) != 0) {
118  vout.crucial(m_vl, "Error at %s: Nx=%d must be even.\n",
119  class_name.c_str(), m_Nx);
120  exit(EXIT_FAILURE);
121  }
122  m_Nx2 = m_Nx / 2;
123 
124  if ((m_Ny % 2) != 0) {
125  vout.crucial(m_vl, "Error at %s: Ny=%d must be even.\n",
126  class_name.c_str(), m_Ny);
127  exit(EXIT_FAILURE);
128  }
129 
132  m_boundary.resize(m_Ndim);
134 
135  m_yzt_eo.resize(m_Ny * m_Nz * m_Nt);
136 
137  for (int it = 0; it < m_Nt; ++it) {
138  for (int iz = 0; iz < m_Nz; ++iz) {
139  for (int iy = 0; iy < m_Ny; ++iy) {
140  int it_global = it + Communicator::ipe(3) * m_Nt;
141  int iz_global = iz + Communicator::ipe(2) * m_Nz;
142  int iy_global = iy + Communicator::ipe(1) * m_Ny;
143  m_yzt_eo[iy + m_Ny * (iz + m_Nz * it)]
144  = (iy_global + iz_global + it_global) % 2;
145  }
146  }
147  }
148 
149  //m_Ueo = new Field_G(m_Nvol, m_Ndim);
151 
152  const int Nvx = m_Nvc * 2 * ((m_Ny * m_Nz * m_Nt + 1) / 2);
153  vcp1_xp = new double[Nvx];
154  vcp2_xp = new double[Nvx];
155  vcp1_xm = new double[Nvx];
156  vcp2_xm = new double[Nvx];
157 
158  const int Nvy = m_Nvc * 2 * m_Nx2 * m_Nz * m_Nt;
159  vcp1_yp = new double[Nvy];
160  vcp2_yp = new double[Nvy];
161  vcp1_ym = new double[Nvy];
162  vcp2_ym = new double[Nvy];
163 
164  const int Nvz = m_Nvc * 2 * m_Nx2 * m_Ny * m_Nt;
165  vcp1_zp = new double[Nvz];
166  vcp2_zp = new double[Nvz];
167  vcp1_zm = new double[Nvz];
168  vcp2_zm = new double[Nvz];
169 
170  const int Nvt = m_Nvc * 2 * m_Nx2 * m_Ny * m_Nz;
171  vcp1_tp = new double[Nvt];
172  vcp2_tp = new double[Nvt];
173  vcp1_tm = new double[Nvt];
174  vcp2_tm = new double[Nvt];
175 
176  m_v1.reset(Nvcd, m_Nvol2, 1);
177  m_v2.reset(Nvcd, m_Nvol2, 1);
178  m_w1.reset(Nvcd, m_Nvol2, 1);
179  m_w2.reset(Nvcd, m_Nvol2, 1);
180  }
181 
182 
183 //====================================================================
185  {
186  // delete m_Ueo;
187 
188  delete[] vcp1_xp;
189  delete[] vcp2_xp;
190  delete[] vcp1_xm;
191  delete[] vcp2_xm;
192 
193  delete[] vcp1_yp;
194  delete[] vcp2_yp;
195  delete[] vcp1_ym;
196  delete[] vcp2_ym;
197 
198  delete[] vcp1_zp;
199  delete[] vcp2_zp;
200  delete[] vcp1_zm;
201  delete[] vcp2_zm;
202 
203  delete[] vcp1_tp;
204  delete[] vcp2_tp;
205  delete[] vcp1_tm;
206  delete[] vcp2_tm;
207  }
208 
209 
210 //====================================================================
212  {
213 #pragma omp barrier
214  int ith = ThreadManager::get_thread_id();
215  std::string vlevel;
216  if (!params.fetch_string("verbose_level", vlevel)) {
217  if (ith == 0) m_vl = vout.set_verbose_level(vlevel);
218  }
219 #pragma omp barrier
220 
221  // fetch and check input parameters
222  double kappa;
223  std::vector<int> bc;
224 
225  int err = 0;
226  err += params.fetch_double("hopping_parameter", kappa);
227  err += params.fetch_int_vector("boundary_condition", bc);
228 
229  if (err) {
230  vout.crucial(m_vl, "Error at %s: parameter fetch error.\n",
231  class_name.c_str());
232  exit(EXIT_FAILURE);
233  }
234 
235  set_parameters(kappa, bc);
236  }
237 
238 
239 //====================================================================
240  void Fopr_Wilson_eo::set_parameters(const double kappa,
241  const std::vector<int> bc)
242  {
243  assert(bc.size() == m_Ndim);
244 
245 #pragma omp barrier
246  int ith = ThreadManager::get_thread_id();
247  if (ith == 0) {
248  m_kappa = kappa;
249  m_boundary = bc;
250 
251  for (int idir = 0; idir < m_Ndim; ++idir) {
252  m_boundary_each_node[idir] = 1.0;
253  if (Communicator::ipe(idir) == 0) {
254  m_boundary_each_node[idir] = m_boundary[idir];
255  }
256  }
257  }
258 #pragma omp barrier
259 
260  //- print input parameters
261  vout.general(m_vl, "%s: input parameters\n", class_name.c_str());
262  vout.general(m_vl, " gamma matrix type = %s\n", m_repr.c_str());
263  vout.general(m_vl, " kappa = %12.8f\n", m_kappa);
264  for (int mu = 0; mu < m_Ndim; ++mu) {
265  vout.general(m_vl, " boundary[%d] = %2d\n", mu, m_boundary[mu]);
266  }
267  }
268 
269 
270 //====================================================================
272  {
273  params.set_double("hopping_parameter", m_kappa);
274  params.set_int_vector("boundary_condition", m_boundary);
275  params.set_string("gamma_matrix_type", m_repr);
276 
277  params.set_string("verbose_level", vout.get_verbose_level(m_vl));
278  }
279 
280 
281 //====================================================================
283  {
284  int nth = ThreadManager::get_num_threads();
285 
286  vout.detailed(m_vl, "%s: set_config is called: num_threads = %d\n",
287  class_name.c_str(), nth);
288 
289  if (nth > 1) {
290  set_config_impl(U);
291  } else {
292  set_config_omp(U);
293  }
294 
295  vout.detailed(m_vl, "%s: set_config finished\n", class_name.c_str());
296  }
297 
298 
299 //====================================================================
301  {
302  vout.detailed(m_vl, " set_config_omp is called.\n");
303 
304 #pragma omp parallel
305  {
306  set_config_impl(U);
307  }
308  }
309 
310 
311 //====================================================================
313  {
315  }
316 
317 
318 //====================================================================
319  void Fopr_Wilson_eo::set_mode(std::string mode)
320  {
321 #pragma omp barrier
322  int ith = ThreadManager::get_thread_id();
323  if (ith == 0) m_mode = mode;
324 #pragma omp barrier
325  }
326 
327 
328 //====================================================================
329  void Fopr_Wilson_eo::mult(Field& v, const Field& w)
330  {
331  if (m_mode == "D") {
332  D(v, w);
333  } else if (m_mode == "Ddag") {
334  Ddag(v, w);
335  } else if (m_mode == "DdagD") {
336  DdagD(v, w);
337  } else if (m_mode == "DDdag") {
338  DDdag(v, w);
339  } else {
340  vout.crucial("Error at %s: irrelevant mult mode = %s.\n",
341  class_name.c_str(), m_mode.c_str());
342  exit(EXIT_FAILURE);
343  }
344  }
345 
346 
347 //====================================================================
349  {
350  if (m_mode == "D") {
351  Ddag(v, w);
352  } else if (m_mode == "Ddag") {
353  D(v, w);
354  } else if (m_mode == "DdagD") {
355  DdagD(v, w);
356  } else if (m_mode == "DDdag") {
357  DDdag(v, w);
358  } else {
359  vout.crucial("Error at %s: irrelevant mult mode = %s.\n",
360  class_name.c_str(), m_mode.c_str());
361  exit(EXIT_FAILURE);
362  }
363  }
364 
365 
366 //====================================================================
367  void Fopr_Wilson_eo::mult(Field& v, const Field& w,
368  const std::string mode)
369  {
370  if (mode == "Deo") {
371  Meo(v, w, 0);
372  } else if (mode == "Doe") {
373  Meo(v, w, 1);
374  } else {
375  vout.crucial("Error at %s: irrelevant mult mode = %s.\n",
376  class_name.c_str(), mode.c_str());
377  exit(EXIT_FAILURE);
378  }
379  }
380 
381 
382 //====================================================================
384  const std::string mode)
385  {
386  if (mode == "Deo") {
387  Meo(v, w, 1); // "Doe" for mult
388  } else if (mode == "Doe") {
389  Meo(v, w, 0); // "Deo" for mult
390  } else {
391  vout.crucial("Error at %s: irrelevant mult mode = %s.\n",
392  class_name.c_str(), mode.c_str());
393  exit(EXIT_FAILURE);
394  }
395  }
396 
397 
398 //====================================================================
399  void Fopr_Wilson_eo::preProp(Field& Be, Field& bo, const Field& b)
400  {
401  m_index.convertField(Be, b, 0);
402  m_index.convertField(bo, b, 1);
403 
404  if (m_mode == "D") {
405  Meo(m_v1, bo, 0);
406  } else {
407  Mdageo(m_v1, bo, 0);
408  }
409 
410  axpy(Be, -1.0, m_v1);
411 
412 #pragma omp barrier
413  }
414 
415 
416 //====================================================================
418  const Field& xe, const Field& bo)
419  {
420  if (m_mode == "D") {
421  Meo(m_v1, xe, 1);
422  } else {
423  Mdageo(m_v1, xe, 1);
424  }
425 
426  aypx(-1.0, m_v1, bo);
427 #pragma omp barrier
428 
429  m_index.reverseField(x, xe, 0);
430  m_index.reverseField(x, m_v1, 1);
431 
432 #pragma omp barrier
433  }
434 
435 
436 //====================================================================
437  void Fopr_Wilson_eo::DdagD(Field& v, const Field& f)
438  {
439  D(m_w1, f);
440  Ddag(v, m_w1);
441  }
442 
443 
444 //====================================================================
445  void Fopr_Wilson_eo::DDdag(Field& v, const Field& f)
446  {
447  Ddag(m_w1, f);
448  D(v, m_w1);
449  }
450 
451 
452 //====================================================================
453  void Fopr_Wilson_eo::D(Field& v, const Field& w)
454  {
455  assert(w.nex() == 1);
456 
457  Meo(m_v1, w, 1);
458  Meo(v, m_v1, 0);
459 
460  aypx(-1.0, v, w);
461 #pragma omp barrier
462  }
463 
464 
465 //====================================================================
466  void Fopr_Wilson_eo::Ddag(Field& v, const Field& w)
467  {
468  Mdageo(m_v1, w, 1);
469  Mdageo(v, m_v1, 0);
470 
471  aypx(-1.0, v, w);
472 #pragma omp barrier
473  }
474 
475 
476 //====================================================================
477  void Fopr_Wilson_eo::Meo(Field& v, const Field& w, const int ieo)
478  {
479  if (m_repr == "Dirac") {
480  Meo_dirac(v, w, ieo);
481  } else {
482  Meo_chiral(v, w, ieo);
483  }
484  }
485 
486 
487 //====================================================================
488  void Fopr_Wilson_eo::Meo_dirac(Field& w, const Field& f, const int ieo)
489  {
490 #pragma omp barrier
491 
492  w.set(0.0);
493 #pragma omp barrier
494 
495  mult_xp(w, f, ieo);
496  mult_xm(w, f, ieo);
497 
498  mult_yp(w, f, ieo);
499  mult_ym(w, f, ieo);
500 
501  mult_zp(w, f, ieo);
502  mult_zm(w, f, ieo);
503 
504  mult_tp_dirac(w, f, ieo);
505  mult_tm_dirac(w, f, ieo);
506 
507  scal(w, -m_kappa);
508 #pragma omp barrier
509  }
510 
511 
512 //====================================================================
513  void Fopr_Wilson_eo::Meo_chiral(Field& w, const Field& f, const int ieo)
514  {
515 #pragma omp barrier
516 
517  w.set(0.0);
518 #pragma omp barrier
519 
520  mult_xp(w, f, ieo);
521  mult_xm(w, f, ieo);
522 
523  mult_yp(w, f, ieo);
524  mult_ym(w, f, ieo);
525 
526  mult_zp(w, f, ieo);
527  mult_zm(w, f, ieo);
528 
529  mult_tp_chiral(w, f, ieo);
530  mult_tm_chiral(w, f, ieo);
531 
532  scal(w, -m_kappa);
533 #pragma omp barrier
534  }
535 
536 
537 //====================================================================
538  void Fopr_Wilson_eo::Mdageo(Field& v, const Field& w, const int ieo)
539  {
540  mult_gm5(v, w);
541  Meo(m_v2, v, ieo);
542  mult_gm5(v, m_v2);
543  }
544 
545 
546 //====================================================================
547  void Fopr_Wilson_eo::Meo_gm5(Field& v, const Field& w, const int ieo)
548  {
549  Meo(m_v2, w, ieo);
550  mult_gm5(v, m_v2);
551  }
552 
553 
554 //====================================================================
556  {
557  if (m_repr == "Dirac") {
558  gm5_dirac(v, w);
559  } else {
560  gm5_chiral(v, w);
561  }
562  }
563 
564 
565 //====================================================================
567  {
568  double *vp = v.ptr(0);
569  const double *wp = w.ptr(0);
570 
571  int ith, nth, is, ns;
572  set_threadtask(ith, nth, is, ns, m_Nvol2);
573 
574  int Nvcd = m_Nvc * m_Nd;
575 
576 #pragma omp barrier
577 
578  for (int site = is; site < ns; ++site) {
579  mult_gamma5_dirac(&vp[Nvcd * site], &wp[Nvcd * site], m_Nc);
580  }
581 
582 #pragma omp barrier
583  }
584 
585 
586 //====================================================================
588  {
589  double *vp = v.ptr(0);
590  const double *wp = w.ptr(0);
591 
592  int ith, nth, is, ns;
593  set_threadtask(ith, nth, is, ns, m_Nvol2);
594 
595  int Nvcd = m_Nvc * m_Nd;
596 
597 #pragma omp barrier
598 
599  for (int site = is; site < ns; ++site) {
600  mult_gamma5_chiral(&vp[Nvcd * site], &wp[Nvcd * site], m_Nc);
601  }
602 
603 #pragma omp barrier
604  }
605 
606 
607 //====================================================================
608  void Fopr_Wilson_eo::gm5p(const int mu, Field& v, const Field& w)
609  {
610  // this function is probably not to be used.
611  // determines \gamma_5 * (1 - \gamma_\mu) v(x+\hat{x})
612  vout.crucial(m_vl, "Error at %s: gm5p is undefined.\n",
613  class_name.c_str());
614  exit(EXIT_FAILURE);
615  }
616 
617 
618 //====================================================================
619  void Fopr_Wilson_eo::mult_xp(Field& v, const Field& w, const int ieo)
620  {
621  int idir = 0;
622 
623  int Nvc2 = m_Nvc * 2;
624  int Nvcd = m_Nvc * m_Nd;
625 
626  double bc2 = m_boundary_each_node[idir];
627 
628  double *vp = v.ptr(0);
629  const double *wp = w.ptr(0);
630  const double *up = m_Ueo.ptr(m_Ndf * m_Nvol2 * (ieo + 2 * idir));
631 
632  int ith, nth, is, ns;
633  set_threadtask(ith, nth, is, ns, m_Nvol2);
634 
635 #pragma omp barrier
636 
637  for (int site = is; site < ns; ++site) {
638  int ix2 = site % m_Nx2;
639  int iyzt = site / m_Nx2;
640  int keo = (ieo + m_yzt_eo[iyzt]) % 2;
641  if ((ix2 == 0) && (keo == 1)) {
642  int iyzt2 = iyzt / 2;
643  int in = Nvcd * site;
644  int ib1 = Nvc2 * iyzt2;
645  int ib2 = ib1 + NVC;
646  double vt1[NVC], vt2[NVC];
647  set_sp2_xp(vt1, vt2, &wp[in], m_Nc);
648  for (int ivc = 0; ivc < NVC; ++ivc) {
649  vcp1_xp[ivc + ib1] = bc2 * vt1[ivc];
650  vcp1_xp[ivc + ib2] = bc2 * vt2[ivc];
651  }
652  }
653  }
654 
655 #pragma omp barrier
656 
657 #pragma omp master
658  {
659  const int Nv = m_Nvc * 2 * ((m_Ny * m_Nz * m_Nt + 1) / 2);
660  Communicator::exchange(Nv, vcp2_xp, vcp1_xp, 0, 1, 1);
661  }
662 #pragma omp barrier
663 
664  for (int site = is; site < ns; ++site) {
665  int ix2 = site % m_Nx2;
666  int iyzt = site / m_Nx2;
667  int keo = (ieo + m_yzt_eo[iyzt]) % 2;
668  int ix2n = ix2 + keo;
669  int nei = ix2n + m_Nx2 * iyzt;
670  int iv = Nvcd * site;
671  int ig = m_Ndf * site;
672 
673  if (ix2n < m_Nx2) {
674  int in = Nvcd * nei;
675  double vt1[NVC], vt2[NVC];
676  set_sp2_xp(vt1, vt2, &wp[in], m_Nc);
677  for (int ic = 0; ic < m_Nc; ++ic) {
678  int ic2 = ic * NVC;
679  double wt1r = mult_uv_r(&up[ic2 + ig], vt1, m_Nc);
680  double wt1i = mult_uv_i(&up[ic2 + ig], vt1, m_Nc);
681  double wt2r = mult_uv_r(&up[ic2 + ig], vt2, m_Nc);
682  double wt2i = mult_uv_i(&up[ic2 + ig], vt2, m_Nc);
683  set_sp4_xp(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i, m_Nc);
684  }
685  } else {
686  int iyzt2 = iyzt / 2;
687  int ib1 = Nvc2 * iyzt2;
688  int ib2 = ib1 + NVC;
689  for (int ic = 0; ic < m_Nc; ++ic) {
690  int ic2 = ic * NVC;
691  double wt1r = mult_uv_r(&up[ic2 + ig], &vcp2_xp[ib1], m_Nc);
692  double wt1i = mult_uv_i(&up[ic2 + ig], &vcp2_xp[ib1], m_Nc);
693  double wt2r = mult_uv_r(&up[ic2 + ig], &vcp2_xp[ib2], m_Nc);
694  double wt2i = mult_uv_i(&up[ic2 + ig], &vcp2_xp[ib2], m_Nc);
695  set_sp4_xp(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i, m_Nc);
696  }
697  }
698  }
699 
700 #pragma omp barrier
701  }
702 
703 
704 //====================================================================
705  void Fopr_Wilson_eo::mult_xm(Field& v, const Field& w, const int ieo)
706  {
707  int idir = 0;
708 
709  int Nvc2 = m_Nvc * 2;
710  int Nvcd = m_Nvc * m_Nd;
711 
712  double bc2 = m_boundary_each_node[idir];
713 
714  double *vp = v.ptr(0);
715  const double *wp = w.ptr(0);
716  const double *up = m_Ueo.ptr(m_Ndf * m_Nvol2 * (1 - ieo + 2 * idir));
717 
718  int ith, nth, is, ns;
719  set_threadtask(ith, nth, is, ns, m_Nvol2);
720 
721 #pragma omp barrier
722 
723  for (int site = is; site < ns; ++site) {
724  int ix2 = site % m_Nx2;
725  int iyzt = site / m_Nx2;
726  int keo = (ieo + m_yzt_eo[iyzt]) % 2;
727  if ((ix2 == m_Nx2 - 1) && (keo == 0)) {
728  int iyzt2 = iyzt / 2;
729  int in = Nvcd * site;
730  int ig = m_Ndf * site;
731  int ib1 = Nvc2 * iyzt2;
732  int ib2 = ib1 + NVC;
733  double vt1[NVC], vt2[NVC];
734  set_sp2_xm(vt1, vt2, &wp[in], m_Nc);
735  for (int ic = 0; ic < m_Nc; ++ic) {
736  int ic2 = 2 * ic;
737  int icr = 2 * ic;
738  int ici = 2 * ic + 1;
739  vcp1_xm[icr + ib1] = mult_udagv_r(&up[ic2 + ig], vt1, m_Nc);
740  vcp1_xm[ici + ib1] = mult_udagv_i(&up[ic2 + ig], vt1, m_Nc);
741  vcp1_xm[icr + ib2] = mult_udagv_r(&up[ic2 + ig], vt2, m_Nc);
742  vcp1_xm[ici + ib2] = mult_udagv_i(&up[ic2 + ig], vt2, m_Nc);
743  }
744  }
745  }
746 
747 #pragma omp barrier
748 
749 
750 #pragma omp master
751  {
752  const int Nv = m_Nvc * 2 * ((m_Ny * m_Nz * m_Nt + 1) / 2);
753  Communicator::exchange(Nv, vcp2_xm, vcp1_xm, 0, -1, 2);
754  }
755 #pragma omp barrier
756 
757  for (int site = is; site < ns; ++site) {
758  int ix2 = site % m_Nx2;
759  int iyzt = site / m_Nx2;
760  int keo = (ieo + m_yzt_eo[iyzt]) % 2;
761  int ix2n = ix2 - (1 - keo);
762  int nei = ix2n + m_Nx2 * iyzt;
763  int iv = Nvcd * site;
764 
765  if (ix2n >= 0) {
766  int ig = m_Ndf * nei;
767  int in = Nvcd * nei;
768  double vt1[NVC], vt2[NVC];
769  set_sp2_xm(vt1, vt2, &wp[in], m_Nc);
770  for (int ic = 0; ic < m_Nc; ++ic) {
771  int ic2 = 2 * ic;
772  double wt1r = mult_udagv_r(&up[ic2 + ig], vt1, m_Nc);
773  double wt1i = mult_udagv_i(&up[ic2 + ig], vt1, m_Nc);
774  double wt2r = mult_udagv_r(&up[ic2 + ig], vt2, m_Nc);
775  double wt2i = mult_udagv_i(&up[ic2 + ig], vt2, m_Nc);
776  set_sp4_xm(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i, m_Nc);
777  }
778  } else {
779  int iyzt2 = iyzt / 2;
780  int ib1 = Nvc2 * iyzt2;
781  int ib2 = ib1 + NVC;
782  for (int ic = 0; ic < m_Nc; ++ic) {
783  double wt1r = bc2 * vcp2_xm[2 * ic + ib1];
784  double wt1i = bc2 * vcp2_xm[2 * ic + 1 + ib1];
785  double wt2r = bc2 * vcp2_xm[2 * ic + ib2];
786  double wt2i = bc2 * vcp2_xm[2 * ic + 1 + ib2];
787  set_sp4_xm(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i, m_Nc);
788  }
789  }
790  }
791 
792 #pragma omp barrier
793  }
794 
795 
796 //====================================================================
797  void Fopr_Wilson_eo::mult_yp(Field& v, const Field& w, const int ieo)
798  {
799  int idir = 1;
800 
801  int Nvc2 = m_Nvc * 2;
802  int Nvcd = m_Nvc * m_Nd;
803 
804  double bc2 = m_boundary_each_node[idir];
805 
806  double *vp = v.ptr(0);
807  const double *wp = w.ptr(0);
808  const double *up = m_Ueo.ptr(m_Ndf * m_Nvol2 * (ieo + 2 * idir));
809 
810  int ith, nth, is, ns;
811  set_threadtask(ith, nth, is, ns, m_Nvol2);
812 
813 #pragma omp barrier
814 
815  for (int site = is; site < ns; ++site) {
816  int ix = site % m_Nx2;
817  int iyzt = site / m_Nx2;
818  int iy = iyzt % m_Ny;
819  int izt = iyzt / m_Ny;
820  int ixzt = ix + m_Nx2 * izt;
821  if (iy == 0) {
822  int in = Nvcd * site;
823  int ix1 = Nvc2 * ixzt;
824  int ix2 = ix1 + NVC;
825  double vt1[NVC], vt2[NVC];
826  set_sp2_yp(vt1, vt2, &wp[in], m_Nc);
827  for (int ivc = 0; ivc < NVC; ++ivc) {
828  vcp1_yp[ivc + ix1] = bc2 * vt1[ivc];
829  vcp1_yp[ivc + ix2] = bc2 * vt2[ivc];
830  }
831  }
832  }
833 
834 #pragma omp barrier
835 
836 #pragma omp master
837  {
838  const int Nv = m_Nvc * 2 * m_Nx2 * m_Nz * m_Nt;
839  Communicator::exchange(Nv, vcp2_yp, vcp1_yp, 1, 1, 3);
840  }
841 #pragma omp barrier
842 
843  for (int site = is; site < ns; ++site) {
844  int ix = site % m_Nx2;
845  int iyzt = site / m_Nx2;
846  int iy = iyzt % m_Ny;
847  int izt = iyzt / m_Ny;
848  int ixzt = ix + m_Nx2 * izt;
849  int nei = ix + m_Nx2 * (iy + 1 + m_Ny * izt);
850  int iv = Nvcd * site;
851  int ig = m_Ndf * site;
852 
853  if (iy < m_Ny - 1) {
854  int in = Nvcd * nei;
855  double vt1[NVC], vt2[NVC];
856  set_sp2_yp(vt1, vt2, &wp[in], m_Nc);
857  for (int ic = 0; ic < m_Nc; ++ic) {
858  int ic2 = ic * NVC;
859  double wt1r = mult_uv_r(&up[ic2 + ig], vt1, m_Nc);
860  double wt1i = mult_uv_i(&up[ic2 + ig], vt1, m_Nc);
861  double wt2r = mult_uv_r(&up[ic2 + ig], vt2, m_Nc);
862  double wt2i = mult_uv_i(&up[ic2 + ig], vt2, m_Nc);
863  set_sp4_yp(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i, m_Nc);
864  }
865  } else {
866  int ix1 = Nvc2 * ixzt;
867  int ix2 = ix1 + NVC;
868  for (int ic = 0; ic < m_Nc; ++ic) {
869  int ic2 = ic * NVC;
870  double wt1r = mult_uv_r(&up[ic2 + ig], &vcp2_yp[ix1], m_Nc);
871  double wt1i = mult_uv_i(&up[ic2 + ig], &vcp2_yp[ix1], m_Nc);
872  double wt2r = mult_uv_r(&up[ic2 + ig], &vcp2_yp[ix2], m_Nc);
873  double wt2i = mult_uv_i(&up[ic2 + ig], &vcp2_yp[ix2], m_Nc);
874  set_sp4_yp(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i, m_Nc);
875  }
876  }
877  }
878 
879 #pragma omp barrier
880  }
881 
882 
883 //====================================================================
884  void Fopr_Wilson_eo::mult_ym(Field& v, const Field& w, const int ieo)
885  {
886  int idir = 1;
887 
888  int Nvc2 = m_Nvc * 2;
889  int Nvcd = m_Nvc * m_Nd;
890 
891  double bc2 = m_boundary_each_node[idir];
892 
893  double *vp = v.ptr(0);
894  const double *wp = w.ptr(0);
895  const double *up = m_Ueo.ptr(m_Ndf * m_Nvol2 * (1 - ieo + 2 * idir));
896 
897  int ith, nth, is, ns;
898  set_threadtask(ith, nth, is, ns, m_Nvol2);
899 
900 #pragma omp barrier
901 
902  for (int site = is; site < ns; ++site) {
903  int ix = site % m_Nx2;
904  int iyzt = site / m_Nx2;
905  int iy = iyzt % m_Ny;
906  int izt = iyzt / m_Ny;
907  int ixzt = ix + m_Nx2 * izt;
908  if (iy == m_Ny - 1) {
909  int in = Nvcd * site;
910  int ig = m_Ndf * site;
911  int ix1 = Nvc2 * ixzt;
912  int ix2 = ix1 + NVC;
913 
914  double vt1[NVC], vt2[NVC];
915  set_sp2_ym(vt1, vt2, &wp[in], m_Nc);
916  for (int ic = 0; ic < m_Nc; ++ic) {
917  int ic2 = 2 * ic;
918  int icr = 2 * ic;
919  int ici = 2 * ic + 1;
920  vcp1_ym[icr + ix1] = mult_udagv_r(&up[ic2 + ig], vt1, m_Nc);
921  vcp1_ym[ici + ix1] = mult_udagv_i(&up[ic2 + ig], vt1, m_Nc);
922  vcp1_ym[icr + ix2] = mult_udagv_r(&up[ic2 + ig], vt2, m_Nc);
923  vcp1_ym[ici + ix2] = mult_udagv_i(&up[ic2 + ig], vt2, m_Nc);
924  }
925  }
926  }
927 
928 #pragma omp barrier
929 
930 #pragma omp master
931  {
932  const int Nv = m_Nvc * 2 * m_Nx2 * m_Nz * m_Nt;
933  Communicator::exchange(Nv, vcp2_ym, vcp1_ym, 1, -1, 4);
934  }
935 #pragma omp barrier
936 
937  for (int site = is; site < ns; ++site) {
938  int ix = site % m_Nx2;
939  int iyzt = site / m_Nx2;
940  int iy = iyzt % m_Ny;
941  int izt = iyzt / m_Ny;
942  int ixzt = ix + m_Nx2 * izt;
943  int nei = ix + m_Nx2 * (iy - 1 + m_Ny * izt);
944  int iv = Nvcd * site;
945 
946  if (iy > 0) {
947  int ig = m_Ndf * nei;
948  int in = Nvcd * nei;
949  double vt1[NVC], vt2[NVC];
950  set_sp2_ym(vt1, vt2, &wp[in], m_Nc);
951  for (int ic = 0; ic < m_Nc; ++ic) {
952  int ic2 = 2 * ic;
953  double wt1r = mult_udagv_r(&up[ic2 + ig], vt1, m_Nc);
954  double wt1i = mult_udagv_i(&up[ic2 + ig], vt1, m_Nc);
955  double wt2r = mult_udagv_r(&up[ic2 + ig], vt2, m_Nc);
956  double wt2i = mult_udagv_i(&up[ic2 + ig], vt2, m_Nc);
957  set_sp4_ym(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i, m_Nc);
958  }
959  } else {
960  int ix1 = Nvc2 * ixzt;
961  int ix2 = ix1 + NVC;
962  for (int ic = 0; ic < m_Nc; ++ic) {
963  double wt1r = bc2 * vcp2_ym[2 * ic + ix1];
964  double wt1i = bc2 * vcp2_ym[2 * ic + 1 + ix1];
965  double wt2r = bc2 * vcp2_ym[2 * ic + ix2];
966  double wt2i = bc2 * vcp2_ym[2 * ic + 1 + ix2];
967  set_sp4_ym(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i, m_Nc);
968  }
969  }
970  }
971 
972 #pragma omp barrier
973  }
974 
975 
976 //====================================================================
977  void Fopr_Wilson_eo::mult_zp(Field& v, const Field& w, const int ieo)
978  {
979  int idir = 2;
980 
981  int Nvc2 = m_Nvc * 2;
982  int Nvcd = m_Nvc * m_Nd;
983 
984  double bc2 = m_boundary_each_node[idir];
985 
986  double *vp = v.ptr(0);
987  const double *wp = w.ptr(0);
988  const double *up = m_Ueo.ptr(m_Ndf * m_Nvol2 * (ieo + 2 * idir));
989 
990  int ith, nth, is, ns;
991  set_threadtask(ith, nth, is, ns, m_Nvol2);
992 
993  int Nxy = m_Nx2 * m_Ny;
994 
995 #pragma omp barrier
996 
997  for (int site = is; site < ns; ++site) {
998  int ixy = site % Nxy;
999  int izt = site / Nxy;
1000  int iz = izt % m_Nz;
1001  int it = izt / m_Nz;
1002  int ixyt = ixy + Nxy * it;
1003  if (iz == 0) {
1004  int in = Nvcd * site;
1005  int ix1 = Nvc2 * ixyt;
1006  int ix2 = ix1 + NVC;
1007  double vt1[NVC], vt2[NVC];
1008  set_sp2_zp(vt1, vt2, &wp[in], m_Nc);
1009  for (int ivc = 0; ivc < NVC; ++ivc) {
1010  vcp1_zp[ivc + ix1] = bc2 * vt1[ivc];
1011  vcp1_zp[ivc + ix2] = bc2 * vt2[ivc];
1012  }
1013  }
1014  }
1015 
1016 #pragma omp barrier
1017 
1018 #pragma omp master
1019  {
1020  int Nv = m_Nvc * 2 * m_Nx2 * m_Ny * m_Nt;
1021  Communicator::exchange(Nv, vcp2_zp, vcp1_zp, 2, 1, 5);
1022  }
1023 #pragma omp barrier
1024 
1025  for (int site = is; site < ns; ++site) {
1026  int ixy = site % Nxy;
1027  int izt = site / Nxy;
1028  int iz = izt % m_Nz;
1029  int it = izt / m_Nz;
1030  int ixyt = ixy + Nxy * it;
1031  int nei = ixy + Nxy * (iz + 1 + m_Nz * it);
1032  int iv = Nvcd * site;
1033  int ig = m_Ndf * site;
1034 
1035  if (iz < m_Nz - 1) {
1036  int in = Nvcd * nei;
1037  double vt1[NVC], vt2[NVC];
1038  set_sp2_zp(vt1, vt2, &wp[in], m_Nc);
1039  for (int ic = 0; ic < m_Nc; ++ic) {
1040  int ic2 = ic * NVC;
1041  double wt1r = mult_uv_r(&up[ic2 + ig], vt1, m_Nc);
1042  double wt1i = mult_uv_i(&up[ic2 + ig], vt1, m_Nc);
1043  double wt2r = mult_uv_r(&up[ic2 + ig], vt2, m_Nc);
1044  double wt2i = mult_uv_i(&up[ic2 + ig], vt2, m_Nc);
1045  set_sp4_zp(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i, m_Nc);
1046  }
1047  } else {
1048  int ix1 = Nvc2 * ixyt;
1049  int ix2 = ix1 + NVC;
1050  for (int ic = 0; ic < m_Nc; ++ic) {
1051  int ic2 = ic * NVC;
1052  double wt1r = mult_uv_r(&up[ic2 + ig], &vcp2_zp[ix1], m_Nc);
1053  double wt1i = mult_uv_i(&up[ic2 + ig], &vcp2_zp[ix1], m_Nc);
1054  double wt2r = mult_uv_r(&up[ic2 + ig], &vcp2_zp[ix2], m_Nc);
1055  double wt2i = mult_uv_i(&up[ic2 + ig], &vcp2_zp[ix2], m_Nc);
1056  set_sp4_zp(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i, m_Nc);
1057  }
1058  }
1059  }
1060 
1061 #pragma omp barrier
1062  }
1063 
1064 
1065 //====================================================================
1066  void Fopr_Wilson_eo::mult_zm(Field& v, const Field& w, const int ieo)
1067  {
1068  int idir = 2;
1069 
1070  int Nvc2 = m_Nvc * 2;
1071  int Nvcd = m_Nvc * m_Nd;
1072 
1073  double bc2 = m_boundary_each_node[idir];
1074 
1075  double *vp = v.ptr(0);
1076  const double *wp = w.ptr(0);
1077  const double *up = m_Ueo.ptr(m_Ndf * m_Nvol2 * (1 - ieo + 2 * idir));
1078 
1079  int ith, nth, is, ns;
1080  set_threadtask(ith, nth, is, ns, m_Nvol2);
1081 
1082  int Nxy = m_Nx2 * m_Ny;
1083 
1084 #pragma omp barrier
1085 
1086  for (int site = is; site < ns; ++site) {
1087  int ixy = site % Nxy;
1088  int izt = site / Nxy;
1089  int iz = izt % m_Nz;
1090  int it = izt / m_Nz;
1091  int ixyt = ixy + Nxy * it;
1092  if (iz == m_Nz - 1) {
1093  int in = Nvcd * site;
1094  int ig = m_Ndf * site;
1095  int ix1 = Nvc2 * ixyt;
1096  int ix2 = ix1 + NVC;
1097 
1098  double vt1[NVC], vt2[NVC];
1099  set_sp2_zm(vt1, vt2, &wp[in], m_Nc);
1100  for (int ic = 0; ic < m_Nc; ++ic) {
1101  int ic2 = 2 * ic;
1102  int icr = 2 * ic;
1103  int ici = 2 * ic + 1;
1104  vcp1_zm[icr + ix1] = mult_udagv_r(&up[ic2 + ig], vt1, m_Nc);
1105  vcp1_zm[ici + ix1] = mult_udagv_i(&up[ic2 + ig], vt1, m_Nc);
1106  vcp1_zm[icr + ix2] = mult_udagv_r(&up[ic2 + ig], vt2, m_Nc);
1107  vcp1_zm[ici + ix2] = mult_udagv_i(&up[ic2 + ig], vt2, m_Nc);
1108  }
1109  }
1110  }
1111 
1112 #pragma omp barrier
1113 
1114 #pragma omp master
1115  {
1116  const int Nv = m_Nvc * 2 * m_Nx2 * m_Ny * m_Nt;
1117  Communicator::exchange(Nv, vcp2_zm, vcp1_zm, 2, -1, 6);
1118  }
1119 #pragma omp barrier
1120 
1121  for (int site = is; site < ns; ++site) {
1122  int ixy = site % Nxy;
1123  int izt = site / Nxy;
1124  int iz = izt % m_Nz;
1125  int it = izt / m_Nz;
1126  int ixyt = ixy + Nxy * it;
1127  int nei = ixy + Nxy * (iz - 1 + m_Nz * it);
1128  int iv = Nvcd * site;
1129 
1130  if (iz > 0) {
1131  int ig = m_Ndf * nei;
1132  int in = Nvcd * nei;
1133  double vt1[NVC], vt2[NVC];
1134  set_sp2_zm(vt1, vt2, &wp[in], m_Nc);
1135  for (int ic = 0; ic < m_Nc; ++ic) {
1136  int ic2 = 2 * ic;
1137  double wt1r = mult_udagv_r(&up[ic2 + ig], vt1, m_Nc);
1138  double wt1i = mult_udagv_i(&up[ic2 + ig], vt1, m_Nc);
1139  double wt2r = mult_udagv_r(&up[ic2 + ig], vt2, m_Nc);
1140  double wt2i = mult_udagv_i(&up[ic2 + ig], vt2, m_Nc);
1141  set_sp4_zm(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i, m_Nc);
1142  }
1143  } else {
1144  int ix1 = Nvc2 * ixyt;
1145  int ix2 = ix1 + NVC;
1146  for (int ic = 0; ic < m_Nc; ++ic) {
1147  double wt1r = bc2 * vcp2_zm[2 * ic + ix1];
1148  double wt1i = bc2 * vcp2_zm[2 * ic + 1 + ix1];
1149  double wt2r = bc2 * vcp2_zm[2 * ic + ix2];
1150  double wt2i = bc2 * vcp2_zm[2 * ic + 1 + ix2];
1151  set_sp4_zm(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i, m_Nc);
1152  }
1153  }
1154  }
1155 
1156 #pragma omp barrier
1157  }
1158 
1159 
1160 //====================================================================
1162  const Field& w, const int ieo)
1163  {
1164  int idir = 3;
1165 
1166  int Nvc2 = m_Nvc * 2;
1167  int Nvcd = m_Nvc * m_Nd;
1168 
1169  double bc2 = m_boundary_each_node[idir];
1170 
1171  double *vp = v.ptr(0);
1172  const double *wp = w.ptr(0);
1173  const double *up = m_Ueo.ptr(m_Ndf * m_Nvol2 * (ieo + 2 * idir));
1174 
1175  int ith, nth, is, ns;
1176  set_threadtask(ith, nth, is, ns, m_Nvol2);
1177 
1178  int Nxyz = m_Nx2 * m_Ny * m_Nz;
1179 
1180 #pragma omp barrier
1181 
1182  for (int site = is; site < ns; ++site) {
1183  int ixyz = site % Nxyz;
1184  int it = site / Nxyz;
1185  if (it == 0) {
1186  int in = Nvcd * site;
1187  int ix1 = Nvc2 * ixyz;
1188  int ix2 = ix1 + NVC;
1189  double vt1[NVC], vt2[NVC];
1190  set_sp2_tp_dirac(vt1, vt2, &wp[in], m_Nc);
1191  for (int ivc = 0; ivc < NVC; ++ivc) {
1192  vcp1_tp[ivc + ix1] = bc2 * vt1[ivc];
1193  vcp1_tp[ivc + ix2] = bc2 * vt2[ivc];
1194  }
1195  }
1196  }
1197 
1198 #pragma omp barrier
1199 
1200 #pragma omp master
1201  {
1202  int Nv = m_Nvc * 2 * m_Nx2 * m_Ny * m_Nz;
1203  Communicator::exchange(Nv, vcp2_tp, vcp1_tp, 3, 1, 7);
1204  }
1205 #pragma omp barrier
1206 
1207  for (int site = is; site < ns; ++site) {
1208  int ixyz = site % Nxyz;
1209  int it = site / Nxyz;
1210  int nei = ixyz + Nxyz * (it + 1);
1211  int iv = Nvcd * site;
1212  int ig = m_Ndf * site;
1213 
1214  if (it < m_Nt - 1) {
1215  int in = Nvcd * nei;
1216  double vt1[NVC], vt2[NVC];
1217  set_sp2_tp_dirac(vt1, vt2, &wp[in], m_Nc);
1218  for (int ic = 0; ic < m_Nc; ++ic) {
1219  int ic2 = ic * NVC;
1220  double wt1r = mult_uv_r(&up[ic2 + ig], vt1, m_Nc);
1221  double wt1i = mult_uv_i(&up[ic2 + ig], vt1, m_Nc);
1222  double wt2r = mult_uv_r(&up[ic2 + ig], vt2, m_Nc);
1223  double wt2i = mult_uv_i(&up[ic2 + ig], vt2, m_Nc);
1224  set_sp4_tp_dirac(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i, m_Nc);
1225  }
1226  } else {
1227  int ix1 = Nvc2 * ixyz;
1228  int ix2 = ix1 + NVC;
1229  for (int ic = 0; ic < m_Nc; ++ic) {
1230  int ic2 = ic * NVC;
1231  double wt1r = mult_uv_r(&up[ic2 + ig], &vcp2_tp[ix1], m_Nc);
1232  double wt1i = mult_uv_i(&up[ic2 + ig], &vcp2_tp[ix1], m_Nc);
1233  double wt2r = mult_uv_r(&up[ic2 + ig], &vcp2_tp[ix2], m_Nc);
1234  double wt2i = mult_uv_i(&up[ic2 + ig], &vcp2_tp[ix2], m_Nc);
1235  set_sp4_tp_dirac(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i, m_Nc);
1236  }
1237  }
1238  }
1239 
1240 #pragma omp barrier
1241  }
1242 
1243 
1244 //====================================================================
1246  const Field& w, const int ieo)
1247  {
1248  int idir = 3;
1249 
1250  int Nvc2 = m_Nvc * 2;
1251  int Nvcd = m_Nvc * m_Nd;
1252 
1253  double bc2 = m_boundary_each_node[idir];
1254 
1255  double *vp = v.ptr(0);
1256  const double *wp = w.ptr(0);
1257  const double *up = m_Ueo.ptr(m_Ndf * m_Nvol2 * (1 - ieo + 2 * idir));
1258 
1259  int ith, nth, is, ns;
1260  set_threadtask(ith, nth, is, ns, m_Nvol2);
1261 
1262  int Nxyz = m_Nx2 * m_Ny * m_Nz;
1263 
1264 #pragma omp barrier
1265 
1266  for (int site = is; site < ns; ++site) {
1267  int ixyz = site % Nxyz;
1268  int it = site / Nxyz;
1269  if (it == m_Nt - 1) {
1270  int in = Nvcd * site;
1271  int ig = m_Ndf * site;
1272  int ix1 = Nvc2 * ixyz;
1273  int ix2 = ix1 + NVC;
1274 
1275  double vt1[NVC], vt2[NVC];
1276  set_sp2_tm_dirac(vt1, vt2, &wp[in], m_Nc);
1277  for (int ic = 0; ic < m_Nc; ++ic) {
1278  int ic2 = 2 * ic;
1279  int icr = 2 * ic;
1280  int ici = 2 * ic + 1;
1281  vcp1_tm[icr + ix1] = mult_udagv_r(&up[ic2 + ig], vt1, m_Nc);
1282  vcp1_tm[ici + ix1] = mult_udagv_i(&up[ic2 + ig], vt1, m_Nc);
1283  vcp1_tm[icr + ix2] = mult_udagv_r(&up[ic2 + ig], vt2, m_Nc);
1284  vcp1_tm[ici + ix2] = mult_udagv_i(&up[ic2 + ig], vt2, m_Nc);
1285  }
1286  }
1287  }
1288 
1289 #pragma omp barrier
1290 
1291 #pragma omp master
1292  {
1293  const int Nv = m_Nvc * 2 * m_Nx2 * m_Ny * m_Nz;
1294  Communicator::exchange(Nv, vcp2_tm, vcp1_tm, 3, -1, 8);
1295  }
1296 #pragma omp barrier
1297 
1298  for (int site = is; site < ns; ++site) {
1299  int ixyz = site % Nxyz;
1300  int it = site / Nxyz;
1301  int nei = ixyz + Nxyz * (it - 1);
1302  int iv = Nvcd * site;
1303 
1304  if (it > 0) {
1305  int ig = m_Ndf * nei;
1306  int in = Nvcd * nei;
1307  double vt1[NVC], vt2[NVC];
1308  set_sp2_tm_dirac(vt1, vt2, &wp[in], m_Nc);
1309  for (int ic = 0; ic < m_Nc; ++ic) {
1310  int ic2 = 2 * ic;
1311  double wt1r = mult_udagv_r(&up[ic2 + ig], vt1, m_Nc);
1312  double wt1i = mult_udagv_i(&up[ic2 + ig], vt1, m_Nc);
1313  double wt2r = mult_udagv_r(&up[ic2 + ig], vt2, m_Nc);
1314  double wt2i = mult_udagv_i(&up[ic2 + ig], vt2, m_Nc);
1315  set_sp4_tm_dirac(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i, m_Nc);
1316  }
1317  } else {
1318  int ix1 = Nvc2 * ixyz;
1319  int ix2 = ix1 + NVC;
1320  for (int ic = 0; ic < m_Nc; ++ic) {
1321  int icr = 2 * ic;
1322  int ici = 2 * ic + 1;
1323  double wt1r = bc2 * vcp2_tm[icr + ix1];
1324  double wt1i = bc2 * vcp2_tm[ici + ix1];
1325  double wt2r = bc2 * vcp2_tm[icr + ix2];
1326  double wt2i = bc2 * vcp2_tm[ici + ix2];
1327  set_sp4_tm_dirac(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i, m_Nc);
1328  }
1329  }
1330  }
1331 
1332 #pragma omp barrier
1333  }
1334 
1335 
1336 //====================================================================
1338  const Field& w, const int ieo)
1339  {
1340  int idir = 3;
1341 
1342  int Nvc2 = m_Nvc * 2;
1343  int Nvcd = m_Nvc * m_Nd;
1344 
1345  double bc2 = m_boundary_each_node[idir];
1346 
1347  double *vp = v.ptr(0);
1348  const double *wp = w.ptr(0);
1349  const double *up = m_Ueo.ptr(m_Ndf * m_Nvol2 * (ieo + 2 * idir));
1350 
1351  int ith, nth, is, ns;
1352  set_threadtask(ith, nth, is, ns, m_Nvol2);
1353 
1354  int Nxyz = m_Nx2 * m_Ny * m_Nz;
1355 
1356 #pragma omp barrier
1357 
1358  for (int site = is; site < ns; ++site) {
1359  int ixyz = site % Nxyz;
1360  int it = site / Nxyz;
1361  if (it == 0) {
1362  int in = Nvcd * site;
1363  int ix1 = Nvc2 * ixyz;
1364  int ix2 = ix1 + NVC;
1365  double vt1[NVC], vt2[NVC];
1366  set_sp2_tp_chiral(vt1, vt2, &wp[in], m_Nc);
1367  for (int ivc = 0; ivc < NVC; ++ivc) {
1368  vcp1_tp[ivc + ix1] = bc2 * vt1[ivc];
1369  vcp1_tp[ivc + ix2] = bc2 * vt2[ivc];
1370  }
1371  }
1372  }
1373 
1374 #pragma omp barrier
1375 
1376 #pragma omp master
1377  {
1378  int Nv = m_Nvc * 2 * m_Nx2 * m_Ny * m_Nz;
1379  Communicator::exchange(Nv, vcp2_tp, vcp1_tp, 3, 1, 7);
1380  }
1381 #pragma omp barrier
1382 
1383  for (int site = is; site < ns; ++site) {
1384  int ixyz = site % Nxyz;
1385  int it = site / Nxyz;
1386  int nei = ixyz + Nxyz * (it + 1);
1387  int iv = Nvcd * site;
1388  int ig = m_Ndf * site;
1389 
1390  if (it < m_Nt - 1) {
1391  int in = Nvcd * nei;
1392  double vt1[NVC], vt2[NVC];
1393  set_sp2_tp_chiral(vt1, vt2, &wp[in], m_Nc);
1394  for (int ic = 0; ic < m_Nc; ++ic) {
1395  int ic2 = ic * NVC;
1396  double wt1r = mult_uv_r(&up[ic2 + ig], vt1, m_Nc);
1397  double wt1i = mult_uv_i(&up[ic2 + ig], vt1, m_Nc);
1398  double wt2r = mult_uv_r(&up[ic2 + ig], vt2, m_Nc);
1399  double wt2i = mult_uv_i(&up[ic2 + ig], vt2, m_Nc);
1400  set_sp4_tp_chiral(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i, m_Nc);
1401  }
1402  } else {
1403  int ix1 = Nvc2 * ixyz;
1404  int ix2 = ix1 + NVC;
1405  for (int ic = 0; ic < m_Nc; ++ic) {
1406  int ic2 = ic * NVC;
1407  double wt1r = mult_uv_r(&up[ic2 + ig], &vcp2_tp[ix1], m_Nc);
1408  double wt1i = mult_uv_i(&up[ic2 + ig], &vcp2_tp[ix1], m_Nc);
1409  double wt2r = mult_uv_r(&up[ic2 + ig], &vcp2_tp[ix2], m_Nc);
1410  double wt2i = mult_uv_i(&up[ic2 + ig], &vcp2_tp[ix2], m_Nc);
1411  set_sp4_tp_chiral(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i, m_Nc);
1412  }
1413  }
1414  }
1415 
1416 #pragma omp barrier
1417  }
1418 
1419 
1420 //====================================================================
1422  const Field& w, const int ieo)
1423  {
1424  int idir = 3;
1425 
1426  int Nvc2 = m_Nvc * 2;
1427  int Nvcd = m_Nvc * m_Nd;
1428 
1429  double bc2 = m_boundary_each_node[idir];
1430 
1431  double *vp = v.ptr(0);
1432  const double *wp = w.ptr(0);
1433  const double *up = m_Ueo.ptr(m_Ndf * m_Nvol2 * (1 - ieo + 2 * idir));
1434 
1435  int ith, nth, is, ns;
1436  set_threadtask(ith, nth, is, ns, m_Nvol2);
1437 
1438  int Nxyz = m_Nx2 * m_Ny * m_Nz;
1439 
1440 #pragma omp barrier
1441 
1442  for (int site = is; site < ns; ++site) {
1443  int ixyz = site % Nxyz;
1444  int it = site / Nxyz;
1445  if (it == m_Nt - 1) {
1446  int in = Nvcd * site;
1447  int ig = m_Ndf * site;
1448  int ix1 = Nvc2 * ixyz;
1449  int ix2 = ix1 + NVC;
1450 
1451  double vt1[NVC], vt2[NVC];
1452  set_sp2_tm_chiral(vt1, vt2, &wp[in], m_Nc);
1453  for (int ic = 0; ic < m_Nc; ++ic) {
1454  int ic2 = 2 * ic;
1455  int icr = 2 * ic;
1456  int ici = 2 * ic + 1;
1457  vcp1_tm[icr + ix1] = mult_udagv_r(&up[ic2 + ig], vt1, m_Nc);
1458  vcp1_tm[ici + ix1] = mult_udagv_i(&up[ic2 + ig], vt1, m_Nc);
1459  vcp1_tm[icr + ix2] = mult_udagv_r(&up[ic2 + ig], vt2, m_Nc);
1460  vcp1_tm[ici + ix2] = mult_udagv_i(&up[ic2 + ig], vt2, m_Nc);
1461  }
1462  }
1463  }
1464 
1465 #pragma omp barrier
1466 
1467 #pragma omp master
1468  {
1469  const int Nv = m_Nvc * 2 * m_Nx2 * m_Ny * m_Nz;
1470  Communicator::exchange(Nv, vcp2_tm, vcp1_tm, 3, -1, 8);
1471  }
1472 #pragma omp barrier
1473 
1474  for (int site = is; site < ns; ++site) {
1475  int ixyz = site % Nxyz;
1476  int it = site / Nxyz;
1477  int nei = ixyz + Nxyz * (it - 1);
1478  int iv = Nvcd * site;
1479 
1480  if (it > 0) {
1481  int ig = m_Ndf * nei;
1482  int in = Nvcd * nei;
1483  double vt1[NVC], vt2[NVC];
1484  set_sp2_tm_chiral(vt1, vt2, &wp[in], m_Nc);
1485  for (int ic = 0; ic < m_Nc; ++ic) {
1486  int ic2 = 2 * ic;
1487  double wt1r = mult_udagv_r(&up[ic2 + ig], vt1, m_Nc);
1488  double wt1i = mult_udagv_i(&up[ic2 + ig], vt1, m_Nc);
1489  double wt2r = mult_udagv_r(&up[ic2 + ig], vt2, m_Nc);
1490  double wt2i = mult_udagv_i(&up[ic2 + ig], vt2, m_Nc);
1491  set_sp4_tm_chiral(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i, m_Nc);
1492  }
1493  } else {
1494  int ix1 = Nvc2 * ixyz;
1495  int ix2 = ix1 + NVC;
1496  for (int ic = 0; ic < m_Nc; ++ic) {
1497  double wt1r = bc2 * vcp2_tm[2 * ic + ix1];
1498  double wt1i = bc2 * vcp2_tm[2 * ic + 1 + ix1];
1499  double wt2r = bc2 * vcp2_tm[2 * ic + ix2];
1500  double wt2i = bc2 * vcp2_tm[2 * ic + 1 + ix2];
1501  set_sp4_tm_chiral(&vp[2 * ic + iv], wt1r, wt1i, wt2r, wt2i, m_Nc);
1502  }
1503  }
1504  }
1505 
1506 #pragma omp barrier
1507  }
1508 
1509 
1510 //====================================================================
1512  {
1513  // Counting of floating point operations in giga unit.
1514  // The following counting explicitly depends on the implementation.
1515  // It will be recalculated when the code is modified.
1516  // The present counting is based on rev.1107. [24 Aug 2014 H.Matsufuru]
1517 
1518  const int Nvol = CommonParameters::Nvol();
1519  const int NPE = CommonParameters::NPE();
1520 
1521  int flop_site;
1522 
1523  if (m_repr == "Dirac") {
1524  flop_site = m_Nc * m_Nd * (6 * (4 * m_Nc + 2) + 2 * (4 * m_Nc + 1));
1525  } else if (m_repr == "Chiral") {
1526  flop_site = m_Nc * m_Nd * 8 * (4 * m_Nc + 2);
1527  } else {
1528  vout.crucial(m_vl, "Error at %s: input repr is undefined.\n",
1529  class_name.c_str());
1530  exit(EXIT_FAILURE);
1531  }
1532 
1533  double gflop = flop_site * ((Nvol / 2) * (NPE / 1.0e+9));
1534 
1535  return gflop;
1536  }
1537 
1538 
1539 //====================================================================
1540 }
1541 //============================================================END=====
Imp::Fopr_Wilson_eo::mult_ym
void mult_ym(Field &, const Field &, const int ieo)
Definition: fopr_Wilson_eo_impl.cpp:884
CommonParameters::Ny
static int Ny()
Definition: commonParameters.h:106
Imp::Fopr_Wilson_eo::m_mode
std::string m_mode
mult mode.
Definition: fopr_Wilson_eo_impl.h:50
Imp::Fopr_Wilson_eo::mult_yp
void mult_yp(Field &, const Field &, const int ieo)
Definition: fopr_Wilson_eo_impl.cpp:797
CommonParameters::Nz
static int Nz()
Definition: commonParameters.h:107
fopr_thread-inc.h
Imp::Fopr_Wilson_eo::gm5p
void gm5p(const int mu, Field &, const Field &v)
gamma_5 (1 - gamma_mu) v(x + mu) used in force calculation.
Definition: fopr_Wilson_eo_impl.cpp:608
Parameters::set_string
void set_string(const string &key, const string &value)
Definition: parameters.cpp:39
Imp::Fopr_Wilson_eo::vcp1_xm
double * vcp1_xm
Definition: fopr_Wilson_eo_impl.h:67
Imp::Fopr_Wilson_eo::postProp
void postProp(Field &x, const Field &xe, const Field &bo)
Definition: fopr_Wilson_eo_impl.cpp:417
Imp::Fopr_Wilson_eo::mult
void mult(Field &v, const Field &w)
multiplies fermion operator to a given field (2nd argument)
Definition: fopr_Wilson_eo_impl.cpp:329
Imp::Fopr_Wilson_eo::Meo_dirac
void Meo_dirac(Field &, const Field &, const int ieo)
Definition: fopr_Wilson_eo_impl.cpp:488
fopr_Wilson_impl_SU_N-inc.h
fopr_Wilson_impl_SU3-inc.h
ThreadManager::get_num_threads
static int get_num_threads()
returns available number of threads.
Definition: threadManager.cpp:246
CommonParameters::Ndim
static int Ndim()
Definition: commonParameters.h:117
Imp::Fopr_Wilson_eo::DDdag
void DDdag(Field &v, const Field &w)
Definition: fopr_Wilson_eo_impl.cpp:445
Imp::Fopr_Wilson_eo::m_Nd
int m_Nd
Definition: fopr_Wilson_eo_impl.h:53
Imp::Fopr_Wilson_eo::vcp1_ym
double * vcp1_ym
Definition: fopr_Wilson_eo_impl.h:68
Field::set
void set(const int jin, const int site, const int jex, double v)
Definition: field.h:175
Parameters
Class for parameters.
Definition: parameters.h:46
Imp::Fopr_Wilson_eo::m_Nvc
int m_Nvc
Definition: fopr_Wilson_eo_impl.h:53
Imp::Fopr_Wilson_eo::mult_zm
void mult_zm(Field &, const Field &, const int ieo)
Definition: fopr_Wilson_eo_impl.cpp:1066
Parameters::set_double
void set_double(const string &key, const double value)
Definition: parameters.cpp:33
Imp::Fopr_Wilson_eo::m_yzt_eo
std::vector< int > m_yzt_eo
yzt parity
Definition: fopr_Wilson_eo_impl.h:62
Imp::Fopr_Wilson_eo::mult_xm
void mult_xm(Field &, const Field &, const int ieo)
Definition: fopr_Wilson_eo_impl.cpp:705
Bridge::BridgeIO::decrease_indent
void decrease_indent()
Definition: bridgeIO.h:86
Imp::Fopr_Wilson_eo::Meo_chiral
void Meo_chiral(Field &, const Field &, const int ieo)
Definition: fopr_Wilson_eo_impl.cpp:513
Imp::Fopr_Wilson_eo::m_Ueo
Field_G m_Ueo
Definition: fopr_Wilson_eo_impl.h:60
Imp::Fopr_Wilson_eo::vcp2_zp
double * vcp2_zp
Definition: fopr_Wilson_eo_impl.h:69
Bridge::BridgeIO::increase_indent
void increase_indent()
Definition: bridgeIO.h:85
Bridge::BridgeIO::detailed
void detailed(const char *format,...)
Definition: bridgeIO.cpp:219
Imp::Fopr_Wilson_eo::mult_xp
void mult_xp(Field &, const Field &, const int ieo)
Definition: fopr_Wilson_eo_impl.cpp:619
Field::nex
int nex() const
Definition: field.h:128
Imp::Fopr_Wilson_eo::vcp1_yp
double * vcp1_yp
Definition: fopr_Wilson_eo_impl.h:68
Imp::Fopr_Wilson_eo::vcp2_xp
double * vcp2_xp
Definition: fopr_Wilson_eo_impl.h:67
CommonParameters::Nvol
static int Nvol()
Definition: commonParameters.h:109
Imp::Fopr_Wilson_eo::m_Ndf
int m_Ndf
Definition: fopr_Wilson_eo_impl.h:53
aypx
void aypx(const double a, Field &y, const Field &x)
aypx(y, a, x): y := a * y + x
Definition: field.cpp:509
Imp::Fopr_Wilson_eo::gm5_dirac
void gm5_dirac(Field &, const Field &)
Definition: fopr_Wilson_eo_impl.cpp:566
axpy
void axpy(Field &y, const double a, const Field &x)
axpy(y, a, x): y := a * x + y
Definition: field.cpp:380
Imp::Fopr_Wilson_eo::vcp2_zm
double * vcp2_zm
Definition: fopr_Wilson_eo_impl.h:69
Imp::Fopr_Wilson_eo::vcp1_tp
double * vcp1_tp
Definition: fopr_Wilson_eo_impl.h:70
Imp::Fopr_Wilson_eo::m_boundary_each_node
std::vector< double > m_boundary_each_node
b.c. for each node.
Definition: fopr_Wilson_eo_impl.h:57
Imp::Fopr_Wilson_eo::vcp2_tm
double * vcp2_tm
Definition: fopr_Wilson_eo_impl.h:70
Imp::Fopr_Wilson_eo::get_parameters
void get_parameters(Parameters &params) const
gets parameters by a Parameter object: to be implemented in a subclass.
Definition: fopr_Wilson_eo_impl.cpp:271
Imp::Fopr_Wilson_eo::Meo
void Meo(Field &, const Field &, const int ieo)
Definition: fopr_Wilson_eo_impl.cpp:477
Imp::Fopr_Wilson_eo::tidyup
void tidyup()
Definition: fopr_Wilson_eo_impl.cpp:184
Imp::Fopr_Wilson_eo::m_Nvol
int m_Nvol
Definition: fopr_Wilson_eo_impl.h:54
Imp::Fopr_Wilson_eo::flop_count
double flop_count()
this returns the number of floating point operations of Meo.
Definition: fopr_Wilson_eo_impl.cpp:1511
Imp::Fopr_Wilson_eo::set_config
void set_config(Field *U)
setting pointer to the gauge configuration.
Definition: fopr_Wilson_eo_impl.cpp:282
Imp::Fopr_Wilson_eo::vcp2_ym
double * vcp2_ym
Definition: fopr_Wilson_eo_impl.h:68
Imp::Fopr_Wilson_eo::preProp
void preProp(Field &Be, Field &bo, const Field &b)
Definition: fopr_Wilson_eo_impl.cpp:399
Imp::Fopr_Wilson_eo::m_v1
Field m_v1
Definition: fopr_Wilson_eo_impl.h:63
Index_eo::reverseField
void reverseField(Field &lex, const Field &eo)
Definition: index_eo.cpp:197
Imp::Fopr_Wilson_eo::Mdageo
void Mdageo(Field &, const Field &, const int ieo)
Definition: fopr_Wilson_eo_impl.cpp:538
CommonParameters::Nx
static int Nx()
Definition: commonParameters.h:105
Imp::Fopr_Wilson_eo::mult_tp_dirac
void mult_tp_dirac(Field &, const Field &, const int ieo)
Definition: fopr_Wilson_eo_impl.cpp:1161
Imp::Fopr_Wilson_eo::set_config_omp
void set_config_omp(Field *U)
Definition: fopr_Wilson_eo_impl.cpp:300
Imp::Fopr_Wilson_eo::mult_tm_chiral
void mult_tm_chiral(Field &, const Field &, const int ieo)
Definition: fopr_Wilson_eo_impl.cpp:1421
CommonParameters::Nc
static int Nc()
Definition: commonParameters.h:115
Imp::Fopr_Wilson_eo::set_config_impl
void set_config_impl(Field *U)
Definition: fopr_Wilson_eo_impl.cpp:312
Imp::Fopr_Wilson_eo::m_w1
Field m_w1
Definition: fopr_Wilson_eo_impl.h:64
Imp::Fopr_Wilson_eo::vcp2_tp
double * vcp2_tp
Definition: fopr_Wilson_eo_impl.h:70
Imp::Fopr_Wilson_eo::vcp1_zp
double * vcp1_zp
Definition: fopr_Wilson_eo_impl.h:69
Imp::Fopr_Wilson_eo::m_w2
Field m_w2
working field
Definition: fopr_Wilson_eo_impl.h:64
Index_eo::convertField
void convertField(Field &eo, const Field &lex)
Definition: index_eo.cpp:90
CommonParameters::Nt
static int Nt()
Definition: commonParameters.h:108
Parameters::fetch_int_vector
int fetch_int_vector(const string &key, vector< int > &value) const
Definition: parameters.cpp:429
Imp::Fopr_Wilson_eo::m_repr
std::string m_repr
Dirac matrix representation.
Definition: fopr_Wilson_eo_impl.h:47
Imp::Fopr_Wilson_eo::vcp1_tm
double * vcp1_tm
Definition: fopr_Wilson_eo_impl.h:70
Imp::Fopr_Wilson_eo::setup
void setup()
Definition: fopr_Wilson_eo_impl.cpp:100
Field_G::reset
void reset(const int Nvol, const int Nex)
Definition: field_G.h:79
Imp::Fopr_Wilson_eo::m_Nt
int m_Nt
Definition: fopr_Wilson_eo_impl.h:55
fopr_Wilson_impl_common-inc.h
Imp::Fopr_Wilson_eo::init
void init(const std::string)
Definition: fopr_Wilson_eo_impl.cpp:73
Imp::Fopr_Wilson_eo::DdagD
void DdagD(Field &v, const Field &w)
Definition: fopr_Wilson_eo_impl.cpp:437
CommonParameters::NPE
static int NPE()
Definition: commonParameters.h:101
Imp::Fopr_Wilson_eo::vcp2_yp
double * vcp2_yp
Definition: fopr_Wilson_eo_impl.h:68
Imp::Fopr_Wilson_eo::m_Ny
int m_Ny
Definition: fopr_Wilson_eo_impl.h:55
Imp::Fopr_Wilson_eo::m_Nz
int m_Nz
Definition: fopr_Wilson_eo_impl.h:55
Field::reset
void reset(const int Nin, const int Nvol, const int Nex, const element_type cmpl=Element_type::COMPLEX)
Definition: field.h:95
Parameters::set_int_vector
void set_int_vector(const string &key, const vector< int > &value)
Definition: parameters.cpp:45
Imp::Fopr_Wilson_eo::vcp1_xp
double * vcp1_xp
communication buffers
Definition: fopr_Wilson_eo_impl.h:67
Imp::Fopr_Wilson_eo::gm5_chiral
void gm5_chiral(Field &, const Field &)
Definition: fopr_Wilson_eo_impl.cpp:587
Imp::Fopr_Wilson_eo::m_Nx2
int m_Nx2
Definition: fopr_Wilson_eo_impl.h:55
Imp::Fopr_Wilson_eo::mult_zp
void mult_zp(Field &, const Field &, const int ieo)
Definition: fopr_Wilson_eo_impl.cpp:977
Field::ptr
const double * ptr(const int jin, const int site, const int jex) const
Definition: field.h:153
Imp::Fopr_Wilson_eo::Meo_gm5
void Meo_gm5(Field &, const Field &, const int ieo)
Definition: fopr_Wilson_eo_impl.cpp:547
CommonParameters::Nd
static int Nd()
Definition: commonParameters.h:116
NVC
#define NVC
Definition: fopr_Wilson_impl_SU2-inc.h:15
CommonParameters::Vlevel
static Bridge::VerboseLevel Vlevel()
Definition: commonParameters.h:122
fopr_Wilson_impl_SU2-inc.h
Bridge::BridgeIO::set_verbose_level
static VerboseLevel set_verbose_level(const std::string &str)
Definition: bridgeIO.cpp:133
Imp::Fopr_Wilson_eo::mult_tp_chiral
void mult_tp_chiral(Field &, const Field &, const int ieo)
Definition: fopr_Wilson_eo_impl.cpp:1337
Imp::Fopr_Wilson_eo::m_boundary
std::vector< int > m_boundary
boundary condition
Definition: fopr_Wilson_eo_impl.h:46
fopr_Wilson_eo_impl.h
Imp::Fopr_Wilson_eo::class_name
static const std::string class_name
Definition: fopr_Wilson_eo_impl.h:41
Imp::Fopr_Wilson_eo::m_vl
Bridge::VerboseLevel m_vl
verbose level
Definition: fopr_Wilson_eo_impl.h:48
scal
void scal(Field &x, const double a)
scal(x, a): x = a * x
Definition: field.cpp:261
Imp::Fopr_Wilson_eo::mult_gm5
void mult_gm5(Field &, const Field &)
multiplies gamma_5 matrix.
Definition: fopr_Wilson_eo_impl.cpp:555
Communicator::ipe
static int ipe(const int dir)
logical coordinate of current proc.
Definition: communicator.cpp:105
Parameters::fetch_string
int fetch_string(const string &key, string &value) const
Definition: parameters.cpp:378
Parameters::fetch_double
int fetch_double(const string &key, double &value) const
Definition: parameters.cpp:327
Imp::Fopr_Wilson_eo::mult_dag
void mult_dag(Field &v, const Field &w)
hermitian conjugate of mult(Field&, const Field&).
Definition: fopr_Wilson_eo_impl.cpp:348
Imp::Fopr_Wilson_eo::m_Nx
int m_Nx
Definition: fopr_Wilson_eo_impl.h:55
Imp::Fopr_Wilson_eo::m_Nvol2
int m_Nvol2
Definition: fopr_Wilson_eo_impl.h:54
Imp::Fopr_Wilson_eo::Ddag
void Ddag(Field &v, const Field &w)
Definition: fopr_Wilson_eo_impl.cpp:466
Bridge::BridgeIO::crucial
void crucial(const char *format,...)
Definition: bridgeIO.cpp:180
Imp
Clover term operator.
Definition: fopr_CloverTerm_eo_impl.cpp:32
Imp::Fopr_Wilson_eo::m_kappa
double m_kappa
hopping parameter
Definition: fopr_Wilson_eo_impl.h:45
Imp::Fopr_Wilson_eo::mult_tm_dirac
void mult_tm_dirac(Field &, const Field &, const int ieo)
Definition: fopr_Wilson_eo_impl.cpp:1245
Imp::Fopr_Wilson_eo::set_parameters
void set_parameters(const Parameters &params)
sets parameters by a Parameter object: to be implemented in a subclass.
Definition: fopr_Wilson_eo_impl.cpp:211
Field
Container of Field-type object.
Definition: field.h:46
Imp::Fopr_Wilson_eo::set_mode
void set_mode(const std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
Definition: fopr_Wilson_eo_impl.cpp:319
Communicator::exchange
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.
Definition: communicator.cpp:207
ThreadManager::get_thread_id
static int get_thread_id()
returns thread id.
Definition: threadManager.cpp:253
Imp::Fopr_Wilson_eo::m_index
Index_eo m_index
Definition: fopr_Wilson_eo_impl.h:59
Imp::Fopr_Wilson_eo::vcp1_zm
double * vcp1_zm
Definition: fopr_Wilson_eo_impl.h:69
Bridge::BridgeIO::general
void general(const char *format,...)
Definition: bridgeIO.cpp:200
Imp::Fopr_Wilson_eo::vcp2_xm
double * vcp2_xm
Definition: fopr_Wilson_eo_impl.h:67
Imp::Fopr_Wilson_eo::D
void D(Field &v, const Field &w)
Definition: fopr_Wilson_eo_impl.cpp:453
Imp::Fopr_Wilson_eo::m_Ndim
int m_Ndim
Definition: fopr_Wilson_eo_impl.h:54
ThreadManager::assert_single_thread
static void assert_single_thread(const std::string &class_name)
assert currently running on single thread.
Definition: threadManager.cpp:372
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512
Imp::Fopr_Wilson_eo::m_Nc
int m_Nc
Definition: fopr_Wilson_eo_impl.h:53
Bridge::BridgeIO::get_verbose_level
static std::string get_verbose_level(const VerboseLevel vl)
Definition: bridgeIO.cpp:154
Imp::Fopr_Wilson_eo::m_v2
Field m_v2
working field
Definition: fopr_Wilson_eo_impl.h:63