Skip to content

Commit

Permalink
Fix tdir handling in FakeIntegrator
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Mar 12, 2024
1 parent 9dba71c commit 3471ad7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/callback_tracking.jl
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ struct FakeIntegrator{uType, P, tType, tprevType}
tprev::tprevType
end

function Base.getproperty(fi::FakeIntegrator, s::Symbol)
s === :tdir && return sign(fi.t - fi.tprev)
return getfield(fi, s)
end

struct CallbackSensitivityFunction{fType, Alg <: AbstractOverloadingSensitivityAlgorithm,
C <: AdjointDiffCache, pType} <: SensitivityFunction
f::fType
Expand Down

0 comments on commit 3471ad7

Please sign in to comment.