[an error occurred while processing this directive]
Package-X is hosted by Hepforge, IPPP Durham

CollierCodeGenerate

CollierCodeGenerate[{x1,x2,},expr]
generates source code that defines a function with arguments xi to evaluate expr using the COLLIER library.

CollierCodeGenerate[{x1,x2,},Module[{y1,y2,},expr]]
generates source code with local variables yi.

Details and OptionsDetails and Options

  • All arguments xi and numerical quantities in expr are assumed double complex type.
  • CollierCodeGenerate recognizes a limited set of Wolfram Language symbols. As of this version, the following symbols are supported:
  • FunctionsPlus, Times, Power, Log, Conjugate, Re, Im, Abs, Arg
    ConstantsI
    NumbersInteger, Real, Complex, Rational
  • CollierCodeGenerate recognizes PVA, PVB, PVC, PVD, PVX, and Derivative[0,0,1,0,0][PVB], and appropriately inserts calls to COLLIER library functions TN_cll and DB_cll in the source code.
  • Typically, the output of LoopIntegrate, suitably manipulated, is supplied as the input expr. Since LoopIntegrate gives a result valid for any value of the kinematic variables, the resulting code may be evaluated with complex internal masses.
  • CollierCodeGenerate has attributes HoldAll. Use CollierCodeGenerate[,Evaluate[expr]] to evaluate expr symbolically before generating code.
  • The following options can be given:
  • Constants{}variables declared as constants
    "ExpressionOptimization"Automaticwhether to optimize the input expression
    "InlineExternalDefinitions"Falsewhether to insert OwnValues of symbols
    "Language""Fortran"language in which source code is written
    "FunctionName""generatedFunction"name of exported function
    "VariableNames"Automatichow variables are named in source code
    "Externals"{}additional code generation rules for variables whose definitions are external
    "PreambleLines"{}addtional lines of code to be inserted before function definition
    "PostambleLines"{}addtional lines of code to be inserted after function definition
  • The option Constants should be given as a list of rules of the form {sym1val1,sym2val2,}.
  • Possible settings for "VariableNames" are Automatic or Verbatim, or a length-three list of Automatic or Verbatim to individually control names of arguments, local variables, and constants.
  • The option "Externals" should be given as a list of rules of the form {sym1"name1",sym2"name2"}.
  • The options "PreambleLines" and "PostambleLines" should be given as a list of strings.