CHROMA
Main Page
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
i
k
l
m
n
o
p
q
r
s
t
u
z
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
c
e
f
g
h
m
o
p
q
r
s
t
v
w
Enumerator
a
b
c
d
e
f
g
h
i
k
m
n
o
p
q
r
s
t
u
w
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
Enumerator
e
h
i
k
r
s
t
v
Related Functions
:
a
g
h
i
l
o
p
r
s
t
u
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
o
p
q
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
e
l
m
p
q
s
t
u
Enumerations
Enumerator
c
e
f
g
h
l
n
o
s
t
w
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
lib
meas
glue
qactden.cc
Go to the documentation of this file.
1
/*! \file
2
* \brief Measure the lattice density of the lattice energy and the naive topological charge.
3
*/
4
5
#include "
chromabase.h
"
6
#include "
meas/glue/qnaive.h
"
7
8
namespace
Chroma
9
{
10
11
//! Measure the lattice density of the lattice energy and the naive topological charge.
12
/*!
13
* \ingroup glue
14
*
15
* \param lrqtop topological charge density (Write)
16
* \param lract action to continuum instanton action density (Write)
17
* \param u gauge field (Read)
18
*/
19
20
void
qactden
(LatticeReal&
lract
, LatticeReal&
lrqtop
,
const
multi1d<LatticeColorMatrix>&
u
)
21
{
22
START_CODE
();
23
24
LatticeColorMatrix
u_clov1
;
25
LatticeColorMatrix
u_clov2
;
26
LatticeColorMatrix
tmp_1
;
27
LatticeColorMatrix
tmp_2
;
28
LatticeColorMatrix
tmp_3
;
29
LatticeReal
qtop_tmp
;
30
LatticeReal
plaq_tmp
;
31
32
/* Lattice version of S_ratio */
33
lract
= Real(2*
Nd
*(
Nd
-1)*Nc);
34
35
/* Lattice version of Qtop */
36
lrqtop
=
zero
;
37
38
/* Loop over checkerboards and triplet of perpendicular planes */
39
int
mu1
= 0;
40
for
(
int
nu1
=1;
nu1
<
Nd
; ++
nu1
)
41
{
42
/* First "plus-plus" plaquette */
43
/* tmp_1(x) = u(x+mu1,nu1) */
44
tmp_1
= shift(
u
[
nu1
],
FORWARD
,
mu1
);
45
46
/* tmp_2(x) = u(x+nu1,mu1) */
47
tmp_2
= shift(
u
[
mu1
],
FORWARD
,
nu1
);
48
49
/* tmp_3(x) = tmp_1 * tmp_2^dag = u(x+mu1,nu1)*u_dag(x+nu1,mu1) */
50
tmp_3
=
tmp_1
* adj(
tmp_2
);
51
52
/* tmp_1(x) = tmp_3 * u_dag(x,nu1)= u(x+mu1,nu1)*u_dag(x+nu1,mu1)*u_dag(x,nu1) */
53
tmp_1
=
tmp_3
* adj(
u
[
nu1
]);
54
55
/* u_clov1(x) = u(x,mu1) * tmp_1 = u(x,mu1)*u(x+mu1,nu1)* */
56
/* u_dag(x+nu1,mu1)*u_dag(x,nu1) */
57
u_clov1
=
u
[
mu1
] *
tmp_1
;
58
59
plaq_tmp
= real(trace(
u_clov1
));
60
lract
-=
plaq_tmp
;
61
62
/* First "plus-minus" plaquette */
63
/* tmp_1(x) = u(x+mu1,nu1) */
64
tmp_1
= shift(
u
[
nu1
],
FORWARD
,
mu1
);
65
66
/* tmp_2(x) = u(x,mu1) * tmp_1 = u(x,mu1)*u(x+mu1,nu1) */
67
tmp_2
=
u
[
mu1
] *
tmp_1
;
68
69
/* tmp_1(x) = tmp_2_dag * u(x,nu1) = u_dag(x+mu1,nu1)*u_dag(x,mu1)*u(x,nu1) */
70
tmp_1
= adj(
tmp_2
) *
u
[
nu1
];
71
72
/* tmp_2(x) = tmp_1(x-nu1) */
73
tmp_2
= shift(
tmp_1
,
BACKWARD
,
nu1
);
74
75
/* tmp_1(x) = u(x,mu1) * tmp_2 = u(x,mu1)*u_dag(x-nu1+mu1,nu1)* */
76
/* u_dag(x-nu1,mu1)*u(x-nu1,nu1) */
77
tmp_1
=
u
[
mu1
] *
tmp_2
;
78
79
u_clov1
-=
tmp_1
;
80
81
plaq_tmp
= real(trace(
tmp_1
));
82
lract
-=
plaq_tmp
;
83
84
/* First "minus-minus" plaquette */
85
/* tmp_1(x) = u(x+mu1,nu1) */
86
tmp_1
= shift(
u
[
nu1
],
FORWARD
,
mu1
);
87
88
/* tmp_2(x) = u(x,mu1) * tmp_1 = u(x,mu1)*u(x+mu1,nu1) */
89
tmp_2
=
u
[
mu1
] *
tmp_1
;
90
91
/* tmp_1(x) = u_dag(x,nu1) * tmp_2 = u_dag(x,nu1)*u(x,mu1)*u(x+mu1,nu1) */
92
tmp_1
= adj(
u
[
nu1
]) *
tmp_2
;
93
94
/* tmp_2(x) = tmp_1(x-nu1) */
95
tmp_2
= shift(
tmp_1
,
BACKWARD
,
nu1
);
96
97
/* tmp_1(x) = u_dag(x,mu1) * tmp_2 = u_dag(x,mu1)*u_dag(x-nu1,nu1)* */
98
/* u(x-nu1,mu1)*u(x-nu1+mu1,nu1) */
99
tmp_1
= adj(
u
[
mu1
]) *
tmp_2
;
100
101
/* tmp_2(x) = tmp_1(x-mu1) */
102
tmp_2
= shift(
tmp_1
,
BACKWARD
,
mu1
);
103
104
u_clov1
+=
tmp_2
;
105
106
plaq_tmp
= real(trace(
tmp_2
));
107
lract
-=
plaq_tmp
;
108
109
/* First "minus-plus" plaquette */
110
/* tmp_1(x) = u_dag(x,mu1) * u(x,nu1) */
111
tmp_1
= adj(
u
[
mu1
]) *
u
[
nu1
];
112
113
/* tmp_2(x) = u(x+nu1,mu1) */
114
tmp_2
= shift(
u
[
mu1
],
FORWARD
,
nu1
);
115
116
/* tmp_3(x) = tmp_1 * tmp_2 = u_dag(x,mu1)*u(x,nu1)*u(x+nu1,mu1) */
117
tmp_3
=
tmp_1
*
tmp_2
;
118
119
/* tmp_1(x) = tmp_3(x-mu1) */
120
tmp_1
= shift(
tmp_3
,
BACKWARD
,
mu1
);
121
122
/* tmp_2(x) = tmp_1 * u_dag(x,nu1) = u_dag(x-mu1,mu1)*u(x-mu1,nu1)* */
123
/* u(x-mu1+nu1,mu1)*u_dag(x,nu1) */
124
tmp_2
=
tmp_1
* adj(
u
[
nu1
]);
125
126
u_clov1
-=
tmp_2
;
127
128
plaq_tmp
= real(trace(
tmp_2
));
129
lract
-=
plaq_tmp
;
130
131
int
mu2
= (
nu1
% 3) + 1;
132
int
nu2
= (
mu2
% 3) + 1;
133
134
/* Second "plus-plus" plaquette */
135
/* tmp_1(x) = u(x+mu2,nu2) */
136
tmp_1
= shift(
u
[
nu2
],
FORWARD
,
mu2
);
137
138
/* tmp_2(x) = u(x+nu2,mu2) */
139
tmp_2
= shift(
u
[
mu2
],
FORWARD
,
nu2
);
140
141
/* tmp_3(x) = tmp_1 * tmp_2^dag = u(x+mu2,nu2)*u_dag(x+nu2,mu2) */
142
tmp_3
=
tmp_1
* adj(
tmp_2
);
143
144
/* tmp_1(x) = tmp_3 * u_dag(x,nu2)= u(x+mu2,nu2)*u_dag(x+nu2,mu2)*u_dag(x,nu2) */
145
tmp_1
=
tmp_3
* adj(
u
[
nu2
]);
146
147
/* u_clov2(x) = u(x,mu2) * tmp_1 = u(x,mu2)*u(x+mu2,nu2)* */
148
/* u_dag(x+nu2,mu2)*u_dag(x,nu2) */
149
u_clov2
=
u
[
mu2
] *
tmp_1
;
150
151
plaq_tmp
= real(trace(
u_clov2
));
152
lract
-=
plaq_tmp
;
153
154
/* Second "plus-minus" plaquette */
155
/* tmp_1(x) = u(x+mu2,nu2) */
156
tmp_1
= shift(
u
[
nu2
],
FORWARD
,
mu2
);
157
158
/* tmp_2(x) = u(x,mu2) * tmp_1 = u(x,mu2)*u(x+mu2,nu2) */
159
tmp_2
=
u
[
mu2
] *
tmp_1
;
160
161
/* tmp_1(x) = tmp_2_dag * u(x,nu2) = u_dag(x+mu2,nu2)*u_dag(x,mu2)*u(x,nu2) */
162
tmp_1
= adj(
tmp_2
) *
u
[
nu2
];
163
164
/* tmp_2(x) = tmp_1(x-nu2) */
165
tmp_2
= shift(
tmp_1
,
BACKWARD
,
nu2
);
166
167
/* tmp_1(x) = u(x,mu2) * tmp_2 = u(x,mu2)*u_dag(x-nu2+mu2,nu2)* */
168
/* u_dag(x-nu2,mu2)*u(x-nu2,nu2) */
169
tmp_1
=
u
[
mu2
] *
tmp_2
;
170
171
u_clov2
-=
tmp_1
;
172
173
plaq_tmp
= real(trace(
tmp_1
));
174
lract
-=
plaq_tmp
;
175
176
/* Second "minus-minus" plaquette */
177
/* tmp_1(x) = u(x+mu2,nu2) */
178
tmp_1
= shift(
u
[
nu2
],
FORWARD
,
mu2
);
179
180
/* tmp_2(x) = u(x,mu2) * tmp_1 = u(x,mu2)*u(x+mu2,nu2) */
181
tmp_2
=
u
[
mu2
] *
tmp_1
;
182
183
/* tmp_1(x) = u_dag(x,nu2) * tmp_2 = u_dag(x,nu2)*u(x,mu2)*u(x+mu2,nu2) */
184
tmp_1
= adj(
u
[
nu2
]) *
tmp_2
;
185
186
/* tmp_2(x) = tmp_1(x-nu2) */
187
tmp_2
= shift(
tmp_1
,
BACKWARD
,
nu2
);
188
189
/* tmp_1(x) = u_dag(x,mu2) * tmp_2 = u_dag(x,mu2)*u_dag(x-nu2,nu2)* */
190
/* u(x-nu2,mu2)*u(x-nu2+mu2,nu2) */
191
tmp_1
= adj(
u
[
mu2
]) *
tmp_2
;
192
193
/* tmp_2(x) = tmp_1(x-mu2) */
194
tmp_2
= shift(
tmp_1
,
BACKWARD
,
mu2
);
195
196
u_clov2
+=
tmp_2
;
197
198
plaq_tmp
= real(trace(
tmp_2
));
199
lract
-=
plaq_tmp
;
200
201
/* Second "minus-plus" plaquette */
202
/* tmp_1(x) = u_dag(x,mu2) * u(x,nu2) */
203
tmp_1
= adj(
u
[
mu2
]) *
u
[
nu2
];
204
205
/* tmp_2(x) = u(x+nu2,mu2) */
206
tmp_2
= shift(
u
[
mu2
],
FORWARD
,
nu2
);
207
208
/* tmp_3(x) = tmp_1 * tmp_2 = u_dag(x,mu2)*u(x,nu2)*u(x+nu2,mu2) */
209
tmp_3
=
tmp_1
*
tmp_2
;
210
211
/* tmp_1(x) = tmp_3(x-mu2) */
212
tmp_1
= shift(
tmp_3
,
BACKWARD
,
mu2
);
213
214
/* tmp_2(x) = tmp_1 * u_dag(x,nu2) = u_dag(x-mu2,mu2)*u(x-mu2,nu2)* */
215
/* u(x-mu2+nu2,mu2)*u_dag(x,nu2) */
216
tmp_2
=
tmp_1
* adj(
u
[
nu2
]);
217
218
u_clov2
-=
tmp_2
;
219
220
plaq_tmp
= real(trace(
tmp_2
));
221
lract
-=
plaq_tmp
;
222
223
/* Now comes the contribution to the topological charge */
224
tmp_1
= 1;
225
tmp_2
= adj(
u_clov1
) *
tmp_1
;
226
u_clov1
-=
tmp_2
;
227
tmp_2
= adj(
u_clov2
) *
tmp_1
;
228
u_clov2
-=
tmp_2
;
229
tmp_2
=
u_clov1
*
u_clov2
;
230
231
qtop_tmp
= real(trace(
tmp_2
));
232
lrqtop
-=
qtop_tmp
;
233
}
234
235
/* Lattice version of S_ratio */
236
lract
/= (4*
Chroma::twopi
*
Chroma::twopi
);
237
238
/* Lattice version of qtop */
239
lrqtop
/= (64*
Chroma::twopi
*
Chroma::twopi
);
240
241
END_CODE
();
242
}
243
244
}
// namespace Chroma
chromabase.h
Primary include file for CHROMA library code.
Chroma::qactden
void qactden(LatticeReal &lract, LatticeReal &lrqtop, const multi1d< LatticeColorMatrix > &u)
Measure the lattice density of the lattice energy and the naive topological charge.
Definition:
qactden.cc:20
nu1
int nu1
Definition:
meslate.cc:67
tmp_2
LatticeColorMatrix tmp_2
Definition:
meslate.cc:51
tmp_3
LatticeColorMatrix tmp_3
Definition:
meslate.cc:52
qtop_tmp
LatticeReal qtop_tmp
Definition:
meslate.cc:53
lract
LatticeReal lract
Definition:
meslate.cc:44
plaq_tmp
LatticeReal plaq_tmp
Definition:
meslate.cc:54
mu1
int mu1
Definition:
meslate.cc:66
u_clov2
LatticeColorMatrix u_clov2
Definition:
meslate.cc:49
u_clov1
LatticeColorMatrix u_clov1
Definition:
meslate.cc:48
mu2
int mu2
Definition:
meslate.cc:68
tmp_1
LatticeColorMatrix tmp_1
Definition:
meslate.cc:50
lrqtop
LatticeReal lrqtop
Definition:
meslate.cc:45
Nd
Nd
Definition:
meslate.cc:74
nu2
int nu2
Definition:
meslate.cc:69
Chroma
Asqtad Staggered-Dirac operator.
Definition:
klein_gord.cc:10
Chroma::u
static multi1d< LatticeColorMatrix > u
Definition:
syssolver_linop_qop_mg_w.cc:39
Chroma::twopi
const Real twopi
Definition:
chromabase.h:55
Chroma::START_CODE
START_CODE()
Chroma::END_CODE
END_CODE()
Chroma::zero
Double zero
Definition:
invbicg.cc:106
FORWARD
#define FORWARD
Definition:
primitives.h:82
BACKWARD
#define BACKWARD
Definition:
primitives.h:83
qnaive.h
Calculate the topological charge from the gluonic definition.
Generated by
1.9.1