Name: Rolf Mertig
Date: 06/21/12-12:20:45 AM Z
Am 20.06.2012 17:21, schrieb Feng Feng:
> Dear All,
>
> I have found that The Tr operation is terriblely slow in FeynCalc
6.0, while the same code run very faster with fc5beta3.
>
> Here is my testing code, and has anyone else experienced the same
problem?
>
> ===========================
> «HighEnergyPhysics`fc`
>
> exp = (mc + GSD[k1]).GAD[c[li3]].(mc +
GSD[k1 + k2 + p - q]).GAD[
*> c[\\\\\\\\\\\\\\\\[Gamma]]].(-mc
- GSD[p] - GSD[q]).GA[*
> 5].(mc + GSD[p] +
GSD[q]).GAD[c[li2]].(-mc +
GSD[k2]).GAD[
> li2].(mc + GSD[p] + GSD[q]).GA[
*> 5].(-mc + GSD[p] -
GSD[q]).GAD[\\\\\\\\\\\\\\\\[Gamma]].(mc
- GSD[k2 + 2 p])*
> .GAD[li3] // FCI
>
> (*$VeryVerbose=5;*)
>
> DateString[]
> Tr[exp]
> DateString[]
>
>
Please use Mathematica 8 and FeynCalc 8.1.0
Then on a reasonably fast computer it takes half a minute to do the
trace.
That is not extremely fast, but also not extremely slow, I think.
Rolf
Mathematica 8.0 for Linux x86 (64-bit)
Copyright 1988-2011 Wolfram Research, Inc.
In[1]:= !!t
<<HighEnergyPhysics`fc` ;
s2v[a_Symbol,b_Symbol]:=s2v[a]=Symbol[ToString[a]<>ToString[b]];
exp = (mc + GSD[k1]).GAD[li3].(mc + GSD[k1 + k2 + p
- q]).GAD[
gam].(-mc + GSD[p] - GSD[q]).GA[5].(mc +
GSD[p + q]).GAD[
li2].(-mc + GSD[k2]).GAD[li2].(mc + GSD[p +
q]).GA[5].
(-mc + GSD[p - q]).GAD[gam].(mc - GSD[k2 + 2 p])
.GAD[li3];
Print[“time needed for the trace = “,
AbsoluteTiming[trres=Tr[exp];]//First];
Print[“the result is : “,
InputForm[result = Collect2[FCE[trres]/.SPD->s2v, mc,
Factoring ->
Simplify, IsolateNames -> X]]];
Print[“where : “];
??X
In[1]:= <<t
Loading FeynCalc from
/usr/share/Mathematica/Applications/HighEnergyPhysics
FeynCalc 8.1.0 Type ?FeynCalc for help or visit
http://www.feyncalc.org/
$PrePrint is set to FeynCalcForm. Use FI and FC to change the display
format.
Loading FeynArts, see www.feynarts.de for documentation
FeynArts 3.4 patched for use with FeynCalc
time needed for the trace = 31.681195
the result is : -4*D^3*mc^8 + 4*mc^2*HoldForm[X[17]]
4*mc^4*HoldForm[X[28]] +
4*mc^6*HoldForm[X[32]] -
4*HoldForm[X[3]]^3*HoldForm[X[47]]
where :
Global`X
X[3] = -2 + D
X[4] = -6*pp + 5*D*pp + 4*D*pq - 6*qq + D*qq +
4*k2p*HoldForm[X[3]] +
2*k2q*HoldForm[X[3]]
X[5] = 8 - 10*D + D^2
X[6] = 16*pq - 20*D*pq + 2*D^2*pq - 8*qq + 2*D*qq -
D^2*qq +
k2q*HoldForm[X[3]]^2 -
pp*HoldForm[X[5]]
X[7] = 32*k2q^2 - 48*D*k2q^2 + 24*D^2*k2q^2 - 4*D^3*k2q^2
- 64*k2q*pp -
64*D*k2q*pp - 16*D^2*k2q*pp + 16*D^3*k2q*pp - 32*D*pp^2
- 34*D^2*pp^2 -
7*D^3*pp^2 - 64*k2q*pq + 32*D*k2q*pq + 16*D^2*k2q*pq -
8*D^3*k2q*pq +
64*D*pp*pq - 64*D^2*pp*pq + 16*D^3*pp*pq - 8*D^2*pq^2 -
4*D^3*pq^2 +
64*k2q*qq - 64*D*k2q*qq + 16*D^2*k2q*qq - 32*D*pp*qq +
36*D^2*pp*qq -
6*D^3*pp*qq + 2*D^2*qq^2 + D^3*qq^2 +
2*k2k2*HoldForm[X[3]]^2*
HoldForm[X[4]] +
4*k2p*HoldForm[X[3]]*HoldForm[X[6]]
X[8] = -2 + 5*D
X[9] = 2*k2p*HoldForm[X[3]] +
qq*HoldForm[X[3]] +
pp*HoldForm[X[8]]
X[10] = 5*pp - 4*pq + qq
X[11] = -4*pq + k2q*HoldForm[X[3]] -
D*HoldForm[X[10]]
X[12] = pp - 2*pq + qq
X[13] = -16 + 9*D
X[14] = 2*pq + qq
X[15] = pp*HoldForm[X[13]] +
D*HoldForm[X[14]]
X[16] = 4*k2p^2*HoldForm[X[3]]^2 +
2*k2k2*HoldForm[X[3]]*HoldForm[X[9]]
- 4*k2p*HoldForm[X[3]]*HoldForm[X[11]]
- D*HoldForm[X[12]]*HoldForm[X[15]]
X[17] = 64*k1k1*k2p^2 - 96*D*k1k1*k2p^2 +
48*D^2*k1k1*k2p^2 -
8*D^3*k1k1*k2p^2 + 128*k1k2*k2p^2 - 192*D*k1k2*k2p^2 +
96*D^2*k1k2*k2p^2 - 16*D^3*k1k2*k2p^2 - 16*k1k1*k2k2*pp
- 24*D*k1k1*k2k2*pp - 12*D^2*k1k1*k2k2*pp +
2*D^3*k1k1*k2k2*pp -
16*k1k2*k2k2*pp + 24*D*k1k2*k2k2*pp -
12*D^2*k1k2*k2k2*pp +
2*D^3*k1k2*k2k2*pp + 96*k1k1*k2p*pp - 144*D*k1k1*k2p*pp
- 72*D^2*k1k1*k2p*pp - 12*D^3*k1k1*k2p*pp +
192*k1k2*k2p*pp -
320*D*k1k2*k2p*pp + 168*D^2*k1k2*k2p*pp -
28*D^3*k1k2*k2p*pp -
8*D^2*k2k2*k2p*pp + 4*D^3*k2k2*k2p*pp - 24*D^2*k2p^2*pp
- 12*D^3*k2p^2*pp + 64*k1k1*k2q*pp - 32*D*k1k1*k2q*pp -
16*D^2*k1k1*k2q*pp + 8*D^3*k1k1*k2q*pp + 96*k1k2*k2q*pp
- 80*D*k1k2*k2q*pp - 8*D^2*k1k2*k2q*pp +
12*D^3*k1k2*k2q*pp -
16*D^2*k2k2*k2q*pp + 8*D^3*k2k2*k2q*pp -
40*D^2*k2p*k2q*pp +
20*D^3*k2p*k2q*pp + 16*D^2*k2q^2*pp - 8*D^3*k2q^2*pp -
32*D*k1k1*pp^2 +
30*D^2*k1k1*pp^2 - 7*D^3*k1k1*pp^2 + 24*k1k2*pp^2 -
88*D*k1k2*pp^2 +
70*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1k2*k2k2*qq -
32*k1k1*k2p*qq + 48*D*k1k1*k2p*qq - 24*D^2*k1k1*k2p*qq
- 4*D^3*k1k1*k2p*qq + 32*k1k2*k2p*qq - 16*D*k1k2*k2p*qq
- 8*D^2*k2k2*k2p*qq - 4*D^3*k2k2*k2p*qq + 24*D^2*k2p^2*qq
- 12*D^3*k2p^2*qq - 8*D^2*k2p*k2q*qq + 4*D^3*k2p*k2q*qq
- 32*D*k1k1*pp*qq -
36*D^2*k1k1*pp*qq + 10*D^3*k1k1*pp*qq + 16*k1k2*pp*qq
- 16*D*k1k2*pp*qq +
4*D^2*k1k2*pp*qq + 2*D^3*k1k2*pp*qq + 2*D^3*k2k2*pp*qq
- 40*D*k2p*pp*qq +
56*D^2*k2p*pp*qq - 12*D^3*k2p*pp*qq - 40*D*k2q*pp*qq
- 40*D^2*k2q*pp*qq -
12*D^3*k2q*pp*qq + 4*D^3*pp^2*qq - 32*k1k2*pq*qq +
32*D*k1k2*pq*qq -
8*D^2*k1k2*pq*qq + 16*D*k2p*pq*qq - 32*D^2*k2p*pq*qq
- 12*D^3*k2p*pq*qq -
16*D*k2q*pq*qq + 16*D^2*k2q*pq*qq - 4*D^3*k2q*pq*qq -
4*D^3*pp*pq*qq -
2*D^2*k1k1*qq^2 + D^3*k1k1*qq^2 - 8*k1k2*qq^2 +
8*D*k1k2*qq^2 -
2*D^2*k1k2*qq^2 + D^3*k1k2*qq^2 + D^3*k2k2*qq^2 +
20*D*k2p*qq^2 -
20*D^2*k2p*qq^2 + 8*D^3*k2p*qq^2 + 4*D*k2q*qq^2 -
4*D^2*k2q*qq^2 +
2*D^3*pp*qq^2 - 2*D^3*pq*qq^2 +
k1p*HoldForm[X[7]] -
k1q*HoldForm[X[3]]*HoldForm[X[16]]
X[18] = 2*k2p + 2*pp - pq + qq
X[19] = 6*k2p + 10*pp - pq + qq
X[20] = pq + qq
X[21] = 4*k2p + 5*pp + pq + 2*qq
X[22] = D^3*HoldForm[X[18]] -
2*D^2*HoldForm[X[19]] -
8*HoldForm[X[20]] +
4*D*HoldForm[X[21]]
X[23] = k2k2*HoldForm[X[3]]^3 +
2*HoldForm[X[22]]
X[24] = -8 + D
X[25] = D*qq + pp*HoldForm[X[24]]
X[26] = k2p*HoldForm[X[3]]^2 +
D*HoldForm[X[25]]
X[27] = k2k2*HoldForm[X[3]]^2 +
2*HoldForm[X[26]]
X[28] = -24*k1p*k2k2 + 20*D*k1p*k2k2 - 2*D^2*k1p*k2k2 -
D^3*k1p*k2k2 +
8*k1q*k2k2 - 12*D*k1q*k2k2 + 6*D^2*k1q*k2k2 -
D^3*k1q*k2k2 +
32*k1p*k2p -
8*D^2*k1p*k2p - 16*k1q*k2p + 8*D*k1q*k2p + 4*D^2*k1q*k2p
- 2*D^3*k1q*k2p + 8*D^2*k2k2*k2p - 4*D^3*k2k2*k2p +
24*D^2*k2p^2 -
12*D^3*k2p^2 + 48*k1p*k2q - 40*D*k1p*k2q + 4*D^2*k1p*k2q
- 2*D^3*k1p*k2q - 8*D^2*k2p*k2q + 4*D^3*k2p*k2q +
16*D*k1p*pp -
36*D^2*k1p*pp + 2*D^3*k1p*pp + 4*D^2*k1q*pp -
2*D^3*k1q*pp -
6*D^3*k2k2*pp - 24*D*k2p*pp + 32*D^2*k2p*pp -
28*D^3*k2p*pp -
8*D*k2q*pp - 8*D^2*k2q*pp + 12*D^3*k2q*pp + 8*D^2*pp^2 -
15*D^3*pp^2 -
32*D*k1p*pq + 16*D^2*k1p*pq - 16*D*k2p*pq +
16*D^2*k2p*pq -
4*D^3*k2p*pq - 16*D*k2q*pq + 16*D^2*k2q*pq -
4*D^3*k2q*pq +
8*D^2*pp*pq +
8*D^3*pp*pq + 16*D^2*pq^2 - 12*D^3*pq^2 + 16*D*k1p*qq -
4*D^2*k1p*qq +
2*D^3*k1p*qq + 4*D^2*k1q*qq - 2*D^3*k1q*qq +
2*D^3*k2k2*qq +
24*D*k2p*qq - 16*D^2*k2p*qq + 8*D^3*k2p*qq + 8*D*k2q*qq
- 8*D^2*k2q*qq -
24*D^2*pp*qq + 18*D^3*pp*qq - 8*D^2*pq*qq + D^3*qq^2 +
k1k2*HoldForm[X[23]] +
k1k1*HoldForm[X[3]]*HoldForm[X[27]]
X[29] = 2*k1k2 + 4*k1p + k2p + k2q
X[30] = k1k1 + k1k2 + 3*k1p - k1q - 2*k2p + 2*k2q + 4*pp +
4*pq
X[31] = k1k1 + k1k2 + k1p - k1q + k2k2 + 2*pq + 2*qq
X[32] = -8*k1k2 + 4*D*HoldForm[X[29]] -
2*D^2*HoldForm[X[30]] +
D^3*HoldForm[X[31]]
X[33] = pp - 2*pq - qq
X[34] = 8*k2q*pp - pp^2 + 4*pq^2 - 2*pp*qq - qq^2 +
4*k2p*HoldForm[X[33]]
X[35] = 3*pp - 6*pq - qq
X[36] = 5*pp - 2*pq + qq
X[37] = 3*pp^2 - 8*pp*pq + 4*pq^2 + 2*pp*qq - qq^2 +
2*k2q*HoldForm[X[36]]
X[38] = 4*k2q*pp*HoldForm[X[12]] +
2*k2p^2*HoldForm[X[35]] +
k2p*HoldForm[X[37]]
X[39] = k2k2*HoldForm[X[34]] +
2*HoldForm[X[38]]
X[40] = pp + 2*pq - qq
X[41] = 3*pp^2 - 12*pq^2 + 8*k2p*qq + 6*pp*qq + 3*qq^2
4*k2q*HoldForm[X[40]]
X[42] = -3*pp^2 + 8*pp*pq - 4*pq^2 - 2*pp*qq + qq^2 +
2*k2q*HoldForm[X[36]]
X[43] = -3*pp + 6*pq + qq
X[44] = pp^2 - 4*pp*pq + 4*pq^2 - qq^2 +
k2q*HoldForm[X[43]]
X[45] = k2q*HoldForm[X[42]] -
2*k2p*HoldForm[X[44]]
X[46] = k2k2*HoldForm[X[41]] -
2*HoldForm[X[45]]
X[47] = -8*k1k1*k2q^2*pp - 16*k1k2*k2q^2*pp +
k1k1*k2k2*pp^2 +
k1k2*k2k2*pp^2 + 2*k1k1*k2p*pp^2 + 8*k1k1*k2q*pp^2 +
12*k1k2*k2q*pp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