Skip to content

Commit

Permalink
Modified the behavior of FCLoopFindIntegralMappings to keep
Browse files Browse the repository at this point in the history
only the occurring master integrals in the list.

The old behavior was to add all preferred integrals by default,
even if they did not occur at all.
  • Loading branch information
vsht committed Jun 21, 2022
1 parent 0ff6364 commit 9bad2d9
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 17 deletions.
4 changes: 2 additions & 2 deletions FeynCalc/LoopIntegrals/FCLoopFindIntegralMappings.m
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@
time=AbsoluteTime[];
FCPrint[1, "FCLoopFindIntegralMappings: Removing irrelevant integrals from the preferred list.", FCDoControl -> fcfpmVerbose];
res = Map[
If[ SelectFree[#,optPreferredIntegrals]==={},
If[ Complement[#,optPreferredIntegrals]==={},
Unevaluated[Sequence[]],
#]&,res];
FCPrint[1, "FCLoopFindIntegralMappings: Done removing irrelevant integrals, timing: ", N[AbsoluteTime[] - time, 4], FCDoControl->fcfpmVerbose];

FCPrint[3, "FCLoopFindIntegralMappings: Preliminary result without irrelevant integrals: ", res, FCDoControl->fcfpmVerbose];

(*Only return replacement rules if the input is a list of GLIs and the List option is set to False*)
If[ !OptionValue[List] && MatchQ[expr,{(_GLI | Power[_GLI, _] | HoldPattern[Times][(_GLI | Power[_GLI, _]) ..]) ..}],
If[ !OptionValue[List] && FreeQ[expr,FCTopology] (*MatchQ[expr,{(_GLI | Power[_GLI, _] | HoldPattern[Times][(_GLI | Power[_GLI, _]) ..]) ..}]*),

time=AbsoluteTime[];
FCPrint[1, "FCLoopFindIntegralMappings: Creating final mapping rules.", FCDoControl -> fcfpmVerbose];
Expand Down
41 changes: 26 additions & 15 deletions Tests/LoopIntegrals/FCLoopFindIntegralMappings.test
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,30 @@
Tests`LoopIntegrals`fcstFCLoopFindIntegralMappings =
({
{"fcstFCLoopFindIntegralMappings-ID1",
"FCLoopFindIntegralMappings[{FAD[{p1,m1}],FAD[{p1+q,m1}],FAD[{p1,m2}]},{p1},FCE->True]\
", "{{FAD[{p1, m1}], FAD[{p1 + q, m1}]}, {FAD[{p1, m2}]}}"},
"FCLoopFindIntegralMappings[{FAD[{p1,m1}],FAD[{p1+q,m1}],FAD[{p1,m2}]},{p1},FCE->True]",
"{{FAD[{p1 + q, m1}] -> FAD[{p1, m1}]}, {FAD[{p1, m1}], FAD[{p1, m2}]}}"},
{"fcstFCLoopFindIntegralMappings-ID2",
"FCLoopFindIntegralMappings[{FAD[p1] FAD[p1-p3-p4] FAD[p4] FAD[p3+q1] \
FAD[{p3,m1}] FAD[{p1-p4,m1}] FAD[{p1+q1,0},{p1+q1,0}],FAD[p4] \
FAD[p1-p3+q1] FAD[p3+q1] FAD[p1+p4+q1] FAD[{p3,m1}] FAD[{p1+q1,m1}] \
FAD[{p1+p4+2 q1,0},{p1+p4+2 q1,0}],FAD[p1] FAD[p4-2 q1] FAD[p3+q1] \
FAD[p1-p3-p4+2 q1] FAD[{p3,m1}] FAD[{p1-p4+2 q1,m1}] \
FAD[{p1+q1,0},{p1+q1,0}]},{p1,p3,p4},FCE->True]",
"{{FAD[p1]*FAD[p1 - p3 - p4]*FAD[p4]*FAD[p3 + q1]*FAD[{p3, m1}]*FAD[{p1 - p4, m1}]*FAD[p1 + q1, p1 + q1],
FAD[p4]*FAD[p1 - p3 + q1]*FAD[p3 + q1]*FAD[p1 + p4 + q1]*FAD[{p3,
m1}]*FAD[{p1 + q1, m1}]*FAD[p1 + p4 + 2*q1, p1 + p4 + 2*q1],
FAD[p1]*FAD[p4 - 2*q1]*FAD[p3 + q1]*FAD[p1 - p3 - p4 + 2*q1]*FAD[{p3,
m1}]*FAD[{p1 - p4 + 2*q1, m1}]*FAD[p1 + q1, p1 + q1]}}"},
"FCLoopFindIntegralMappings[{FAD[p1] FAD[p1 - p3 - p4] FAD[p4] FAD[
p3 + q1] FAD[{p3, m1}] FAD[{p1 - p4, m1}] FAD[{p1 + q1,
0}, {p1 + q1, 0}],
FAD[p4] FAD[p1 - p3 + q1] FAD[p3 + q1] FAD[
p1 + p4 + q1] FAD[{p3, m1}] FAD[{p1 + q1,
m1}] FAD[{p1 + p4 + 2 q1, 0}, {p1 + p4 + 2 q1, 0}],
FAD[p1] FAD[p4 - 2 q1] FAD[p3 + q1] FAD[
p1 - p3 - p4 + 2 q1] FAD[{p3, m1}] FAD[{p1 - p4 + 2 q1,
m1}] FAD[{p1 + q1, 0}, {p1 + q1, 0}]}, {p1, p3, p4}, FCE -> True]",
"{{FAD[p4] FAD[p1 - p3 + q1] FAD[p3 + q1] FAD[
p1 + p4 + q1] FAD[{p3, m1}] FAD[{p1 + q1, m1}] FAD[
p1 + p4 + 2 q1, p1 + p4 + 2 q1] ->
FAD[p1] FAD[p1 - p3 - p4] FAD[p4] FAD[
p3 + q1] FAD[{p3, m1}] FAD[{p1 - p4, m1}] FAD[p1 + q1, p1 + q1],
FAD[p1] FAD[p4 - 2 q1] FAD[p3 + q1] FAD[
p1 - p3 - p4 + 2 q1] FAD[{p3, m1}] FAD[{p1 - p4 + 2 q1, m1}] FAD[
p1 + q1, p1 + q1] ->
FAD[p1] FAD[p1 - p3 - p4] FAD[p4] FAD[
p3 + q1] FAD[{p3, m1}] FAD[{p1 - p4, m1}] FAD[p1 + q1,
p1 + q1]}, {FAD[p1] FAD[p1 - p3 - p4] FAD[p4] FAD[
p3 + q1] FAD[{p3, m1}] FAD[{p1 - p4, m1}] FAD[p1 + q1, p1 + q1]}}"},

{"ID-3","FCLoopFindIntegralMappings[{FCTopology[
fctopology1, {SFAD[{{p1, 0}, {0, 1}, 1}],
Expand Down Expand Up @@ -193,8 +203,9 @@ GLI[topo2, {1, 1}]}}"},
SFAD[{{I tmom1, 0}, {-m2^2, -1},
1}] SFAD[{{I tmom2, 0}, {-m2^2, -1}, 1}]}, {p1, p3, tmom1,
tmom2}, FCE -> True]",
"{{SFAD[{{I*p1, 0}, {-m2^2, -1}, 1}]*SFAD[{{I*p3, 0}, {-m2^2, -1}, 1}],
SFAD[{{I*tmom1, 0}, {-m2^2, -1}, 1}]*SFAD[{{I*tmom2, 0}, {-m2^2, -1}, 1}]}}"},
"{{SFAD[{{I*tmom1, 0}, {-m2^2, -1}, 1}]*SFAD[{{I*tmom2, 0},
{-m2^2, -1}, 1}] -> SFAD[{{I*p1, 0}, {-m2^2, -1}, 1}]*SFAD[{{I*p3, 0},
{-m2^2, -1}, 1}]}, {SFAD[{{I*p1, 0}, {-m2^2, -1}, 1}]*SFAD[{{I*p3, 0}, {-m2^2, -1}, 1}]}}"},
{"fcstFCLoopFindIntegralMappings-ID9",
"FCLoopFindIntegralMappings[{GLI[prop2LtopoG21, {0, n1, n2, n3, n4}],
GLI[prop2LtopoG20, {0, n1, n2, n3, n4}]}, {
Expand Down

0 comments on commit 9bad2d9

Please sign in to comment.