Bridge++  Ver.2.1.3
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>
562 void AFopr_Domainwall_5din_eo<AFIELD>::set_mode(std::string mode)
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 if (m_mode == "Deo") {
584  D_eo(v, w, 0);
585  } else if (m_mode == "Doe") {
586  D_eo(v, w, 1);
587  } else if (m_mode == "Dee") {
588  D_ee(v, w, 0);
589  } else if (m_mode == "Doo") {
590  D_ee(v, w, 1);
591  } else if (m_mode == "Dee_inv") {
592  D_ee_inv(v, w, 0);
593  } else if (m_mode == "Doo_inv") {
594  D_ee_inv(v, w, 1);
595  } else {
596  vout.crucial(m_vl, "mode undeifined in %s.\n", class_name.c_str());
597  abort();
598  }
599 }
600 
601 
602 //====================================================================
603 template<typename AFIELD>
605  const AFIELD& w)
606 {
607  if (m_mode == "D") {
608  Ddag(v, w);
609  } else if (m_mode == "Ddag") {
610  D(v, w);
611  } else if (m_mode == "DdagD") {
612  DdagD(v, w);
613  } else if (m_mode == "Deo") {
614  Ddag_eo(v, w, 0);
615  } else if (m_mode == "Doe") {
616  Ddag_eo(v, w, 1);
617  } else if (m_mode == "Dee") {
618  Ddag_ee(v, w, 0);
619  } else if (m_mode == "Doo") {
620  Ddag_ee(v, w, 1);
621  } else if (m_mode == "Dee_inv") {
622  Ddag_ee_inv(v, w, 0);
623  } else if (m_mode == "Doo_inv") {
624  Ddag_ee_inv(v, w, 1);
625  } else {
626  vout.crucial(m_vl, "mode undeifined in %s.\n", class_name.c_str());
627  abort();
628  }
629 }
630 
631 
632 //====================================================================
633 template<typename AFIELD>
635  const AFIELD& w,
636  std::string mode)
637 {
638  assert(w.check_size(m_NinF, m_Nst2, 1));
639  assert(v.check_size(m_NinF, m_Nst2, 1));
640 
641  if (mode == "Deo") {
642  D_eo(v, w, 0);
643  } else if (mode == "Doe") {
644  D_eo(v, w, 1);
645  } else if (mode == "Dee") {
646  D_ee(v, w, 0);
647  } else if (mode == "Doo") {
648  D_ee(v, w, 1);
649  } else if (mode == "Dee_inv") {
650  D_ee_inv(v, w, 0);
651  } else if (mode == "Doo_inv") {
652  D_ee_inv(v, w, 1);
653  } else {
654  std::cout << "mode undeifined in AFopr_Domainwall_eo.\n";
655  abort();
656  }
657 }
658 
659 
660 //====================================================================
661 template<typename AFIELD>
663  const AFIELD& w,
664  std::string mode)
665 {
666  assert(w.check_size(m_NinF, m_Nst2, 1));
667  assert(v.check_size(m_NinF, m_Nst2, 1));
668 
669  if (mode == "Deo") {
670  Ddag_eo(v, w, 0);
671  } else if (mode == "Doe") {
672  Ddag_eo(v, w, 1);
673  } else if (mode == "Dee") {
674  Ddag_ee(v, w, 0);
675  } else if (mode == "Doo") {
676  Ddag_ee(v, w, 1);
677  } else if (mode == "Dee_inv") {
678  Ddag_ee_inv(v, w, 0);
679  } else if (mode == "Doo_inv") {
680  Ddag_ee_inv(v, w, 1);
681  } else {
682  std::cout << "mode undeifined in AFopr_Domainwall_eo.\n";
683  abort();
684  }
685 }
686 
687 
688 //====================================================================
689 template<typename AFIELD>
691  const AFIELD& w)
692 {
693  D_eo(m_v1, w, 1);
694  L_inv(m_v2, m_v1);
695  U_inv(m_v1, m_v2);
696  D_eo(m_v2, m_v1, 0);
697  L_inv(m_v1, m_v2);
698  U_inv(m_v2, m_v1);
699 
700  copy(m_v1, w);
701  axpy(m_v1, real_t(-1.0), m_v2);
702 #pragma omp barrier
703 
704  Udag_inv(v, m_v1);
705  Ldag_inv(m_v2, v);
706  Ddag_eo(v, m_v2, 1);
707  Udag_inv(m_v2, v);
708  Ldag_inv(v, m_v2);
709  Ddag_eo(m_v2, v, 0);
710 
711  copy(v, m_v1);
712  axpy(v, real_t(-1.0), m_v2);
713 #pragma omp barrier
714 }
715 
716 
717 //====================================================================
718 template<typename AFIELD>
720 {
721  D_eo(m_v1, w, 1);
722  L_inv(m_v2, m_v1);
723  U_inv(m_v1, m_v2);
724  D_eo(m_v2, m_v1, 0);
725  L_inv(m_v1, m_v2);
726  U_inv(m_v2, m_v1);
727 
728  copy(v, w);
729  axpy(v, real_t(-1.0), m_v2);
730 #pragma omp barrier
731 }
732 
733 
734 //====================================================================
735 template<typename AFIELD>
737 {
738 #pragma omp barrier
739 
740  Udag_inv(m_v1, w);
741  Ldag_inv(m_v2, m_v1);
742  Ddag_eo(m_v1, m_v2, 1);
743  Udag_inv(m_v2, m_v1);
744  Ldag_inv(m_v1, m_v2);
745  Ddag_eo(m_v2, m_v1, 0);
746 
747  copy(v, w);
748  axpy(v, real_t(-1.0), m_v2);
749 #pragma omp barrier
750 }
751 
752 
753 //====================================================================
754 template<typename AFIELD>
756  const AFIELD& w,
757  const int ieo)
758 { // ieo = 0: even < odd, ieo = 1: odd <- even
759  mult_D_eo(v, w, ieo);
760 }
761 
762 
763 //====================================================================
764 template<typename AFIELD>
766  const AFIELD& w,
767  const int ieo)
768 { // ieo = 0: even < odd, ieo = 1: odd <- even
769  mult_Ddag_eo(v, w, ieo);
770 }
771 
772 
773 //====================================================================
774 template<typename AFIELD>
776  const AFIELD& w,
777  const int ieo)
778 { // ieo = 0: even < odd, ieo = 1: odd <- even
779  real_t *vp = v.ptr(0);
780  real_t *wp = const_cast<AFIELD *>(&w)->ptr(0);
781  real_t *yp = m_y1.ptr(0); // working vector
782  real_t *up = m_Ueo.ptr(0);
783 
784  int ith = ThreadManager::get_thread_id();
785 
786 #pragma omp barrier
787 
788  BridgeQXS::mult_domainwall_5din_eo_clear(vp, m_Ns, m_Nsize);
789 
791  m_mq, m_M0, m_Ns, &m_boundary[0],
792  &m_b[0], &m_c[0],
793  m_Nsize, do_comm);
794 
795 #pragma omp barrier
796 
797  if (do_comm_any > 0) {
798  if (ith == 0) chset_recv.start();
799 
800  real_t *buf1_xp = (real_t *)chsend_dn[0].ptr();
801  real_t *buf1_xm = (real_t *)chsend_up[0].ptr();
802  real_t *buf1_yp = (real_t *)chsend_dn[1].ptr();
803  real_t *buf1_ym = (real_t *)chsend_up[1].ptr();
804  real_t *buf1_zp = (real_t *)chsend_dn[2].ptr();
805  real_t *buf1_zm = (real_t *)chsend_up[2].ptr();
806  real_t *buf1_tp = (real_t *)chsend_dn[3].ptr();
807  real_t *buf1_tm = (real_t *)chsend_up[3].ptr();
808 
810  buf1_xp, buf1_xm, buf1_yp, buf1_ym,
811  buf1_zp, buf1_zm, buf1_tp, buf1_tm,
812  up, yp,
813  m_mq, m_M0, m_Ns, &m_boundary[0],
814  &m_Leo[0], m_Nsize, do_comm, ieo);
815 
816 #pragma omp barrier
817 
818  if (ith == 0) chset_send.start();
819  }
820 
822  m_mq, m_M0, m_Ns, &m_boundary[0],
823  &m_b[0], &m_c[0],
824  &m_Leo[0], m_Nsize, do_comm, ieo);
825 
826  if (do_comm_any > 0) {
827  if (ith == 0) chset_recv.wait();
828 
829 #pragma omp barrier
830 
831  real_t *buf2_xp = (real_t *)chrecv_up[0].ptr();
832  real_t *buf2_xm = (real_t *)chrecv_dn[0].ptr();
833  real_t *buf2_yp = (real_t *)chrecv_up[1].ptr();
834  real_t *buf2_ym = (real_t *)chrecv_dn[1].ptr();
835  real_t *buf2_zp = (real_t *)chrecv_up[2].ptr();
836  real_t *buf2_zm = (real_t *)chrecv_dn[2].ptr();
837  real_t *buf2_tp = (real_t *)chrecv_up[3].ptr();
838  real_t *buf2_tm = (real_t *)chrecv_dn[3].ptr();
839 
841  buf2_xp, buf2_xm, buf2_yp, buf2_ym,
842  buf2_zp, buf2_zm, buf2_tp, buf2_tm,
843  m_mq, m_M0, m_Ns, &m_boundary[0],
844  &m_Leo[0], m_Nsize, do_comm, ieo);
845 
846  if (ith == 0) chset_send.wait();
847  }
848 
849 #pragma omp barrier
850 }
851 
852 
853 //====================================================================
854 template<typename AFIELD>
856  const AFIELD& w,
857  const int ieo)
858 { // ieo = 0: even < odd, ieo = 1: odd <- even
859  real_t *vp = v.ptr(0);
860  real_t *wp = const_cast<AFIELD *>(&w)->ptr(0);
861  real_t *yp = m_y1.ptr(0); // working vector
862  real_t *up = m_Ueo.ptr(0);
863 
864  int ith = ThreadManager::get_thread_id();
865 
866 #pragma omp barrier
867 
869 
870  BridgeQXS::mult_domainwall_5din_eo_clear(yp, m_Ns, m_Nsize);
871 
872 #pragma omp barrier
873 
874  if (do_comm_any > 0) {
875  if (ith == 0) chset_recv.start();
876 
877  real_t *buf1_xp = (real_t *)chsend_dn[0].ptr();
878  real_t *buf1_xm = (real_t *)chsend_up[0].ptr();
879  real_t *buf1_yp = (real_t *)chsend_dn[1].ptr();
880  real_t *buf1_ym = (real_t *)chsend_up[1].ptr();
881  real_t *buf1_zp = (real_t *)chsend_dn[2].ptr();
882  real_t *buf1_zm = (real_t *)chsend_up[2].ptr();
883  real_t *buf1_tp = (real_t *)chsend_dn[3].ptr();
884  real_t *buf1_tm = (real_t *)chsend_up[3].ptr();
885 
887  buf1_xp, buf1_xm, buf1_yp, buf1_ym,
888  buf1_zp, buf1_zm, buf1_tp, buf1_tm,
889  up, vp,
890  m_mq, m_M0, m_Ns, &m_boundary[0],
891  &m_Leo[0], m_Nsize, do_comm, ieo);
892 
893 #pragma omp barrier
894 
895  if (ith == 0) chset_send.start();
896  }
897 
899  m_mq, m_M0, m_Ns, &m_boundary[0],
900  &m_b[0], &m_c[0],
901  &m_Leo[0], m_Nsize, do_comm, ieo);
902 
903  if (do_comm_any > 0) {
904  if (ith == 0) chset_recv.wait();
905 
906 #pragma omp barrier
907 
908  real_t *buf2_xp = (real_t *)chrecv_up[0].ptr();
909  real_t *buf2_xm = (real_t *)chrecv_dn[0].ptr();
910  real_t *buf2_yp = (real_t *)chrecv_up[1].ptr();
911  real_t *buf2_ym = (real_t *)chrecv_dn[1].ptr();
912  real_t *buf2_zp = (real_t *)chrecv_up[2].ptr();
913  real_t *buf2_zm = (real_t *)chrecv_dn[2].ptr();
914  real_t *buf2_tp = (real_t *)chrecv_up[3].ptr();
915  real_t *buf2_tm = (real_t *)chrecv_dn[3].ptr();
916 
918  buf2_xp, buf2_xm, buf2_yp, buf2_ym,
919  buf2_zp, buf2_zm, buf2_tp, buf2_tm,
920  m_mq, m_M0, m_Ns, &m_boundary[0],
921  &m_Leo[0], m_Nsize, do_comm, ieo);
922 
923  if (ith == 0) chset_send.wait();
924  }
925 
926 #pragma omp barrier
927 
929  m_mq, m_M0, m_Ns, &m_boundary[0],
930  &m_b[0], &m_c[0],
931  m_Nsize, do_comm);
932 
933 #pragma omp barrier
934 }
935 
936 
937 //====================================================================
938 template<typename AFIELD>
940  const AFIELD& w,
941  const int ieo)
942 {
943 #pragma omp barrier
944  L_inv(m_v1, w);
945  U_inv(v, m_v1);
946 }
947 
948 
949 //====================================================================
950 template<typename AFIELD>
952  const AFIELD& w,
953  const int ieo)
954 {
955 #pragma omp barrier
956  Udag_inv(m_v1, w);
957  Ldag_inv(v, m_v1);
958 }
959 
960 
961 //====================================================================
962 template<typename AFIELD>
964  const AFIELD& w,
965  const int ieo)
966 { // ieo = 0: even < odd, ieo = 1: odd <- even (no difference)
967  int Nin4 = VLEN * NVCD;
968  int Nin5 = Nin4 * m_Ns;
969 
970  real_t *vp = v.ptr(0);
971  real_t *wp = const_cast<AFIELD *>(&w)->ptr(0);
972 
973  int ith, nth, site0, site1;
974  set_threadtask_mult(ith, nth, site0, site1, m_Nst2v);
975 
976 #pragma omp barrier
977 
978  for (int site = site0; site < site1; ++site) {
979  real_t *vp2 = &vp[Nin5 * site];
980  real_t *wp2 = &wp[Nin5 * site];
981 
982  Vsimd_t vL[NVCD], wL[NVCD];
983 
984  for (int is = 0; is < m_Ns; ++is) {
985  real_t FF1 = m_b[is] * (4.0 - m_M0) + 1.0;
986  real_t FF2 = m_c[is] * (4.0 - m_M0) - 1.0;
987 
988  load_vec(wL, &wp2[Nin4 * is], NVCD);
989  set_vec(vL, FF1, wL, NVCD);
990 
991  int is_up = (is + 1) % m_Ns;
992  real_t Fup = 0.5 * FF2;
993  if (is == m_Ns - 1) Fup *= -m_mq;
994  load_vec(wL, &wp2[Nin4 * is_up], NVCD);
995  add_aPm5_dirac_vec(vL, Fup, wL, NC);
996 
997  int is_dn = (is - 1 + m_Ns) % m_Ns;
998  real_t Fdn = 0.5 * FF2;
999  if (is == 0) Fdn *= -m_mq;
1000  load_vec(wL, &wp2[Nin4 * is_dn], NVCD);
1001  add_aPp5_dirac_vec(vL, Fdn, wL, NC);
1002 
1003  save_vec(&vp2[Nin4 * is], vL, NVCD);
1004  }
1005  }
1006 
1007 #pragma omp barrier
1008 }
1009 
1010 
1011 //====================================================================
1012 template<typename AFIELD>
1014  const AFIELD& w,
1015  const int ieo)
1016 { // ieo = 0: even < odd, ieo = 1: odd <- even
1017  int Nin4 = VLEN * NVCD;
1018  int Nin5 = Nin4 * m_Ns;
1019 
1020  real_t *vp = v.ptr(0);
1021  real_t *wp = const_cast<AFIELD *>(&w)->ptr(0);
1022 
1023  int ith, nth, site0, site1;
1024  set_threadtask_mult(ith, nth, site0, site1, m_Nst2v);
1025 
1026 #pragma omp barrier
1027 
1028  for (int site = site0; site < site1; ++site) {
1029  real_t *vp2 = &vp[Nin5 * site];
1030  real_t *wp2 = &wp[Nin5 * site];
1031 
1032  Vsimd_t vL[NVCD], wL[NVCD];
1033 
1034  for (int is = 0; is < m_Ns; ++is) {
1035  real_t FF1 = m_b[is] * (4.0 - m_M0) + 1.0;
1036  load_vec(vL, &wp2[Nin4 * is], NVCD);
1037  scal_vec(vL, FF1, NVCD);
1038 
1039  int is_up = (is + 1) % m_Ns;
1040  real_t Fup = 0.5 * (m_c[is_up] * (4.0 - m_M0) - 1.0);
1041  if (is == m_Ns - 1) Fup *= -m_mq;
1042  load_vec(wL, &wp2[Nin4 * is_up], NVCD);
1043  add_aPp5_dirac_vec(vL, Fup, wL, NC);
1044 
1045  int is_dn = (is - 1 + m_Ns) % m_Ns;
1046  real_t Fdn = 0.5 * (m_c[is_dn] * (4.0 - m_M0) - 1.0);
1047  if (is == 0) Fdn *= -m_mq;
1048  load_vec(wL, &wp2[Nin4 * is_dn], NVCD);
1049  add_aPm5_dirac_vec(vL, Fdn, wL, NC);
1050 
1051  save_vec(&vp2[Nin4 * is], vL, NVCD);
1052  }
1053  }
1054 
1055 #pragma omp barrier
1056 }
1057 
1058 
1059 //====================================================================
1060 template<typename AFIELD>
1062  const AFIELD& w)
1063 {
1064  real_t *vp = v.ptr(0);
1065  real_t *wp = const_cast<AFIELD *>(&w)->ptr(0);
1066 
1068  vp, wp, m_Ns, m_Nsize,
1069  &m_e[0], &m_dpinv[0], &m_dm[0]);
1070 }
1071 
1072 
1073 //====================================================================
1074 template<typename AFIELD>
1076  const AFIELD& w)
1077 {
1078  real_t *vp = v.ptr(0);
1079  real_t *wp = const_cast<AFIELD *>(&w)->ptr(0);
1080 
1082  vp, wp, m_Ns, m_Nsize,
1083  &m_f[0], &m_dpinv[0], &m_dm[0]);
1084 }
1085 
1086 
1087 //====================================================================
1088 template<typename AFIELD>
1090  const AFIELD& w)
1091 {
1092  real_t *vp = v.ptr(0);
1093  real_t *wp = const_cast<AFIELD *>(&w)->ptr(0);
1094 
1096  vp, wp, m_Ns, m_Nsize,
1097  &m_f[0], &m_dpinv[0], &m_dm[0]);
1098 }
1099 
1100 
1101 //====================================================================
1102 template<typename AFIELD>
1104  const AFIELD& w)
1105 {
1106  real_t *vp = v.ptr(0);
1107  real_t *wp = const_cast<AFIELD *>(&w)->ptr(0);
1108 
1110  vp, wp, m_Ns, m_Nsize,
1111  &m_e[0], &m_dpinv[0], &m_dm[0]);
1112 }
1113 
1114 
1115 //====================================================================
1116 template<typename AFIELD>
1117 double AFopr_Domainwall_5din_eo<AFIELD>::flop_count(std::string mode)
1118 {
1119  // flop counting of this class is not confirmed.
1120 
1121  int Lvol = CommonParameters::Lvol();
1122  double vsite = static_cast<double>(Lvol);
1123  double vNs = static_cast<double>(m_Ns);
1124 
1125  double flop_Wilson_hop;
1126  double flop_LU_inv;
1127  double flop_pre;
1128  int Nc = CommonParameters::Nc();
1129  int Nd = CommonParameters::Nd();
1130  if (m_repr == "Dirac") {
1131  flop_Wilson_hop = static_cast<double>(
1132  vNs * Nc * Nd * (6 * (4 * Nc + 2) + 2 * (4 * Nc + 1))) * vsite;
1133  flop_pre = static_cast<double>(vNs * Nc * Nd * 14) * vsite;
1134  flop_LU_inv = static_cast<double>(Nc * Nd * (2 + (vNs - 1) * 26)) * vsite;
1135  } else if (m_repr == "Chiral") {
1136  flop_Wilson_hop = static_cast<double>(
1137  vNs * Nc * Nd * (8 * (4 * Nc + 2))) * vsite;
1138  flop_pre = static_cast<double>(vNs * Nc * Nd * 6) * vsite;
1139  flop_LU_inv = static_cast<double>(Nc * Nd * (2 + (vNs - 1) * 10)) * vsite;
1140  }
1141  double flop_axpy = static_cast<double>(vNs * 2 * Nc * Nd) * vsite;
1142 
1143  // double axpy1 = static_cast<double>(2 * m_NinF);
1144  // double scal1 = static_cast<double>(1 * m_NinF);
1145  // double flop_DW = vNs * (flop_Wilson + vsite*(6*axpy1 + 2*scal1));
1146  // In Ddag case, flop_Wilson + 7 axpy which equals flop_DW.
1147  double flop_Deo = flop_Wilson_hop + flop_pre;
1148 
1149 
1150  // double flop_LU_inv = 2.0 * vsite *
1151  // ((3.0*axpy1 + scal1)*(vNs-1.0) + axpy1 + 2.0*scal1);
1152 
1153  double flop = 0.0;
1154  if ((mode == "D") || (mode == "Ddag")) {
1155  flop = flop_Deo + flop_LU_inv + 0.5 * flop_axpy; // axpy is for 1 - (Deo etc)
1156  } else if (mode == "DdagD") {
1157  flop = 2 * flop_Deo + 2 * flop_LU_inv + flop_axpy;
1158  } else if ((mode == "Dee_inv") || (mode == "Doo_inv")) {
1159  flop = 0.5 * flop_LU_inv; // 0.5 is for even-odd
1160  } else if ((mode == "Dee") || (mode == "Doo")) {
1161  flop = 0.5 * flop_pre;
1162  } else if ((mode == "Doe") || (mode == "Doe")) {
1163  flop = 0.5 * flop_Deo; // 0.5 is for even-odd
1164  } else {
1165  vout.crucial(m_vl, "Error at %s: input mode is undefined: %s.\n",
1166  class_name.c_str(), mode.c_str());
1167  exit(EXIT_FAILURE);
1168  }
1169 
1170  return flop;
1171 }
1172 
1173 
1174 //============================================================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:189
CommonParameters::Ny
static int Ny()
Definition: commonParameters.h:106
CommonParameters::Nz
static int Nz()
Definition: commonParameters.h:107
CommonParameters::Lvol
static long_t Lvol()
Definition: commonParameters.h:95
convert_gauge
void convert_gauge(INDEX &index, AFIELD &v, const Field &w)
Definition: afield-inc.h:223
AFopr_Domainwall_5din_eo::init
void init(const Parameters &params)
initial setup.
Definition: afopr_Domainwall_5din_eo-tmpl.h:31
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:1075
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:440
AIndex_lex
Definition: aindex_lex_base.h:17
AFopr_Domainwall_5din_eo::Udag_inv
void Udag_inv(AFIELD &, const AFIELD &)
Definition: afopr_Domainwall_5din_eo-tmpl.h:1089
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:634
Bridge::BridgeIO::decrease_indent
void decrease_indent()
Definition: bridgeIO.cpp:518
AFopr_Domainwall_5din_eo::Ldag_inv
void Ldag_inv(AFIELD &, const AFIELD &)
Definition: afopr_Domainwall_5din_eo-tmpl.h:1103
NVCD
#define NVCD
Definition: define_params_SU3.h:20
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:674
afield-inc.h
Bridge::BridgeIO::increase_indent
void increase_indent()
Definition: bridgeIO.cpp:508
VLEN
#define VLEN
Definition: bridgeQXS_Clover_coarse_double.cpp:12
Bridge::BridgeIO::detailed
void detailed(const char *format,...)
Definition: bridgeIO.cpp:281
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:555
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:620
AFopr_Domainwall_5din_eo
Domain-wall fermion operator with even-odd site index.
Definition: afopr_Domainwall_5din_eo.h:41
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:587
axpy
void axpy(Field &y, const double a, const Field &x)
axpy(y, a, x): y := a * x + y
Definition: field.cpp:381
AFopr_Domainwall_5din_eo::Ddag_ee_inv
void Ddag_ee_inv(AFIELD &, const AFIELD &, const int ieo)
Definition: afopr_Domainwall_5din_eo-tmpl.h:1330
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)
AFopr_Domainwall_5din_eo::Ddag
void Ddag(AFIELD &, const AFIELD &)
Definition: afopr_Domainwall_5din_eo-tmpl.h:806
AFopr_Domainwall_5din_eo::setup_channels
void setup_channels()
Definition: afopr_Domainwall_5din_eo-tmpl.h:194
copy
void copy(Field &y, const Field &x)
copy(y, x): y = x
Definition: field.cpp:213
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)
AFopr_Domainwall_5din_eo::set_coefficients
void set_coefficients(const std::vector< real_t > b, const std::vector< real_t > c)
set coefficients if they depend in s.
Definition: afopr_Domainwall_5din_eo-tmpl.h:409
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:855
AFopr_Domainwall_5din_eo::L_inv
void L_inv(AFIELD &, const AFIELD &)
Definition: afopr_Domainwall_5din_eo-tmpl.h:1061
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:1317
NC
#define NC
Definition: field_F_imp_SU2-inc.h:15
AFopr_Domainwall_5din_eo::DdagD
void DdagD(AFIELD &, const AFIELD &)
Definition: afopr_Domainwall_5din_eo-tmpl.h:771
QXS_Gauge::set_boundary
void set_boundary(AField< REALTYPE, QXS > &ulex, const std::vector< int > &boundary)
Definition: afield_Gauge-inc.h:32
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:1221
AFopr_Domainwall_5din_eo::tidyup
void tidyup()
final tidyup.
Definition: afopr_Domainwall_5din_eo-tmpl.h:151
ND
#define ND
Definition: field_F_imp_SU2-inc.h:18
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:246
AFopr_Domainwall_5din_eo::D_eo
void D_eo(AFIELD &, const AFIELD &, const int ieo)
Definition: afopr_Domainwall_5din_eo-tmpl.h:942
Field::nvol
int nvol() const
Definition: field.h:127
real_t
double real_t
Definition: bridgeACC_AField_double.cpp:14
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::set_config_impl
void set_config_impl(Field *U)
Definition: afopr_Domainwall_5din_eo-tmpl.h:544
AFopr_Domainwall_5din_eo::mult_D_eo
void mult_D_eo(AFIELD &, const AFIELD &, const int ieo)
Definition: afopr_Domainwall_5din_eo-tmpl.h:775
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)
sets the gauge configuration.
Definition: afopr_Domainwall_5din_eo-tmpl.h:514
AFopr_Domainwall_5din_eo::Ddag_eo
void Ddag_eo(AFIELD &, const AFIELD &, const int ieo)
Definition: afopr_Domainwall_5din_eo-tmpl.h:1069
AFopr_Domainwall_5din_eo::real_t
AFIELD::real_t real_t
Definition: afopr_Domainwall_5din_eo.h:44
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:195
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:1199
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:793
AFopr_Domainwall_5din_eo::set_config_omp
void set_config_omp(Field *U)
Definition: afopr_Domainwall_5din_eo-tmpl.h:532
Bridge::BridgeIO::crucial
void crucial(const char *format,...)
Definition: bridgeIO.cpp:242
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:262
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:572
AIndex_eo
Definition: aindex_eo_base.h:17