Skip to content

Commit

Permalink
meta/Lattice.m: add t to list of parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
jhyeon committed Aug 3, 2014
1 parent 331e27a commit dd6032c
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions meta/Lattice.m
Expand Up @@ -118,8 +118,8 @@
Format[d:drv[_, _], CForm] := Format[DrvToCFormString[d], OutputForm];

Module[{
parameterRules =
Join[gaugeCouplingRules, vevRules, otherParameterRules],
parameterRules = Join[
{t -> Re[t]}, gaugeCouplingRules, vevRules, otherParameterRules],
gaugeCouplings = RealVariables[gaugeCouplingRules],
betaFunctionRules, betaFunctionDerivRules,
abbrRules, abbrDerivRules,
Expand Down Expand Up @@ -572,12 +572,12 @@
cppFiles, templateRules];

EnumRules[parameters_List] := MapIndexed[
#1 -> "l" <> ToString@First[#2] <>
#1 -> "l" <> ToString[First[#2] - 1] <>
ToString[PrivatizeReIm@ToCExp[#1], CForm]&,
parameters];

EnumParameters[enumRules_List] :=
StringJoin["enum : size_t { l0t, ", {Last[#], ", "}& /@ enumRules,
StringJoin["enum : size_t { ", {Last[#], ", "}& /@ enumRules,
"eftWidth };"];

SetToEnumSymbol[parameter_ -> enum_String] :=
Expand Down Expand Up @@ -605,10 +605,12 @@
ScaleByA[b:BETA[_Integer, _] -> rhs_, _] := b -> a rhs;

RealVariables[parameterRules_] := Module[{
rvs = Variables[parameterRules[[All,2]]]
rhsList = Flatten@parameterRules[[All,2]],
rvs
},
Assert[Complement[rvs, Union[rvs]] === {}];
SortBy[rvs, Position[Flatten@parameterRules[[All,2]], #]&]
rvs = Variables[rhsList];
Assert[Length[rvs] === Length@Union[rvs]];
SortBy[rvs, Position[rhsList, #]&]
];

DifferentiateRules[rules_, parameters_, abbrRules_] :=
Expand Down Expand Up @@ -825,7 +827,7 @@
Qualifier -> "const",
Body -> StringJoin["{\n",
" dx.setZero();\n",
" dx[l0t] = 1;\n",
" dx[l0REt] = 1;\n",
MapIndexed[{
"\n if (nloops < ", ToString@First[#2], ") return;\n",
Module[{flattened = Flatten[#1], nRules, name},
Expand Down

0 comments on commit dd6032c

Please sign in to comment.