CodeTools · MakeKernel#
3 symbols, auto-generated from package ::usage strings.
GetStandardKernelDefinitions#
GetStandardKernelDefinitions[] returns a list of standard kernel definitions used in DiFfRG.
MakeKernel#
MakeKernel[kernel_Association, parameterList_List,integrandFlow_,constantFlow_:0., integrandDefinitions_String:"", constantDefinitions_String:""]
Make a kernel from a given flow equation, parmeter list and kernel. The kernel must be a valid specification of an integration kernel. This Function creates an integrator that evaluates (constantFlow + ∫integrandFlow). One can prepend additional c++ definitions to the flow equation by using the integrandDefinitions and constantDefinitions parameters. These are prepended to the respective methods of the integration kernel, allowing one to e.g. define specific angles one needs for the flow code.
The options “KernelReturnTransform” and “ConstantReturnTransform” (default Identity) accept a Mathematica function applied to the optimized expression before code generation, which lets you wrap the return value, e.g. “KernelReturnTransform” -> Re renders the kernel return as real(…).
The option “ComputeType” (default “double”) is the value type the kernel is evaluated and integrated in: “double”, “float”, “DiFfRG::complexstatic constexpr bool <name> = <value>; member. “MatsubaraEven” stays a separate option because it carries a symbolic evenness check that a generic mechanism cannot.
MakeKernelGroup#
MakeKernelGroup[{{kernelExpr1, constExpr1, "output1"}, {kernelExpr2, constExpr2, "output2"}, ...}, opts]
Make one kernel that computes several integrals of the same loop at once, e.g. several projections of one diagram onto different tensor structures. The outputs share everything that is common to their integrands (lookups, propagators, subexpressions), which makes the group substantially cheaper than separate kernels. A member may also be given as {kernelExpr, “output”} (no constant).
Takes the options of MakeKernel; all outputs share the parameters, integrator, coordinates and “ComputeType”. “KernelReturnTransform” and “ConstantReturnTransform” may also be lists with one function per output.
The generated