Bridge++  Ver. 2.0.2
fopr_CloverTerm_eo_impl.cpp
Go to the documentation of this file.
1 
15 
17 #include "Field/shiftField_eo.h"
18 #include "Solver/solver_CG.h"
19 #include "Tools/gammaMatrixSet.h"
20 
21 #include "Field/field_thread-inc.h"
22 
23 namespace Org {
24  const std::string Fopr_CloverTerm_eo::class_name
25  = "Org::Fopr_CloverTerm_eo";
26 
27 //====================================================================
29  {
31 
33 
34  vout.general(m_vl, "%s: construction\n", class_name.c_str());
36 
37  std::string repr;
38  if (!params.fetch_string("gamma_matrix_type", repr)) {
39  m_repr = repr;
40  } else {
41  m_repr = "Dirac"; // default
42  vout.general(m_vl, "gamma_matrix_type is not given: defalt = %s\n",
43  m_repr.c_str());
44  }
45  if ((m_repr != "Dirac") && (m_repr != "Chiral")) {
46  vout.crucial("Error in %s: irrelevant mult mode = %s\n",
47  class_name.c_str(), m_repr.c_str());
48  exit(EXIT_FAILURE);
49  }
50 
51  setup();
52 
53  set_parameters(params);
54 
56  vout.general(m_vl, "%s: construction finished.\n",
57  class_name.c_str());
58  }
59 
60 
61 //====================================================================
62  void Fopr_CloverTerm_eo::init(const std::string repr)
63  {
65 
67 
68  vout.general(m_vl, "%s: construction (obsolete)\n",
69  class_name.c_str());
71 
72  m_repr = repr;
73  setup();
74 
76 
77  vout.general(m_vl, "%s: construction finished.\n",
78  class_name.c_str());
79  }
80 
81 
82 //====================================================================
84  {
87  m_NinF = 2 * m_Nc * m_Nd;
89  m_Nvol2 = m_Nvol / 2;
91 
92  m_Ndm2 = m_Nd * m_Nd / 2;
94 
95  m_boundary.resize(m_Ndim);
96 
98 
99  m_shift_eo = new ShiftField_eo(2 * m_Nc * m_Nc);
100  m_staple = new Staple_eo;
101 
102  m_GM.resize(m_Ndim + 1);
103  m_SG.resize(m_Ndim * m_Ndim);
104 
105  GammaMatrixSet *gmset = GammaMatrixSet::New(m_repr);
106 
107  m_GM[0] = gmset->get_GM(gmset->GAMMA1);
108  m_GM[1] = gmset->get_GM(gmset->GAMMA2);
109  m_GM[2] = gmset->get_GM(gmset->GAMMA3);
110  m_GM[3] = gmset->get_GM(gmset->GAMMA4);
111  m_GM[4] = gmset->get_GM(gmset->GAMMA5);
112 
113  m_SG[sg_index(0, 1)] = gmset->get_GM(gmset->SIGMA12);
114  m_SG[sg_index(1, 2)] = gmset->get_GM(gmset->SIGMA23);
115  m_SG[sg_index(2, 0)] = gmset->get_GM(gmset->SIGMA31);
116  m_SG[sg_index(3, 0)] = gmset->get_GM(gmset->SIGMA41);
117  m_SG[sg_index(3, 1)] = gmset->get_GM(gmset->SIGMA42);
118  m_SG[sg_index(3, 2)] = gmset->get_GM(gmset->SIGMA43);
119 
120  m_SG[sg_index(1, 0)] = m_SG[sg_index(0, 1)].mult(-1);
121  m_SG[sg_index(2, 1)] = m_SG[sg_index(1, 2)].mult(-1);
122  m_SG[sg_index(0, 2)] = m_SG[sg_index(2, 0)].mult(-1);
123  m_SG[sg_index(0, 3)] = m_SG[sg_index(3, 0)].mult(-1);
124  m_SG[sg_index(1, 3)] = m_SG[sg_index(3, 1)].mult(-1);
125  m_SG[sg_index(2, 3)] = m_SG[sg_index(3, 2)].mult(-1);
126 
127  m_SG[sg_index(0, 0)] = gmset->get_GM(gmset->UNITY);
128  m_SG[sg_index(1, 1)] = gmset->get_GM(gmset->UNITY);
129  m_SG[sg_index(2, 2)] = gmset->get_GM(gmset->UNITY);
130  m_SG[sg_index(3, 3)] = gmset->get_GM(gmset->UNITY);
131  // these 4 gamma matrices are actually not used.
132 
133  delete gmset;
134 
137 
138  const int Nfst = 6;
139  m_T2.resize(2); // 0: even, 1: odd.
140  m_T2[0].reset(m_Nvol2, Nfst);
141  m_T2[1].reset(m_Nvol2, Nfst);
142 
143  m_v1.reset(m_Nvol2, 1);
144  m_v2.reset(m_Nvol2, 1);
145  m_v3.reset(m_Nvol2, 1);
146 
147  m_w1.reset(m_Nvol2, 1);
148  m_w2.reset(m_Nvol2, 1);
149 
150  // setup solver
151  Parameters params_solver;
152  params_solver.set_string("solver_type", "CG");
153  params_solver.set_int("maximum_number_of_iteration", 100);
154  params_solver.set_int("maximum_number_of_restart", 40);
155  params_solver.set_double("convergence_criterion_squared", 1.0e-30);
156  params_solver.set_string("use_initial_guess", "false");
157  params_solver.set_string("verbose_level", "Crucial");
158  // NB. set VerboseLevel to CRUCIAL to suppress frequent messages.
159 
160  m_solver = new Solver_CG(this);
161  m_solver->set_parameters(params_solver);
162  }
163 
164 
165 //====================================================================
167  {
168  delete m_solver;
169  delete m_shift_eo;
170  delete m_staple;
171  }
172 
173 
174 //====================================================================
176  {
177  int ith = ThreadManager::get_thread_id();
178 
179  std::string vlevel;
180  if (!params.fetch_string("verbose_level", vlevel)) {
181  if (ith == 0) m_vl = vout.set_verbose_level(vlevel);
182  }
183 
184  //- fetch and check input parameters
185  double kappa, cSW;
186  std::vector<int> bc;
187 
188  int err = 0;
189  err += params.fetch_double("hopping_parameter", kappa);
190  err += params.fetch_double("clover_coefficient", cSW);
191  err += params.fetch_int_vector("boundary_condition", bc);
192 
193  if (err) {
194  vout.crucial(m_vl, "Error at %s: input parameter not found.\n",
195  class_name.c_str());
196  exit(EXIT_FAILURE);
197  }
198 
199  set_parameters(kappa, cSW, bc);
200  }
201 
202 
203 //====================================================================
204  void Fopr_CloverTerm_eo::set_parameters(const double kappa,
205  const double cSW,
206  const std::vector<int> bc)
207  {
208  int ith = ThreadManager::get_thread_id();
209 
210  assert(bc.size() == m_Ndim);
211 
212  if (ith == 0) {
213  m_kappa = kappa;
214  m_cSW = cSW;
215  m_boundary = bc;
216  }
217 
218  vout.general(m_vl, "%s: input parameters\n", class_name.c_str());
219  vout.general(m_vl, " gamma matrix type = %s\n", m_repr.c_str());
220  vout.general(m_vl, " kappa = %12.8f\n", m_kappa);
221  vout.general(m_vl, " cSW = %12.8f\n", m_cSW);
222  for (int mu = 0; mu < m_Ndim; ++mu) {
223  vout.general(m_vl, " boundary[%d] = %2d\n", mu, m_boundary[mu]);
224  }
225  }
226 
227 
228 //====================================================================
230  {
231  params.set_double("hopping_parameter", m_kappa);
232  params.set_double("clover_coefficient", m_cSW);
233  params.set_int_vector("boundary_condition", m_boundary);
234  params.set_string("gamma_matrix_type", m_repr);
235 
236  params.set_string("verbose_level", vout.get_verbose_level(m_vl));
237  }
238 
239 
240 //====================================================================
242  {
243  int nth = ThreadManager::get_num_threads();
244  vout.detailed(m_vl, "%s: set_config is called: num_threads = %d\n",
245  class_name.c_str(), nth);
246 
247  if (nth > 1) {
248  set_config_impl(U);
249  } else {
250  set_config_omp(U);
251  }
252 
253  vout.detailed(m_vl, "%s: set_config finished\n", class_name.c_str());
254  }
255 
256 
257 //====================================================================
259  {
260  vout.detailed(m_vl, " set_config_omp is called.\n");
261 
262 #pragma omp parallel
263  {
264  set_config_impl(U);
265  }
266  }
267 
268 
269 //====================================================================
271  {
273 
274  set_csw();
275  solve_csw_inv();
276  }
277 
278 
279 //====================================================================
280  void Fopr_CloverTerm_eo::set_mode(const std::string mode)
281  {
282 #pragma omp barrier
283 
284  int ith = ThreadManager::get_thread_id();
285  if (ith == 0) m_mode = mode;
286 
287 #pragma omp barrier
288  }
289 
290 
291 //====================================================================
293  {
294  if (m_mode == "even") {
295  D(v, w, 0);
296  } else if (m_mode == "odd") {
297  D(v, w, 1);
298  } else {
299  vout.crucial(m_vl, "Error at %s: undefined mode = %s\n",
300  class_name.c_str(), m_mode.c_str());
301  exit(EXIT_FAILURE);
302  }
303  }
304 
305 
306 //====================================================================
308  {
309  if (m_mode == "even") {
310  D(v, w, 0);
311  } else if (m_mode == "odd") {
312  D(v, w, 1);
313  } else {
314  vout.crucial(m_vl, "Error at %s: undefined mode = %s\n",
315  class_name.c_str(), m_mode.c_str());
316  exit(EXIT_FAILURE);
317  }
318  }
319 
320 
321 //====================================================================
322  void Fopr_CloverTerm_eo::D(Field& v, const Field& f, const int ieo)
323  {
324  // multiplies [ 1 - csw kappa sigma_{mu nu} F_{mu nu} ]
325 
326 #pragma omp barrier
327 
328  copy(m_v1, f); // m_v1 = (Field_F)f;
329  copy(m_v3, f);
330 
331  const double coeff = -m_kappa * m_cSW;
332 
333  // i s_23 F_23
334  mult_iGM(m_v2, m_SG[sg_index(1, 2)], m_v1);
335  multadd_Field_Gn(m_v3, 0, m_T2[ieo], 0, m_v2, 0, coeff);
336 
337  // i s_31 F_31
338  mult_iGM(m_v2, m_SG[sg_index(2, 0)], m_v1);
339  multadd_Field_Gn(m_v3, 0, m_T2[ieo], 1, m_v2, 0, coeff);
340 
341  // i s_12 F_12
342  mult_iGM(m_v2, m_SG[sg_index(0, 1)], m_v1);
343  multadd_Field_Gn(m_v3, 0, m_T2[ieo], 2, m_v2, 0, coeff);
344 
345  // i s_41 F_41
346  mult_iGM(m_v2, m_SG[sg_index(3, 0)], m_v1);
347  multadd_Field_Gn(m_v3, 0, m_T2[ieo], 3, m_v2, 0, coeff);
348 
349  // i s_42 F_42
350  mult_iGM(m_v2, m_SG[sg_index(3, 1)], m_v1);
351  multadd_Field_Gn(m_v3, 0, m_T2[ieo], 4, m_v2, 0, coeff);
352 
353  // i s_43 F_43
354  mult_iGM(m_v2, m_SG[sg_index(3, 2)], m_v1);
355  multadd_Field_Gn(m_v3, 0, m_T2[ieo], 5, m_v2, 0, coeff);
356 
357  copy(v, m_v3);
358 
359 #pragma omp barrier
360  }
361 
362 
363 //====================================================================
365  const Field& f, const int ieo)
366  {
367  // multiplies [ 1 - csw kappa sigma_{mu nu} F_{mu nu} ]^{-1}
368 
369 #pragma omp barrier
370 
371  copy(m_v1, f);
372  m_v2.set(0.0);
373 
374  Field_F *csw_inv;
375  if (ieo == 0) {
376  csw_inv = &m_Fee_inv;
377  } else if (ieo == 1) {
378  csw_inv = &m_Foo_inv;
379  } else {
380  vout.crucial(m_vl, "Error at %s: wrong parameter, ieo=%d.\n",
381  class_name.c_str(), ieo);
382  exit(EXIT_FAILURE);
383  }
384 
385  int ith, nth, is, ns;
386  set_threadtask(ith, nth, is, ns, m_Nvol2);
387 
388  for (int isite = is; isite < ns; ++isite) {
389  for (int id = 0; id < m_Nd; ++id) {
390  for (int ic = 0; ic < m_Nc; ++ic) {
391  double re = 0.0;
392  double im = 0.0;
393  for (int jd = 0; jd < m_Nd; ++jd) {
394  for (int jc = 0; jc < m_Nc; ++jc) {
395  int icd = jc + m_Nc * jd;
396  // Hermiticity of clover term is used here.
397  re += csw_inv->cmp_r(ic, id, isite, icd)
398  * m_v1.cmp_r(jc, jd, isite, 0);
399  re += csw_inv->cmp_i(ic, id, isite, icd)
400  * m_v1.cmp_i(jc, jd, isite, 0);
401 
402  im += csw_inv->cmp_r(ic, id, isite, icd)
403  * m_v1.cmp_i(jc, jd, isite, 0);
404  im -= csw_inv->cmp_i(ic, id, isite, icd)
405  * m_v1.cmp_r(jc, jd, isite, 0);
406  }
407  }
408 
409  m_v2.set_ri(ic, id, isite, 0, re, im);
410  }
411  }
412  }
413 
414  copy(v, m_v2);
415 
416 #pragma omp barrier
417  }
418 
419 
420 //====================================================================
422  const int mu, const int nu)
423  {
424 #pragma omp barrier
425 
426  assert(mu != nu);
427  mult_iGM(v, m_SG[sg_index(mu, nu)], w);
428 
429 #pragma omp barrier
430  }
431 
432 
433 //====================================================================
435  {
436 #pragma omp barrier
437 
438  m_T.set(0.0);
439 
440  set_fieldstrength(m_Ft, 1, 2); // F_23
441  copy(m_T, 0, m_Ft, 0);
442 
443  set_fieldstrength(m_Ft, 2, 0); // F_31
444  copy(m_T, 1, m_Ft, 0);
445 
446  set_fieldstrength(m_Ft, 0, 1); // F_12
447  copy(m_T, 2, m_Ft, 0);
448 
449  set_fieldstrength(m_Ft, 3, 0); // F_41
450  copy(m_T, 3, m_Ft, 0);
451 
452  set_fieldstrength(m_Ft, 3, 1); // F_42
453  copy(m_T, 4, m_Ft, 0);
454 
455  set_fieldstrength(m_Ft, 3, 2); // F_43
456  copy(m_T, 5, m_Ft, 0);
457 
458 #pragma omp barrier
459 
460  int ith, nth, is, ns;
461  set_threadtask(ith, nth, is, ns, m_Nvol2);
462 
463  const int Nfst = 6;
464  const int NinG = m_T2[0].nin();
465 
466  for (int ieo = 0; ieo < 2; ++ieo) {
467  for (int ex = 0; ex < Nfst; ++ex) {
468  for (int isite = is; isite < ns; ++isite) {
469  for (int in = 0; in < NinG; ++in) {
470  double cmp = m_T.cmp(in, m_index_eo.site(isite, ieo), ex);
471  m_T2[ieo].set(in, isite, ex, cmp);
472  }
473  }
474  }
475  }
476 
477 #pragma omp barrier
478  }
479 
480 
481 //====================================================================
483  {
484  const double eps2 = CommonParameters::epsilon_criterion2();
485 
486 #pragma omp barrier
487 
488  int ith, nth, is, ns;
489  set_threadtask(ith, nth, is, ns, m_Nvol2);
490 
491  for (int id = 0; id < m_Nd; ++id) {
492  for (int ic = 0; ic < m_Nc; ++ic) {
493  int icd = ic + m_Nc * id;
494 
495  m_w1.set(0.0);
496  for (int isite = is; isite < ns; ++isite) {
497  m_w1.set_ri(ic, id, isite, 0, 1, 0);
498  }
499 #pragma omp barrier
500 
501  if (m_cSW * m_cSW < eps2) {
502  copy(m_Fee_inv, icd, m_w1, 0);
503  copy(m_Foo_inv, icd, m_w1, 0);
504  } else {
505  int Nconv;
506  double diff;
507  set_mode("even");
508  m_solver->solve(m_w2, m_w1, Nconv, diff);
509  copy(m_Fee_inv, icd, m_w2, 0);
510 
511  vout.detailed(m_vl, " Nconv,diff = %d %12.4e\n", Nconv, diff);
512 
513  set_mode("odd");
514  m_solver->solve(m_w2, m_w1, Nconv, diff);
515  copy(m_Foo_inv, icd, m_w2, 0);
516 
517  vout.detailed(m_vl, " Nconv,diff = %d %12.4e\n", Nconv, diff);
518  }
519  }
520  }
521 #pragma omp barrier
522 
523  // redefine the inverse matrix with its dagger.
524  for (int ics = 0; ics < m_Nc * m_Nd; ++ics) {
525  for (int site = is; site < ns; ++site) {
526  for (int id = 0; id < m_Nd; ++id) {
527  for (int ic = 0; ic < m_Nc; ++ic) {
528  double re = m_Foo_inv.cmp_r(ic, id, site, ics);
529  double im = m_Foo_inv.cmp_i(ic, id, site, ics);
530 
531  m_Foo_inv.set_ri(ic, id, site, ics, re, -im);
532 
533  re = m_Fee_inv.cmp_r(ic, id, site, ics);
534  im = m_Fee_inv.cmp_i(ic, id, site, ics);
535 
536  m_Fee_inv.set_ri(ic, id, site, ics, re, -im);
537  }
538  }
539  }
540  }
541 #pragma omp barrier
542  }
543 
544 
545 //====================================================================
547  const int mu, const int nu)
548  {
549  copy(m_Umu, 0, m_Ueo, mu);
550  m_staple->upper(m_Cup, m_Ueo, mu, nu);
551  m_staple->lower(m_Cdn, m_Ueo, mu, nu);
552 
553  mult_Field_Gnd(Fst, 0, m_Umu, 0, m_Cup, 0);
554  multadd_Field_Gnd(Fst, 0, m_Umu, 0, m_Cdn, 0, -1.0);
555 
556  mult_Field_Gdn(m_u1, 0, m_Cup, 0, m_Umu, 0);
557  multadd_Field_Gdn(m_u1, 0, m_Cdn, 0, m_Umu, 0, -1.0);
558 
559  m_shift_eo->forward(m_u2, m_u1, mu);
560  axpy(Fst, 1.0, m_u2);
561 
562  ah_Field_G(Fst, 0);
563  scal(Fst, 0.25);
564  }
565 
566 
567 //====================================================================
569  {
570  // Counting of floating point operations in giga unit.
571  // The following counting explicitly depends on the implementation
572  // and to be recalculated when the code is modified.
573  // Present counting is based on rev.1107. [24 Aug 2014 H.Matsufuru]
574 
575  const int Nvol = CommonParameters::Nvol();
576  const int NPE = CommonParameters::NPE();
577 
578  const int flop_site = 8 * m_Nc * m_Nc * m_Nd * m_Nd;
579 
580  const double gflop = flop_site * ((Nvol / 2) * (NPE / 1.0e+9));
581 
582  return gflop;
583  }
584 
585 
586 //====================================================================
587 }
588 //============================================================END=====
GammaMatrixSet
Set of Gamma Matrices: basis class.
Definition: gammaMatrixSet.h:37
Org::Fopr_CloverTerm_eo::m_staple
Staple_eo * m_staple
Definition: fopr_CloverTerm_eo_impl.h:93
ShiftField_eo::forward
void forward(Field &, const Field &, const int mu)
Definition: shiftField_eo.cpp:175
Org::Fopr_CloverTerm_eo::m_Cup
Field_G m_Cup
Definition: fopr_CloverTerm_eo_impl.h:111
GammaMatrixSet::GAMMA5
@ GAMMA5
Definition: gammaMatrixSet.h:48
Org::Fopr_CloverTerm_eo::m_T2
std::vector< Field_G > m_T2
m_T2 is used in Org-version.
Definition: fopr_CloverTerm_eo_impl.h:104
ShiftField_eo
Methods to shift the even-odd field.
Definition: shiftField_eo.h:49
Org::Fopr_CloverTerm_eo::m_kappa
double m_kappa
Definition: fopr_CloverTerm_eo_impl.h:73
mult_Field_Gdn
void mult_Field_Gdn(Field_G &W, const int ex, const Field_G &U1, const int ex1, const Field_G &U2, const int ex2)
Definition: field_G_imp.cpp:134
Parameters::set_string
void set_string(const string &key, const string &value)
Definition: parameters.cpp:39
GammaMatrixSet::GAMMA1
@ GAMMA1
Definition: gammaMatrixSet.h:48
Org::Fopr_CloverTerm_eo::tidyup
void tidyup()
Definition: fopr_CloverTerm_eo_impl.cpp:166
Org::Fopr_CloverTerm_eo::solve_csw_inv
void solve_csw_inv()
Definition: fopr_CloverTerm_eo_impl.cpp:482
ThreadManager::get_num_threads
static int get_num_threads()
returns available number of threads.
Definition: threadManager.cpp:246
Field_F::cmp_i
double cmp_i(const int cc, const int s, const int site, const int e=0) const
Definition: field_F.h:100
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
Org::Fopr_CloverTerm_eo::flop_count
double flop_count()
returns number of floating point operations.
Definition: fopr_CloverTerm_eo_impl.cpp:568
Org::Fopr_CloverTerm_eo::m_T
Field_G m_T
m_T = 1 - kappa c_SW sigma F / 2
Definition: fopr_CloverTerm_eo_impl.h:101
Org::Fopr_CloverTerm_eo::set_fieldstrength
void set_fieldstrength(Field_G &, const int, const int)
Definition: fopr_CloverTerm_eo_impl.cpp:546
Org::Fopr_CloverTerm_eo::m_v1
Field_F m_v1
Definition: fopr_CloverTerm_eo_impl.h:108
GammaMatrixSet::UNITY
@ UNITY
Definition: gammaMatrixSet.h:48
Parameters::set_double
void set_double(const string &key, const double value)
Definition: parameters.cpp:33
Bridge::BridgeIO::decrease_indent
void decrease_indent()
Definition: bridgeIO.h:86
Org::Fopr_CloverTerm_eo::m_Ueo
Field_G m_Ueo
Definition: fopr_CloverTerm_eo_impl.h:90
Org::Fopr_CloverTerm_eo::m_u1
Field_G m_u1
Definition: fopr_CloverTerm_eo_impl.h:111
Org::Fopr_CloverTerm_eo::m_GM
std::vector< GammaMatrix > m_GM
Gamma Matrix and Sigma_{mu,nu} = -i [Gamma_mu, Gamma_nu] /2.
Definition: fopr_CloverTerm_eo_impl.h:85
Bridge::BridgeIO::increase_indent
void increase_indent()
Definition: bridgeIO.h:85
Org::Fopr_CloverTerm_eo::m_NinF
int m_NinF
Definition: fopr_CloverTerm_eo_impl.h:82
Bridge::BridgeIO::detailed
void detailed(const char *format,...)
Definition: bridgeIO.cpp:219
Org::Fopr_CloverTerm_eo::m_Umu
Field_G m_Umu
Definition: fopr_CloverTerm_eo_impl.h:111
Org::Fopr_CloverTerm_eo::m_u2
Field_G m_u2
working fields
Definition: fopr_CloverTerm_eo_impl.h:111
Org::Fopr_CloverTerm_eo::m_v2
Field_F m_v2
Definition: fopr_CloverTerm_eo_impl.h:108
Org::Fopr_CloverTerm_eo::get_parameters
void get_parameters(Parameters &params) const
gets parameters by a Parameter object: to be implemented in a subclass.
Definition: fopr_CloverTerm_eo_impl.cpp:229
CommonParameters::Nvol
static int Nvol()
Definition: commonParameters.h:109
Field_F::set_ri
void set_ri(const int cc, const int s, const int site, const int e, const double re, const double im)
Definition: field_F.h:116
Org::Fopr_CloverTerm_eo::m_index_eo
Index_eo m_index_eo
Definition: fopr_CloverTerm_eo_impl.h:92
Org::Fopr_CloverTerm_eo::m_cSW
double m_cSW
Definition: fopr_CloverTerm_eo_impl.h:74
Org::Fopr_CloverTerm_eo::class_name
static const std::string class_name
Definition: fopr_CloverTerm_eo_impl.h:67
axpy
void axpy(Field &y, const double a, const Field &x)
axpy(y, a, x): y := a * x + y
Definition: field.cpp:380
Org::Fopr_CloverTerm_eo::mult_isigma
void mult_isigma(Field_F &, const Field_F &, const int mu, const int nu)
Definition: fopr_CloverTerm_eo_impl.cpp:421
Solver_CG::solve
void solve(Field &solution, const Field &source, int &Nconv, double &diff)
Definition: solver_CG.cpp:125
GammaMatrixSet::GAMMA3
@ GAMMA3
Definition: gammaMatrixSet.h:48
Org::Fopr_CloverTerm_eo::D
void D(Field &v, const Field &f, const int ieo)
multiplies 1 - csw kappa sigma_{mu nu} F_{mu nu}
Definition: fopr_CloverTerm_eo_impl.cpp:322
copy
void copy(Field &y, const Field &x)
copy(y, x): y = x
Definition: field.cpp:212
Org::Fopr_CloverTerm_eo::m_Nvol2
int m_Nvol2
Definition: fopr_CloverTerm_eo_impl.h:79
multadd_Field_Gn
void multadd_Field_Gn(Field_F &y, const int ex, const Field_G &u, int ex1, const Field_F &x, int ex2, const double a)
Definition: field_F_imp.cpp:116
Org::Fopr_CloverTerm_eo::set_config
void set_config(Field *U)
sets the gauge configuration.
Definition: fopr_CloverTerm_eo_impl.cpp:241
shiftField_eo.h
Org::Fopr_CloverTerm_eo::m_Ndm2
int m_Ndm2
Definition: fopr_CloverTerm_eo_impl.h:81
GammaMatrixSet::GAMMA4
@ GAMMA4
Definition: gammaMatrixSet.h:48
Org::Fopr_CloverTerm_eo::m_v3
Field_F m_v3
working vector (in D)
Definition: fopr_CloverTerm_eo_impl.h:108
Org::Fopr_CloverTerm_eo::m_Ft
Field_G m_Ft
Definition: fopr_CloverTerm_eo_impl.h:110
GammaMatrixSet::SIGMA41
@ SIGMA41
Definition: gammaMatrixSet.h:52
Index_eo::site
int site(const int x2, const int y, const int z, const int t, const int ieo) const
Definition: index_eo.h:68
Org::Fopr_CloverTerm_eo::sg_index
int sg_index(const int mu, const int nu)
Definition: fopr_CloverTerm_eo_impl.h:176
CommonParameters::epsilon_criterion2
static double epsilon_criterion2()
Definition: commonParameters.h:120
CommonParameters::Nc
static int Nc()
Definition: commonParameters.h:115
Org::Fopr_CloverTerm_eo::mult_csw_inv
void mult_csw_inv(Field &, const Field &, const int ieo)
multiplies [1 - csw kappa sigma_{mu nu} F_{mu nu} ]^{-1}
Definition: fopr_CloverTerm_eo_impl.cpp:364
ah_Field_G
void ah_Field_G(Field_G &W, const int ex)
Definition: field_G_imp.cpp:462
Org::Fopr_CloverTerm_eo::m_vl
Bridge::VerboseLevel m_vl
Definition: fopr_CloverTerm_eo_impl.h:71
mult_iGM
void mult_iGM(Field_F &y, const GammaMatrix &gm, const Field_F &x)
gamma matrix multiplication (i is multiplied)
Definition: field_F_imp.cpp:250
Org::Fopr_CloverTerm_eo::m_repr
std::string m_repr
Definition: fopr_CloverTerm_eo_impl.h:76
Index_eo::convertField
void convertField(Field &eo, const Field &lex)
Definition: index_eo.cpp:90
Field_F::cmp_r
double cmp_r(const int cc, const int s, const int site, const int e=0) const
Definition: field_F.h:94
Parameters::fetch_int_vector
int fetch_int_vector(const string &key, vector< int > &value) const
Definition: parameters.cpp:429
Org::Fopr_CloverTerm_eo::m_Nd
int m_Nd
Definition: fopr_CloverTerm_eo_impl.h:81
Org::Fopr_CloverTerm_eo::m_Ndim
int m_Ndim
Definition: fopr_CloverTerm_eo_impl.h:80
Org::Fopr_CloverTerm_eo::mult_dag
void mult_dag(Field &, const Field &)
hermitian conjugate of mult.
Definition: fopr_CloverTerm_eo_impl.cpp:307
Org::Fopr_CloverTerm_eo::set_parameters
void set_parameters(const Parameters &params)
sets parameters by a Parameter object: to be implemented in a subclass.
Definition: fopr_CloverTerm_eo_impl.cpp:175
Org::Fopr_CloverTerm_eo::set_config_impl
void set_config_impl(Field *U)
Definition: fopr_CloverTerm_eo_impl.cpp:270
Org::Fopr_CloverTerm_eo::mult
void mult(Field &, const Field &)
return D = D^dag = 1-f_ee or 1-f_oo
Definition: fopr_CloverTerm_eo_impl.cpp:292
Org::Fopr_CloverTerm_eo::m_mode
std::string m_mode
Definition: fopr_CloverTerm_eo_impl.h:77
Field_G::reset
void reset(const int Nvol, const int Nex)
Definition: field_G.h:79
fopr_CloverTerm_eo_impl.h
Staple_eo::upper
void upper(Field_G &, const Field_G &, const int, const int)
constructs upper staple in mu-nu plane.
Definition: staple_eo.cpp:282
Org
Clover term operator.
Definition: fopr_CloverTerm_eo_impl.cpp:23
Org::Fopr_CloverTerm_eo::m_w2
Field_F m_w2
working vector (in solve_csw_inv)
Definition: fopr_CloverTerm_eo_impl.h:107
CommonParameters::NPE
static int NPE()
Definition: commonParameters.h:101
Org::Fopr_CloverTerm_eo::m_boundary
std::vector< int > m_boundary
Definition: fopr_CloverTerm_eo_impl.h:75
Org::Fopr_CloverTerm_eo::m_Nc
int m_Nc
Definition: fopr_CloverTerm_eo_impl.h:81
Org::Fopr_CloverTerm_eo::m_shift_eo
ShiftField_eo * m_shift_eo
Definition: fopr_CloverTerm_eo_impl.h:94
Parameters::set_int_vector
void set_int_vector(const string &key, const vector< int > &value)
Definition: parameters.cpp:45
GammaMatrixSet::SIGMA42
@ SIGMA42
Definition: gammaMatrixSet.h:52
multadd_Field_Gnd
void multadd_Field_Gnd(Field_G &W, const int ex, const Field_G &U1, const int ex1, const Field_G &U2, const int ex2, const double ff)
Definition: field_G_imp.cpp:335
Field::cmp
double cmp(const int jin, const int site, const int jex) const
Definition: field.h:143
CommonParameters::Nd
static int Nd()
Definition: commonParameters.h:116
CommonParameters::Vlevel
static Bridge::VerboseLevel Vlevel()
Definition: commonParameters.h:122
Bridge::BridgeIO::set_verbose_level
static VerboseLevel set_verbose_level(const std::string &str)
Definition: bridgeIO.cpp:133
Staple_eo
Staple construction.
Definition: staple_eo.h:33
Org::Fopr_CloverTerm_eo::init
void init(const std::string repr)
Definition: fopr_CloverTerm_eo_impl.cpp:62
GammaMatrixSet::SIGMA23
@ SIGMA23
Definition: gammaMatrixSet.h:51
Parameters::set_int
void set_int(const string &key, const int value)
Definition: parameters.cpp:36
Org::Fopr_CloverTerm_eo::m_Foo_inv
Field_F m_Foo_inv
Definition: fopr_CloverTerm_eo_impl.h:98
scal
void scal(Field &x, const double a)
scal(x, a): x = a * x
Definition: field.cpp:261
Org::Fopr_CloverTerm_eo::setup
void setup()
Definition: fopr_CloverTerm_eo_impl.cpp:83
Parameters::fetch_string
int fetch_string(const string &key, string &value) const
Definition: parameters.cpp:378
Field_F
Wilson-type fermion field.
Definition: field_F.h:37
Parameters::fetch_double
int fetch_double(const string &key, double &value) const
Definition: parameters.cpp:327
GammaMatrixSet::SIGMA12
@ SIGMA12
Definition: gammaMatrixSet.h:51
Org::Fopr_CloverTerm_eo::m_w1
Field_F m_w1
Definition: fopr_CloverTerm_eo_impl.h:107
field_thread-inc.h
Solver_CG::set_parameters
void set_parameters(const Parameters &params)
Definition: solver_CG.cpp:25
GammaMatrixSet::get_GM
GammaMatrix get_GM(GMspecies spec)
Definition: gammaMatrixSet.h:76
solver_CG.h
GammaMatrixSet::GAMMA2
@ GAMMA2
Definition: gammaMatrixSet.h:48
Org::Fopr_CloverTerm_eo::set_mode
void set_mode(const std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
Definition: fopr_CloverTerm_eo_impl.cpp:280
Bridge::BridgeIO::crucial
void crucial(const char *format,...)
Definition: bridgeIO.cpp:180
Solver_CG
Standard Conjugate Gradient solver algorithm.
Definition: solver_CG.h:38
staple_eo.h
Field
Container of Field-type object.
Definition: field.h:46
Staple_eo::lower
void lower(Field_G &, const Field_G &, const int, const int)
constructs lower staple in mu-nu plane.
Definition: staple_eo.cpp:307
GammaMatrixSet::SIGMA31
@ SIGMA31
Definition: gammaMatrixSet.h:51
Org::Fopr_CloverTerm_eo::set_config_omp
void set_config_omp(Field *U)
Definition: fopr_CloverTerm_eo_impl.cpp:258
ThreadManager::get_thread_id
static int get_thread_id()
returns thread id.
Definition: threadManager.cpp:253
GammaMatrixSet::SIGMA43
@ SIGMA43
Definition: gammaMatrixSet.h:52
Org::Fopr_CloverTerm_eo::m_Fee_inv
Field_F m_Fee_inv
Definition: fopr_CloverTerm_eo_impl.h:97
Field_G
SU(N) gauge field.
Definition: field_G.h:38
Org::Fopr_CloverTerm_eo::m_Cdn
Field_G m_Cdn
Definition: fopr_CloverTerm_eo_impl.h:111
Org::Fopr_CloverTerm_eo::m_solver
Solver_CG * m_solver
Definition: fopr_CloverTerm_eo_impl.h:95
Bridge::BridgeIO::general
void general(const char *format,...)
Definition: bridgeIO.cpp:200
multadd_Field_Gdn
void multadd_Field_Gdn(Field_G &W, const int ex, const Field_G &U1, const int ex1, const Field_G &U2, const int ex2, const double ff)
Definition: field_G_imp.cpp:293
Field_F::reset
void reset(int Nvol, int Nex)
Definition: field_F.h:80
Org::Fopr_CloverTerm_eo::set_csw
void set_csw()
Definition: fopr_CloverTerm_eo_impl.cpp:434
mult_Field_Gnd
void mult_Field_Gnd(Field_G &W, const int ex, const Field_G &U1, const int ex1, const Field_G &U2, const int ex2)
Definition: field_G_imp.cpp:173
gammaMatrixSet.h
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
Bridge::BridgeIO::get_verbose_level
static std::string get_verbose_level(const VerboseLevel vl)
Definition: bridgeIO.cpp:154
Org::Fopr_CloverTerm_eo::m_Nvol
int m_Nvol
Definition: fopr_CloverTerm_eo_impl.h:79
Org::Fopr_CloverTerm_eo::m_SG
std::vector< GammaMatrix > m_SG
Definition: fopr_CloverTerm_eo_impl.h:85