16 #ifdef USE_FACTORY_AUTOREGISTER
18 bool init = Projection_Stout_SU3::register_factory();
80 const int Nex = Uorg.
nex();
81 const int Nvol = Uorg.
nvol();
82 const int NinG = Uorg.
nin();
84 assert(Cst.
nex() == Nex);
85 assert(Cst.
nvol() == Nvol);
86 assert(U.
nex() == Nex);
87 assert(U.
nvol() == Nvol);
92 for (
int mu = 0; mu < Nex; ++mu) {
93 for (
int site = 0; site < Nvol; ++site) {
95 Uorg.
mat(ut, site, mu);
98 Cst.
mat(ct, site, mu);
112 double norm = iQ1.
norm2();
113 if (norm > 1.0e-10) {
120 for (
int cc = 0; cc <
NC *
NC; ++cc) {
121 dcomplex qt = f0 * cmplx(iQ0.
r(cc), iQ0.
i(cc))
122 + f1 * cmplx(iQ1.
i(cc), -iQ1.
r(cc))
123 - f2 * cmplx(iQ2.
r(cc), iQ2.
i(cc));
124 e_iQ.
set_r(cc, real(qt));
125 e_iQ.
set_i(cc, imag(qt));
153 const int Nvol = iQ.
nvol();
154 const int Nex = iQ.
nex();
160 for (
int mu = 0; mu < Nex; ++mu) {
161 for (
int site = 0; site < Nvol; ++site) {
166 double norm = iQ1.
norm2();
167 if (norm > 1.0e-10) {
174 for (
int cc = 0; cc <
NC *
NC; ++cc) {
175 dcomplex qt = f0 * cmplx(iQ0.
r(cc), iQ0.
i(cc))
176 + f1 * cmplx(iQ1.i(cc), -iQ1.r(cc))
177 - f2 * cmplx(iQ2.r(cc), iQ2.i(cc));
178 e_iQ.
set_ri(cc, site, mu, real(qt), imag(qt));
205 const double alpha,
const Field_G& Sigmap,
215 const int Nex = Xi.
nex();
217 assert(Xi.
nvol() == Nvol);
218 assert(iTheta.
nvol() == Nvol);
219 assert(Sigmap.
nvol() == Nvol);
220 assert(Cst.
nvol() == Nvol);
221 assert(Uorg.
nvol() == Nvol);
222 assert(iTheta.
nex() == Nex);
223 assert(Sigmap.
nex() == Nex);
224 assert(Cst.
nex() == Nex);
225 assert(Uorg.
nex() == Nex);
230 for (
int mu = 0; mu < Nex; ++mu) {
231 for (
int site = 0; site < Nvol; ++site) {
234 Cst.
mat(C_tmp, site, mu);
238 Uorg.
mat(U_tmp, site, mu);
242 Sigmap.
mat(Sigmap_tmp, site, mu);
258 double norm = iQ1.
norm2();
259 if (norm > 1.0e-10) {
266 for (
int cc = 0; cc <
NC *
NC; ++cc) {
267 dcomplex qt = f0 * cmplx(iQ0.
r(cc), iQ0.
i(cc))
268 + f1 * cmplx(iQ1.
i(cc), -iQ1.
r(cc))
269 - f2 * cmplx(iQ2.
r(cc), iQ2.
i(cc));
270 e_iQ.set(cc, real(qt), imag(qt));
277 double cos_w = cos(w);
279 dcomplex emiu = cmplx(cos(u), -sin(u));
280 dcomplex e2iu = cmplx(cos(2.0 * u), sin(2.0 * u));
282 dcomplex r01 = cmplx(2.0 * u, 2.0 * (u2 - w2)) * e2iu
283 + emiu * cmplx(16.0 * u * cos_w + 2.0 * u * (3.0 * u2 + w2) * xi0,
284 -8.0 * u2 * cos_w + 2.0 * (9.0 * u2 + w2) * xi0);
286 dcomplex r11 = cmplx(2.0, 4.0 * u) * e2iu
287 + emiu * cmplx(-2.0 * cos_w + (3.0 * u2 - w2) * xi0,
288 2.0 * u * cos_w + 6.0 * u * xi0);
290 dcomplex r21 = cmplx(0.0, 2.0) * e2iu
291 + emiu * cmplx(-3.0 * u * xi0, cos_w - 3.0 * xi0);
293 dcomplex r02 = cmplx(-2.0, 0.0) * e2iu
294 + emiu * cmplx(-8.0 * u2 * xi0,
295 2.0 * u * (cos_w + xi0 + 3.0 * u2 * xi1));
297 dcomplex r12 = emiu * cmplx(2.0 * u * xi0,
298 -cos_w - xi0 + 3.0 * u2 * xi1);
300 dcomplex r22 = emiu * cmplx(xi0, -3.0 * u * xi1);
302 double fden = 1.0 / (2 * (9.0 * u2 - w2) * (9.0 * u2 - w2));
304 dcomplex b10 = cmplx(2.0 * u, 0.0) * r01 + cmplx(3.0 * u2 - w2, 0.0) * r02
305 - cmplx(30.0 * u2 + 2.0 * w2, 0.0) * f0;
306 dcomplex b11 = cmplx(2.0 * u, 0.0) * r11 + cmplx(3.0 * u2 - w2, 0.0) * r12
307 - cmplx(30.0 * u2 + 2.0 * w2, 0.0) * f1;
308 dcomplex b12 = cmplx(2.0 * u, 0.0) * r21 + cmplx(3.0 * u2 - w2, 0.0) * r22
309 - cmplx(30.0 * u2 + 2.0 * w2, 0.0) * f2;
311 dcomplex b20 = r01 - cmplx(3.0 * u, 0.0) * r02 - cmplx(24.0 * u, 0.0) * f0;
312 dcomplex b21 = r11 - cmplx(3.0 * u, 0.0) * r12 - cmplx(24.0 * u, 0.0) * f1;
313 dcomplex b22 = r21 - cmplx(3.0 * u, 0.0) * r22 - cmplx(24.0 * u, 0.0) * f2;
315 b10 *= cmplx(fden, 0.0);
316 b11 *= cmplx(fden, 0.0);
317 b12 *= cmplx(fden, 0.0);
318 b20 *= cmplx(fden, 0.0);
319 b21 *= cmplx(fden, 0.0);
320 b22 *= cmplx(fden, 0.0);
323 for (
int cc = 0; cc <
NC *
NC; ++cc) {
324 dcomplex qt1 = b10 * cmplx(iQ0.
r(cc), iQ0.
i(cc))
325 + b11 * cmplx(iQ1.
i(cc), -iQ1.
r(cc))
326 - b12 * cmplx(iQ2.
r(cc), iQ2.
i(cc));
327 B1.set(cc, real(qt1), imag(qt1));
329 dcomplex qt2 = b20 * cmplx(iQ0.
r(cc), iQ0.
i(cc))
330 + b21 * cmplx(iQ1.
i(cc), -iQ1.
r(cc))
331 - b22 * cmplx(iQ2.
r(cc), iQ2.
i(cc));
332 B2.
set(cc, real(qt2), imag(qt2));
336 USigmap.
mult_nn(U_tmp, Sigmap_tmp);
344 dcomplex tr1 = cmplx(tmp1.
r(0) + tmp1.
r(4) + tmp1.
r(8),
345 tmp1.
i(0) + tmp1.
i(4) + tmp1.
i(8));
346 dcomplex tr2 = cmplx(tmp2.
r(0) + tmp2.
r(4) + tmp2.
r(8),
347 tmp2.
i(0) + tmp2.
i(4) + tmp2.
i(8));
355 for (
int cc = 0; cc <
NC *
NC; ++cc) {
356 dcomplex qt = tr1 * cmplx(iQ1.
i(cc), -iQ1.
r(cc))
357 - tr2 * cmplx(iQ2.
r(cc), iQ2.
i(cc))
358 + f1 * cmplx(USigmap.
r(cc), USigmap.
i(cc))
359 + f2 * cmplx(iQUS.
i(cc), -iQUS.
r(cc))
360 + f2 * cmplx(iUSQ.
i(cc), -iUSQ.
r(cc));
361 iGamma.
set(cc, -imag(qt), real(qt));
373 iTheta_tmp.
mult_nn(iGamma, U_tmp);
376 iTheta.
set_mat(site, mu, iTheta_tmp);
379 Xi_tmp.
mult_nn(Sigmap_tmp, e_iQ);
401 const double& u,
const double& w)
404 const double u2 = u * u;
405 const double w2 = w * w;
406 const double cos_w = cos(w);
408 const double cos_u = cos(u);
409 const double sin_u = sin(u);
411 const dcomplex emiu = cmplx(cos_u, -sin_u);
412 const dcomplex e2iu = cmplx(cos_u * cos_u - sin_u * sin_u, 2.0 * sin_u * cos_u);
414 const dcomplex h0 = e2iu * cmplx(u2 - w2, 0.0)
415 + emiu * cmplx(8.0 * u2 * cos_w, 2.0 * u * (3.0 * u2 + w2) * xi0);
416 const dcomplex h1 = cmplx(2 * u, 0.0) * e2iu
417 - emiu * cmplx(2.0 * u * cos_w, -(3.0 * u2 - w2) * xi0);
418 const dcomplex h2 = e2iu - emiu * cmplx(cos_w, 3.0 * u * xi0);
420 const double fden = 1.0 / (9.0 * u2 - w2);
433 const double c0 = -(iQ3.
i(0, 0) + iQ3.
i(1, 1) + iQ3.
i(2, 2)) / 3.0;
434 const double c1 = -0.5 * (iQ2.
r(0, 0) + iQ2.
r(1, 1) + iQ2.
r(2, 2));
435 const double c13r = sqrt(c1 / 3.0);
436 const double c0max = 2.0 * c13r * c13r * c13r;
438 const double theta = acos(c0 / c0max);
441 u = c13r * cos(theta / 3.0);
442 w = sqrt(c1) * sin(theta / 3.0);
461 const double w2 = w * w;
462 const static double c0 = -1.0 / 3.0;
463 const static double c1 = 1.0 / 30.0;
464 const static double c2 = -1.0 / 840.0;
465 const static double c3 = 1.0 / 45360.0;
466 const static double c4 = -1.0 / 3991680.0;
468 return c0 + w2 * (c1 + w2 * (c2 + w2 * (c3 + w2 * c4)));
470 return (w * cos(w) - sin(w)) / (w * w * w);
480 const static int Nprec = 32;
482 const int Nvol = iQ.
nvol();
483 const int Nex = iQ.
nex();
485 for (
int ex = 0; ex < Nex; ++ex) {
486 for (
int site = 0; site < Nvol; ++site) {
495 for (
int iprec = 0; iprec < Nprec; ++iprec) {
496 double exf = 1.0 / (Nprec - iprec);