16 #ifdef USE_FACTORY_AUTOREGISTER
18 bool init = Fopr_Clover_SF::register_factory();
27 const std::string str_vlevel = params.
get_string(
"verbose_level");
32 std::string str_gmset_type;
35 std::vector<double> phi, phipr;
39 err_optional += params.
fetch_string(
"gamma_matrix_type", str_gmset_type);
60 double *phi,
double *phipr)
66 for (
int mu = 0; mu <
m_Ndim; ++mu) {
79 assert(bc.size() ==
m_Ndim);
88 for (
int i = 0; i < 3; ++i) {
100 inline double mult_uv_r(
const double *u,
const double *v)
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];
108 inline double mult_uv_i(
const double *u,
const double *v)
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];
184 assert(f.
nex() == 1);
197 assert(f.
nex() == 1);
209 assert(f.
nex() == 1);
220 assert(f.
nex() == 1);
222 const int Nvol = f.
nvol();
242 const int mu,
const int nu)
253 (this->*
m_csw)(v, w);
260 assert(w.
nex() == 1);
263 const int Nvc = 2 * Nc;
264 const int Ndf = 2 * Nc * Nc;
266 const int Nvol = w.
nvol();
270 const int id3 = Nvc * 2;
271 const int id4 = Nvc * 3;
273 const double *w2 = w.
ptr(0);
274 double *v2 = v.
ptr(0);
285 for (
int site = 0; site < Nvol; ++site) {
286 int iv = Nvc * Nd * site;
289 for (
int ic = 0; ic < Nc; ++ic) {
291 int ic_i = 2 * ic + 1;
292 int ic_g = ic * Nvc + ig;
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]);
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]);
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]);
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]);
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]);
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]);
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]);
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]);
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]);
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]);
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]);
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]);
369 assert(w.
nex() == 1);
372 const int Nvc = 2 * Nc;
373 const int Ndf = 2 * Nc * Nc;
375 const int Nvol = w.
nvol();
379 const int id3 = Nvc * 2;
380 const int id4 = Nvc * 3;
382 const double *w2 = w.
ptr(0);
383 double *v2 = v.
ptr(0);
394 for (
int site = 0; site < Nvol; ++site) {
395 int iv = Nvc * Nd * site;
398 for (
int ic = 0; ic < Nc; ++ic) {
400 int ic_i = 2 * ic + 1;
401 int ic_g = ic * Nvc + ig;
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]);
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]);
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]);
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]);
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]);
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]);
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]);
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]);
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]);
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]);
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]);
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]);
496 const int mu,
const int nu)
536 const double gflop = 0.0;
SU(N) gauge field class in which a few functions are added for the SF.
void scal(Field &x, const double a)
scal(x, a): x = a * x
std::vector< GammaMatrix > m_SG
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
void mult_csw_dirac(Field_F &, const Field_F &)
int fetch_double_vector(const string &key, vector< double > &value) const
void set(const int jin, const int site, const int jex, double v)
double m_phi[3]
SF boundary condition at t=0.
void general(const char *format,...)
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.
int fetch_double(const string &key, double &value) const
void H(Field &, const Field &)
void mult_Field_Gdn(Field_G &W, const int ex, const Field_G &U1, const int ex1, const Field_G &U2, const int ex2)
int fetch_string(const string &key, string &value) const
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 ¶ms)
Wilson-type fermion field.
int sg_index(const int mu, const int nu)
void DdagD(Field &, const Field &)
void upper(Field_G_SF &, const Field_G &, const int, const int)
void mult_iGM(Field_F &y, const GammaMatrix &gm, const Field_F &x)
gamma matrix multiplication (i is multiplied)
Bridge::VerboseLevel m_vl
void set_fieldstrength(Field_G &, const int, const int)
void mult_csw(Field_F &, const Field_F &)
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
void crucial(const char *format,...)
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)
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)
void setpart_ex(int ex, const Field &w, int exw)
string get_string(const string &key) const
int fetch_int_vector(const string &key, vector< int > &value) const
double flop_count()
this returns the number of floating point number operations.
static VerboseLevel set_verbose_level(const std::string &str)
void set_parameters(const Parameters ¶ms)
void set_parameters(const Parameters ¶ms)
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)