Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fopr_Clover_SF.cpp
Go to the documentation of this file.
1 
14 #include "fopr_Clover_SF.h"
15 
16 #ifdef USE_FACTORY_AUTOREGISTER
17 namespace {
18  bool init = Fopr_Clover_SF::register_factory();
19 }
20 #endif
21 
22 const std::string Fopr_Clover_SF::class_name = "Fopr_Clover_SF";
23 
24 //====================================================================
26 {
27  const std::string str_vlevel = params.get_string("verbose_level");
28 
29  m_vl = vout.set_verbose_level(str_vlevel);
30 
31  //- fetch and check input parameters
32  std::string str_gmset_type;
33  double kappa, cSW;
34  std::vector<int> bc;
35  std::vector<double> phi, phipr;
36 
37  int err = 0;
38  int err_optional = 0;
39  err_optional += params.fetch_string("gamma_matrix_type", str_gmset_type);
40  err += params.fetch_double("hopping_parameter", kappa);
41  err += params.fetch_double("clover_coefficient", cSW);
42  err += params.fetch_int_vector("boundary_condition", bc);
43  err += params.fetch_double_vector("phi", phi);
44  err += params.fetch_double_vector("phipr", phipr);
45 
46  if (err) {
47  vout.crucial(m_vl, "Error at %s: input parameter not found.\n", class_name.c_str());
48  exit(EXIT_FAILURE);
49  }
50 
51 
52  m_repr = str_gmset_type;
53 
54  set_parameters(kappa, cSW, bc, &phi[0], &phipr[0]);
55 }
56 
57 
58 //====================================================================
59 void Fopr_Clover_SF::set_parameters(const double kappa, const double cSW, const std::vector<int> bc,
60  double *phi, double *phipr)
61 {
62  //- print input parameters
63  vout.general(m_vl, "%s:\n", class_name.c_str());
64  vout.general(m_vl, " kappa = %12.8f\n", kappa);
65  vout.general(m_vl, " cSW = %12.8f\n", cSW);
66  for (int mu = 0; mu < m_Ndim; ++mu) {
67  vout.general(m_vl, " boundary[%d] = %2d\n", mu, bc[mu]);
68  }
69  vout.general(m_vl, " phi1 = %12.8f\n", phi[0]);
70  vout.general(m_vl, " phi2 = %12.8f\n", phi[1]);
71  vout.general(m_vl, " phi3 = %12.8f\n", phi[2]);
72  vout.general(m_vl, " phipr1= %12.8f\n", phipr[0]);
73  vout.general(m_vl, " phipr2= %12.8f\n", phipr[1]);
74  vout.general(m_vl, " phipr3= %12.8f\n", phipr[2]);
75 
76  //- range check
77  // NB. kappa,cSW == 0 is allowed.
78  // NB. phi,phipr == 0 is allowed.
79  assert(bc.size() == m_Ndim);
80 
81  //- store values
82  m_kappa = kappa;
83  m_cSW = cSW;
84 
85  // m_boundary.resize(m_Ndim); // NB. already resized in init.
86  m_boundary = bc;
87 
88  for (int i = 0; i < 3; ++i) {
89  m_phi[i] = phi[i];
90  m_phipr[i] = phipr[i];
91  }
92 
93  //- propagate parameters
95 }
96 
97 
98 //====================================================================
99 namespace {
100  inline double mult_uv_r(const double *u, const double *v)
101  {
102  return u[0] * v[0] - u[1] * v[1]
103  + u[2] * v[2] - u[3] * v[3]
104  + u[4] * v[4] - u[5] * v[5];
105  }
106 
107 
108  inline double mult_uv_i(const double *u, const double *v)
109  {
110  return u[0] * v[1] + u[1] * v[0]
111  + u[2] * v[3] + u[3] * v[2]
112  + u[4] * v[5] + u[5] * v[4];
113  }
114 }
115 
116 //====================================================================
117 void Fopr_Clover_SF::init(const std::string repr)
118 {
123  m_NinF = 2 * m_Nc * m_Nd;
124 
125  m_U = 0;
126 
127  m_repr = repr;
128 
129  m_boundary.resize(m_Ndim);
130  m_GM.resize(m_Ndim + 1);
131  m_SG.resize(m_Ndim * m_Ndim);
132 
133  unique_ptr<GammaMatrixSet> gmset(GammaMatrixSet::New(m_repr));
134 
135  m_GM[0] = gmset->get_GM(gmset->GAMMA1);
136  m_GM[1] = gmset->get_GM(gmset->GAMMA2);
137  m_GM[2] = gmset->get_GM(gmset->GAMMA3);
138  m_GM[3] = gmset->get_GM(gmset->GAMMA4);
139  m_GM[4] = gmset->get_GM(gmset->GAMMA5);
140 
141  m_SG[sg_index(0, 1)] = gmset->get_GM(gmset->SIGMA12);
142  m_SG[sg_index(1, 2)] = gmset->get_GM(gmset->SIGMA23);
143  m_SG[sg_index(2, 0)] = gmset->get_GM(gmset->SIGMA31);
144  m_SG[sg_index(3, 0)] = gmset->get_GM(gmset->SIGMA41);
145  m_SG[sg_index(3, 1)] = gmset->get_GM(gmset->SIGMA42);
146  m_SG[sg_index(3, 2)] = gmset->get_GM(gmset->SIGMA43);
147 
148  m_SG[sg_index(1, 0)] = m_SG[sg_index(0, 1)].mult(-1);
149  m_SG[sg_index(2, 1)] = m_SG[sg_index(1, 2)].mult(-1);
150  m_SG[sg_index(0, 2)] = m_SG[sg_index(2, 0)].mult(-1);
151  m_SG[sg_index(0, 3)] = m_SG[sg_index(3, 0)].mult(-1);
152  m_SG[sg_index(1, 3)] = m_SG[sg_index(3, 1)].mult(-1);
153  m_SG[sg_index(2, 3)] = m_SG[sg_index(3, 2)].mult(-1);
154 
155  m_SG[sg_index(0, 0)] = gmset->get_GM(gmset->UNITY);
156  m_SG[sg_index(1, 1)] = gmset->get_GM(gmset->UNITY);
157  m_SG[sg_index(2, 2)] = gmset->get_GM(gmset->UNITY);
158  m_SG[sg_index(3, 3)] = gmset->get_GM(gmset->UNITY);
159  // these 4 gamma matrices are actually not used.
160 
161 
162  // m_fopr_w = new Fopr_Wilson_SF(repr);
163  // Dirac reps. only!
164  m_fopr_w = new Fopr_Wilson_SF();
165 
166  if (m_repr == "Dirac") {
168  // }else if(m_repr == "Chiral"){
169  // m_csw = &Fopr_Clover_SF::mult_csw_chiral;
170  }
171 }
172 
173 
174 //====================================================================
176 {
177  delete m_fopr_w;
178 }
179 
180 
181 //====================================================================
183 {
184  assert(f.nex() == 1);
185  Field w2(f.nin(), f.nvol(), 1);
186 
187  D(w2, f);
188  mult_gm5(w, w2);
189  D(w2, w);
190  mult_gm5(w, w2);
191 }
192 
193 
194 //====================================================================
195 void Fopr_Clover_SF::Ddag(Field& w, const Field& f)
196 {
197  assert(f.nex() == 1);
198  Field w2(f.nin(), f.nvol(), 1);
199 
200  mult_gm5(w, f);
201  D(w2, w);
202  mult_gm5(w, w2);
203 }
204 
205 
206 //====================================================================
207 void Fopr_Clover_SF::H(Field& w, const Field& f)
208 {
209  assert(f.nex() == 1);
210  Field w2(f.nin(), f.nvol(), 1);
211 
212  D(w2, f);
213  mult_gm5(w, w2);
214 }
215 
216 
217 //====================================================================
218 void Fopr_Clover_SF::D(Field& w, const Field& f)
219 {
220  assert(f.nex() == 1);
221 
222  const int Nvol = f.nvol();
223 
224  // Field_F w3(f);
225  // setzero.set_boundary_zero(w3);
226  // m_fopr_w->D(w,w3);
227  // mult_csw(w2,w3);
228 
229  m_fopr_w->D(w, f);
230 
231  Field_F w2;
232  mult_csw(w2, (Field_F)f);
233  axpy(w, -1.0, w2); // w -= (Field)w2;
235 
236 #pragma omp barrier
237 }
238 
239 
240 //====================================================================
242  const int mu, const int nu)
243 {
244  assert(mu != nu);
245 
246  mult_iGM(v, m_SG[sg_index(mu, nu)], w);
247 }
248 
249 
250 //====================================================================
252 {
253  (this->*m_csw)(v, w);
254 }
255 
256 
257 //====================================================================
259 {
260  assert(w.nex() == 1);
261 
262  const int Nc = CommonParameters::Nc();
263  const int Nvc = 2 * Nc;
264  const int Ndf = 2 * Nc * Nc;
265  const int Nd = CommonParameters::Nd();
266  const int Nvol = w.nvol();
267 
268  const int id1 = 0;
269  const int id2 = Nvc;
270  const int id3 = Nvc * 2;
271  const int id4 = Nvc * 3;
272 
273  const double *w2 = w.ptr(0);
274  double *v2 = v.ptr(0);
275 
276  double *Bx = m_Bx.ptr(0);
277  double *By = m_By.ptr(0);
278  double *Bz = m_Bz.ptr(0);
279  double *Ex = m_Ex.ptr(0);
280  double *Ey = m_Ey.ptr(0);
281  double *Ez = m_Ez.ptr(0);
282 
283  v.set(0.0);
284 
285  for (int site = 0; site < Nvol; ++site) {
286  int iv = Nvc * Nd * site;
287  int ig = Ndf * site;
288 
289  for (int ic = 0; ic < Nc; ++ic) {
290  int ic_r = 2 * ic;
291  int ic_i = 2 * ic + 1;
292  int ic_g = ic * Nvc + ig;
293 
294  // isigma_23 * Bx
295  v2[ic_r + id1 + iv] -= mult_uv_i(&Bx[ic_g], &w2[id2 + iv]);
296  v2[ic_i + id1 + iv] += mult_uv_r(&Bx[ic_g], &w2[id2 + iv]);
297  v2[ic_r + id2 + iv] -= mult_uv_i(&Bx[ic_g], &w2[id1 + iv]);
298  v2[ic_i + id2 + iv] += mult_uv_r(&Bx[ic_g], &w2[id1 + iv]);
299 
300  v2[ic_r + id3 + iv] -= mult_uv_i(&Bx[ic_g], &w2[id4 + iv]);
301  v2[ic_i + id3 + iv] += mult_uv_r(&Bx[ic_g], &w2[id4 + iv]);
302  v2[ic_r + id4 + iv] -= mult_uv_i(&Bx[ic_g], &w2[id3 + iv]);
303  v2[ic_i + id4 + iv] += mult_uv_r(&Bx[ic_g], &w2[id3 + iv]);
304 
305  // isigma_31 * By
306  v2[ic_r + id1 + iv] += mult_uv_r(&By[ic_g], &w2[id2 + iv]);
307  v2[ic_i + id1 + iv] += mult_uv_i(&By[ic_g], &w2[id2 + iv]);
308  v2[ic_r + id2 + iv] -= mult_uv_r(&By[ic_g], &w2[id1 + iv]);
309  v2[ic_i + id2 + iv] -= mult_uv_i(&By[ic_g], &w2[id1 + iv]);
310 
311  v2[ic_r + id3 + iv] += mult_uv_r(&By[ic_g], &w2[id4 + iv]);
312  v2[ic_i + id3 + iv] += mult_uv_i(&By[ic_g], &w2[id4 + iv]);
313  v2[ic_r + id4 + iv] -= mult_uv_r(&By[ic_g], &w2[id3 + iv]);
314  v2[ic_i + id4 + iv] -= mult_uv_i(&By[ic_g], &w2[id3 + iv]);
315 
316  // isigma_12 * Bz
317  v2[ic_r + id1 + iv] -= mult_uv_i(&Bz[ic_g], &w2[id1 + iv]);
318  v2[ic_i + id1 + iv] += mult_uv_r(&Bz[ic_g], &w2[id1 + iv]);
319  v2[ic_r + id2 + iv] += mult_uv_i(&Bz[ic_g], &w2[id2 + iv]);
320  v2[ic_i + id2 + iv] -= mult_uv_r(&Bz[ic_g], &w2[id2 + iv]);
321 
322  v2[ic_r + id3 + iv] -= mult_uv_i(&Bz[ic_g], &w2[id3 + iv]);
323  v2[ic_i + id3 + iv] += mult_uv_r(&Bz[ic_g], &w2[id3 + iv]);
324  v2[ic_r + id4 + iv] += mult_uv_i(&Bz[ic_g], &w2[id4 + iv]);
325  v2[ic_i + id4 + iv] -= mult_uv_r(&Bz[ic_g], &w2[id4 + iv]);
326 
327  // isigma_41 * Ex
328  v2[ic_r + id1 + iv] += mult_uv_i(&Ex[ic_g], &w2[id2 + iv]);
329  v2[ic_i + id1 + iv] -= mult_uv_r(&Ex[ic_g], &w2[id2 + iv]);
330  v2[ic_r + id2 + iv] += mult_uv_i(&Ex[ic_g], &w2[id1 + iv]);
331  v2[ic_i + id2 + iv] -= mult_uv_r(&Ex[ic_g], &w2[id1 + iv]);
332 
333  v2[ic_r + id3 + iv] -= mult_uv_i(&Ex[ic_g], &w2[id4 + iv]);
334  v2[ic_i + id3 + iv] += mult_uv_r(&Ex[ic_g], &w2[id4 + iv]);
335  v2[ic_r + id4 + iv] -= mult_uv_i(&Ex[ic_g], &w2[id3 + iv]);
336  v2[ic_i + id4 + iv] += mult_uv_r(&Ex[ic_g], &w2[id3 + iv]);
337 
338  // isigma_42 * Ey
339  v2[ic_r + id1 + iv] -= mult_uv_r(&Ey[ic_g], &w2[id2 + iv]);
340  v2[ic_i + id1 + iv] -= mult_uv_i(&Ey[ic_g], &w2[id2 + iv]);
341  v2[ic_r + id2 + iv] += mult_uv_r(&Ey[ic_g], &w2[id1 + iv]);
342  v2[ic_i + id2 + iv] += mult_uv_i(&Ey[ic_g], &w2[id1 + iv]);
343 
344  v2[ic_r + id3 + iv] += mult_uv_r(&Ey[ic_g], &w2[id4 + iv]);
345  v2[ic_i + id3 + iv] += mult_uv_i(&Ey[ic_g], &w2[id4 + iv]);
346  v2[ic_r + id4 + iv] -= mult_uv_r(&Ey[ic_g], &w2[id3 + iv]);
347  v2[ic_i + id4 + iv] -= mult_uv_i(&Ey[ic_g], &w2[id3 + iv]);
348 
349  // isigma_43 * Ez
350  v2[ic_r + id1 + iv] += mult_uv_i(&Ez[ic_g], &w2[id1 + iv]);
351  v2[ic_i + id1 + iv] -= mult_uv_r(&Ez[ic_g], &w2[id1 + iv]);
352  v2[ic_r + id2 + iv] -= mult_uv_i(&Ez[ic_g], &w2[id2 + iv]);
353  v2[ic_i + id2 + iv] += mult_uv_r(&Ez[ic_g], &w2[id2 + iv]);
354 
355  v2[ic_r + id3 + iv] -= mult_uv_i(&Ez[ic_g], &w2[id3 + iv]);
356  v2[ic_i + id3 + iv] += mult_uv_r(&Ez[ic_g], &w2[id3 + iv]);
357  v2[ic_r + id4 + iv] += mult_uv_i(&Ez[ic_g], &w2[id4 + iv]);
358  v2[ic_i + id4 + iv] -= mult_uv_r(&Ez[ic_g], &w2[id4 + iv]);
359  }
360  }
361 
362  scal(v, m_kappa * m_cSW); // v *= m_kappa * m_cSW;
363 }
364 
365 
366 //====================================================================
368 {
369  assert(w.nex() == 1);
370 
371  const int Nc = CommonParameters::Nc();
372  const int Nvc = 2 * Nc;
373  const int Ndf = 2 * Nc * Nc;
374  const int Nd = CommonParameters::Nd();
375  const int Nvol = w.nvol();
376 
377  const int id1 = 0;
378  const int id2 = Nvc;
379  const int id3 = Nvc * 2;
380  const int id4 = Nvc * 3;
381 
382  const double *w2 = w.ptr(0);
383  double *v2 = v.ptr(0);
384 
385  double *Bx = m_Bx.ptr(0);
386  double *By = m_By.ptr(0);
387  double *Bz = m_Bz.ptr(0);
388  double *Ex = m_Ex.ptr(0);
389  double *Ey = m_Ey.ptr(0);
390  double *Ez = m_Ez.ptr(0);
391 
392  v.set(0.0);
393 
394  for (int site = 0; site < Nvol; ++site) {
395  int iv = Nvc * Nd * site;
396  int ig = Ndf * site;
397 
398  for (int ic = 0; ic < Nc; ++ic) {
399  int ic_r = 2 * ic;
400  int ic_i = 2 * ic + 1;
401  int ic_g = ic * Nvc + ig;
402 
403  // isigma_23 * Bx
404  v2[ic_r + id1 + iv] -= mult_uv_i(&Bx[ic_g], &w2[id2 + iv]);
405  v2[ic_i + id1 + iv] += mult_uv_r(&Bx[ic_g], &w2[id2 + iv]);
406  v2[ic_r + id2 + iv] -= mult_uv_i(&Bx[ic_g], &w2[id1 + iv]);
407  v2[ic_i + id2 + iv] += mult_uv_r(&Bx[ic_g], &w2[id1 + iv]);
408 
409  v2[ic_r + id3 + iv] -= mult_uv_i(&Bx[ic_g], &w2[id4 + iv]);
410  v2[ic_i + id3 + iv] += mult_uv_r(&Bx[ic_g], &w2[id4 + iv]);
411  v2[ic_r + id4 + iv] -= mult_uv_i(&Bx[ic_g], &w2[id3 + iv]);
412  v2[ic_i + id4 + iv] += mult_uv_r(&Bx[ic_g], &w2[id3 + iv]);
413 
414  // isigma_31 * By
415  v2[ic_r + id1 + iv] += mult_uv_r(&By[ic_g], &w2[id2 + iv]);
416  v2[ic_i + id1 + iv] += mult_uv_i(&By[ic_g], &w2[id2 + iv]);
417  v2[ic_r + id2 + iv] -= mult_uv_r(&By[ic_g], &w2[id1 + iv]);
418  v2[ic_i + id2 + iv] -= mult_uv_i(&By[ic_g], &w2[id1 + iv]);
419 
420  v2[ic_r + id3 + iv] += mult_uv_r(&By[ic_g], &w2[id4 + iv]);
421  v2[ic_i + id3 + iv] += mult_uv_i(&By[ic_g], &w2[id4 + iv]);
422  v2[ic_r + id4 + iv] -= mult_uv_r(&By[ic_g], &w2[id3 + iv]);
423  v2[ic_i + id4 + iv] -= mult_uv_i(&By[ic_g], &w2[id3 + iv]);
424 
425  // isigma_12 * Bz
426  v2[ic_r + id1 + iv] -= mult_uv_i(&Bz[ic_g], &w2[id1 + iv]);
427  v2[ic_i + id1 + iv] += mult_uv_r(&Bz[ic_g], &w2[id1 + iv]);
428  v2[ic_r + id2 + iv] += mult_uv_i(&Bz[ic_g], &w2[id2 + iv]);
429  v2[ic_i + id2 + iv] -= mult_uv_r(&Bz[ic_g], &w2[id2 + iv]);
430 
431  v2[ic_r + id3 + iv] -= mult_uv_i(&Bz[ic_g], &w2[id3 + iv]);
432  v2[ic_i + id3 + iv] += mult_uv_r(&Bz[ic_g], &w2[id3 + iv]);
433  v2[ic_r + id4 + iv] += mult_uv_i(&Bz[ic_g], &w2[id4 + iv]);
434  v2[ic_i + id4 + iv] -= mult_uv_r(&Bz[ic_g], &w2[id4 + iv]);
435 
436  // isigma_41 * Ex
437  v2[ic_r + id1 + iv] += mult_uv_i(&Ex[ic_g], &w2[id4 + iv]);
438  v2[ic_i + id1 + iv] -= mult_uv_r(&Ex[ic_g], &w2[id4 + iv]);
439  v2[ic_r + id2 + iv] += mult_uv_i(&Ex[ic_g], &w2[id3 + iv]);
440  v2[ic_i + id2 + iv] -= mult_uv_r(&Ex[ic_g], &w2[id3 + iv]);
441 
442  v2[ic_r + id3 + iv] += mult_uv_i(&Ex[ic_g], &w2[id2 + iv]);
443  v2[ic_i + id3 + iv] -= mult_uv_r(&Ex[ic_g], &w2[id2 + iv]);
444  v2[ic_r + id4 + iv] += mult_uv_i(&Ex[ic_g], &w2[id1 + iv]);
445  v2[ic_i + id4 + iv] -= mult_uv_r(&Ex[ic_g], &w2[id1 + iv]);
446 
447  // isigma_42 * Ey
448  v2[ic_r + id1 + iv] -= mult_uv_r(&Ey[ic_g], &w2[id4 + iv]);
449  v2[ic_i + id1 + iv] -= mult_uv_i(&Ey[ic_g], &w2[id4 + iv]);
450  v2[ic_r + id2 + iv] += mult_uv_r(&Ey[ic_g], &w2[id3 + iv]);
451  v2[ic_i + id2 + iv] += mult_uv_i(&Ey[ic_g], &w2[id3 + iv]);
452 
453  v2[ic_r + id3 + iv] -= mult_uv_r(&Ey[ic_g], &w2[id2 + iv]);
454  v2[ic_i + id3 + iv] -= mult_uv_i(&Ey[ic_g], &w2[id2 + iv]);
455  v2[ic_r + id4 + iv] += mult_uv_r(&Ey[ic_g], &w2[id1 + iv]);
456  v2[ic_i + id4 + iv] += mult_uv_i(&Ey[ic_g], &w2[id1 + iv]);
457 
458  // isigma_43 * Ez
459  v2[ic_r + id1 + iv] += mult_uv_i(&Ez[ic_g], &w2[id3 + iv]);
460  v2[ic_i + id1 + iv] -= mult_uv_r(&Ez[ic_g], &w2[id3 + iv]);
461  v2[ic_r + id2 + iv] -= mult_uv_i(&Ez[ic_g], &w2[id4 + iv]);
462  v2[ic_i + id2 + iv] += mult_uv_r(&Ez[ic_g], &w2[id4 + iv]);
463 
464  v2[ic_r + id3 + iv] += mult_uv_i(&Ez[ic_g], &w2[id1 + iv]);
465  v2[ic_i + id3 + iv] -= mult_uv_r(&Ez[ic_g], &w2[id1 + iv]);
466  v2[ic_r + id4 + iv] -= mult_uv_i(&Ez[ic_g], &w2[id2 + iv]);
467  v2[ic_i + id4 + iv] += mult_uv_r(&Ez[ic_g], &w2[id2 + iv]);
468  }
469  }
470 
471  scal(v, m_kappa * m_cSW); // v *= m_kappa * m_cSW;
472 }
473 
474 
475 //====================================================================
477 {
478  set_fieldstrength(m_Bx, 1, 2);
479  set_fieldstrength(m_By, 2, 0);
480  set_fieldstrength(m_Bz, 0, 1);
481  set_fieldstrength(m_Ex, 3, 0);
482  set_fieldstrength(m_Ey, 3, 1);
483  set_fieldstrength(m_Ez, 3, 2);
484 }
485 
486 
494 //====================================================================
496  const int mu, const int nu)
497 {
498  const int Nvol = CommonParameters::Nvol();
499 
500  Staple_SF staple;
501 
502  staple.set_parameters(m_phi, m_phipr);
503 
504  Field_G_SF Cup;
505  staple.upper(Cup, *m_U, mu, nu);
506 
507  Field_G_SF Cdn;
508  staple.lower(Cdn, *m_U, mu, nu);
509 
510  Field_G_SF Umu;
511  Umu.setpart_ex(0, *m_U, mu);
512 
513  mult_Field_Gnd(Fst, 0, Umu, 0, Cup, 0);
514  multadd_Field_Gnd(Fst, 0, Umu, 0, Cdn, 0, -1.0);
515 
516  Field_G v;
517  mult_Field_Gdn(v, 0, Cup, 0, Umu, 0);
518  multadd_Field_Gdn(v, 0, Cdn, 0, Umu, 0, -1.0);
519 
520  Field_G v2;
521  m_shift.forward(v2, v, mu);
522 
523  axpy(Fst, 1.0, v2); // Fst += v2;
524 
525  ah_Field_G(Fst, 0);
526  scal(Fst, 0.25); // Fst *= 0.25;
527 }
528 
529 
530 //====================================================================
532 {
533  //- Counting of floating point operations in giga unit.
534  // not implemented, yet.
535 
536  const double gflop = 0.0;
537 
538  return gflop;
539 }
540 
541 
542 //====================================================================
543 //============================================================END=====
SU(N) gauge field class in which a few functions are added for the SF.
Definition: field_G_SF.h:33
void scal(Field &x, const double a)
scal(x, a): x = a * x
Definition: field.cpp:433
std::vector< GammaMatrix > m_SG
BridgeIO vout
Definition: bridgeIO.cpp:503
void ah_Field_G(Field_G &W, const int ex)
void init(const std::string repr)
const double * ptr(const int jin, const int site, const int jex) const
Definition: field.h:153
void mult_csw_dirac(Field_F &, const Field_F &)
int fetch_double_vector(const string &key, vector< double > &value) const
Definition: parameters.cpp:410
void set(const int jin, const int site, const int jex, double v)
Definition: field.h:175
double m_phi[3]
SF boundary condition at t=0.
ShiftField_lex m_shift
void general(const char *format,...)
Definition: bridgeIO.cpp:197
GammaMatrix get_GM(GMspecies spec)
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)
static const std::string class_name
Container of Field-type object.
Definition: field.h:45
int fetch_double(const string &key, double &value) const
Definition: parameters.cpp:327
Staple construction.
Definition: staple_SF.h:36
void H(Field &, const Field &)
int nvol() const
Definition: field.h:127
void mult_Field_Gdn(Field_G &W, const int ex, const Field_G &U1, const int ex1, const Field_G &U2, const int ex2)
std::string m_repr
Class for parameters.
Definition: parameters.h:46
int fetch_string(const string &key, string &value) const
Definition: parameters.cpp:378
Wilson fermion operator with SF BC.
double m_phipr[3]
SF boundary condition at t=Nt.
void mult_isigma(Field_F &, const Field_F &, const int mu, const int nu)
void D(Field &, const Field &)
void set_parameters(const Parameters &params)
Definition: staple_SF.cpp:35
Wilson-type fermion field.
Definition: field_F.h:37
int sg_index(const int mu, const int nu)
int nin() const
Definition: field.h:126
void DdagD(Field &, const Field &)
void upper(Field_G_SF &, const Field_G &, const int, const int)
Definition: staple_SF.cpp:886
SU(N) gauge field.
Definition: field_G.h:38
void mult_iGM(Field_F &y, const GammaMatrix &gm, const Field_F &x)
gamma matrix multiplication (i is multiplied)
Bridge::VerboseLevel m_vl
Definition: fopr.h:127
void set_fieldstrength(Field_G &, const int, const int)
void mult_csw(Field_F &, const Field_F &)
int nex() const
Definition: field.h:128
std::vector< int > m_boundary
void mult_gm5(Field &v, const Field &w)
gamma_5 multiplication. [31 Mar 2017 H.Matsufuru]
Fopr_Wilson_SF * m_fopr_w
std::vector< GammaMatrix > m_GM
void axpy(Field &y, const double a, const Field &x)
axpy(y, a, x): y := a * x + y
Definition: field.cpp:319
void crucial(const char *format,...)
Definition: bridgeIO.cpp:178
const Field_G * m_U
void(Fopr_Clover_SF::* m_csw)(Field_F &, const Field_F &)
void Ddag(Field &, const Field &)
void mult_csw_chiral(Field_F &, const Field_F &)
void D(Field &, const Field &)
void set_boundary_zero(Field &f)
Definition: field_F_SF.h:53
Field_F_SF setzero
In order to set the boundary field to zero.
void lower(Field_G_SF &, const Field_G &, const int, const int)
Definition: staple_SF.cpp:921
void setpart_ex(int ex, const Field &w, int exw)
Definition: field.h:197
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
double flop_count()
this returns the number of floating point number operations.
static VerboseLevel set_verbose_level(const std::string &str)
Definition: bridgeIO.cpp:131
void set_parameters(const Parameters &params)
void set_parameters(const Parameters &params)
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)
void forward(Field &, const Field &, const int mu)
void mult_Field_Gnd(Field_G &W, const int ex, const Field_G &U1, const int ex1, const Field_G &U2, const int ex2)