Skip to content

Commit

Permalink
Write out EWSB equations after making any user defined substitutions
Browse files Browse the repository at this point in the history
  • Loading branch information
Dylan Harries committed Dec 27, 2016
1 parent 3aedb75 commit 87860ba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 4 additions & 1 deletion meta/EWSB.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@

BeginPackage["EWSB`", {"SARAH`", "TextFormatting`", "CConversion`", "Parameters`", "TreeMasses`", "WriteOut`", "Utils`"}];

GetLinearlyIndependentEqs::"Removes linearly dependent EWSB equations
ApplySubstitutionsToEqs::usage="Makes the given substitutions in the EWSB
equations, taking into account SARAH heads";

GetLinearlyIndependentEqs::usage="Removes linearly dependent EWSB equations
from a list of equations";

FindSolutionAndFreePhases::usage="Finds solution to the EWSB and free
Expand Down
10 changes: 6 additions & 4 deletions meta/FlexibleSUSY.m
Original file line number Diff line number Diff line change
Expand Up @@ -2527,19 +2527,21 @@ corresponding tadpole is real or imaginary (only in models with CP
If[haveEWSB,
ewsbEquations = Parameters`ExpandExpressions[ewsbEquations];
FlexibleSUSY`EWSBOutputParameters = Parameters`DecreaseIndexLiterals[FlexibleSUSY`EWSBOutputParameters];

If[Head[FlexibleSUSY`EWSBSubstitutions] === List && FlexibleSUSY`EWSBSubstitutions =!= {},
FlexibleSUSY`EWSBSubstitutions = FlexibleSUSY`EWSBSubstitutions /. allIndexReplacementRules;
];
(* adding tadpoles to the EWSB eqs. *)
ewsbEquations = MapIndexed[#1 - tadpole[First[#2]]&, ewsbEquations];
treeLevelEwsbSolutionOutputFile = FileNameJoin[{FSOutputDir,
FlexibleSUSY`FSModelName <> "_EWSB_solution.m"}];
treeLevelEwsbEqsOutputFile = FileNameJoin[{FSOutputDir,
FlexibleSUSY`FSModelName <> "_EWSB_equations.m"}];
Print["Writing EWSB equations to ", treeLevelEwsbEqsOutputFile];
Put[ewsbEquations, treeLevelEwsbEqsOutputFile];
Print["Searching for independent EWSB equations ..."];
If[Head[FlexibleSUSY`EWSBSubstitutions] === List && FlexibleSUSY`EWSBSubstitutions =!= {},
FlexibleSUSY`EWSBSubstitutions = FlexibleSUSY`EWSBSubstitutions /. allIndexReplacementRules;
Put[EWSB`ApplySubstitutionsToEqs[ewsbEquations, FlexibleSUSY`EWSBSubstitutions], treeLevelEwsbEqsOutputFile],
Put[ewsbEquations, treeLevelEwsbEqsOutputFile]
];
Print["Searching for independent EWSB equations ..."];
independentEwsbEquations = EWSB`GetLinearlyIndependentEqs[ewsbEquations, FlexibleSUSY`EWSBOutputParameters,
FlexibleSUSY`EWSBSubstitutions];

Expand Down

0 comments on commit 87860ba

Please sign in to comment.