Bridge++  Version 1.4.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
corr2pt_4spinor.cpp
Go to the documentation of this file.
1 
14 #include "corr2pt_4spinor.h"
15 
16 const std::string Corr2pt_4spinor::class_name = "Corr2pt_4spinor";
17 
18 //====================================================================
20 {
21  m_filename_output = params.get_string("filename_output");
22  if (m_filename_output.empty()) {
23  m_filename_output = "stdout";
24  }
25 
26  const string str_vlevel = params.get_string("verbose_level");
27  m_vl = vout.set_verbose_level(str_vlevel);
28 }
29 
30 
31 //====================================================================
33 {
34  assert(CommonParameters::Nc() == 3);
35 
36  int Nc = 3;
37  int n;
38 
39  m_filename_output = "stdout";
40 
41  m_epsilon_index.resize(Nc * 6);
42 
43  n = 0;
44  m_epsilon_index[Nc * n] = 0;
45  m_epsilon_index[1 + Nc * n] = 1;
46  m_epsilon_index[2 + Nc * n] = 2;
47 
48  n = 1;
49  m_epsilon_index[Nc * n] = 1;
50  m_epsilon_index[1 + Nc * n] = 2;
51  m_epsilon_index[2 + Nc * n] = 0;
52 
53  n = 2;
54  m_epsilon_index[Nc * n] = 2;
55  m_epsilon_index[1 + Nc * n] = 0;
56  m_epsilon_index[2 + Nc * n] = 1;
57 
58  n = 3;
59  m_epsilon_index[Nc * n] = 2;
60  m_epsilon_index[1 + Nc * n] = 1;
61  m_epsilon_index[2 + Nc * n] = 0;
62 
63  n = 4;
64  m_epsilon_index[Nc * n] = 1;
65  m_epsilon_index[1 + Nc * n] = 0;
66  m_epsilon_index[2 + Nc * n] = 2;
67 
68  n = 5;
69  m_epsilon_index[Nc * n] = 0;
70  m_epsilon_index[1 + Nc * n] = 2;
71  m_epsilon_index[2 + Nc * n] = 1;
72 }
73 
74 
75 //====================================================================
76 double Corr2pt_4spinor::meson_all(const std::vector<Field_F>& sq1,
77  const std::vector<Field_F>& sq2)
78 {
79  int Lt = CommonParameters::Lt();
80 
81  std::vector<dcomplex> corr(Lt);
82  GammaMatrix gm_src, gm_sink;
83 
84  std::ostream& log_file_previous = vout.getStream();
85  std::ofstream log_file;
86 
87  if (m_filename_output != "stdout") {
88  log_file.open(m_filename_output.c_str(), std::ios::app);
89  vout.init(log_file);
90  }
91 
92 
93  gm_src = m_gmset->get_GM(m_gmset->GAMMA5);
94  gm_sink = m_gmset->get_GM(m_gmset->GAMMA5);
95  vout.general(m_vl, "PS <-- PS correlator:\n");
96  meson_correlator(corr, gm_sink, gm_src, sq1, sq2);
97  double result = real(corr[0]);
98 
99  gm_src = m_gmset->get_GM(m_gmset->GAMMA1);
100  gm_sink = m_gmset->get_GM(m_gmset->GAMMA1);
101  vout.general(m_vl, "V1 <-- V1 correlator:\n");
102  meson_correlator(corr, gm_sink, gm_src, sq1, sq2);
103 
104  gm_src = m_gmset->get_GM(m_gmset->GAMMA2);
105  gm_sink = m_gmset->get_GM(m_gmset->GAMMA2);
106  vout.general(m_vl, "V2 <-- V2 correlator:\n");
107  meson_correlator(corr, gm_sink, gm_src, sq1, sq2);
108 
109  gm_src = m_gmset->get_GM(m_gmset->GAMMA3);
110  gm_sink = m_gmset->get_GM(m_gmset->GAMMA3);
111  vout.general(m_vl, "V3 <-- V3 correlator:\n");
112  meson_correlator(corr, gm_sink, gm_src, sq1, sq2);
113 
114  gm_src = m_gmset->get_GM(m_gmset->GAMMA5);
115  gm_sink = m_gmset->get_GM(m_gmset->GAMMA45);
116  vout.general(m_vl, "A4 <-- PS correlator:\n");
117  meson_correlator(corr, gm_sink, gm_src, sq1, sq2);
118 
119  gm_src = m_gmset->get_GM(m_gmset->GAMMA54);
120  gm_sink = m_gmset->get_GM(m_gmset->GAMMA5);
121  vout.general(m_vl, "PS <-- A4 correlator:\n");
122  meson_correlator(corr, gm_sink, gm_src, sq1, sq2);
123 
124  gm_src = m_gmset->get_GM(m_gmset->UNITY);
125  gm_sink = m_gmset->get_GM(m_gmset->UNITY);
126  vout.general(m_vl, "S <-- S correlator:\n");
127  meson_correlator(corr, gm_sink, gm_src, sq1, sq2);
128 
129  gm_src = m_gmset->get_GM(m_gmset->GAMMA51);
130  gm_sink = m_gmset->get_GM(m_gmset->GAMMA51);
131  vout.general(m_vl, "GAMMA51 <-- GAMMA51 correlator:\n");
132  meson_correlator(corr, gm_sink, gm_src, sq1, sq2);
133 
134  gm_src = m_gmset->get_GM(m_gmset->GAMMA52);
135  gm_sink = m_gmset->get_GM(m_gmset->GAMMA52);
136  vout.general(m_vl, "GAMMA52 <-- GAMMA52 correlator:\n");
137  meson_correlator(corr, gm_sink, gm_src, sq1, sq2);
138 
139  gm_src = m_gmset->get_GM(m_gmset->GAMMA53);
140  gm_sink = m_gmset->get_GM(m_gmset->GAMMA53);
141  vout.general(m_vl, "GAMMA53 <-- GAMMA53 correlator:\n");
142  meson_correlator(corr, gm_sink, gm_src, sq1, sq2);
143 
144  gm_src = m_gmset->get_GM(m_gmset->SIGMA12);
145  gm_sink = m_gmset->get_GM(m_gmset->SIGMA12);
146  vout.general(m_vl, "SIGMA12 <-- SIGMA12 correlator:\n");
147  meson_correlator(corr, gm_sink, gm_src, sq1, sq2);
148 
149  gm_src = m_gmset->get_GM(m_gmset->SIGMA23);
150  gm_sink = m_gmset->get_GM(m_gmset->SIGMA23);
151  vout.general(m_vl, "SIGMA23 <-- SIGMA23 correlator:\n");
152  meson_correlator(corr, gm_sink, gm_src, sq1, sq2);
153 
154  gm_src = m_gmset->get_GM(m_gmset->SIGMA31);
155  gm_sink = m_gmset->get_GM(m_gmset->SIGMA31);
156  vout.general(m_vl, "SIGMA31 <-- SIGMA31 correlator:\n");
157  meson_correlator(corr, gm_sink, gm_src, sq1, sq2);
158 
159 
160  if (m_filename_output != "stdout") {
161  log_file.close();
162  vout.init(log_file_previous);
163  }
164 
165  return result;
166 }
167 
168 
169 //====================================================================
170 void Corr2pt_4spinor::meson_correlator(std::vector<dcomplex>& corr_global,
171  const GammaMatrix& gm_sink,
172  const GammaMatrix& gm_src,
173  const std::vector<Field_F>& sq1,
174  const std::vector<Field_F>& sq2)
175 {
176  int Nc = CommonParameters::Nc();
177  int Nd = CommonParameters::Nd();
178  int Lt = CommonParameters::Lt();
179  int Nt = CommonParameters::Nt();
180 
181  assert(corr_global.size() == Lt);
182 
183  GammaMatrix gm_gm5_src, gm5_gm_sink, gm5;
184  gm5 = m_gmset->get_GM(m_gmset->GAMMA5);
185  gm_gm5_src = gm_src.mult(gm5);
186  gm5_gm_sink = gm5.mult(gm_sink);
187 
188  std::vector<dcomplex> corr_local(Nt);
189 
190  for (int c0 = 0; c0 < Nc; ++c0) {
191  for (int d0 = 0; d0 < Nd; ++d0) {
192  int d1 = gm_gm5_src.index(d0);
193 
194  for (int t = 0; t < Nt; ++t) {
195  dcomplex corr_t;
196 
197  contract_at_t(corr_t, gm5_gm_sink,
198  sq1[c0 + Nc * d0], sq2[c0 + Nc * d1], t);
199 
200  corr_local[t] += gm_gm5_src.value(d0) * corr_t;
201  }
202  }
203  }
204 
205  global_corr_t(corr_global, corr_local);
206 
207  for (int t = 0; t < corr_global.size(); ++t) {
208  vout.general(m_vl, " %4d %20.12e %20.12e\n",
209  t, real(corr_global[t]), imag(corr_global[t]));
210  }
211 }
212 
213 
214 //====================================================================
215 double Corr2pt_4spinor::meson_momentum_all(const std::vector<Field_F>& sq1,
216  const std::vector<Field_F>& sq2,
217  const std::vector<int>& source_position)
218 {
219  const int Ndim = CommonParameters::Ndim();
220  const int Lt = CommonParameters::Lt();
221 
222  std::vector<dcomplex> corr(Lt);
223  GammaMatrix gm_src, gm_sink;
224 
225  const int N_momentum = 10;
226 
227  typedef std::vector<int> MomentumSet;
228  std::vector<MomentumSet> momentum_sink(N_momentum);
229  for (int i_momentum = 0; i_momentum < N_momentum; i_momentum++) {
230  momentum_sink[i_momentum].resize(Ndim - 1);
231  }
232 
233  //- momentum_sink[0] = (1,0,0)
234  int i_momentum = 0;
235  momentum_sink[i_momentum][0] = 1;
236  momentum_sink[i_momentum][1] = 0;
237  momentum_sink[i_momentum][2] = 0;
238 
239  //- momentum_sink[1] = (0,1,0)
240  i_momentum = 1;
241  momentum_sink[i_momentum][0] = 0;
242  momentum_sink[i_momentum][1] = 1;
243  momentum_sink[i_momentum][2] = 0;
244 
245  //- momentum_sink[2] = (0,0,1)
246  i_momentum = 2;
247  momentum_sink[i_momentum][0] = 0;
248  momentum_sink[i_momentum][1] = 0;
249  momentum_sink[i_momentum][2] = 1;
250 
251  //- momentum_sink[3] = (1,1,0)
252  i_momentum = 3;
253  momentum_sink[i_momentum][0] = 1;
254  momentum_sink[i_momentum][1] = 1;
255  momentum_sink[i_momentum][2] = 0;
256 
257  //- momentum_sink[4] = (0,1,1)
258  i_momentum = 4;
259  momentum_sink[i_momentum][0] = 0;
260  momentum_sink[i_momentum][1] = 1;
261  momentum_sink[i_momentum][2] = 1;
262 
263  //- momentum_sink[5] = (1,0,1)
264  i_momentum = 5;
265  momentum_sink[i_momentum][0] = 1;
266  momentum_sink[i_momentum][1] = 0;
267  momentum_sink[i_momentum][2] = 1;
268 
269  //- momentum_sink[6] = (1,1,1)
270  i_momentum = 6;
271  momentum_sink[i_momentum][0] = 1;
272  momentum_sink[i_momentum][1] = 1;
273  momentum_sink[i_momentum][2] = 1;
274 
275  //- momentum_sink[7] = (2,0,0)
276  i_momentum = 7;
277  momentum_sink[i_momentum][0] = 2;
278  momentum_sink[i_momentum][1] = 0;
279  momentum_sink[i_momentum][2] = 0;
280 
281  //- momentum_sink[8] = (0,2,0)
282  i_momentum = 8;
283  momentum_sink[i_momentum][0] = 0;
284  momentum_sink[i_momentum][1] = 2;
285  momentum_sink[i_momentum][2] = 0;
286 
287  //- momentum_sink[9] = (0,0,2)
288  i_momentum = 9;
289  momentum_sink[i_momentum][0] = 0;
290  momentum_sink[i_momentum][1] = 0;
291  momentum_sink[i_momentum][2] = 2;
292 
293 
294  std::ostream& log_file_previous = vout.getStream();
295  std::ofstream log_file;
296 
297  if (m_filename_output != "stdout") {
298  log_file.open(m_filename_output.c_str(), std::ios::app);
299  vout.init(log_file);
300  }
301 
302 
303  gm_src = m_gmset->get_GM(m_gmset->GAMMA5);
304  gm_sink = m_gmset->get_GM(m_gmset->GAMMA5);
305  for (int i_momentum = 0; i_momentum < N_momentum; i_momentum++) {
306  vout.general(m_vl, "PS_momentum(%d %d %d) <-- PS correlator:\n",
307  momentum_sink[i_momentum][0],
308  momentum_sink[i_momentum][1],
309  momentum_sink[i_momentum][2]);
310  meson_momentum_correlator(corr, momentum_sink[i_momentum], gm_sink, gm_src,
311  sq1, sq2, source_position);
312  }
313 
314  gm_src = m_gmset->get_GM(m_gmset->GAMMA1);
315  gm_sink = m_gmset->get_GM(m_gmset->GAMMA1);
316  for (int i_momentum = 0; i_momentum < N_momentum; i_momentum++) {
317  vout.general(m_vl, "V1_momentum(%d %d %d) <-- V1 correlator:\n",
318  momentum_sink[i_momentum][0],
319  momentum_sink[i_momentum][1],
320  momentum_sink[i_momentum][2]);
321  meson_momentum_correlator(corr, momentum_sink[i_momentum], gm_sink, gm_src,
322  sq1, sq2, source_position);
323  }
324 
325  gm_src = m_gmset->get_GM(m_gmset->GAMMA2);
326  gm_sink = m_gmset->get_GM(m_gmset->GAMMA2);
327  for (int i_momentum = 0; i_momentum < N_momentum; i_momentum++) {
328  vout.general(m_vl, "V2_momentum(%d %d %d) <-- V2 correlator:\n",
329  momentum_sink[i_momentum][0],
330  momentum_sink[i_momentum][1],
331  momentum_sink[i_momentum][2]);
332  meson_momentum_correlator(corr, momentum_sink[i_momentum], gm_sink, gm_src,
333  sq1, sq2, source_position);
334  }
335 
336  gm_src = m_gmset->get_GM(m_gmset->GAMMA3);
337  gm_sink = m_gmset->get_GM(m_gmset->GAMMA3);
338  for (int i_momentum = 0; i_momentum < N_momentum; i_momentum++) {
339  vout.general(m_vl, "V3_momentum(%d %d %d) <-- V3 correlator:\n",
340  momentum_sink[i_momentum][0],
341  momentum_sink[i_momentum][1],
342  momentum_sink[i_momentum][2]);
343  meson_momentum_correlator(corr, momentum_sink[i_momentum], gm_sink, gm_src,
344  sq1, sq2, source_position);
345  }
346 
347 
348  if (m_filename_output != "stdout") {
349  log_file.close();
350  vout.init(log_file_previous);
351  }
352 
353  return EXIT_SUCCESS;
354 }
355 
356 
357 //====================================================================
358 void Corr2pt_4spinor::meson_momentum_correlator(std::vector<dcomplex>& corr_global,
359  const std::vector<int>& momentum_sink,
360  const GammaMatrix& gm_sink,
361  const GammaMatrix& gm_src,
362  const std::vector<Field_F>& sq1,
363  const std::vector<Field_F>& sq2,
364  const std::vector<int>& source_position)
365 {
366  int Nc = CommonParameters::Nc();
367  int Nd = CommonParameters::Nd();
368  int Lt = CommonParameters::Lt();
369  int Nt = CommonParameters::Nt();
370 
371  assert(corr_global.size() == Lt);
372 
373  GammaMatrix gm_gm5_src, gm5_gm_sink, gm5;
374  gm5 = m_gmset->get_GM(m_gmset->GAMMA5);
375  gm_gm5_src = gm_src.mult(gm5);
376  gm5_gm_sink = gm5.mult(gm_sink);
377 
378  std::vector<dcomplex> corr_local(Nt);
379 
380  for (int c0 = 0; c0 < Nc; ++c0) {
381  for (int d0 = 0; d0 < Nd; ++d0) {
382  int d1 = gm_gm5_src.index(d0);
383 
384  for (int t = 0; t < Nt; ++t) {
385  dcomplex corr_t;
386 
387  contract_at_t(corr_t, momentum_sink, gm5_gm_sink, source_position,
388  sq1[c0 + Nc * d0], sq2[c0 + Nc * d1], t);
389 
390  corr_local[t] += gm_gm5_src.value(d0) * corr_t;
391  }
392  }
393  }
394 
395  global_corr_t(corr_global, corr_local);
396 
397  for (int t = 0; t < corr_global.size(); ++t) {
398  vout.general(m_vl, " %4d %20.12e %20.12e\n",
399  t, real(corr_global[t]), imag(corr_global[t]));
400  }
401 }
402 
403 
404 //====================================================================
405 double Corr2pt_4spinor::proton_test(const std::vector<Field_F>& sq_u,
406  const std::vector<Field_F>& sq_d)
407 {
408  int Lt = CommonParameters::Lt();
409 
410  std::vector<dcomplex> p_corr_unity(Lt), p_corr_gamma0(Lt), p_corr_upper(Lt);
411  GammaMatrix gm_unit, gm_gamma0;
412 
413  std::ostream& log_file_previous = vout.getStream();
414  std::ofstream log_file;
415 
416  if (m_filename_output != "stdout") {
417  log_file.open(m_filename_output.c_str(), std::ios::app);
418  vout.init(log_file);
419  }
420 
421 
422  vout.general(m_vl, "proton <-- proton correlator(UNITY):\n");
423 
424  gm_unit = m_gmset->get_GM(m_gmset->UNITY);
425  gm_gamma0 = m_gmset->get_GM(m_gmset->GAMMA4);
426 
427  proton_correlator(p_corr_unity, gm_unit, sq_u, sq_d);
428 
429  for (int it = 0; it < p_corr_unity.size(); it++) {
430  vout.general(m_vl, " %4d %20.12e %20.12e\n",
431  it, real(p_corr_unity[it]), imag(p_corr_unity[it]));
432  }
433 
434  vout.general(m_vl, "proton <-- proton correlator(UPPER):\n");
435 
436  proton_correlator(p_corr_gamma0, gm_gamma0, sq_u, sq_d);
437  for (int it = 0; it < p_corr_upper.size(); it++) {
438  p_corr_upper[it] = (p_corr_unity[it] + p_corr_gamma0[it]) * 0.5;
439  vout.general(m_vl, " %4d %20.12e %20.12e\n",
440  it, real(p_corr_upper[it]), imag(p_corr_upper[it]));
441  }
442 
443  vout.general(m_vl, "proton <-- proton correlator(GAMMA0):\n");
444 
445  for (int it = 0; it < p_corr_gamma0.size(); it++) {
446  vout.general(m_vl, " %4d %20.12e %20.12e\n",
447  it, real(p_corr_gamma0[it]), imag(p_corr_gamma0[it]));
448  }
449 
450 
451  if (m_filename_output != "stdout") {
452  log_file.close();
453  vout.init(log_file_previous);
454  }
455 
456  double result = real(p_corr_gamma0[0]);
457 
458  return result;
459 }
460 
461 
462 //====================================================================
463 void Corr2pt_4spinor::proton_correlator(std::vector<dcomplex>& corr_global,
464  const GammaMatrix& gm,
465  const std::vector<Field_F>& sq_u,
466  const std::vector<Field_F>& sq_d)
467 {
468  int Nc = CommonParameters::Nc();
469  int Nd = CommonParameters::Nd();
470  int Lt = CommonParameters::Lt();
471  int Nt = CommonParameters::Nt();
472 
473  assert(Nc == 3);
474  assert(corr_global.size() == Lt);
475 
476  GammaMatrix cg5, c, gm5;
477  gm5 = m_gmset->get_GM(m_gmset->GAMMA5);
479  cg5 = c.mult(gm5);
480 
481 #ifdef DEBUG
482  vout.general(m_vl, "i:\tgm5\t\t\t\tc\t\t\t\tcg5\t\t\t\tgm\n");
483  for (int i = 0; i < Nd; i++) {
484  vout.general(m_vl, "%d:\t %d %e %e \t %d %e %e \t %d %e %e \t %d %e %e \n",
485  i,
486  gm5.index(i), real(gm5.value(i)), imag(gm5.value(i)),
487  c.index(i), real(c.value(i)), imag(c.value(i)),
488  cg5.index(i), real(cg5.value(i)), imag(cg5.value(i)),
489  gm.index(i), real(gm.value(i)), imag(gm.value(i))
490  );
491  }
492 #endif
493 
494  int FactNc = 6;
495  // This is valid only when Nc =3, which was already asserted.
496 
497  std::vector<dcomplex> corr_local(Nt);
498 
499  for (int it = 0; it < Nt; it++) {
500  vout.paranoiac(m_vl, "# it= %d\n", it);
501 
502  dcomplex sum = cmplx(0.0, 0.0);
503  dcomplex sum1, sum2;
504 
505  for (int i_alpha = 0; i_alpha < Nd; i_alpha++) {
506  int i_alphaP = gm.index(i_alpha);
507  int i_alpha3 = i_alpha;
508  int i_alpha3P = i_alphaP;
509 
510  for (int i_alpha1P = 0; i_alpha1P < Nd; i_alpha1P++) {
511  int i_alpha2P = cg5.index(i_alpha1P);
512 
513  for (int ic123P = 0; ic123P < FactNc; ic123P++) {
514  int ic1P = epsilon_index(0, ic123P);
515  int ic2P = epsilon_index(1, ic123P);
516  int ic3P = epsilon_index(2, ic123P);
517  dcomplex factor = gm.value(i_alpha)
518  * cg5.value(i_alpha1P) * epsilon_value(ic123P);
519 
520  contract_at_t(sum1, cg5, i_alpha3,
521  sq_u[ic1P + Nc * i_alpha1P],
522  sq_d[ic2P + Nc * i_alpha2P],
523  sq_u[ic3P + Nc * i_alpha3P], it);
524  contract_at_t(sum2, cg5, i_alpha3,
525  sq_u[ic3P + Nc * i_alpha3P],
526  sq_d[ic2P + Nc * i_alpha2P],
527  sq_u[ic1P + Nc * i_alpha1P], it);
528  sum += factor * (sum1 - sum2);
529  }
530  }
531  }
532 
533  corr_local[it] = sum;
534  } // it loop end.
535 
536  global_corr_t(corr_global, corr_local);
537 }
538 
539 
540 //====================================================================
541 void Corr2pt_4spinor::global_corr_t(std::vector<dcomplex>& corr_global,
542  std::vector<dcomplex>& corr_local)
543 {
544  int Lt = CommonParameters::Lt();
545  int Nt = CommonParameters::Nt();
546 
547  assert(corr_global.size() == Lt);
548  assert(corr_local.size() == Nt);
549 
550  std::vector<dcomplex> corr_tmp(Lt);
551 
552  int ipe_t = Communicator::ipe(3);
553 
554  for (int t = 0; t < Lt; ++t) {
555  corr_tmp[t] = cmplx(0.0, 0.0);
556  }
557 
558  for (int t = 0; t < Nt; ++t) {
559  int t_global = t + ipe_t * Nt;
560  corr_tmp[t_global] = corr_local[t];
561  }
562 
563  for (int t_global = 0; t_global < Lt; ++t_global) {
564  double cr_r = Communicator::reduce_sum(real(corr_tmp[t_global]));
565  double cr_i = Communicator::reduce_sum(imag(corr_tmp[t_global]));
566  corr_global[t_global] = cmplx(cr_r, cr_i);
567  }
568 }
569 
570 
571 //====================================================================
572 //============================================================END=====
BridgeIO vout
Definition: bridgeIO.cpp:495
double meson_all(const std::vector< Field_F > &sq1, const std::vector< Field_F > &sq2)
void general(const char *format,...)
Definition: bridgeIO.cpp:195
GammaMatrix get_GM(GMspecies spec)
Bridge::VerboseLevel m_vl
void contract_at_t(dcomplex &corr, const GammaMatrix &gm_sink, const Field_F &f1, const Field_F &f2, const int time)
Contraction of hadron for 4-spinor fermion.
void proton_correlator(std::vector< dcomplex > &corr_global, const GammaMatrix &gm, const std::vector< Field_F > &sq_u, const std::vector< Field_F > &sq_d)
GammaMatrixSet * m_gmset
void init(const std::string &filename)
Definition: bridgeIO.cpp:51
Class for parameters.
Definition: parameters.h:46
static int ipe(const int dir)
logical coordinate of current proc.
void global_corr_t(std::vector< dcomplex > &corr_global, std::vector< dcomplex > &corr_local)
transform node-local correlator in t to global.
double proton_test(const std::vector< Field_F > &sq_u, const std::vector< Field_F > &sq_d)
Gamma Matrix class.
Definition: gammaMatrix.h:44
static const std::string class_name
void meson_correlator(std::vector< dcomplex > &corr_global, const GammaMatrix &gm_sink, const GammaMatrix &gm_src, const std::vector< Field_F > &sq1, const std::vector< Field_F > &sq2)
void paranoiac(const char *format,...)
Definition: bridgeIO.cpp:229
GammaMatrix mult(GammaMatrix) const
Definition: gammaMatrix.cpp:39
double epsilon_value(int n)
totally antisymmetric tensor: value.
double meson_momentum_all(const std::vector< Field_F > &sq1, const std::vector< Field_F > &sq2, const std::vector< int > &source_position)
int epsilon_index(int i, int n)
totally antisymmetric tensor: index.
std::ostream & getStream()
Definition: bridgeIO.cpp:383
static int reduce_sum(int count, double *recv_buf, double *send_buf, int pattern=0)
make a global sum of an array of double over the communicator. pattern specifies the dimensions to be...
std::string m_filename_output
dcomplex value(int row) const
Definition: gammaMatrix.h:88
virtual void set_parameters(const Parameters &params)
string get_string(const string &key) const
Definition: parameters.cpp:116
void meson_momentum_correlator(std::vector< dcomplex > &corr_global, const std::vector< int > &momentum_sink, const GammaMatrix &gm_sink, const GammaMatrix &gm_src, const std::vector< Field_F > &sq1, const std::vector< Field_F > &sq2, const std::vector< int > &source_position)
std::vector< int > m_epsilon_index
index of totally antisymmetric tensor
int index(int row) const
Definition: gammaMatrix.h:83
static VerboseLevel set_verbose_level(const std::string &str)
Definition: bridgeIO.cpp:131