59 const valarray<Field_F>& sq2)
63 valarray<dcomplex> mcorr(Lt);
70 for (
int t = 0; t < mcorr.size(); ++t) {
72 t, real(mcorr[t]), imag(mcorr[t]));
74 double result = real(mcorr[0]);
80 for (
int t = 0; t < mcorr.size(); ++t) {
82 t, real(mcorr[t]), imag(mcorr[t]));
89 for (
int t = 0; t < mcorr.size(); ++t) {
91 t, real(mcorr[t]), imag(mcorr[t]));
98 for (
int t = 0; t < mcorr.size(); ++t) {
100 t, real(mcorr[t]), imag(mcorr[t]));
111 const valarray<Field_F>& sq1,
112 const valarray<Field_F>& sq2)
119 assert(meson.size() == Lt);
123 gm_src = qn_src.
mult(gm5);
124 gm_sink = gm5.
mult(qn_sink);
127 valarray<dcomplex> corr_local(Nt);
128 valarray<double> corr_r(Nd), corr_i(Nd);
129 valarray<int> s2(Nd);
131 for (
int c0 = 0; c0 < Nc; ++c0) {
132 for (
int d0 = 0; d0 < Nd; ++d0) {
133 int d1 = gm_src.index(d0);
136 for (
int t = 0; t < Nt; ++t) {
138 sq1[c0 + Nc * d0], sq2[c0 + Nc * d1], t);
140 dcomplex corr = cmplx(real(corr_t), imag(corr_t));
141 corr_local[t] += gm_src.value(d0) * corr;
152 const valarray<Field_F>& sqd)
156 valarray<dcomplex> p_corr_unity(Lt), p_corr_gamm0(Lt), p_corr_upper(Lt);
171 for (
int it = 0; it < p_corr_unity.size(); it++) {
173 it, real(p_corr_unity[it]), imag(p_corr_unity[it]));
180 for (
int it = 0; it < p_corr_upper.size(); it++) {
181 p_corr_upper[it] = (p_corr_unity[it] + p_corr_gamm0[it]) * 0.5;
183 it, real(p_corr_upper[it]), imag(p_corr_upper[it]));
189 for (
int it = 0; it < p_corr_gamm0.size(); it++) {
191 it, real(p_corr_gamm0[it]), imag(p_corr_gamm0[it]));
195 double result = real(p_corr_gamm0[0]);
204 const valarray<Field_F>& squ,
205 const valarray<Field_F>& sqd)
213 assert(proton.size() == Lt);
222 for (
int i = 0; i < Nd; i++) {
223 vout.
general(
m_vl,
"%d:\t %d %e %e \t %d %e %e \t %d %e %e \t %d %e %e \n",
225 gm5.index(i), real(gm5.value(i)), imag(gm5.value(i)),
226 c.index(i), real(c.value(i)), imag(c.value(i)),
227 cg5.index(i), real(cg5.value(i)), imag(cg5.value(i)),
236 valarray<dcomplex> corr_local(Nt);
237 corr_local = cmplx(0.0, 0.0);
239 for (
int it = 0; it < Nt; it++) {
240 #if ((DEBUG & 65535) & 0)
247 for (
int ialph = 0; ialph < Nd; ialph++) {
248 int ialphP = gm.
index(ialph);
250 int ialph3P = ialphP;
252 for (
int ialph1P = 0; ialph1P < Nd; ialph1P++) {
253 int ialph2P = cg5.index(ialph1P);
255 for (
int ic123P = 0; ic123P < FactNc; ic123P++) {
259 dcomplex factor = gm.
value(ialph)
263 squ[ic1P + Nc * ialph1P],
264 sqd[ic2P + Nc * ialph2P],
265 squ[ic3P + Nc * ialph3P], it);
267 squ[ic3P + Nc * ialph3P],
268 sqd[ic2P + Nc * ialph2P],
269 squ[ic1P + Nc * ialph1P], it);
270 sum += factor * (sum1 - sum2);
275 corr_local[it] = sum;
284 valarray<dcomplex>& corr_local)
289 assert(corr_global.size() == Lt);
290 assert(corr_local.size() == Nt);
292 valarray<dcomplex> corr_tmp(Lt);
296 for (
int t = 0; t < Lt; ++t) {
297 corr_tmp[t] = cmplx(0.0, 0.0);
300 for (
int t = 0; t < Nt; ++t) {
301 int t2 = t + ipet * Nt;
302 corr_tmp[t2] = corr_local[t];
305 for (
int t = 0; t < Lt; ++t) {
306 double crr = real(corr_tmp[t]);
307 double cri = imag(corr_tmp[t]);
310 corr_global[t] = cmplx(crr, cri);