Skip to content

Commit b0452e7

Browse files
authored
Merge pull request #2708 from SciML/myb/delay
Generalize `substitute_sample_time` so that other backends and extend it
2 parents 901046a + fd73c57 commit b0452e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/systems/clock_inference.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ struct NotInferedTimeDomain end
2525
function error_sample_time(eq)
2626
error("$eq\ncontains `SampleTime` but it is not an infered discrete equation.")
2727
end
28-
function substitute_sample_time(ci::ClockInference)
29-
@unpack ts, eq_domain = ci
28+
function substitute_sample_time(ci::ClockInference, ts::TearingState)
29+
@unpack eq_domain = ci
3030
eqs = copy(equations(ts))
3131
@assert length(eqs) == length(eq_domain)
3232
for i in eachindex(eqs)
@@ -112,7 +112,7 @@ function infer_clocks!(ci::ClockInference)
112112
end
113113
end
114114

115-
ci = substitute_sample_time(ci)
115+
ci = substitute_sample_time(ci, ts)
116116
return ci
117117
end
118118

0 commit comments

Comments
 (0)