16 #ifdef USE_FACTORY_AUTOREGISTER
18 bool init = Projection_Stout_SU3::register_factory();
27 const string str_vlevel = params.
get_string(
"verbose_level");
66 const int Nex = Uorg.
nex();
67 const int Nvol = Uorg.
nvol();
68 const int NinG = Uorg.
nin();
70 assert(Cst.
nex() == Nex);
71 assert(Cst.
nvol() == Nvol);
72 assert(U.
nex() == Nex);
73 assert(U.
nvol() == Nvol);
78 for (
int mu = 0; mu < Nex; ++mu) {
79 for (
int site = 0; site < Nvol; ++site) {
81 Uorg.
mat(ut, site, mu);
84 Cst.
mat(ct, site, mu);
98 double norm = iQ1.
norm2();
106 for (
int cc = 0; cc <
NC *
NC; ++cc) {
107 dcomplex qt = f0 * cmplx(iQ0.r(cc), iQ0.i(cc))
108 + f1 * cmplx(iQ1.
i(cc), -iQ1.
r(cc))
109 - f2 * cmplx(iQ2.
r(cc), iQ2.
i(cc));
110 e_iQ.
set_r(cc, real(qt));
111 e_iQ.
set_i(cc, imag(qt));
139 const int Nvol = iQ.
nvol();
140 const int Nex = iQ.
nex();
146 for (
int mu = 0; mu < Nex; ++mu) {
147 for (
int site = 0; site < Nvol; ++site) {
152 double norm = iQ1.
norm2();
153 if (norm > 1.0e-10) {
160 for (
int cc = 0; cc <
NC *
NC; ++cc) {
161 dcomplex qt = f0 * cmplx(iQ0.
r(cc), iQ0.
i(cc))
162 + f1 * cmplx(iQ1.i(cc), -iQ1.r(cc))
163 - f2 * cmplx(iQ2.r(cc), iQ2.i(cc));
164 e_iQ.
set_ri(cc, site, mu, real(qt), imag(qt));
191 const double alpha,
const Field_G& Sigmap,
202 const int Nex = Xi.
nex();
204 assert(Xi.
nvol() == Nvol);
205 assert(iTheta.
nvol() == Nvol);
206 assert(Sigmap.
nvol() == Nvol);
207 assert(Cst.
nvol() == Nvol);
208 assert(Uorg.
nvol() == Nvol);
209 assert(iTheta.
nex() == Nex);
210 assert(Sigmap.
nex() == Nex);
211 assert(Cst.
nex() == Nex);
212 assert(Uorg.
nex() == Nex);
217 for (
int mu = 0; mu < Nex; ++mu) {
218 for (
int site = 0; site < Nvol; ++site) {
221 Cst.
mat(C_tmp, site, mu);
225 Uorg.
mat(U_tmp, site, mu);
229 Sigmap.
mat(Sigmap_tmp, site, mu);
245 double norm = iQ1.
norm2();
246 if (norm > 1.0e-10) {
253 for (
int cc = 0; cc <
NC *
NC; ++cc) {
254 dcomplex qt = f0 * cmplx(iQ0.r(cc), iQ0.i(cc))
255 + f1 * cmplx(iQ1.
i(cc), -iQ1.
r(cc))
256 - f2 * cmplx(iQ2.
r(cc), iQ2.
i(cc));
257 e_iQ.set(cc, real(qt), imag(qt));
264 double cos_w = cos(w);
266 dcomplex emiu = cmplx(cos(u), -sin(u));
267 dcomplex e2iu = cmplx(cos(2.0 * u), sin(2.0 * u));
269 dcomplex r01 = cmplx(2.0 * u, 2.0 * (u2 - w2)) * e2iu
270 + emiu * cmplx(16.0 * u * cos_w + 2.0 * u * (3.0 * u2 + w2) * xi0,
271 -8.0 * u2 * cos_w + 2.0 * (9.0 * u2 + w2) * xi0);
273 dcomplex r11 = cmplx(2.0, 4.0 * u) * e2iu
274 + emiu * cmplx(-2.0 * cos_w + (3.0 * u2 - w2) * xi0,
275 2.0 * u * cos_w + 6.0 * u * xi0);
277 dcomplex r21 = cmplx(0.0, 2.0) * e2iu
278 + emiu * cmplx(-3.0 * u * xi0, cos_w - 3.0 * xi0);
280 dcomplex r02 = cmplx(-2.0, 0.0) * e2iu
281 + emiu * cmplx(-8.0 * u2 * xi0,
282 2.0 * u * (cos_w + xi0 + 3.0 * u2 * xi1));
284 dcomplex r12 = emiu * cmplx(2.0 * u * xi0,
285 -cos_w - xi0 + 3.0 * u2 * xi1);
287 dcomplex r22 = emiu * cmplx(xi0, -3.0 * u * xi1);
289 double fden = 1.0 / (2 * (9.0 * u2 - w2) * (9.0 * u2 - w2));
291 dcomplex b10 = cmplx(2.0 * u, 0.0) * r01 + cmplx(3.0 * u2 - w2, 0.0) * r02
292 - cmplx(30.0 * u2 + 2.0 * w2, 0.0) * f0;
293 dcomplex b11 = cmplx(2.0 * u, 0.0) * r11 + cmplx(3.0 * u2 - w2, 0.0) * r12
294 - cmplx(30.0 * u2 + 2.0 * w2, 0.0) * f1;
295 dcomplex b12 = cmplx(2.0 * u, 0.0) * r21 + cmplx(3.0 * u2 - w2, 0.0) * r22
296 - cmplx(30.0 * u2 + 2.0 * w2, 0.0) * f2;
298 dcomplex b20 = r01 - cmplx(3.0 * u, 0.0) * r02 - cmplx(24.0 * u, 0.0) * f0;
299 dcomplex b21 = r11 - cmplx(3.0 * u, 0.0) * r12 - cmplx(24.0 * u, 0.0) * f1;
300 dcomplex b22 = r21 - cmplx(3.0 * u, 0.0) * r22 - cmplx(24.0 * u, 0.0) * f2;
302 b10 *= cmplx(fden, 0.0);
303 b11 *= cmplx(fden, 0.0);
304 b12 *= cmplx(fden, 0.0);
305 b20 *= cmplx(fden, 0.0);
306 b21 *= cmplx(fden, 0.0);
307 b22 *= cmplx(fden, 0.0);
310 for (
int cc = 0; cc < NC *
NC; ++cc) {
311 dcomplex qt1 = b10 * cmplx(iQ0.r(cc), iQ0.i(cc))
312 + b11 * cmplx(iQ1.
i(cc), -iQ1.
r(cc))
313 - b12 * cmplx(iQ2.
r(cc), iQ2.
i(cc));
314 B1.set(cc, real(qt1), imag(qt1));
316 dcomplex qt2 = b20 * cmplx(iQ0.r(cc), iQ0.i(cc))
317 + b21 * cmplx(iQ1.
i(cc), -iQ1.
r(cc))
318 - b22 * cmplx(iQ2.
r(cc), iQ2.
i(cc));
319 B2.
set(cc, real(qt2), imag(qt2));
323 USigmap.
mult_nn(U_tmp, Sigmap_tmp);
331 dcomplex tr1 = cmplx(tmp1.
r(0) + tmp1.
r(4) + tmp1.
r(8),
332 tmp1.
i(0) + tmp1.
i(4) + tmp1.
i(8));
333 dcomplex tr2 = cmplx(tmp2.
r(0) + tmp2.
r(4) + tmp2.
r(8),
334 tmp2.
i(0) + tmp2.
i(4) + tmp2.
i(8));
337 iQUS.mult_nn(iQ1, USigmap);
342 for (
int cc = 0; cc < NC *
NC; ++cc) {
343 dcomplex qt = tr1 * cmplx(iQ1.
i(cc), -iQ1.
r(cc))
344 - tr2 * cmplx(iQ2.
r(cc), iQ2.
i(cc))
345 + f1 * cmplx(USigmap.
r(cc), USigmap.
i(cc))
346 + f2 * cmplx(iQUS.i(cc), -iQUS.r(cc))
347 + f2 * cmplx(iUSQ.
i(cc), -iUSQ.
r(cc));
348 iGamma.
set(cc, -imag(qt), real(qt));
360 iTheta_tmp.
mult_nn(iGamma, U_tmp);
362 iTheta.
set_mat(site, mu, iTheta_tmp);
365 Xi_tmp.
mult_nn(Sigmap_tmp, e_iQ);
386 const double& u,
const double& w)
389 const double u2 = u * u;
390 const double w2 = w * w;
391 const double cos_w = cos(w);
393 const double cos_u = cos(u);
394 const double sin_u = sin(u);
396 const dcomplex emiu = cmplx(cos_u, -sin_u);
397 const dcomplex e2iu = cmplx(cos_u * cos_u - sin_u * sin_u, 2.0 * sin_u * cos_u);
399 const dcomplex h0 = e2iu * cmplx(u2 - w2, 0.0)
400 + emiu * cmplx(8.0 * u2 * cos_w, 2.0 * u * (3.0 * u2 + w2) * xi0);
401 const dcomplex h1 = cmplx(2 * u, 0.0) * e2iu
402 - emiu * cmplx(2.0 * u * cos_w, -(3.0 * u2 - w2) * xi0);
403 const dcomplex h2 = e2iu - emiu * cmplx(cos_w, 3.0 * u * xi0);
405 const double fden = 1.0 / (9.0 * u2 - w2);
418 const double c0 = -(iQ3.
i(0, 0) + iQ3.
i(1, 1) + iQ3.
i(2, 2)) / 3.0;
419 const double c1 = -0.5 * (iQ2.
r(0, 0) + iQ2.
r(1, 1) + iQ2.
r(2, 2));
420 const double c13r = sqrt(c1 / 3.0);
421 const double c0max = 2.0 * c13r * c13r * c13r;
423 const double theta = acos(c0 / c0max);
426 u = c13r * cos(theta / 3.0);
427 w = sqrt(c1) * sin(theta / 3.0);
446 const double w2 = w * w;
447 const static double c0 = -1.0 / 3.0;
448 const static double c1 = 1.0 / 30.0;
449 const static double c2 = -1.0 / 840.0;
450 const static double c3 = 1.0 / 45360.0;
451 const static double c4 = -1.0 / 3991680.0;
453 return c0 + w2 * (c1 + w2 * (c2 + w2 * (c3 + w2 * c4)));
455 return (w * cos(w) - sin(w)) / (w * w * w);
465 const static int Nprec = 32;
467 const int Nvol = iQ.
nvol();
468 const int Nex = iQ.
nex();
470 for (
int ex = 0; ex < Nex; ++ex) {
471 for (
int site = 0; site < Nvol; ++site) {
480 for (
int iprec = 0; iprec < Nprec; ++iprec) {
481 double exf = 1.0 / (Nprec - iprec);
void force_recursive(Field_G &Xi, Field_G &iTheta, const double alpha, const Field_G &Sigmap, const Field_G &C, const Field_G &U)
determination of fields for force calculation
void general(const char *format,...)
double func_xi1(const double w)
void set_uw(double &u, double &w, const Mat_SU_N &iQ2, const Mat_SU_N &iQ3)
Mat_SU_N & at()
antihermitian traceless
double func_xi0(const double w)
void multadd_dn(const Mat_SU_N &u1, const Mat_SU_N &u2)
void set_i(int c, const double &im)
void project(Field_G &U, const double alpha, const Field_G &C, const Field_G &Uorg)
projection U = P[alpha, C, Uorg]
void set_r(int c, const double &re)
void mult_nd(const Mat_SU_N &u1, const Mat_SU_N &u2)
void set_fj(dcomplex &f0, dcomplex &f1, dcomplex &f2, const double &u, const double &w)
void set_parameters(const Parameters ¶m)
void exp_iQ(Field_G &e_iQ, const Field_G &iQ)
void exp_iQ_bf(Field_G &e_iQ, const Field_G &iQ)
static const std::string class_name
static double get_time()
obtain a wall-clock time.
void set(int c, double re, const double &im)
string get_string(const string &key) const
void set_mat(const int site, const int mn, const Mat_SU_N &U)
Mat_SU_N mat(const int site, const int mn=0) const
void mult_nn(const Mat_SU_N &u1, const Mat_SU_N &u2)
static VerboseLevel set_verbose_level(const std::string &str)
Bridge::VerboseLevel m_vl
void set_ri(const int cc, const int site, const int mn, const double re, const double im)