44 void curcor2(
const multi1d<LatticeColorMatrix>&
u,
45 const LatticePropagator& quark_prop_1,
46 const LatticePropagator& quark_prop_2,
55 if ( no_vec_cur < 2 || no_vec_cur > 4 )
61 write(xml,
"num_vec_cur", no_vec_cur);
67 LatticePropagator tmp_prop1;
68 LatticePropagator tmp_prop2;
73 multi1d<Double> hsum(length);
77 LatticePropagator anti_quark_prop = Gamma(
G5) * quark_prop_2 * Gamma(
G5);
81 multi2d<Real> vector_current(no_vec_cur*(
Nd-1), length);
87 for(
int k = 0;
k <
Nd; ++
k)
95 tmp_prop2 =
u[
k] * shift(quark_prop_1,
FORWARD,
k) * Gamma(
n);
96 chi_sq = - real(trace(adj(anti_quark_prop) * tmp_prop2));
98 tmp_prop1 = Gamma(
n) * tmp_prop2;
99 psi_sq = real(trace(adj(anti_quark_prop) * tmp_prop1));
101 tmp_prop2 =
u[
k] * shift(anti_quark_prop,
FORWARD,
k) * Gamma(
n);
102 chi_sq += real(trace(adj(tmp_prop2) * quark_prop_1));
104 tmp_prop1 = Gamma(
n) * tmp_prop2;
105 psi_sq += real(trace(adj(tmp_prop1) * quark_prop_1));
115 hsum = sumMulti(psi_sq, phases.
getSet());
117 for(
int t = 0;
t < length; ++
t)
119 int t_eff = (
t -
t0 + length) % length;
120 vector_current[kv][t_eff] = dummy1 * Real(hsum[
t]);
124 hsum = sumMulti(chi_sq, phases.
getSet());
126 for(
int t = 0;
t < length; ++
t)
128 int t_eff = (
t -
t0 + length) % length;
129 vector_current[kcv][t_eff] = dummy1 * Real(hsum[
t]);
137 if ( no_vec_cur >= 3 )
142 for(
int k = 0;
k <
Nd; ++
k)
150 psi_sq = real(trace(adj(anti_quark_prop) * Gamma(n1) * quark_prop_1 * Gamma(
n)));
156 hsum = sumMulti(psi_sq, phases.
getSet());
158 for(
int t = 0;
t < length; ++
t)
160 int t_eff = (
t -
t0 + length) % length;
161 vector_current[kv][t_eff] = dummy1 * Real(hsum[
t]);
169 if ( no_vec_cur >= 4 )
173 for(
int k = 0;
k <
Nd; ++
k)
180 psi_sq = real(trace(adj(anti_quark_prop) * Gamma(
n) * quark_prop_1 * Gamma(
n)));
186 hsum = sumMulti(psi_sq, phases.
getSet());
188 for(
int t = 0;
t < length; ++
t)
190 int t_eff = (
t -
t0 + length) % length;
191 vector_current[kv][t_eff] = dummy1 * Real(hsum[
t]);
199 XMLArrayWriter xml_cur(xml,vector_current.size2());
200 push(xml_cur,
"Vector_currents");
202 for (
int current_value=0; current_value < vector_current.size2(); ++current_value)
206 write(xml_cur,
"current_value", current_value);
207 write(xml_cur,
"vector_current", vector_current[current_value]);
220 multi2d<Real> axial_current(2, length);
226 psi_sq = real(trace(adj(anti_quark_prop) * Gamma(
n) * quark_prop_1 * Gamma(
G5)));
229 chi_sq = real(trace(adj(anti_quark_prop) * Gamma(
n) *
234 Gamma(
G5)) * quark_prop_1));
238 Real dummy1 = Real(-1) / Real(2);
241 hsum = sumMulti(psi_sq, phases.
getSet());
243 for(
int t = 0;
t < length; ++
t)
245 int t_eff = (
t -
t0 + length) % length;
246 axial_current[1][t_eff] = - Real(hsum[
t]);
250 hsum = sumMulti(chi_sq, phases.
getSet());
252 for(
int t = 0;
t < length; ++
t)
254 int t_eff = (
t -
t0 + length) % length;
255 axial_current[0][t_eff] = dummy1 * Real(hsum[
t]);
260 XMLArrayWriter xml_cur(xml,axial_current.size2());
261 push(xml_cur,
"Axial_currents");
263 for (
int current_value=0; current_value < axial_current.size2(); ++current_value)
267 write(xml_cur,
"current_value", current_value);
268 write(xml_cur,
"axial_current", axial_current[current_value]);
Primary include file for CHROMA library code.
Fourier transform phase factor support.
int numSubsets() const
Number of subsets - length in decay direction.
int getDir() const
Decay direction.
const Set & getSet() const
The set to be used in sumMulti.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams ¶m)
Writer parameters.
void curcor2(const multi1d< LatticeColorMatrix > &u, const LatticePropagator &quark_prop_1, const LatticePropagator &quark_prop_2, const SftMom &phases, int t0, int no_vec_cur, XMLWriter &xml, const std::string &xml_group)
Construct current correlators.
Asqtad Staggered-Dirac operator.
QDP_error_exit("too many BiCG iterations", n_count, rsd_sq, cp, c, re_rvr, im_rvr, re_a, im_a, re_b, im_b)
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
Fourier transform phase factor support.