Skip to content

Commit

Permalink
fix: fix SII implementation for caches
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed Nov 13, 2024
1 parent f0ec343 commit d837b1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/NonlinearSolveBase/src/abstract_types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ SciMLBase.isinplace(cache::AbstractNonlinearSolveCache) = SciMLBase.isinplace(ca
## SII Interface
SII.symbolic_container(cache::AbstractNonlinearSolveCache) = cache.prob
SII.parameter_values(cache::AbstractNonlinearSolveCache) = SII.parameter_values(cache.prob)
SII.state_values(cache::AbstractNonlinearSolveCache) = SII.state_values(cache.prob)
SII.state_values(cache::AbstractNonlinearSolveCache) = get_u(cache)

function Base.getproperty(cache::AbstractNonlinearSolveCache, sym::Symbol)
if sym === :ps
Expand Down
2 changes: 1 addition & 1 deletion lib/NonlinearSolveBase/src/polyalg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ end
function SII.symbolic_container(cache::NonlinearSolvePolyAlgorithmCache)
return cache.caches[cache.current]
end
SII.state_values(cache::NonlinearSolvePolyAlgorithmCache) = cache.u0
SII.state_values(cache::NonlinearSolvePolyAlgorithmCache) = SII.state_values(SII.symbolic_container(cache))

function Base.show(io::IO, ::MIME"text/plain", cache::NonlinearSolvePolyAlgorithmCache)
println(io, "NonlinearSolvePolyAlgorithmCache with \
Expand Down

0 comments on commit d837b1f

Please sign in to comment.