Skip to content

Commit b1fea7c

Browse files
Merge pull request #1967 from SciML/simplenonlinearsolve
Change to SimpleNonlinearSolve
2 parents 348e56e + 4cc86c2 commit b1fea7c

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Project.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
3030
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
3131
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
3232
NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
33-
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
3433
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
3534
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
3635
RuntimeGeneratedFunctions = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47"
3736
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
3837
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
3938
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
39+
SimpleNonlinearSolve = "727e6d20-b764-4bd8-a329-72de5adea6c7"
4040
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
4141
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
4242
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
@@ -68,12 +68,12 @@ LabelledArrays = "1.3"
6868
Latexify = "0.11, 0.12, 0.13, 0.14, 0.15"
6969
MacroTools = "0.5"
7070
NaNMath = "0.3, 1"
71-
NonlinearSolve = "0.3.8"
7271
RecursiveArrayTools = "2.3"
7372
Reexport = "0.2, 1"
7473
RuntimeGeneratedFunctions = "0.4.3, 0.5"
7574
SciMLBase = "1.72.0"
7675
Setfield = "0.7, 0.8, 1"
76+
SimpleNonlinearSolve = "0.1.0"
7777
SpecialFunctions = "0.7, 0.8, 0.9, 0.10, 1.0, 2"
7878
StaticArrays = "0.10, 0.11, 0.12, 1.0"
7979
SymbolicUtils = "0.19"
@@ -89,6 +89,7 @@ ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
8989
Ipopt = "b6b21f68-93f8-5de0-b562-5493be1d77c9"
9090
Ipopt_jll = "9cc047cb-c261-5740-88fc-0cf96f7bdcc7"
9191
ModelingToolkitStandardLibrary = "16a59e39-deab-5bd0-87e4-056b12336739"
92+
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
9293
Optimization = "7f7a1694-90dd-40f0-9382-eb1efda571ba"
9394
OptimizationMOI = "fd9f6733-72f4-499f-8506-86b2bdd0dea1"
9495
OptimizationOptimJL = "36348300-93cb-4f02-beb5-3c3902f8871e"
@@ -104,4 +105,4 @@ Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4"
104105
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
105106

106107
[targets]
107-
test = ["AmplNLWriter", "BenchmarkTools", "ForwardDiff", "Ipopt", "Ipopt_jll", "ModelingToolkitStandardLibrary", "Optimization", "OptimizationOptimJL", "OptimizationMOI", "OrdinaryDiffEq", "Random", "ReferenceTests", "SafeTestsets", "StableRNGs", "Statistics", "SteadyStateDiffEq", "Test", "StochasticDiffEq", "Sundials"]
108+
test = ["AmplNLWriter", "BenchmarkTools", "NonlinearSolve", "ForwardDiff", "Ipopt", "Ipopt_jll", "ModelingToolkitStandardLibrary", "Optimization", "OptimizationOptimJL", "OptimizationMOI", "OrdinaryDiffEq", "Random", "ReferenceTests", "SafeTestsets", "StableRNGs", "Statistics", "SteadyStateDiffEq", "Test", "StochasticDiffEq", "Sundials"]

src/structural_transformation/StructuralTransformations.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ RuntimeGeneratedFunctions.init(@__MODULE__)
3939

4040
using SparseArrays
4141

42-
using NonlinearSolve
42+
using SimpleNonlinearSolve
4343

4444
export tearing, partial_state_selection, dae_index_lowering, check_consistency
4545
export dummy_derivative

src/structural_transformation/utils.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,9 @@ end
388388

389389
function numerical_nlsolve(f, u0, p)
390390
prob = NonlinearProblem{false}(f, u0, p)
391-
sol = solve(prob, NewtonRaphson())
391+
sol = solve(prob, SimpleNewtonRaphson())
392392
rc = sol.retcode
393-
(rc == :DEFAULT || rc == :Default) || nlsolve_failure(rc)
393+
(rc == ReturnCode.Success) || nlsolve_failure(rc)
394394
# TODO: robust initial guess, better debugging info, and residual check
395395
sol.u
396396
end

0 commit comments

Comments
 (0)