Skip to content

Commit ea125ed

Browse files
committed
Revert to old behavior of iv_from_nested_derivative
1 parent 558c125 commit ea125ed

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/utils.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,12 @@ function collect_ivs_from_nested_operator!(ivs, x, target_op)
213213
end
214214

215215
function iv_from_nested_derivative(x, op = Differential)
216-
if istree(x) && operation(x) isa op
217-
iv_from_nested_derivative(operation(x).x, op)
218-
elseif SymbolicUtils.issym(x)
219-
return x
216+
if istree(x)
217+
operation(x) isa op ? iv_from_nested_derivative(arguments(x)[1], op) : arguments(x)[1]
218+
elseif issym(x)
219+
x
220220
else
221-
return nothing
221+
nothing
222222
end
223223
end
224224

test/mass_matrix.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using OrdinaryDiffEq, ModelingToolkit, Test, LinearAlgebra
22
@parameters t
3-
@variables y[1:3](t)
3+
@variables y(t)[1:3]
44
@parameters k[1:3]
55
D = Differential(t)
66

0 commit comments

Comments
 (0)