-
-
Notifications
You must be signed in to change notification settings - Fork 55
Closed
SciML/DifferentialEquations.jl
#935Description
This simple example without supplying an alg but iip = true seems to switch to SteadyStateProblem, asks for using DifferentialEquations, then complains that the method is deprecated and that NonlinearSolve should be used.
using NonlinearSolve
using DifferentialEquations
function sys(sto, x, p)
@show x
x1 = x[1]
x2 = x[2]
p1 = p[1]
p2 = p[2]
sto[1] = x1/p2 - x2/p1
sto[2] = 100.0 - p1*x1 - p2*x2
@show sto
return sto
end
a=0
p = [0.5,0.5]
x = [1.0,1.0]
#du = similar(p)
probN = NonlinearProblem{true}(sys,x, p)
sol = solve(probN)
@show sol
sto = similar(p)
@show sys(sto,sol.u,p)
gives the following warning:
┌ Warning: This method is deprecated in favor of using NonlinearSolve.jl. Note that an ODEProblem
│ can be converted into a steady state NonlinearProblem via
│ `NonlinearProblem(prob::ODEProblem)`. The algorithm `NLSolveJL` as part of the
│ SciMLNLSolve.jl set of nonlinear solvers for NonlinearSolve.jl is equivalent to
│ SteadyStateDiffEq.jl's default `SSRootfind` (with a few improvements).
│
│ See [the documentation of NonlinearSolve.jl](https://docs.sciml.ai/NonlinearSolve/stable/)
│ for more details.
└ @ SteadyStateDiffEq C:\Users\elber\.julia\packages\SteadyStateDiffEq\1di7r\src\solve.jl:8
Metadata
Metadata
Assignees
Labels
No labels