Skip to content

Commit e1c86d0

Browse files
committed
collect_ivs on Difference
1 parent 44bff5e commit e1c86d0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/utils.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,14 @@ function collect_ivs_from_nested_operator!(ivs, x, target_op)
208208
op = operation(unwrap(x))
209209
if op isa target_op
210210
push!(ivs, get_iv(op))
211-
collect_ivs_from_nested_operator!(ivs, op.x, target_op)
211+
x = if target_op <: Differential
212+
op.x
213+
elseif target_op <: Difference
214+
op.t
215+
else
216+
error("Unknown target op type in collect_ivs $target_op. Pass Difference or Differential")
217+
end
218+
collect_ivs_from_nested_operator!(ivs, x, target_op)
212219
end
213220
end
214221

0 commit comments

Comments
 (0)