Skip to content

Commit 0ced8d4

Browse files
committed
fix: fix _initialize_dae
1 parent 1b73799 commit 0ced8d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ImplicitDiscreteSolve/src/solve.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ function _initialize_dae!(integrator, prob::ImplicitDiscreteProblem,
5151

5252
nlls = !isnothing(f.resid_prototype) && (length(f.resid_prototype) == length(integrator.u))
5353
prob = if nlls
54-
NonlinearLeastSquaresProblem{isinplace(f)}(NonlinearFunction(_f; resid_prototype = f.resid_prototype), cache.state.u, cache.state)
54+
NonlinearLeastSquaresProblem{isinplace(f)}(NonlinearFunction(_f; resid_prototype = f.resid_prototype), u, initstate)
5555
else
56-
NonlinearProblem{isinplace(f)}(_f, cache.state.u, cache.state)
56+
NonlinearProblem{isinplace(f)}(_f, u, initstate)
5757
end
5858
sol = solve(prob, SimpleNewtonRaphson())
5959
integrator.u = sol

0 commit comments

Comments
 (0)