14 #if defined USE_GROUP_SU3
23 #elif defined USE_GROUP_SU2
41 const int Nvol = u.
nvol();
43 assert(Nvol == v1.
nvol());
44 assert(Nvol == v2.
nvol());
46 assert(v1.
nex() == 1);
47 assert(v2.
nex() == 1);
49 #if defined USE_GROUP_SU_N
52 const int NC2 = 2 *
NC;
53 const int NDF = 2 * NC *
NC;
57 const double *w1 = v1.
ptr(0);
58 const double *w2 = v2.
ptr(0);
59 double *g = u.
ptr(0, 0, ex);
61 for (
int site = 0; site < Nvol; ++site) {
65 for (
int c1 = 0; c1 <
NC; ++c1) {
66 for (
int c2 = 0; c2 <
NC; ++c2) {
68 int c1_i = 2 * c1 + 1;
71 int c2_i = 2 * c2 + 1;
73 int ig_r = c2 * 2 + c1 * NC2 + ig;
74 int ig_i = c2 * 2 + c1 * NC2 + ig + 1;
79 for (
int s = 0; s <
ND; ++s) {
80 g[ig_r] += w1[c2_r + s * NC2 + iw] * w2[c1_r + s * NC2 + iw]
81 + w1[c2_i + s * NC2 + iw] * w2[c1_i + s * NC2 + iw];
82 g[ig_i] += w1[c2_r + s * NC2 + iw] * w2[c1_i + s * NC2 + iw]
83 - w1[c2_i + s * NC2 + iw] * w2[c1_r + s * NC2 + iw];
const double * ptr(const int jin, const int site, const int jex) const
Wilson-type fermion field.
void tensorProd_Field_F(Field_G &u, const Field_F &v1, const Field_F &v2)