Skip to content

Commit 90a5379

Browse files
Remove unnecessary casing on intermediate equations
1 parent a5b96cb commit 90a5379

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/systems/diffeqs/diffeqsystem.jl

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,9 @@ end
4545
isintermediate(eq::Equation) = !(isa(eq.lhs, Operation) && isa(eq.lhs.op, Differential))
4646

4747
function build_equals_expr(eq::Equation)
48-
@assert !isa(eq.lhs, Constant)
49-
50-
if isintermediate(eq)
51-
@assert isa(eq.lhs, Variable)
52-
lhs = eq.lhs.name
53-
else
54-
@assert isa(eq.lhs, Operation) && isa(eq.lhs.op, Differential)
55-
lhs = Symbol(eq.lhs.args[1].name, :_, eq.lhs.op.x.name)
56-
end
48+
@assert !isintermediate(eq)
5749

50+
lhs = Symbol(eq.lhs.args[1].name, :_, eq.lhs.op.x.name)
5851
return :($lhs = $(convert(Expr, eq.rhs)))
5952
end
6053

0 commit comments

Comments
 (0)