Bridge++  Ver. 2.0.2
afopr_Domainwall_5din_eo-tmpl.h
Go to the documentation of this file.
1 
11 
12 template<typename AFIELD>
14  = "AFopr_Domainwall_5din_eo";
15 //====================================================================
16 template<typename AFIELD>
18 {
20 
21  // switch for communication
22  int req_comm = 1; // set 1 if communication forced any time
23  //int req_comm = 0; // set 1 if communication forced any time
24 
25  std::string vlevel;
26  if (!params.fetch_string("verbose_level", vlevel)) {
27  m_vl = vout.set_verbose_level(vlevel);
28  } else {
29  m_vl = CommonParameters::Vlevel();
30  }
31 
32  vout.general(m_vl, "%s: construction\n", class_name.c_str());
33 
34  m_repr = "Dirac"; // now only the Dirac repr is available.
35 
36  std::string repr;
37  if (!params.fetch_string("gamma_matrix_type", repr)) {
38  if (repr != "Dirac") {
39  vout.crucial(" Error at %s: unsupported gamma-matrix type: %s\n",
40  class_name.c_str(), repr.c_str());
41  exit(EXIT_FAILURE);
42  }
43  }
44 
45  int Nc = CommonParameters::Nc();
46  if (Nc != 3) {
47  vout.crucial("%s: only applicable to Nc = 3\n",
48  class_name.c_str());
49  exit(EXIT_FAILURE);
50  }
51 
52  int Nd = CommonParameters::Nd();
53  m_Nvcd = 2 * Nc * Nd;
54  m_Ndf = 2 * Nc * Nc;
55 
56  m_Nx = CommonParameters::Nx();
57  m_Ny = CommonParameters::Ny();
58  m_Nz = CommonParameters::Nz();
59  m_Nt = CommonParameters::Nt();
60  m_Nvol = CommonParameters::Nvol();
61  m_Ndim = CommonParameters::Ndim();
62 
63  m_Nx2 = m_Nx / 2;
64  m_Nst2 = m_Nvol / 2;
65 
66  m_Nx2v = m_Nx2 / VLENX;
67  m_Nyv = m_Ny / VLENY;
68  m_Nst2v = m_Nst2 / VLEN;
69 
70  // condition check
71  if (m_Nx % 2 != 0) {
72  vout.crucial(m_vl, "%s: Nx must be even.\n",
73  class_name.c_str());
74  exit(EXIT_FAILURE);
75  }
76  if (m_Nx % (2 * VLENX) != 0) {
77  vout.crucial(m_vl, "%s: Nx must be mulriple of 2*VLENX.\n",
78  class_name.c_str());
79  exit(EXIT_FAILURE);
80  }
81  if (m_Ny % (VLENY) != 0) {
82  vout.crucial(m_vl, "%s: Ny must be multiple of VLENY.\n",
83  class_name.c_str());
84  exit(EXIT_FAILURE);
85  }
86 
87  vout.general(m_vl, " VLENX = %2d Nx2v = %d\n", VLENX, m_Nx2v);
88  vout.general(m_vl, " VLENY = %2d Nyv = %d\n", VLENY, m_Nyv);
89  vout.general(m_vl, " VLEN = %2d Nst2v = %d\n", VLEN, m_Nst2v);
90 
91  m_Leo.resize(m_Ny * m_Nz * m_Nt);
92 
93  int ipe3 = Communicator::ipe(3);
94  int ipe2 = Communicator::ipe(2);
95  int ipe1 = Communicator::ipe(1);
96  for (int t = 0; t < m_Nt; ++t) {
97  for (int z = 0; z < m_Nz; ++z) {
98  for (int y = 0; y < m_Ny; ++y) {
99  int t2 = ipe3 * m_Nt + t;
100  int z2 = ipe2 * m_Nz + z;
101  int y2 = ipe1 * m_Ny + y;
102  m_Leo[y + m_Ny * (z + m_Nz * t)] = (y2 + z2 + t2) % 2;
103  }
104  }
105  }
106 
107  m_Nsize[0] = m_Nx2v;
108  m_Nsize[1] = m_Nyv;
109  m_Nsize[2] = m_Nz;
110  m_Nsize[3] = m_Nt;
111 
112  do_comm_any = 0;
113  for (int mu = 0; mu < m_Ndim; ++mu) {
114  do_comm[mu] = 1;
115  if ((req_comm == 0) && (Communicator::npe(mu) == 1)) do_comm[mu] = 0;
116  do_comm_any += do_comm[mu];
117  vout.general(" do_comm[%d] = %d\n", mu, do_comm[mu]);
118  }
119 
121 
122  m_Ns = 0; // temporary set
123  set_parameters(params);
124 
126 
127  m_Nbdsize.resize(m_Ndim);
128  int Nbdin = (m_Nvcd / 2) * m_Ns;
129  m_Nbdsize[0] = Nbdin * ((m_Ny * m_Nz * m_Nt + 1) / 2);
130  m_Nbdsize[1] = Nbdin * m_Nx2 * m_Nz * m_Nt;
131  m_Nbdsize[2] = Nbdin * m_Nx2 * m_Ny * m_Nt;
132  m_Nbdsize[3] = Nbdin * m_Nx2 * m_Ny * m_Nz;
133 
134  setup_channels();
135 
136  // gauge configuration.
137  m_Ueo.reset(m_Ndf, m_Nvol, m_Ndim);
138  m_Ulex.reset(m_Ndf, m_Nvol, m_Ndim);
139 
140  vout.detailed(m_vl, "%s: initalization finished.\n",
141  class_name.c_str());
142 }
143 
144 
145 //====================================================================
146 template<typename AFIELD>
148 {
149  // need to do nothing.
150 }
151 
152 
153 //====================================================================
154 template<typename AFIELD>
156 {
157  chsend_up.resize(m_Ndim);
158  chrecv_up.resize(m_Ndim);
159  chsend_dn.resize(m_Ndim);
160  chrecv_dn.resize(m_Ndim);
161 
162  for (int mu = 0; mu < m_Ndim; ++mu) {
163  size_t Nvsize = m_Nbdsize[mu] * sizeof(real_t);
164 
165  chsend_dn[mu].send_init(Nvsize, mu, -1);
166  chsend_up[mu].send_init(Nvsize, mu, 1);
167 #ifdef USE_MPI
168  chrecv_up[mu].recv_init(Nvsize, mu, 1);
169  chrecv_dn[mu].recv_init(Nvsize, mu, -1);
170 #else
171  void *buf_up = (void *)chsend_dn[mu].ptr();
172  chrecv_up[mu].recv_init(Nvsize, mu, 1, buf_up);
173  void *buf_dn = (void *)chsend_up[mu].ptr();
174  chrecv_dn[mu].recv_init(Nvsize, mu, -1, buf_dn);
175 #endif
176 
177  if (do_comm[mu] == 1) {
178  chset_send.append(chsend_up[mu]);
179  chset_send.append(chsend_dn[mu]);
180  chset_recv.append(chrecv_up[mu]);
181  chset_recv.append(chrecv_dn[mu]);
182  }
183  }
184 }
185 
186 
187 //====================================================================
188 template<typename AFIELD>
190  const Parameters& params)
191 {
192  string gmset_type;
193  double mq, M0;
194  int Ns;
195  std::vector<int> bc;
196  double b, c;
197 
198  int err_optional = 0;
199  err_optional += params.fetch_string("gamma_matrix_type", gmset_type);
200  if (!err_optional) {
201  if (gmset_type != m_repr) {
202  vout.crucial(m_vl, "%s: unsupported gamma_matrix_type: %s\n",
203  class_name.c_str(), gmset_type.c_str());
204  exit(EXIT_FAILURE);
205  }
206  }
207 
208  int err = 0;
209  err += params.fetch_double("quark_mass", mq);
210  err += params.fetch_double("domain_wall_height", M0);
211  err += params.fetch_int("extent_of_5th_dimension", Ns);
212  err += params.fetch_int_vector("boundary_condition", bc);
213  err += params.fetch_double("coefficient_b", b);
214  err += params.fetch_double("coefficient_c", c);
215 
216  if (err) {
217  vout.crucial(m_vl, "Error at %s: input parameter not found.\n",
218  class_name.c_str());
219  exit(EXIT_FAILURE);
220  }
221 
222  set_parameters(mq, M0, Ns, bc, b, c);
223 }
224 
225 
226 //====================================================================
227 template<typename AFIELD>
229  const double mq,
230  const double M0,
231  const int Ns,
232  const vector<int> bc,
233  const double b,
234  const double c)
235 {
236  assert(bc.size() == m_Ndim);
237 
238 #pragma omp barrier
239 
240  int ith = ThreadManager::get_thread_id();
241 
242  if (ith == 0) {
243  m_M0 = real_t(M0);
244  m_mq = real_t(mq);
245  m_Ns = Ns;
246  m_NinF = m_Nvcd * m_Ns;
247 
248  if (m_boundary.size() != m_Ndim) m_boundary.resize(m_Ndim);
249  for (int mu = 0; mu < m_Ndim; ++mu) {
250  m_boundary[mu] = bc[mu];
251  }
252 
253  if (m_b.size() != m_Ns) {
254  m_b.resize(m_Ns);
255  m_c.resize(m_Ns);
256  }
257  for (int is = 0; is < m_Ns; ++is) {
258  m_b[is] = real_t(b);
259  m_c[is] = real_t(c);
260  }
261  }
262 
263  vout.general(m_vl, "Parameters of %s:\n", class_name.c_str());
264  vout.general(m_vl, " mq = %8.4f\n", m_mq);
265  vout.general(m_vl, " M0 = %8.4f\n", m_M0);
266  vout.general(m_vl, " Ns = %4d\n", m_Ns);
267  for (int mu = 0; mu < m_Ndim; ++mu) {
268  vout.general(m_vl, " boundary[%d] = %2d\n", mu, m_boundary[mu]);
269  }
270  vout.general(m_vl, " coefficients b = %16.10f c = %16.10f\n",
271  m_b[0], m_c[0]);
272 
273  set_precond_parameters();
274 
275  // working 5d vectors.
276  if (m_y1.nin() != m_NinF) {
277  if (ith == 0) {
278  m_y1.reset(m_NinF, m_Nst2, 1);
279  m_v1.reset(m_NinF, m_Nst2, 1);
280  m_v2.reset(m_NinF, m_Nst2, 1);
281  }
282  }
283 
284 #pragma omp barrier
285 }
286 
287 
288 //====================================================================
289 template<typename AFIELD>
291 {
292 #pragma omp barrier
293 
294  int ith = ThreadManager::get_thread_id();
295 
296  if (ith == 0) {
297  if (m_dp.size() != m_Ns) {
298  m_dp.resize(m_Ns);
299  m_dpinv.resize(m_Ns);
300  m_dm.resize(m_Ns);
301  m_e.resize(m_Ns - 1);
302  m_f.resize(m_Ns - 1);
303  }
304 
305  for (int is = 0; is < m_Ns; ++is) {
306  m_dp[is] = 1.0 + m_b[is] * (4.0 - m_M0);
307  m_dm[is] = 1.0 - m_c[is] * (4.0 - m_M0);
308  }
309 
310  m_e[0] = m_mq * m_dm[m_Ns - 1] / m_dp[0];
311  m_f[0] = m_mq * m_dm[0];
312  for (int is = 1; is < m_Ns - 1; ++is) {
313  m_e[is] = m_e[is - 1] * m_dm[is - 1] / m_dp[is];
314  m_f[is] = m_f[is - 1] * m_dm[is] / m_dp[is - 1];
315  }
316 
317  m_g = m_e[m_Ns - 2] * m_dm[m_Ns - 2];
318 
319  for (int is = 0; is < m_Ns - 1; ++is) {
320  m_dpinv[is] = 1.0 / m_dp[is];
321  }
322  m_dpinv[m_Ns - 1] = 1.0 / (m_dp[m_Ns - 1] + m_g);
323  }
324 
325 #pragma omp barrier
326 }
327 
328 
329 //====================================================================
330 template<typename AFIELD>
332  const std::vector<double> vec_b,
333  const std::vector<double> vec_c)
334 {
335 #pragma omp barrier
336 
337  if ((vec_b.size() != m_Ns) || (vec_c.size() != m_Ns)) {
338  vout.crucial(m_vl, "%s: size of coefficient vectors incorrect.\n",
339  class_name.c_str());
340  }
341 
342  vout.general(m_vl, "%s: coefficient vectors are set:\n",
343  class_name.c_str());
344 
345  int ith = ThreadManager::get_thread_id();
346 
347  if (ith == 0) {
348  for (int is = 0; is < m_Ns; ++is) {
349  m_b[is] = real_t(vec_b[is]);
350  m_c[is] = real_t(vec_c[is]);
351  }
352  }
353 
354 #pragma omp barrier
355 
356  for (int is = 0; is < m_Ns; ++is) {
357  vout.general(m_vl, "b[%2d] = %16.10f c[%2d] = %16.10f\n",
358  is, m_b[is], is, m_c[is]);
359  }
360 
361  set_precond_parameters();
362 }
363 
364 
365 //====================================================================
366 template<typename AFIELD>
368 {
369  int nth = ThreadManager::get_num_threads();
370 
371  vout.detailed(m_vl, "%s: set_config is called: num_threads = %d\n",
372  class_name.c_str(), nth);
373 
374  if (nth > 1) {
375  set_config_impl(u);
376  } else {
377  set_config_omp(u);
378  }
379 
380  vout.detailed(m_vl, "%s: set_config finished\n", class_name.c_str());
381 }
382 
383 
384 //====================================================================
385 template<typename AFIELD>
387 {
388  vout.detailed(m_vl, " set_config_omp is called.\n");
389 
390 #pragma omp parallel
391  {
392  set_config_impl(u);
393  }
394 }
395 
396 
397 //====================================================================
398 template<typename AFIELD>
400 {
401 #pragma omp barrier
402 
403  AIndex_lex<real_t, QXS> index_lex;
404  convert_gauge(index_lex, m_Ulex, *u);
405 
406  QXS_Gauge::set_boundary(m_Ulex, m_boundary);
407 
408  AIndex_eo<real_t, QXS> index_eo;
409 
410  int ith, nth, is, ns;
411  set_threadtask_mult(ith, nth, is, ns, m_Nvol);
412 
413  for (int ex = 0; ex < m_Ndim; ++ex) {
414  for (int site = is; site < ns; ++site) {
415  for (int in = 0; in < m_Ndf; ++in) {
416  int iv1 = index_lex.idx(in, m_Ndf, site, ex);
417  int iv2 = index_eo.idx(in, m_Ndf, site, ex);
418  m_Ueo.set(iv2, m_Ulex.cmp(iv1));
419  }
420  }
421  }
422 
423 #pragma omp barrier
424 }
425 
426 
427 //====================================================================
428 
429 /*
430 template<typename AFIELD>
431 void AFopr_Domainwall_5din_eo<AFIELD>::set_boundary_config(
432  AFIELD& U,
433  const int mu)
434 { // this function may be called inside parallel region
435 
436  int ith, nth, is, ns;
437  set_threadtask_mult(ith, nth, is, ns, m_Nvol);
438 
439  AIndex_lex<real_t,AFIELD::IMPL> index_lex;
440 
441  int ipe[4], Nsize[4], Lsize[4];
442  for(int i = 0; i < m_Ndim; ++i){
443  ipe[i] = Communicator::ipe(i);
444  Nsize[i] = CommonParameters::Nsize(i);
445  Lsize[i] = CommonParameters::Lsize(i);
446  }
447 
448  real_t bc = (real_t)(m_boundary[mu]);
449 
450  int j[4];
451  for(int site = is; site < ns; ++site){
452  int x = site % m_Nx;
453  int yzt = site/m_Nx;
454  int y = yzt % m_Ny;
455  int z = (yzt/m_Ny) % m_Nz;
456  int t = yzt/(m_Ny*m_Nz);
457  j[0] = ipe[0] * Nsize[0] + x;
458  j[1] = ipe[1] * Nsize[1] + y;
459  j[2] = ipe[2] * Nsize[2] + z;
460  j[3] = ipe[3] * Nsize[3] + t;
461 
462  if(j[mu] == Lsize[mu]-1){
463  for(int in = 0; in < m_Ndf; ++in){
464  int i = index_lex.idx_G(in, site, mu);
465  real_t uv = bc * U.cmp(i);
466  U.set(i, uv);
467  }
468  }
469 
470  }
471 
472 #pragma omp barrier
473 
474 }
475 */
476 //====================================================================
477 template<typename AFIELD>
479  const Field& w)
480 { // the following implementation only applies Dirac repr.
481  int Nvol = v.nvol();
482 
483  int ith, nth, site0, site1;
484  set_threadtask_mult(ith, nth, site0, site1, Nvol);
485 
487 
488 #pragma omp barrier
489 
490  for (int site = site0; site < site1; ++site) {
491  for (int is = 0; is < m_Ns; ++is) {
492  for (int ic = 0; ic < NC; ++ic) {
493  for (int id = 0; id < ND2; ++id) {
494  for (int iri = 0; iri < 2; ++iri) {
495  int in_org = iri + 2 * (ic + NC * id);
496  int in_alt = iri + 2 * (id + ND * ic) + NVCD * is;
497  v.set(index.idx(in_alt, m_NinF, site, 0),
498  real_t(w.cmp(in_org, site, is)));
499  }
500  }
501 
502  for (int id = ND2; id < ND; ++id) {
503  for (int iri = 0; iri < 2; ++iri) {
504  int in_org = iri + 2 * (ic + NC * id);
505  int in_alt = iri + 2 * (id + ND * ic) + NVCD * is;
506  v.set(index.idx(in_alt, m_NinF, site, 0),
507  real_t(-w.cmp(in_org, site, is)));
508  }
509  }
510  }
511  }
512  }
513 
514 #pragma omp barrier
515 }
516 
517 
518 //====================================================================
519 template<typename AFIELD>
521  const AFIELD& w)
522 { // the following implementation only applies Dirac repr.
523  int Nvol = v.nvol();
524 
525  int ith, nth, site0, site1;
526  set_threadtask_mult(ith, nth, site0, site1, Nvol);
527 
529 
530 #pragma omp barrier
531 
532  for (int site = site0; site < site1; ++site) {
533  for (int is = 0; is < m_Ns; ++is) {
534  for (int ic = 0; ic < NC; ++ic) {
535  for (int id = 0; id < ND2; ++id) {
536  for (int iri = 0; iri < 2; ++iri) {
537  int in_org = iri + 2 * (ic + NC * id);
538  int in_alt = iri + 2 * (id + ND * ic) + NVCD * is;
539  v.set(in_org, site, is,
540  double( w.cmp(index.idx(in_alt, m_NinF, site, 0))));
541  }
542  }
543 
544  for (int id = ND2; id < ND; ++id) {
545  for (int iri = 0; iri < 2; ++iri) {
546  int in_org = iri + 2 * (ic + NC * id);
547  int in_alt = iri + 2 * (id + ND * ic) + NVCD * is;
548  v.set(in_org, site, is,
549  double( -w.cmp(index.idx(in_alt, m_NinF, site, 0))));
550  }
551  }
552  }
553  }
554  }
555 
556 #pragma omp barrier
557 }
558 
559 
560 //====================================================================
561 template<typename AFIELD>
563 {
564 #pragma omp barrier
565 
566  int ith = ThreadManager::get_thread_id();
567  if (ith == 0) m_mode = mode;
568 
569 #pragma omp barrier
570 }
571 
572 
573 //====================================================================
574 template<typename AFIELD>
576 {
577  if (m_mode == "D") {
578  D(v, w);
579  } else if (m_mode == "Ddag") {
580  Ddag(v, w);
581  } else if (m_mode == "DdagD") {
582  DdagD(v, w);
583  } else {
584  vout.crucial(m_vl, "mode undeifined in %s.\n", class_name.c_str());
585  abort();
586  }
587 }
588 
589 
590 //====================================================================
591 template<typename AFIELD>
593  const AFIELD& w)
594 {
595  if (m_mode == "D") {
596  Ddag(v, w);
597  } else if (m_mode == "Ddag") {
598  D(v, w);
599  } else if (m_mode == "DdagD") {
600  DdagD(v, w);
601  } else {
602  vout.crucial(m_vl, "mode undeifined in %s.\n", class_name.c_str());
603  abort();
604  }
605 }
606 
607 
608 //====================================================================
609 template<typename AFIELD>
611  const AFIELD& w,
612  std::string mode)
613 {
614  assert(w.check_size(m_NinF, m_Nst2, 1));
615  assert(v.check_size(m_NinF, m_Nst2, 1));
616 
617  if (mode == "Deo") {
618  D_eo(v, w, 0);
619  } else if (mode == "Doe") {
620  D_eo(v, w, 1);
621  } else if (mode == "Dee") {
622  D_ee(v, w, 0);
623  } else if (mode == "Doo") {
624  D_ee(v, w, 1);
625  } else if (mode == "Dee_inv") {
626  D_ee_inv(v, w, 0);
627  } else if (mode == "Doo_inv") {
628  D_ee_inv(v, w, 1);
629  } else {
630  std::cout << "mode undeifined in AFopr_Domainwall_eo.\n";
631  abort();
632  }
633 }
634 
635 
636 //====================================================================
637 template<typename AFIELD>
639  const AFIELD& w,
640  std::string mode)
641 {
642  assert(w.check_size(m_NinF, m_Nst2, 1));
643  assert(v.check_size(m_NinF, m_Nst2, 1));
644 
645  if (mode == "Deo") {
646  Ddag_eo(v, w, 0);
647  } else if (mode == "Doe") {
648  Ddag_eo(v, w, 1);
649  } else if (mode == "Dee") {
650  Ddag_ee(v, w, 0);
651  } else if (mode == "Doo") {
652  Ddag_ee(v, w, 1);
653  } else if (mode == "Dee_inv") {
654  Ddag_ee_inv(v, w, 0);
655  } else if (mode == "Doo_inv") {
656  Ddag_ee_inv(v, w, 1);
657  } else {
658  std::cout << "mode undeifined in AFopr_Domainwall_eo.\n";
659  abort();
660  }
661 }
662 
663 
664 //====================================================================
665 template<typename AFIELD>
667  const AFIELD& w)
668 {
669  D_eo(m_v1, w, 1);
670  L_inv(m_v2, m_v1);
671  U_inv(m_v1, m_v2);
672  D_eo(m_v2, m_v1, 0);
673  L_inv(m_v1, m_v2);
674  U_inv(m_v2, m_v1);
675 
676  copy(m_v1, w);
677  axpy(m_v1, real_t(-1.0), m_v2);
678 #pragma omp barrier
679 
680  Udag_inv(v, m_v1);
681  Ldag_inv(m_v2, v);
682  Ddag_eo(v, m_v2, 1);
683  Udag_inv(m_v2, v);
684  Ldag_inv(v, m_v2);
685  Ddag_eo(m_v2, v, 0);
686 
687  copy(v, m_v1);
688  axpy(v, real_t(-1.0), m_v2);
689 #pragma omp barrier
690 }
691 
692 
693 //====================================================================
694 template<typename AFIELD>
696 {
697  D_eo(m_v1, w, 1);
698  L_inv(m_v2, m_v1);
699  U_inv(m_v1, m_v2);
700  D_eo(m_v2, m_v1, 0);
701  L_inv(m_v1, m_v2);
702  U_inv(m_v2, m_v1);
703 
704  copy(v, w);
705  axpy(v, real_t(-1.0), m_v2);
706 #pragma omp barrier
707 }
708 
709 
710 //====================================================================
711 template<typename AFIELD>
713 {
714 #pragma omp barrier
715 
716  Udag_inv(m_v1, w);
717  Ldag_inv(m_v2, m_v1);
718  Ddag_eo(m_v1, m_v2, 1);
719  Udag_inv(m_v2, m_v1);
720  Ldag_inv(m_v1, m_v2);
721  Ddag_eo(m_v2, m_v1, 0);
722 
723  copy(v, w);
724  axpy(v, real_t(-1.0), m_v2);
725 #pragma omp barrier
726 }
727 
728 
729 //====================================================================
730 template<typename AFIELD>
732  const AFIELD& w,
733  const int ieo)
734 { // ieo = 0: even < odd, ieo = 1: odd <- even
735  mult_D_eo(v, w, ieo);
736 }
737 
738 
739 //====================================================================
740 template<typename AFIELD>
742  const AFIELD& w,
743  const int ieo)
744 { // ieo = 0: even < odd, ieo = 1: odd <- even
745  mult_Ddag_eo(v, w, ieo);
746 }
747 
748 
749 //====================================================================
750 template<typename AFIELD>
752  const AFIELD& w,
753  const int ieo)
754 { // ieo = 0: even < odd, ieo = 1: odd <- even
755  real_t *vp = v.ptr(0);
756  real_t *wp = const_cast<AFIELD *>(&w)->ptr(0);
757  real_t *yp = m_y1.ptr(0); // working vector
758  real_t *up = m_Ueo.ptr(0);
759 
760  int ith = ThreadManager::get_thread_id();
761 
762 #pragma omp barrier
763 
764  BridgeQXS::mult_domainwall_5din_eo_clear(vp, m_Ns, m_Nsize);
765 
767  m_mq, m_M0, m_Ns, &m_boundary[0],
768  &m_b[0], &m_c[0],
769  m_Nsize, do_comm);
770 
771 #pragma omp barrier
772 
773  if (do_comm_any > 0) {
774  if (ith == 0) chset_recv.start();
775 
776  real_t *buf1_xp = (real_t *)chsend_dn[0].ptr();
777  real_t *buf1_xm = (real_t *)chsend_up[0].ptr();
778  real_t *buf1_yp = (real_t *)chsend_dn[1].ptr();
779  real_t *buf1_ym = (real_t *)chsend_up[1].ptr();
780  real_t *buf1_zp = (real_t *)chsend_dn[2].ptr();
781  real_t *buf1_zm = (real_t *)chsend_up[2].ptr();
782  real_t *buf1_tp = (real_t *)chsend_dn[3].ptr();
783  real_t *buf1_tm = (real_t *)chsend_up[3].ptr();
784 
786  buf1_xp, buf1_xm, buf1_yp, buf1_ym,
787  buf1_zp, buf1_zm, buf1_tp, buf1_tm,
788  up, yp,
789  m_mq, m_M0, m_Ns, &m_boundary[0],
790  &m_Leo[0], m_Nsize, do_comm, ieo);
791 
792 #pragma omp barrier
793 
794  if (ith == 0) chset_send.start();
795  }
796 
798  m_mq, m_M0, m_Ns, &m_boundary[0],
799  &m_b[0], &m_c[0],
800  &m_Leo[0], m_Nsize, do_comm, ieo);
801 
802  if (do_comm_any > 0) {
803  if (ith == 0) chset_recv.wait();
804 
805 #pragma omp barrier
806 
807  real_t *buf2_xp = (real_t *)chrecv_up[0].ptr();
808  real_t *buf2_xm = (real_t *)chrecv_dn[0].ptr();
809  real_t *buf2_yp = (real_t *)chrecv_up[1].ptr();
810  real_t *buf2_ym = (real_t *)chrecv_dn[1].ptr();
811  real_t *buf2_zp = (real_t *)chrecv_up[2].ptr();
812  real_t *buf2_zm = (real_t *)chrecv_dn[2].ptr();
813  real_t *buf2_tp = (real_t *)chrecv_up[3].ptr();
814  real_t *buf2_tm = (real_t *)chrecv_dn[3].ptr();
815 
817  buf2_xp, buf2_xm, buf2_yp, buf2_ym,
818  buf2_zp, buf2_zm, buf2_tp, buf2_tm,
819  m_mq, m_M0, m_Ns, &m_boundary[0],
820  &m_Leo[0], m_Nsize, do_comm, ieo);
821 
822  if (ith == 0) chset_send.wait();
823  }
824 
825 #pragma omp barrier
826 }
827 
828 
829 //====================================================================
830 template<typename AFIELD>
832  const AFIELD& w,
833  const int ieo)
834 { // ieo = 0: even < odd, ieo = 1: odd <- even
835  real_t *vp = v.ptr(0);
836  real_t *wp = const_cast<AFIELD *>(&w)->ptr(0);
837  real_t *yp = m_y1.ptr(0); // working vector
838  real_t *up = m_Ueo.ptr(0);
839 
840  int ith = ThreadManager::get_thread_id();
841 
842 #pragma omp barrier
843 
845 
846  BridgeQXS::mult_domainwall_5din_eo_clear(yp, m_Ns, m_Nsize);
847 
848 #pragma omp barrier
849 
850  if (do_comm_any > 0) {
851  if (ith == 0) chset_recv.start();
852 
853  real_t *buf1_xp = (real_t *)chsend_dn[0].ptr();
854  real_t *buf1_xm = (real_t *)chsend_up[0].ptr();
855  real_t *buf1_yp = (real_t *)chsend_dn[1].ptr();
856  real_t *buf1_ym = (real_t *)chsend_up[1].ptr();
857  real_t *buf1_zp = (real_t *)chsend_dn[2].ptr();
858  real_t *buf1_zm = (real_t *)chsend_up[2].ptr();
859  real_t *buf1_tp = (real_t *)chsend_dn[3].ptr();
860  real_t *buf1_tm = (real_t *)chsend_up[3].ptr();
861 
863  buf1_xp, buf1_xm, buf1_yp, buf1_ym,
864  buf1_zp, buf1_zm, buf1_tp, buf1_tm,
865  up, vp,
866  m_mq, m_M0, m_Ns, &m_boundary[0],
867  &m_Leo[0], m_Nsize, do_comm, ieo);
868 
869 #pragma omp barrier
870 
871  if (ith == 0) chset_send.start();
872  }
873 
875  m_mq, m_M0, m_Ns, &m_boundary[0],
876  &m_b[0], &m_c[0],
877  &m_Leo[0], m_Nsize, do_comm, ieo);
878 
879  if (do_comm_any > 0) {
880  if (ith == 0) chset_recv.wait();
881 
882 #pragma omp barrier
883 
884  real_t *buf2_xp = (real_t *)chrecv_up[0].ptr();
885  real_t *buf2_xm = (real_t *)chrecv_dn[0].ptr();
886  real_t *buf2_yp = (real_t *)chrecv_up[1].ptr();
887  real_t *buf2_ym = (real_t *)chrecv_dn[1].ptr();
888  real_t *buf2_zp = (real_t *)chrecv_up[2].ptr();
889  real_t *buf2_zm = (real_t *)chrecv_dn[2].ptr();
890  real_t *buf2_tp = (real_t *)chrecv_up[3].ptr();
891  real_t *buf2_tm = (real_t *)chrecv_dn[3].ptr();
892 
894  buf2_xp, buf2_xm, buf2_yp, buf2_ym,
895  buf2_zp, buf2_zm, buf2_tp, buf2_tm,
896  m_mq, m_M0, m_Ns, &m_boundary[0],
897  &m_Leo[0], m_Nsize, do_comm, ieo);
898 
899  if (ith == 0) chset_send.wait();
900  }
901 
902 #pragma omp barrier
903 
905  m_mq, m_M0, m_Ns, &m_boundary[0],
906  &m_b[0], &m_c[0],
907  m_Nsize, do_comm);
908 
909 #pragma omp barrier
910 }
911 
912 
913 //====================================================================
914 template<typename AFIELD>
916  const AFIELD& w,
917  const int ieo)
918 {
919 #pragma omp barrier
920  L_inv(m_v1, w);
921  U_inv(v, m_v1);
922 }
923 
924 
925 //====================================================================
926 template<typename AFIELD>
928  const AFIELD& w,
929  const int ieo)
930 {
931 #pragma omp barrier
932  Udag_inv(m_v1, w);
933  Ldag_inv(v, m_v1);
934 }
935 
936 
937 //====================================================================
938 template<typename AFIELD>
940  const AFIELD& w,
941  const int ieo)
942 { // ieo = 0: even < odd, ieo = 1: odd <- even (no difference)
943  int Nin4 = VLEN * NVCD;
944  int Nin5 = Nin4 * m_Ns;
945 
946  real_t *vp = v.ptr(0);
947  real_t *wp = const_cast<AFIELD *>(&w)->ptr(0);
948 
949  int ith, nth, site0, site1;
950  set_threadtask_mult(ith, nth, site0, site1, m_Nst2v);
951 
952 #pragma omp barrier
953 
954  for (int site = site0; site < site1; ++site) {
955  real_t *vp2 = &vp[Nin5 * site];
956  real_t *wp2 = &wp[Nin5 * site];
957 
958  Vsimd_t vL[NVCD], wL[NVCD];
959 
960  for (int is = 0; is < m_Ns; ++is) {
961  real_t FF1 = m_b[is] * (4.0 - m_M0) + 1.0;
962  real_t FF2 = m_c[is] * (4.0 - m_M0) - 1.0;
963 
964  load_vec(wL, &wp2[Nin4 * is], NVCD);
965  set_vec(vL, FF1, wL, NVCD);
966 
967  int is_up = (is + 1) % m_Ns;
968  real_t Fup = 0.5 * FF2;
969  if (is == m_Ns - 1) Fup *= -m_mq;
970  load_vec(wL, &wp2[Nin4 * is_up], NVCD);
971  add_aPm5_dirac_vec(vL, Fup, wL, NC);
972 
973  int is_dn = (is - 1 + m_Ns) % m_Ns;
974  real_t Fdn = 0.5 * FF2;
975  if (is == 0) Fdn *= -m_mq;
976  load_vec(wL, &wp2[Nin4 * is_dn], NVCD);
977  add_aPp5_dirac_vec(vL, Fdn, wL, NC);
978 
979  save_vec(&vp2[Nin4 * is], vL, NVCD);
980  }
981  }
982 
983 #pragma omp barrier
984 }
985 
986 
987 //====================================================================
988 template<typename AFIELD>
990  const AFIELD& w,
991  const int ieo)
992 { // ieo = 0: even < odd, ieo = 1: odd <- even
993  int Nin4 = VLEN * NVCD;
994  int Nin5 = Nin4 * m_Ns;
995 
996  real_t *vp = v.ptr(0);
997  real_t *wp = const_cast<AFIELD *>(&w)->ptr(0);
998 
999  int ith, nth, site0, site1;
1000  set_threadtask_mult(ith, nth, site0, site1, m_Nst2v);
1001 
1002 #pragma omp barrier
1003 
1004  for (int site = site0; site < site1; ++site) {
1005  real_t *vp2 = &vp[Nin5 * site];
1006  real_t *wp2 = &wp[Nin5 * site];
1007 
1008  Vsimd_t vL[NVCD], wL[NVCD];
1009 
1010  for (int is = 0; is < m_Ns; ++is) {
1011  real_t FF1 = m_b[is] * (4.0 - m_M0) + 1.0;
1012  load_vec(vL, &wp2[Nin4 * is], NVCD);
1013  scal_vec(vL, FF1, NVCD);
1014 
1015  int is_up = (is + 1) % m_Ns;
1016  real_t Fup = 0.5 * (m_c[is_up] * (4.0 - m_M0) - 1.0);
1017  if (is == m_Ns - 1) Fup *= -m_mq;
1018  load_vec(wL, &wp2[Nin4 * is_up], NVCD);
1019  add_aPp5_dirac_vec(vL, Fup, wL, NC);
1020 
1021  int is_dn = (is - 1 + m_Ns) % m_Ns;
1022  real_t Fdn = 0.5 * (m_c[is_dn] * (4.0 - m_M0) - 1.0);
1023  if (is == 0) Fdn *= -m_mq;
1024  load_vec(wL, &wp2[Nin4 * is_dn], NVCD);
1025  add_aPm5_dirac_vec(vL, Fdn, wL, NC);
1026 
1027  save_vec(&vp2[Nin4 * is], vL, NVCD);
1028  }
1029  }
1030 
1031 #pragma omp barrier
1032 }
1033 
1034 
1035 //====================================================================
1036 template<typename AFIELD>
1038  const AFIELD& w)
1039 {
1040  real_t *vp = v.ptr(0);
1041  real_t *wp = const_cast<AFIELD *>(&w)->ptr(0);
1042 
1044  vp, wp, m_Ns, m_Nsize,
1045  &m_e[0], &m_dpinv[0], &m_dm[0]);
1046 }
1047 
1048 
1049 //====================================================================
1050 template<typename AFIELD>
1052  const AFIELD& w)
1053 {
1054  real_t *vp = v.ptr(0);
1055  real_t *wp = const_cast<AFIELD *>(&w)->ptr(0);
1056 
1058  vp, wp, m_Ns, m_Nsize,
1059  &m_f[0], &m_dpinv[0], &m_dm[0]);
1060 }
1061 
1062 
1063 //====================================================================
1064 template<typename AFIELD>
1066  const AFIELD& w)
1067 {
1068  real_t *vp = v.ptr(0);
1069  real_t *wp = const_cast<AFIELD *>(&w)->ptr(0);
1070 
1072  vp, wp, m_Ns, m_Nsize,
1073  &m_f[0], &m_dpinv[0], &m_dm[0]);
1074 }
1075 
1076 
1077 //====================================================================
1078 template<typename AFIELD>
1080  const AFIELD& w)
1081 {
1082  real_t *vp = v.ptr(0);
1083  real_t *wp = const_cast<AFIELD *>(&w)->ptr(0);
1084 
1086  vp, wp, m_Ns, m_Nsize,
1087  &m_e[0], &m_dpinv[0], &m_dm[0]);
1088 }
1089 
1090 
1091 //====================================================================
1092 template<typename AFIELD>
1094 {
1095  // flop counting of this class is not confirmed.
1096 
1097  int Lvol = CommonParameters::Lvol();
1098  double vsite = static_cast<double>(Lvol);
1099  double vNs = static_cast<double>(m_Ns);
1100 
1101  double flop_Wilson_hop;
1102  double flop_LU_inv;
1103  double flop_pre;
1104  int Nc = CommonParameters::Nc();
1105  int Nd = CommonParameters::Nd();
1106  if (m_repr == "Dirac") {
1107  flop_Wilson_hop = static_cast<double>(
1108  vNs * Nc * Nd * (6 * (4 * Nc + 2) + 2 * (4 * Nc + 1))) * vsite;
1109  flop_pre = static_cast<double>(vNs * Nc * Nd * 14) * vsite;
1110  flop_LU_inv = static_cast<double>(Nc * Nd * (2 + (vNs - 1) * 26)) * vsite;
1111  } else if (m_repr == "Chiral") {
1112  flop_Wilson_hop = static_cast<double>(
1113  vNs * Nc * Nd * (8 * (4 * Nc + 2))) * vsite;
1114  flop_pre = static_cast<double>(vNs * Nc * Nd * 6) * vsite;
1115  flop_LU_inv = static_cast<double>(Nc * Nd * (2 + (vNs - 1) * 10)) * vsite;
1116  }
1117  double flop_axpy = static_cast<double>(vNs * 2 * Nc * Nd) * vsite;
1118 
1119  // double axpy1 = static_cast<double>(2 * m_NinF);
1120  // double scal1 = static_cast<double>(1 * m_NinF);
1121  // double flop_DW = vNs * (flop_Wilson + vsite*(6*axpy1 + 2*scal1));
1122  // In Ddag case, flop_Wilson + 7 axpy which equals flop_DW.
1123  double flop_Deo = flop_Wilson_hop + flop_pre;
1124 
1125 
1126  // double flop_LU_inv = 2.0 * vsite *
1127  // ((3.0*axpy1 + scal1)*(vNs-1.0) + axpy1 + 2.0*scal1);
1128 
1129  double flop = 0.0;
1130  if ((mode == "D") || (mode == "Ddag")) {
1131  flop = flop_Deo + flop_LU_inv + 0.5 * flop_axpy; // axpy is for 1 - (Deo etc)
1132  } else if (mode == "DdagD") {
1133  flop = 2 * flop_Deo + 2 * flop_LU_inv + flop_axpy;
1134  } else if ((mode == "Dee_inv") || (mode == "Doo_inv")) {
1135  flop = 0.5 * flop_LU_inv; // 0.5 is for even-odd
1136  } else if ((mode == "Dee") || (mode == "Doo")) {
1137  flop = 0.5 * flop_pre;
1138  } else if ((mode == "Doe") || (mode == "Doe")) {
1139  flop = 0.5 * flop_Deo; // 0.5 is for even-odd
1140  } else {
1141  vout.crucial(m_vl, "Error at %s: input mode is undefined: %s.\n",
1142  class_name.c_str(), mode.c_str());
1143  exit(EXIT_FAILURE);
1144  }
1145 
1146  return flop;
1147 }
1148 
1149 
1150 //============================================================END=====
AFopr_Domainwall_5din_eo::flop_count
double flop_count()
this returns the number of floating point number operations.
Definition: afopr_Domainwall_5din_eo.h:171
CommonParameters::Ny
static int Ny()
Definition: commonParameters.h:106
afield-inc.h
CommonParameters::Nz
static int Nz()
Definition: commonParameters.h:107
CommonParameters::Lvol
static long_t Lvol()
Definition: commonParameters.h:95
AFopr_Domainwall_5din_eo::init
void init(const Parameters &params)
initial setup.
Definition: afopr_Domainwall_5din_eo-tmpl.h:17
BridgeQXS::mult_domainwall_5din_eo_hop2_dirac
void mult_domainwall_5din_eo_hop2_dirac(double *vp, double *up, double *wp, double *buf2_xp, double *buf2_xm, double *buf2_yp, double *buf2_ym, double *buf2_zp, double *buf2_zm, double *buf2_tp, double *buf2_tm, double mq, double M0, int Ns, int *bc, int *Leo, int *Nsize, int *do_comm, const int ieo)
Definition: mult_Domainwall_5din_eo_qxs-inc.h:916
ThreadManager::get_num_threads
static int get_num_threads()
returns available number of threads.
Definition: threadManager.cpp:246
AFopr_Domainwall_5din_eo::U_inv
void U_inv(AFIELD &, const AFIELD &)
Definition: afopr_Domainwall_5din_eo-tmpl.h:1051
CommonParameters::Ndim
static int Ndim()
Definition: commonParameters.h:117
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
AFopr_Domainwall_5din_eo::set_precond_parameters
void set_precond_parameters()
set parameters for preconditioning.
Definition: afopr_Domainwall_5din_eo-tmpl.h:290
AIndex_lex
Definition: aindex_lex_base.h:17
AFopr_Domainwall_5din_eo::set_config_impl
void set_config_impl(Field *u)
setting gauge configuration (implementation).
Definition: afopr_Domainwall_5din_eo-tmpl.h:399
AFopr_Domainwall_5din_eo::Udag_inv
void Udag_inv(AFIELD &, const AFIELD &)
Definition: afopr_Domainwall_5din_eo-tmpl.h:1065
AFopr_Domainwall_5din_eo::mult
void mult(AFIELD &v, const AFIELD &w)
multiplies fermion operator to a given field.
Definition: afopr_Domainwall_5din_eo-tmpl.h:575
Bridge::BridgeIO::decrease_indent
void decrease_indent()
Definition: bridgeIO.h:86
AFopr_Domainwall_5din_eo::Ldag_inv
void Ldag_inv(AFIELD &, const AFIELD &)
Definition: afopr_Domainwall_5din_eo-tmpl.h:1079
NVCD
#define NVCD
Definition: define_params_SU3.h:20
AFopr_Domainwall_5din_eo::set_config_omp
void set_config_omp(Field *u)
setting gauge configuration (setting omp parallel).
Definition: afopr_Domainwall_5din_eo-tmpl.h:386
AFopr_Domainwall_5din_eo::mult_dag
void mult_dag(AFIELD &v, const AFIELD &w)
hermitian conjugate of mult.
Definition: afopr_Domainwall_5din_eo-tmpl.h:592
Bridge::BridgeIO::increase_indent
void increase_indent()
Definition: bridgeIO.h:85
VLEN
#define VLEN
Definition: bridgeQXS_Clover_coarse_double.cpp:12
Bridge::BridgeIO::detailed
void detailed(const char *format,...)
Definition: bridgeIO.cpp:219
Field::check_size
bool check_size(const int nin, const int nvol, const int nex) const
checking size parameters. [23 May 2016 H.Matsufuru]
Definition: field.h:135
AFopr_Domainwall_5din_eo::convert
void convert(AFIELD &, const Field &)
convert Field to AField for this class.
Definition: afopr_Domainwall_5din_eo-tmpl.h:478
CommonParameters::Nvol
static int Nvol()
Definition: commonParameters.h:109
AFopr_Domainwall_5din_eo::set_mode
void set_mode(std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
Definition: afopr_Domainwall_5din_eo-tmpl.h:562
convert_gauge
void convert_gauge(INDEX &index, FIELD &v, const Field &w)
Definition: afield-inc.h:224
AFopr_Domainwall_5din_eo
Optimal Domain-wall fermion operator.
Definition: afopr_Domainwall_5din_eo.h:35
Vsimd_t
Definition: vsimd_double-inc.h:13
AFopr_Domainwall_5din_eo::reverse
void reverse(Field &, const AFIELD &)
reverse AField to Field.
Definition: afopr_Domainwall_5din_eo-tmpl.h:520
axpy
void axpy(Field &y, const double a, const Field &x)
axpy(y, a, x): y := a * x + y
Definition: field.cpp:380
AFopr_Domainwall_5din_eo::Ddag_ee_inv
void Ddag_ee_inv(AFIELD &, const AFIELD &, const int ieo)
Definition: afopr_Domainwall_5din_eo-tmpl.h:927
BridgeQXS::mult_domainwall_5din_eo_5dirdag_dirac
void mult_domainwall_5din_eo_5dirdag_dirac(double *vp, double *yp, double mq, double M0, int Ns, int *bc, double *b, double *c, int *Nsize, int *do_comm)
real_t
double real_t
Definition: bridgeQXS_Clover_coarse_double.cpp:16
AFopr_Domainwall_5din_eo::Ddag
void Ddag(AFIELD &, const AFIELD &)
Definition: afopr_Domainwall_5din_eo-tmpl.h:712
AFopr_Domainwall_5din_eo::setup_channels
void setup_channels()
setup channels for communication.
Definition: afopr_Domainwall_5din_eo-tmpl.h:155
copy
void copy(Field &y, const Field &x)
copy(y, x): y = x
Definition: field.cpp:212
BridgeQXS::mult_domainwall_5din_eo_Ldag_inv_dirac
void mult_domainwall_5din_eo_Ldag_inv_dirac(real_t *vp, real_t *wp, int Ns, int *Nsize, real_t *e, real_t *dpinv, real_t *dm)
CommonParameters::Nx
static int Nx()
Definition: commonParameters.h:105
AFopr_Domainwall_5din_eo::mult_Ddag_eo
void mult_Ddag_eo(AFIELD &, const AFIELD &, const int ieo)
Definition: afopr_Domainwall_5din_eo-tmpl.h:831
AFopr_Domainwall_5din_eo::L_inv
void L_inv(AFIELD &, const AFIELD &)
Definition: afopr_Domainwall_5din_eo-tmpl.h:1037
CommonParameters::Nc
static int Nc()
Definition: commonParameters.h:115
AFopr_Domainwall_5din_eo::D_ee_inv
void D_ee_inv(AFIELD &, const AFIELD &, const int ieo)
Definition: afopr_Domainwall_5din_eo-tmpl.h:915
NC
#define NC
Definition: field_F_imp_SU2-inc.h:2
AFopr_Domainwall_5din_eo::DdagD
void DdagD(AFIELD &, const AFIELD &)
Definition: afopr_Domainwall_5din_eo-tmpl.h:666
QXS_Gauge::set_boundary
void set_boundary(AField< REALTYPE, QXS > &ulex, const std::vector< int > &boundary)
Definition: afield_Gauge-inc.h:24
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
Communicator::npe
static int npe(const int dir)
logical grid extent
Definition: communicator.cpp:112
AFopr_Domainwall_5din_eo::Ddag_ee
void Ddag_ee(AFIELD &, const AFIELD &, const int ieo)
Definition: afopr_Domainwall_5din_eo-tmpl.h:989
AFopr_Domainwall_5din_eo::tidyup
void tidyup()
final tidyup.
Definition: afopr_Domainwall_5din_eo-tmpl.h:147
ND
#define ND
Definition: field_F_imp_SU2-inc.h:5
AFopr_Domainwall_5din_eo::set_parameters
void set_parameters(const Parameters &params)
sets parameters by a Parameter object: to be implemented in a subclass.
Definition: afopr_Domainwall_5din_eo-tmpl.h:189
AFopr_Domainwall_5din_eo::D_eo
void D_eo(AFIELD &, const AFIELD &, const int ieo)
Definition: afopr_Domainwall_5din_eo-tmpl.h:731
Field::nvol
int nvol() const
Definition: field.h:127
BridgeQXS::mult_domainwall_5din_eo_Udag_inv_dirac
void mult_domainwall_5din_eo_Udag_inv_dirac(real_t *vp, real_t *wp, int Ns, int *Nsize, real_t *f, real_t *dpinv, real_t *dm)
BridgeQXS::mult_domainwall_5din_eo_5dir_dirac
void mult_domainwall_5din_eo_5dir_dirac(double *yp, double *wp, double mq, double M0, int Ns, int *bc, double *b, double *c, int *Nsize, int *do_comm)
AFopr_Domainwall_5din_eo::mult_D_eo
void mult_D_eo(AFIELD &, const AFIELD &, const int ieo)
Definition: afopr_Domainwall_5din_eo-tmpl.h:751
Field::cmp
double cmp(const int jin, const int site, const int jex) const
Definition: field.h:143
VLENY
#define VLENY
Definition: bridgeQXS_Clover_coarse_double.cpp:14
Field::ptr
const double * ptr(const int jin, const int site, const int jex) const
Definition: field.h:153
AFopr_Domainwall_5din_eo::set_config
void set_config(Field *U)
setting gauge configuration (common interface).
Definition: afopr_Domainwall_5din_eo-tmpl.h:367
AFopr_Domainwall_5din_eo::Ddag_eo
void Ddag_eo(AFIELD &, const AFIELD &, const int ieo)
Definition: afopr_Domainwall_5din_eo-tmpl.h:741
AFopr_Domainwall_5din_eo::real_t
AFIELD::real_t real_t
Definition: afopr_Domainwall_5din_eo.h:38
CommonParameters::Nd
static int Nd()
Definition: commonParameters.h:116
CommonParameters::Vlevel
static Bridge::VerboseLevel Vlevel()
Definition: commonParameters.h:122
BridgeQXS::mult_domainwall_5din_eo_U_inv_dirac
void mult_domainwall_5din_eo_U_inv_dirac(real_t *vp, real_t *wp, int Ns, int *Nsize, real_t *f, real_t *dpinv, real_t *dm)
Bridge::BridgeIO::set_verbose_level
static VerboseLevel set_verbose_level(const std::string &str)
Definition: bridgeIO.cpp:133
BridgeQXS::mult_domainwall_5din_eo_L_inv_dirac
void mult_domainwall_5din_eo_L_inv_dirac(real_t *vp, real_t *wp, int Ns, int *Nsize, real_t *e, real_t *dpinv, real_t *dm)
BridgeQXS::mult_domainwall_5din_eo_mult_gm5_dirac
void mult_domainwall_5din_eo_mult_gm5_dirac(double *vp, double *wp, int Ns, int *Nsize)
VLENX
#define VLENX
Definition: bridgeQXS_Clover_coarse_double.cpp:13
AFopr_Domainwall_5din_eo::D_ee
void D_ee(AFIELD &, const AFIELD &, const int ieo)
Definition: afopr_Domainwall_5din_eo-tmpl.h:939
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
AFopr_Domainwall_5din_eo::D
void D(AFIELD &, const AFIELD &)
Definition: afopr_Domainwall_5din_eo-tmpl.h:695
Bridge::BridgeIO::crucial
void crucial(const char *format,...)
Definition: bridgeIO.cpp:180
Field
Container of Field-type object.
Definition: field.h:46
BridgeQXS::mult_domainwall_5din_eo_hop1_dirac
void mult_domainwall_5din_eo_hop1_dirac(double *buf1_xp, double *buf1_xm, double *buf1_yp, double *buf1_ym, double *buf1_zp, double *buf1_zm, double *buf1_tp, double *buf1_tm, double *up, double *wp, double mq, double M0, int Ns, int *bc, int *Leo, int *Nsize, int *do_comm, const int ieo)
Definition: mult_Domainwall_5din_eo_qxs-inc.h:511
ThreadManager::get_thread_id
static int get_thread_id()
returns thread id.
Definition: threadManager.cpp:253
BridgeQXS::mult_domainwall_5din_eo_hopb_dirac
void mult_domainwall_5din_eo_hopb_dirac(double *vp, double *up, double *wp, double mq, double M0, int Ns, int *bc, double *b, double *c, int *Leo, int *Nsize, int *do_comm, const int ieo)
Definition: mult_Domainwall_5din_eo_qxs-inc.h:252
ND2
#define ND2
Definition: define_params_SU3.h:18
BridgeQXS::mult_domainwall_5din_eo_clear
void mult_domainwall_5din_eo_clear(double *vp, int Ns, int *Nsize)
Definition: mult_Domainwall_5din_eo_qxs-inc.h:145
Parameters::fetch_int
int fetch_int(const string &key, int &value) const
Definition: parameters.cpp:346
Bridge::BridgeIO::general
void general(const char *format,...)
Definition: bridgeIO.cpp:200
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
AFopr_Domainwall_5din_eo::set_coefficients
void set_coefficients(const std::vector< double > b, const std::vector< double > c)
set coefficients if they depend in s.
Definition: afopr_Domainwall_5din_eo-tmpl.h:331
AIndex_eo
Definition: aindex_eo_base.h:17