Skip to content

Commit

Permalink
Changed some function names and added a few comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Jobst Ziebell authored and Jobst Ziebell committed Aug 6, 2015
1 parent 4dabe52 commit 6c9de69
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
6 changes: 4 additions & 2 deletions meta/FlexibleSUSY.m
Expand Up @@ -988,6 +988,7 @@ corresponding tadpole is real or imaginary (only in models with CP
} ];
];

(* Write the GMM2 c++ files *)
WriteGMuonMinus2Class[files_List] :=
Module[{particles, muonFunctions, diagrams, vertexFunctions,
definitions, calculationCode, threadedCalculationCode},
Expand Down Expand Up @@ -1015,8 +1016,8 @@ corresponding tadpole is real or imaginary (only in models with CP
Module[{parseCmdLineOptions, printCommandLineOptions, gMuonMinus2Def, gMuonMinus2},
parseCmdLineOptions = WriteOut`ParseCmdLineOptions[inputParameters];
printCommandLineOptions = WriteOut`PrintCmdLineOptions[inputParameters];
gMuonMinus2Def = GMuonMinus2`CreatePhysicalDefinition[];
gMuonMinus2 = GMuonMinus2`GetPhysicalName[];
gMuonMinus2Def = GMuonMinus2`CreateVariableDefinition[];
gMuonMinus2 = GMuonMinus2`GetVariableName[];

WriteOut`ReplaceInFiles[files,
{ "@parseCmdLineOptions@" -> IndentText[IndentText[parseCmdLineOptions]],
Expand Down Expand Up @@ -1336,6 +1337,7 @@ corresponding tadpole is real or imaginary (only in models with CP
ConvertSarahTadpoles[tadpoles]
];

(* Get all nPointFunctions that GMM2 needs *)
PrepareGMuonMinus2[] := GMuonMinus2`NPointFunctions[];

PrepareUnrotatedParticles[eigenstates_] :=
Expand Down
8 changes: 4 additions & 4 deletions meta/GMuonMinus2.m
@@ -1,8 +1,8 @@

BeginPackage["GMuonMinus2`", {"SARAH`", "TextFormatting`", "TreeMasses`", "LoopMasses`", "Vertices`"}];

GetPhysicalName::usage="The name of the c++ data type that stores the resulting magnetic moment";
CreatePhysicalDefinition::usage="Returns the c++ code with declaration of the magnetic moment variable";
GetVariableName::usage="The name of the c++ data type that stores the resulting magnetic moment";
CreateVariableDefinition::usage="Returns the c++ code with declaration of the magnetic moment variable";

CreateParticles::usage="Returns the c++ code that contains all particle classes";
CreateMuonFunctions::usage="Returns the c++ code that contains all muon functions";
Expand All @@ -20,8 +20,8 @@

(************* Begin public interface *******************)

GetPhysicalName[] := "GMuonMinus2";
CreatePhysicalDefinition[] := "double " <> GMuonMinus2`GetPhysicalName[] <> ";";
GetVariableName[] := "GMuonMinus2";
CreateVariableDefinition[] := "double " <> GMuonMinus2`GetVariableName[] <> ";";

(* Create c++ classes for all particles *)
CreateParticles[] := Module[{particles, code},
Expand Down
5 changes: 5 additions & 0 deletions meta/SelfEnergies.m
Expand Up @@ -479,7 +479,12 @@
(* creating n-point functions *)
Print["Generating C++ code for ..."];
For[k = 1, k <= Length[nPointFunctions], k++,

(* HACK: (GMM2) ignore nPointFunctions with a Null head
This makes it possible to extract vertex rules without
having to generate an nPointFunction *)
If[Head[nPointFunctions[[k]]] === Null, Continue[]];

Print[" ", PrintNPointFunctionName[nPointFunctions[[k]]]];
{p,d} = CreateNPointFunction[nPointFunctions[[k]], vertexFunctionNames];
prototypes = prototypes <> p;
Expand Down

0 comments on commit 6c9de69

Please sign in to comment.