Skip to content

Commit d050e89

Browse files
feat: support setindex! for nonlinear integrators
1 parent a74c321 commit d050e89

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/NonlinearSolve.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ using PrecompileTools: @recompile_invalidations, @compile_workload, @setup_workl
5353
using StaticArraysCore: StaticArray, SVector, SArray, MArray, Size, SMatrix
5454
using SymbolicIndexingInterface: SymbolicIndexingInterface, ParameterIndexingProxy,
5555
symbolic_container, parameter_values, state_values,
56-
getu
56+
getu, setu
5757
end
5858

5959
@reexport using SciMLBase, SimpleNonlinearSolve

src/abstract_types.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@ function Base.getindex(cache::AbstractNonlinearSolveCache, sym)
220220
return getu(cache, sym)(cache)
221221
end
222222

223+
function Base.setindex!(cache::AbstractNonlinearSolveCache, val, sym)
224+
return setu(cache, sym)(cache, val)
225+
end
226+
223227
function Base.show(io::IO, cache::AbstractNonlinearSolveCache)
224228
__show_cache(io, cache, 0)
225229
end

0 commit comments

Comments
 (0)