Skip to content

Commit

Permalink
fix: add getproperty method for backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed Oct 30, 2024
1 parent 6159778 commit 70d7747
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/scimlfunctions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4606,3 +4606,14 @@ function SymbolicIndexingInterface.observed(fn::AbstractSciMLFunction, sym::Symb
end

SymbolicIndexingInterface.constant_structure(::AbstractSciMLFunction) = true

function Base.getproperty(x::Union{ODEFunction, SplitFunction, DAEFunction}, sym::Symbol)
if sym == :initializeprob || sym == :update_initializeprob! || sym == :initializeprobmap || sym == :initializeprobpmap
if x.initialization_data === nothing
return nothing
else
return getproperty(x.initialization_data, sym)
end
end
return getfield(x, sym)
end

0 comments on commit 70d7747

Please sign in to comment.