Skip to content

Commit 33e180d

Browse files
committed
fix input to discrete update with split parameters
1 parent 34f601f commit 33e180d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/systems/clock_inference.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,11 @@ function generate_discrete_affect(
373373
quote
374374
if !$empty_disc
375375
# NOTE: the first and third arguments to `disc` MAY NOT be aliased
376-
disc(cache, integrator.u, p..., t) # Cache needed for atomic state update
376+
disc(cache, disc_unknowns, p..., t) # Cache needed for atomic state update
377377
for (val, i) in zip(cache, $disc_range)
378378
$(_set_parameter_unchecked!)(p, val, i; update_dependent = false)
379379
end
380+
copyto!(disc_unknowns, cache)
380381
end
381382
end
382383
else

0 commit comments

Comments
 (0)