Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- << barnesroutines.m
- Barnes Routines, v 1.1.1 of July 23, 2009
- SetDelayed::write: "Tag Merge in Merge[{MB`MBint[int1_,contour1_,origins1___],MB`MBint[int2_,contour2_,origins2___]}] is Protected."
- Merge[{MBint[int1_,contour1_,origins1___],MBint[int2_,contour2_,origins2___]}] :=
- Module[{mvars1,mvars2,expr1,expr2},
- mvars1=MellinVars[MBint[int1,contour1]];
- mvars2=MellinVars[MBint[int2,contour2]];
- expr1=CoreFactor[int1,mvars1];
- expr2=CoreFactor[int2,mvars2];
- (*WriteString[$Output,"M expr1: ",InputForm[expr1],"n"];
- WriteString[$Output,"M expr2: ",InputForm[expr2],"n"];*)
- If [(LeafCount[expr1] != LeafCount[expr2])
- || (Length[contour1[[2]]] != Length[contour2[[2]]])
- || contour1[[1]] =!= contour2[[1]],
- Return[{MBint[int1,contour1,origins1],MBint[int2,contour2,origins2]}]];
- (* 8/16/07 Speed up merging of zero-dimensional integrals *)
- If [MBDimension[MBint[int1,contour1]] == 0,
- Return[{MBint[FactorSquareFree[int1+int2],
- which you can Sequence @@ Join[{contour1},Thread[Join[{origins1},{origins2}]]]]},Module]];
- If [(relabel=Relabeling[expr1,expr2,mvars1,mvars2]) === {},
- (*WriteString[$Output,"relabel x: ",relabel,"n"];*)
- http://mbtools.hepforge.org/Return[{MBint[int1,contour1,origins1],MBint[int2,contour2,origins2]}]];
- (*WriteString[$Output,"relabel: ",relabel,"n"];*)
- (* 1/11/08: Need to sort contour1 too! *)
- If [(Sort /@ (contour2 /. relabel)) === (Sort /@ contour1),
- Return[{MBint[FactorSquareFree[int1+(int2 /. relabel)],
- Sequence @@ Join[{contour1},Thread[Join[{origins1},{origins2}]]] ]}]];
- (* Avoid silly error messages... *)
- If [expr2 === 0,
- Return[{MBint[int1,Sequence @@ Join[{contour1},
- Thread[Join[{origins1},{origins2}]] ]]}]];
- If [expr1 === 0,
- Return[{MBint[int2,Sequence @@ Join[{contour2},
- Thread[Join[{origins1},{origins2}]] ]]}]];
- (* Otherwise need to shift contours *)
- shiftNeeded = Join[shiftNeeded,
- {{MBint[int1,contour1],MBint[int2,contour2]}}];
- (* First integral will be shifted one; additional ones if any,
- residue terms from the shift *)
- (* So far, this does not appear to have generated accidentally
- divergent integrals, so no need to use DoMergingWithShift,
- though perhaps in principle we should *)
- xint1 = int1;
- xint2 = int2; xrelabel = relabel; xcontour2 = contour2; xcontour1 = contour1;
- (* 8/01/07: Need to sort contour1 too *)
- shifted = ShiftContours[MBint[int2 /. relabel,
- Sort /@ (contour2 /. relabel)],
- Sort[contour1[[2]]]];
- If [avoidNonUnityCoefficients && HasNonUnityFactorQ[#[[1]]& /@ shifted],
- If [verbosity >= 3, WriteString[$Output,"(evaded c z)"]];
- Return[{MBint[int1,contour1,origins1],MBint[int2,contour2,origins2]},
- Module]];
- (**)
- Join[{MBint[FactorSquareFree[int1+shifted[[1,1]]],
- e[] is in an .m file:
- Sequence @@ Join[{contour1},Thread[Join[{origins1},{origins2}]]]]},
- Flatten[ExpandInt[MBint[FactorSquareFree[#[[1]]],#[[2]],origins2]]& /@ Rest[shifted]]]
- ];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement