Skip to content

Commit 9cbca5f

Browse files
committed
error on alg equations
1 parent 656aec2 commit 9cbca5f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/input_affine_form.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ The function assumes that the equations are affine in the inputs. If the equatio
4242
are nonlinear in the inputs, an error is thrown.
4343
"""
4444
function input_affine_form(eqs, inputs)
45+
any(is_alg_equation, eqs) && error("All equations must be differential equations.")
4546
g, f, flag = Symbolics.linear_expansion(getfield.(eqs, :rhs), inputs)
4647
flag || error("The system is not affine in the inputs.")
4748
return f, g

0 commit comments

Comments
 (0)