Skip to content

Commit

Permalink
refactor: use common observed for NonlinearSystem
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed Jun 14, 2024
1 parent 46997c4 commit 6534e2b
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/systems/nonlinear/nonlinearsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -306,18 +306,7 @@ function SciMLBase.NonlinearFunction{iip}(sys::NonlinearSystem, dvs = unknowns(s
_jac = nothing
end

observedfun = let sys = sys, dict = Dict()
function generated_observed(obsvar, u, p)
obs = get!(dict, value(obsvar)) do
build_explicit_observed_function(sys, obsvar)
end
if p isa MTKParameters
obs(u, p...)
else
obs(u, p)
end
end
end
observedfun = ObservedFunctionCache(sys)

NonlinearFunction{iip}(f,
sys = sys,
Expand Down

0 comments on commit 6534e2b

Please sign in to comment.