Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fopr_CloverTerm_eo_impl.cpp
Go to the documentation of this file.
1 
15 
17 #include "Solver/solver_CG.h"
18 
19 namespace Org {
20 //====================================================================
21 
22  const std::string Fopr_CloverTerm_eo::class_name = "Org::Fopr_CloverTerm_eo";
23 
24 //====================================================================
25  void Fopr_CloverTerm_eo::init(const std::string repr)
26  {
27  m_repr = repr;
28 
32  m_NinF = 2 * m_Nc * m_Nd;
34  m_Nvol2 = m_Nvol / 2;
35 
36  m_boundary.resize(m_Ndim);
37 
38  m_Ueo = 0;
39 
40  m_GM.resize(m_Ndim + 1);
41  m_SG.resize(m_Ndim * m_Ndim);
42 
43  unique_ptr<GammaMatrixSet> gmset(GammaMatrixSet::New(m_repr));
44 
45  m_GM[0] = gmset->get_GM(gmset->GAMMA1);
46  m_GM[1] = gmset->get_GM(gmset->GAMMA2);
47  m_GM[2] = gmset->get_GM(gmset->GAMMA3);
48  m_GM[3] = gmset->get_GM(gmset->GAMMA4);
49  m_GM[4] = gmset->get_GM(gmset->GAMMA5);
50 
51  m_SG[sg_index(0, 1)] = gmset->get_GM(gmset->SIGMA12);
52  m_SG[sg_index(1, 2)] = gmset->get_GM(gmset->SIGMA23);
53  m_SG[sg_index(2, 0)] = gmset->get_GM(gmset->SIGMA31);
54  m_SG[sg_index(3, 0)] = gmset->get_GM(gmset->SIGMA41);
55  m_SG[sg_index(3, 1)] = gmset->get_GM(gmset->SIGMA42);
56  m_SG[sg_index(3, 2)] = gmset->get_GM(gmset->SIGMA43);
57 
58  m_SG[sg_index(1, 0)] = m_SG[sg_index(0, 1)].mult(-1);
59  m_SG[sg_index(2, 1)] = m_SG[sg_index(1, 2)].mult(-1);
60  m_SG[sg_index(0, 2)] = m_SG[sg_index(2, 0)].mult(-1);
61  m_SG[sg_index(0, 3)] = m_SG[sg_index(3, 0)].mult(-1);
62  m_SG[sg_index(1, 3)] = m_SG[sg_index(3, 1)].mult(-1);
63  m_SG[sg_index(2, 3)] = m_SG[sg_index(3, 2)].mult(-1);
64 
65  m_SG[sg_index(0, 0)] = gmset->get_GM(gmset->UNITY);
66  m_SG[sg_index(1, 1)] = gmset->get_GM(gmset->UNITY);
67  m_SG[sg_index(2, 2)] = gmset->get_GM(gmset->UNITY);
68  m_SG[sg_index(3, 3)] = gmset->get_GM(gmset->UNITY);
69  // these 4 gamma matrices are actually not used.
70 
71  m_fee_inv = new Field_F(m_Nvol2, m_Nc * m_Nd);
72  m_foo_inv = new Field_F(m_Nvol2, m_Nc * m_Nd);
73 
74  m_vf.reset(m_Nvol2, 1);
75  m_ff.reset(m_Nvol2, 1);
76 
77  const int Nfst = 6;
78  m_T2.resize(2); // 0: even, 1: odd.
79  m_T2[0].reset(m_Nvol2, Nfst);
80  m_T2[1].reset(m_Nvol2, Nfst);
81  }
82 
83 
84 //====================================================================
86  {
87  delete m_foo_inv;
88  delete m_fee_inv;
89  }
90 
91 
92 //====================================================================
94  {
95  const string str_vlevel = params.get_string("verbose_level");
96 
97  m_vl = vout.set_verbose_level(str_vlevel);
98 
99  //- fetch and check input parameters
100  double kappa, cSW;
101  std::vector<int> bc;
102 
103  int err = 0;
104  err += params.fetch_double("hopping_parameter", kappa);
105  err += params.fetch_double("clover_coefficient", cSW);
106  err += params.fetch_int_vector("boundary_condition", bc);
107 
108  if (err) {
109  vout.crucial(m_vl, "Error at %s: input parameter not found\n", class_name.c_str());
110  exit(EXIT_FAILURE);
111  }
112 
113  set_parameters(kappa, cSW, bc);
114  }
115 
116 
117 //====================================================================
118  void Fopr_CloverTerm_eo::set_parameters(const double kappa, const double cSW,
119  const std::vector<int> bc)
120  {
121  //- print input parameters
122  vout.general(m_vl, "%s:\n", class_name.c_str());
123  vout.general(m_vl, " kappa = %12.8f\n", kappa);
124  vout.general(m_vl, " cSW = %12.8f\n", cSW);
125  for (int mu = 0; mu < m_Ndim; ++mu) {
126  vout.general(m_vl, " boundary[%d] = %2d\n", mu, bc[mu]);
127  }
128 
129  //- range check
130  // NB. kappa,cSW == 0 is allowed.
131  assert(bc.size() == m_Ndim);
132 
133  //- store values
134  m_kappa = kappa;
135  m_cSW = cSW;
136 
137  // m_boundary.resize(m_Ndim); // already resized in init.
138  m_boundary = bc;
139  }
140 
141 
142 //====================================================================
144  {
145  m_Ueo = (Field_G *)Ueo;
146 
147  set_csw();
148  solve_csw_inv();
149  }
150 
151 
152 //====================================================================
154  {
155  const double eps2 = CommonParameters::epsilon_criterion2();
156 
157 #if 1
158  Parameters params_solver;
159 
160  params_solver.set_string("solver_type", "CG");
161  params_solver.set_int("maximum_number_of_iteration", 100);
162  params_solver.set_int("maximum_number_of_restart", 40);
163  params_solver.set_double("convergence_criterion_squared", 1.0e-30);
164  params_solver.set_string("use_initial_guess", "false");
165  //- NB. set VerboseLevel to CRUCIAL to suppress frequent messages.
166  params_solver.set_string("verbose_level", "Crucial");
167 #else
168  //
169 #endif
170 
172 
173 #if 1
174  solver->set_parameters(params_solver);
175 #else
176  const int Niter = 100;
177  const int Nrestart = 40;
178  const double Stopping_condition = 1.0e-30;
179 
180  solver->set_parameters(Niter, Nrestart, Stopping_condition);
182 #endif
183 
184  for (int ispin = 0; ispin < m_Nd; ++ispin) {
185  for (int icolor = 0; icolor < m_Nc; ++icolor) {
186  int spin_color = icolor + m_Nc * ispin;
187 
188  Field_F w(m_Nvol2);
189  w.set(0.0);
190  for (int isite = 0; isite < m_Nvol2; ++isite) {
191  w.set_ri(icolor, ispin, isite, 0, 1, 0);
192  }
193 
194  if (m_cSW * m_cSW < eps2) {
195  m_fee_inv->setpart_ex(spin_color, w, 0);
196  m_foo_inv->setpart_ex(spin_color, w, 0);
197  } else {
198  Field_F w2(m_Nvol2);
199  int Nconv;
200  double diff;
201  set_mode("even");
202  solver->solve(w2, w, Nconv, diff);
203  m_fee_inv->setpart_ex(spin_color, w2, 0);
204 
205  vout.detailed(m_vl, " Nconv,diff = %d %12.4e\n", Nconv, diff);
206 
207  set_mode("odd");
208  solver->solve(w2, w, Nconv, diff);
209  m_foo_inv->setpart_ex(spin_color, w2, 0);
210 
211  vout.detailed(m_vl, " Nconv,diff = %d %12.4e\n", Nconv, diff);
212  }
213  }
214  }
215 
216  // redefine the inverse matrix with its dagger.
217  for (int ics = 0; ics < m_Nc * m_Nd; ++ics) {
218  for (int site = 0; site < m_Nvol2; ++site) {
219  for (int id = 0; id < m_Nd; ++id) {
220  for (int ic = 0; ic < m_Nc; ++ic) {
221  double re = m_foo_inv->cmp_r(ic, id, site, ics);
222  double im = m_foo_inv->cmp_i(ic, id, site, ics);
223 
224  m_foo_inv->set_ri(ic, id, site, ics, re, -im);
225 
226  re = m_fee_inv->cmp_r(ic, id, site, ics);
227  im = m_fee_inv->cmp_i(ic, id, site, ics);
228 
229  m_fee_inv->set_ri(ic, id, site, ics, re, -im);
230  }
231  }
232  }
233  }
234  }
235 
236 
237 //====================================================================
238 
239 /*
240 const Field_F Fopr_CloverTerm_eo::mult_csw_inv(const Field_F& f, const int ieo)
241 {
242  int nex = f.nex();
243  Field_F w(m_Nvol2, nex);
244 
245  mult_csw_inv(w, f, ieo);
246 
247  return w;
248 }
249 */
250 
251 //====================================================================
253  const Field& f, const int ieo)
254  {
255  // multiplies [ 1 - csw kappa sigma_{mu nu} F_{mu nu} ]^{-1}
256  const int nex = f.nex();
257 
258  Field_F f2(m_Nvol2, nex);
259 
260  copy(f2, f);
261 
262  Field_F v2(m_Nvol2, nex);
263  v2.set(0.0);
264 
265  Field_F *csw_inv;
266 
267  if (ieo == 0) {
268  csw_inv = m_fee_inv;
269  } else if (ieo == 1) {
270  csw_inv = m_foo_inv;
271  } else {
272  vout.crucial(m_vl, "Error at %s: wrong parameter, ieo=%d.\n",
273  class_name.c_str(), ieo);
274  exit(EXIT_FAILURE);
275  }
276 
277  for (int iex = 0; iex < nex; ++iex) {
278  for (int isite = 0; isite < m_Nvol2; ++isite) {
279  for (int ispin = 0; ispin < m_Nd; ++ispin) {
280  for (int icolor = 0; icolor < m_Nc; ++icolor) {
281  double re = 0.0;
282  double im = 0.0;
283 
284  for (int jspin = 0; jspin < m_Nd; ++jspin) {
285  for (int jcolor = 0; jcolor < m_Nc; ++jcolor) {
286  int spin_color = jcolor + m_Nc * jspin;
287  // Hermiteness of clover term is used here.
288  re += csw_inv->cmp_r(icolor, ispin, isite, spin_color) *
289  f2.cmp_r(jcolor, jspin, isite, iex);
290  re += csw_inv->cmp_i(icolor, ispin, isite, spin_color) *
291  f2.cmp_i(jcolor, jspin, isite, iex);
292 
293  im += csw_inv->cmp_r(icolor, ispin, isite, spin_color) *
294  f2.cmp_i(jcolor, jspin, isite, iex);
295  im -= csw_inv->cmp_i(icolor, ispin, isite, spin_color) *
296  f2.cmp_r(jcolor, jspin, isite, iex);
297  }
298  }
299 
300  v2.set_ri(icolor, ispin, isite, iex, re, im);
301  }
302  }
303  }
304  }
305  copy(v, v2);
306  }
307 
308 
309 //====================================================================
310  std::vector<double> Fopr_CloverTerm_eo::csmatrix(const int& site)
311  {
312  std::vector<double> matrix(m_Nc * m_Nc * m_Nd * m_Nd * 2);
313 
314  for (int ispin = 0; ispin < m_Nd / 2; ++ispin) {
315  for (int icolor = 0; icolor < m_Nc; ++icolor) {
316  int ics = icolor + ispin * m_Nc;
317 
318  for (int jspin = 0; jspin < m_Nd; ++jspin) {
319  int js2 = (jspin + m_Nd / 2) % m_Nd;
320 
321  for (int jcolor = 0; jcolor < m_Nc; ++jcolor) {
322  int cs1 = jcolor + m_Nc * (jspin + m_Nd * ics);
323  int cs2 = jcolor + m_Nc * (jspin + m_Nd * (ics + m_Nc * m_Nd / 2));
324  int cc = jcolor + icolor * m_Nc;
325  int ss1 = jspin + ispin * m_Nd;
326  int ss2 = js2 + ispin * m_Nd;
327 
328  int cs1_r = 2 * cs1;
329  int cs1_i = 2 * cs1 + 1;
330 
331  matrix[cs1_r] = m_T.cmp_r(cc, site, ss1);
332  matrix[cs1_i] = m_T.cmp_i(cc, site, ss1);
333 
334  int cs2_r = 2 * cs2;
335  int cs2_i = 2 * cs2 + 1;
336 
337  matrix[cs2_r] = m_T.cmp_r(cc, site, ss2);
338  matrix[cs2_i] = m_T.cmp_i(cc, site, ss2);
339  }
340  }
341  }
342  }
343 
344  return matrix;
345  }
346 
347 
348 //====================================================================
349  void Fopr_CloverTerm_eo::D(Field& v, const Field& f, const int ieo)
350  {
351  // multiplies [ 1 - csw kappa sigma_{mu nu} F_{mu nu} ]
352  Field_F vf(v.nvol(), v.nex());
353  Field_F ff(f.nvol(), f.nex());
354  Field_F wt(f.nvol(), f.nex());
355 
356  const int Nfst = 6;
357  Field_G T2(m_Nvol2, Nfst);
358  const int NinG = T2.nin();
359 
360  /*
361  for(int ex = 0; ex < Nfst; ++ex){
362  for(int isite = 0; isite < m_Nvol2; ++isite){
363  for(int in = 0; in < NinG; ++in){
364  T2.set(in, isite, ex, m_T.cmp(in, idx.site(isite, ieo), ex));
365  }
366  }
367  }
368  */
369 
370  copy(ff, f); // ff = (Field_F)f;
371  copy(vf, ff);
372 
373  const double coeff = -m_kappa * m_cSW;
374 
375  // i s_23 F_23
376  mult_iGM(wt, m_SG[sg_index(1, 2)], ff);
377  multadd_Field_Gn(vf, 0, m_T2[ieo], 0, wt, 0, coeff);
378 
379  // i s_31 F_31
380  mult_iGM(wt, m_SG[sg_index(2, 0)], ff);
381  multadd_Field_Gn(vf, 0, m_T2[ieo], 1, wt, 0, coeff);
382 
383  // i s_12 F_12
384  mult_iGM(wt, m_SG[sg_index(0, 1)], ff);
385  multadd_Field_Gn(vf, 0, m_T2[ieo], 2, wt, 0, coeff);
386 
387  // i s_41 F_41
388  mult_iGM(wt, m_SG[sg_index(3, 0)], ff);
389  multadd_Field_Gn(vf, 0, m_T2[ieo], 3, wt, 0, coeff);
390 
391  // i s_42 F_42
392  mult_iGM(wt, m_SG[sg_index(3, 1)], ff);
393  multadd_Field_Gn(vf, 0, m_T2[ieo], 4, wt, 0, coeff);
394 
395  // i s_43 F_43
396  mult_iGM(wt, m_SG[sg_index(3, 2)], ff);
397  multadd_Field_Gn(vf, 0, m_T2[ieo], 5, wt, 0, coeff);
398 
399  copy(v, vf);
400 
401  /*
402  Field_F vf(v.nvol(), v.nex());
403  Field_F ff(f.nvol(), f.nex());
404 
405  ff = (Field_F)f;
406 
407  int n_ex = f.nex();
408 
409  Vec_SU_N u_vec, d_vec;
410  for (int iex = 0; iex < n_ex; ++iex) {
411  for (int isite = 0; isite < m_Nvol2; ++isite) {
412  for (int ispin = 0; ispin < m_Nd / 2; ++ispin) {
413  u_vec.zero();
414  d_vec.zero();
415  for (int jspin = 0; jspin < m_Nd; ++jspin) {
416  int u_spin = jspin + ispin * m_Nd;
417  u_vec += m_T.mat(idx.site(isite, ieo), u_spin)
418  * ff.vec(jspin, isite, iex);
419  int d_spin = (jspin + m_Nd / 2) % m_Nd + ispin * m_Nd;
420  d_vec += m_T.mat(idx.site(isite, ieo), d_spin)
421  * ff.vec(jspin, isite, iex);
422  }
423  vf.set_vec(ispin, isite, iex, u_vec);
424  vf.set_vec(ispin + m_Nd / 2, isite, iex, d_vec);
425  }
426  }
427  }
428 
429  v = (Field)vf;
430  */
431  }
432 
433 
434 //====================================================================
436  const int mu, const int nu)
437  {
438  assert(mu != nu);
439  mult_iGM(v, m_SG[sg_index(mu, nu)], w);
440  }
441 
442 
443 //====================================================================
445  {
446  m_T.set(0.0);
447 
448  Field_G F;
449 
450  //- F_23
451  set_fieldstrength(F, 1, 2);
452  copy(m_T, 0, F, 0);
453 
454  //- F_31
455  set_fieldstrength(F, 2, 0);
456  copy(m_T, 1, F, 0);
457 
458  //- F_12
459  set_fieldstrength(F, 0, 1);
460  copy(m_T, 2, F, 0);
461 
462  //- F_41
463  set_fieldstrength(F, 3, 0);
464  copy(m_T, 3, F, 0);
465 
466  //- F_42
467  set_fieldstrength(F, 3, 1);
468  copy(m_T, 4, F, 0);
469 
470  //- F_43
471  set_fieldstrength(F, 3, 2);
472  copy(m_T, 5, F, 0);
473 
474  const int Nfst = 6;
475  const int NinG = m_T2[0].nin();
476 
477  for (int ieo = 0; ieo < 2; ++ieo) {
478  for (int ex = 0; ex < Nfst; ++ex) {
479  for (int isite = 0; isite < m_Nvol2; ++isite) {
480  for (int in = 0; in < NinG; ++in) {
481  m_T2[ieo].set(in, isite, ex, m_T.cmp(in, m_index_eo.site(isite, ieo), ex));
482  }
483  }
484  }
485  }
486 
487 
488  /*
489  //- sigma23
490  Field_G F;
491  set_fieldstrength(F, 1, 2);
492  F.xI();
493  m_T.addpart_ex(1, F, 0);
494  m_T.addpart_ex(4, F, 0);
495 
496  //- sigma31
497  set_fieldstrength(F, 2, 0);
498  m_T.addpart_ex(1, F, 0);
499  scal(F, -1.0);
500  m_T.addpart_ex(4, F, 0);
501 
502  //- sigma12
503  set_fieldstrength(F, 0, 1);
504  F.xI();
505  m_T.addpart_ex(0, F, 0);
506  scal(F, -1.0);
507  m_T.addpart_ex(5, F, 0);
508 
509  //- sigma41
510  set_fieldstrength(F, 3, 0);
511  F.xI();
512  scal(F, -1.0); // F *= -1.0;
513  m_T.addpart_ex(3, F, 0);
514  m_T.addpart_ex(6, F, 0);
515 
516  //- sigma42
517  set_fieldstrength(F, 3, 1);
518  m_T.addpart_ex(6, F, 0);
519  scal(F, -1.0);
520  m_T.addpart_ex(3, F, 0);
521 
522  //- sigma43
523  set_fieldstrength(F, 3, 2);
524  F.xI();
525  m_T.addpart_ex(7, F, 0);
526  scal(F, -1.0);
527  m_T.addpart_ex(2, F, 0);
528 
529  scal(m_T, -m_kappa*m_cSW);
530 
531  //- add unit color matrix for diag part of dirac matrix;
532  for (int ispin = 0; ispin < m_Nd / 2; ++ispin) {
533  int spin_diag = ispin + m_Nd * ispin;
534  for (int isite = 0; isite < m_Nvol; ++isite) {
535  for (int icolor = 0; icolor < m_Nc; ++icolor) {
536  int cc2 = 2 * (icolor * m_Nc + icolor);
537  m_T.add(cc2, isite, spin_diag, 1.0);
538  }
539  }
540  }
541  */
542  }
543 
544 
545 //====================================================================
547  const int mu, const int nu)
548  {
549  // Staple_eo staple;
550  unique_ptr<Staple> staple(Staple::New("EvenOdd"));
551 
552  Field_G Cup;
553  staple->upper(Cup, *m_Ueo, mu, nu);
554 
555  Field_G Cdn;
556  staple->lower(Cdn, *m_Ueo, mu, nu);
557 
558  Field_G Umu;
559  Umu.setpart_ex(0, *m_Ueo, mu);
560 
561  Field_G w;
562  for (int site = 0; site < m_Nvol; ++site) {
563  w.set_mat(site, 0, Umu.mat(site) * Cup.mat_dag(site));
564  }
565 
566  Field_G v2;
567  for (int site = 0; site < m_Nvol; ++site) {
568  v2.set_mat(site, 0, Umu.mat(site) * Cdn.mat_dag(site));
569  }
570 
571  axpy(w, -1.0, v2);
572 
573  Field_G v;
574  for (int site = 0; site < m_Nvol; ++site) {
575  v.set_mat(site, 0, Cup.mat_dag(site) * Umu.mat(site));
576  }
577 
578  for (int site = 0; site < m_Nvol; ++site) {
579  v2.set_mat(site, 0, Cdn.mat_dag(site) * Umu.mat(site));
580  }
581 
582  axpy(v, -1.0, v2);
583 
584  m_shift_eo.forward(v2, v, mu);
585 
586  axpy(w, 1.0, v2);
587 
588  for (int site = 0; site < m_Nvol; ++site) {
589  Fst.set_mat(site, 0, w.mat(site).ah());
590  }
591 
592  scal(Fst, 0.25);
593  }
594 
595 
596 //====================================================================
597  void Fopr_CloverTerm_eo::trSigmaInv(Field_G& tr_sigma_inv, const int mu, const int nu)
598  {
599  const int nex_finv = m_fee_inv->nex();
600 
601  assert(tr_sigma_inv.nvol() == m_Nvol);
602  assert(tr_sigma_inv.nex() == 1);
603 
604  Field_F sigma_inv(m_Nvol, nex_finv);
605  {
606  Field_F sigma_eo_inv(m_Nvol2, nex_finv);
607  mult_isigma(sigma_eo_inv, *m_fee_inv, mu, nu);
608  m_index_eo.reverseField(sigma_inv, sigma_eo_inv, 0);
609 
610  mult_isigma(sigma_eo_inv, *m_foo_inv, mu, nu);
611  m_index_eo.reverseField(sigma_inv, sigma_eo_inv, 1);
612  }
613 
614  for (int isite = 0; isite < m_Nvol; ++isite) {
615  for (int ispin = 0; ispin < m_Nd; ++ispin) {
616  for (int icolor = 0; icolor < m_Nc; ++icolor) {
617  Vec_SU_N v = sigma_inv.vec(ispin, isite, icolor + m_Nc * ispin);
618 
619  for (int jcolor = 0; jcolor < m_Nc; ++jcolor) {
620  int cc = icolor + m_Nc * jcolor;
621 
622  tr_sigma_inv.set_r(cc, isite, 0, v.r(jcolor));
623  tr_sigma_inv.set_i(cc, isite, 0, v.i(jcolor));
624  }
625  }
626  }
627  }
628  }
629 
630 
631 //====================================================================
633  {
634  // Counting of floating point operations in giga unit.
635  // The following counting explicitly depends on the implementation
636  // and to be recalculated when the code is modified.
637  // Present counting is based on rev.1107. [24 Aug 2014 H.Matsufuru]
638 
639  const int Nvol = CommonParameters::Nvol();
640  const int NPE = CommonParameters::NPE();
641 
642  const int flop_site = 8 * m_Nc * m_Nc * m_Nd * m_Nd;
643 
644  const double gflop = flop_site * ((Nvol / 2) * (NPE / 1.0e+9));
645 
646  return gflop;
647  }
648 
649 
650 //====================================================================
651 }
652 //============================================================END=====
void scal(Field &x, const double a)
scal(x, a): x = a * x
Definition: field.cpp:433
BridgeIO vout
Definition: bridgeIO.cpp:503
double cmp_i(const int cc, const int s, const int site, const int e=0) const
Definition: field_F.h:100
void detailed(const char *format,...)
Definition: bridgeIO.cpp:216
virtual void upper(Field_G &, const Field_G &, const int mu, const int nu)=0
constructs upper staple in mu-nu plane.
double r(const int c) const
Definition: vec_SU_N.h:65
void set(const int jin, const int site, const int jex, double v)
Definition: field.h:175
virtual void lower(Field_G &, const Field_G &, const int mu, const int nu)=0
constructs lower staple in mu-nu plane.
void init(const std::string repr)
Field_G m_T
m_T = 1 - kappa c_SW sigma F / 2
void set_mode(const std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
void general(const char *format,...)
Definition: bridgeIO.cpp:197
GammaMatrix get_GM(GMspecies spec)
void set_int(const string &key, const int value)
Definition: parameters.cpp:36
int solver(const std::string &)
Container of Field-type object.
Definition: field.h:45
int fetch_double(const string &key, double &value) const
Definition: parameters.cpp:327
int nvol() const
Definition: field.h:127
double cmp_i(const int cc, const int site, const int mn=0) const
Definition: field_G.h:92
double cmp(const int jin, const int site, const int jex) const
Definition: field.h:143
void mult_isigma(Field_F &, const Field_F &, const int mu, const int nu)
int site(const int x2, const int y, const int z, const int t, const int ieo) const
Definition: index_eo.h:114
std::vector< double > csmatrix(const int &)
Class for parameters.
Definition: parameters.h:46
void copy(Field &y, const Field &x)
copy(y, x): y = x
Definition: field.cpp:532
Standard Conjugate Gradient solver algorithm.
Definition: solver_CG.h:38
void set_fieldstrength(Field_G &, const int, const int)
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)
Wilson-type fermion field.
Definition: field_F.h:37
virtual void set_parameters(const Parameters &params)=0
int nin() const
Definition: field.h:126
void set_string(const string &key, const string &value)
Definition: parameters.cpp:39
SU(N) gauge field.
Definition: field_G.h:38
static double epsilon_criterion2()
void reset(int Nvol, int Nex)
Definition: field_F.h:80
int sg_index(const int mu, const int nu)
void trSigmaInv(Field_G &, const int mu, const int nu)
void mult_iGM(Field_F &y, const GammaMatrix &gm, const Field_F &x)
gamma matrix multiplication (i is multiplied)
double i(const int c) const
Definition: vec_SU_N.h:67
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
Bridge::VerboseLevel m_vl
Definition: fopr.h:127
std::vector< Field_G > m_T2
m_T2 is used in Org-version.
void set_i(const int cc, const int site, const int mn, const double im)
Definition: field_G.h:102
Mat_SU_N & ah()
antihermitian
Definition: mat_SU_N.h:357
int nex() const
Definition: field.h:128
void set_r(const int cc, const int site, const int mn, const double re)
Definition: field_G.h:97
double flop_count()
returns number of floating point operations.
void axpy(Field &y, const double a, const Field &x)
axpy(y, a, x): y := a * x + y
Definition: field.cpp:319
static const std::string class_name
void set_parameters(const Parameters &params)
void crucial(const char *format,...)
Definition: bridgeIO.cpp:178
void D(Field &v, const Field &f, const int ieo)
multiplies 1 - csw kappa sigma_{mu nu} F_{mu nu}
void set_double(const string &key, const double value)
Definition: parameters.cpp:33
void reverseField(Field &lex, const Field &eo)
Definition: index_eo.cpp:112
void forward(Field &, const Field &, const int mu)
Mat_SU_N mat_dag(const int site, const int mn=0) const
Definition: field_G.h:127
double cmp_r(const int cc, const int site, const int mn=0) const
Definition: field_G.h:87
void set_config(Field *Ueo)
setting pointer to the gauge configuration.
void setpart_ex(int ex, const Field &w, int exw)
Definition: field.h:197
void set_parameter_verboselevel(const Bridge::VerboseLevel vl)
Definition: solver.h:53
string get_string(const string &key) const
Definition: parameters.cpp:221
int fetch_int_vector(const string &key, vector< int > &value) const
Definition: parameters.cpp:429
void set_mat(const int site, const int mn, const Mat_SU_N &U)
Definition: field_G.h:160
void mult_csw_inv(Field &, const Field &, const int ieo)
multiplies [1 - csw kappa sigma_{mu nu} F_{mu nu} ]^{-1}
Mat_SU_N mat(const int site, const int mn=0) const
Definition: field_G.h:114
std::vector< GammaMatrix > m_GM
Gamma Matrix and Sigma_{mu,nu} = -i [Gamma_mu, Gamma_nu] /2.
virtual void solve(Field &solution, const Field &source, int &Nconv, double &diff)=0
std::vector< GammaMatrix > m_SG
static VerboseLevel set_verbose_level(const std::string &str)
Definition: bridgeIO.cpp:131
double cmp_r(const int cc, const int s, const int site, const int e=0) const
Definition: field_F.h:94