Skip to content

Commit a05c0c9

Browse files
feat: add specialized observed for AbstractDDEIntegrator
1 parent 262be8f commit a05c0c9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/integrator_interface.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,3 +910,11 @@ Checks if the integrator is adaptive
910910
function isadaptive(integrator::DEIntegrator)
911911
isdefined(integrator.opts, :adaptive) ? integrator.opts.adaptive : false
912912
end
913+
914+
function SymbolicIndexingInterface.observed(integ::AbstractDDEIntegrator, sym)
915+
return let histfn = DDESolutionHistoryWrapper(get_sol(integ)),
916+
rawfn = SymbolicIndexingInterface.observed(symbolic_container(integ), sym)
917+
918+
fn(u, p, t) = rawfn(u, histfn, p, t)
919+
end
920+
end

0 commit comments

Comments
 (0)