From 59f91a1dd2b4655165c3b35ab38f7582389a0887 Mon Sep 17 00:00:00 2001 From: Dylan Harries Date: Thu, 23 Feb 2017 12:18:29 +1030 Subject: [PATCH] Check if parameter does not appear in equation when trying to solve in order to avoid potential errors when trying to solve for a parameter that does not appear in the equation --- meta/EWSB.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/meta/EWSB.m b/meta/EWSB.m index 9c0d3f677..1c3e8de0c 100644 --- a/meta/EWSB.m +++ b/meta/EWSB.m @@ -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, {}];