Skip to content

Commit

Permalink
Add function testing for linearly independent equations
Browse files Browse the repository at this point in the history
  • Loading branch information
Dylan Harries committed Dec 7, 2016
1 parent 7d2ea17 commit 9cb28c6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions meta/EWSB.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

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

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

FindSolutionAndFreePhases::usage="Finds solution to the EWSB and free
phases / signs."

Expand Down Expand Up @@ -70,6 +73,17 @@
CheckInEquations[parameter_, statement_, equations_List] :=
And @@ (statement[parameter,#]& /@ equations);

GetLinearlyIndependentEqs[eqs_List, parameters_List, substitutions_List:{}] :=
Module[{eqsToSolve, indepEqsToSolve, eqsToKeep},
If[substitutions =!= {},
eqsToSolve = eqs /. (Rule[#[[1]], #[[2]]]& /@ substitutions);,
eqsToSolve = eqs;
];
indepEqsToSolve = Parameters`FilterOutLinearDependentEqs[eqsToSolve, parameters];
eqsToKeep = Position[eqsToSolve, p_ /; MemberQ[indepEqsToSolve, p]];
Extract[eqs, eqsToKeep]
];

CreateEWSBEqPrototype[higgs_] :=
Module[{result = "", i, ctype},
ctype = CConversion`CreateCType[CConversion`ScalarType[CConversion`realScalarCType]];
Expand Down

0 comments on commit 9cb28c6

Please sign in to comment.