Skip to content

Commit

Permalink
Check if parameter does not appear in equation when trying to solve
Browse files Browse the repository at this point in the history
in order to avoid potential errors when trying to solve for a parameter
that does not appear in the equation
  • Loading branch information
Dylan Harries committed Feb 23, 2017
1 parent ab0782f commit 59f91a1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion meta/EWSB.m
Expand Up @@ -392,7 +392,13 @@
And @@ (Function[p,FreeQ[e,p]] /@ par),
FreeQ[e,par]
]];
independentEq = Select[eq, (!Selector[#])&];
independentEq = Select[eq, (!Selector[#])&];,
If[Head[par] =!= List,
If[FreeQ[eq, par],
Print["Error: parameter ", par, " does not appear in the equation"];
Return[{}];
];
];
];
result = TimeConstrained[Solve[independentEq, par],
FlexibleSUSY`FSSolveEWSBTimeConstraint, {}];
Expand Down

0 comments on commit 59f91a1

Please sign in to comment.