Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit 58fe0cf

Browse files
Dramatically reduce dependencies
1 parent c6c858e commit 58fe0cf

File tree

3 files changed

+10
-19
lines changed

3 files changed

+10
-19
lines changed

Project.toml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,31 @@
11
name = "SimpleNonlinearSolve"
22
uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7"
33
authors = ["SciML"]
4-
version = "0.1.0"
4+
version = "0.1.1"
55

66
[deps]
77
ArrayInterfaceCore = "30b0a656-2188-435a-8636-2ec0e6a096e2"
88
FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41"
99
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
10-
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
11-
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
1210
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
1311
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
14-
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
15-
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
16-
UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"
12+
StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c"
1713

1814
[compat]
1915
ArrayInterfaceCore = "0.1.1"
2016
FiniteDiff = "2"
2117
ForwardDiff = "0.10.3"
22-
RecursiveArrayTools = "2"
2318
Reexport = "0.2, 1"
2419
SciMLBase = "1.73"
25-
Setfield = "0.7, 0.8, 1"
26-
StaticArrays = "0.12,1.0"
27-
UnPack = "1.0"
20+
StaticArraysCore = "1.4"
2821
julia = "1.6"
2922

3023
[extras]
3124
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
32-
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
3325
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
3426
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
27+
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
3528
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
3629

3730
[targets]
38-
test = ["BenchmarkTools", "SafeTestsets", "Pkg", "Test", "ForwardDiff"]
31+
test = ["BenchmarkTools", "SafeTestsets", "Pkg", "Test", "StaticArrays"]

src/SimpleNonlinearSolve.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
module SimpleNonlinearSolve
22

33
using Reexport
4-
using UnPack: @unpack
54
using FiniteDiff, ForwardDiff
65
using ForwardDiff: Dual
7-
using Setfield
8-
using StaticArrays
9-
using RecursiveArrayTools
10-
using LinearAlgebra
6+
using StaticArraysCore
117
import ArrayInterfaceCore
128

139
@reexport using SciMLBase

src/ad.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,16 @@ function scalar_nlsolve_ad(prob, alg, args...; kwargs...)
2828
return sol, partials
2929
end
3030

31-
function SciMLBase.solve(prob::NonlinearProblem{<:Union{Number, SVector}, iip,
31+
function SciMLBase.solve(prob::NonlinearProblem{<:Union{Number, StaticArraysCore.SVector},
32+
iip,
3233
<:Dual{T, V, P}}, alg::SimpleNewtonRaphson,
3334
args...; kwargs...) where {iip, T, V, P}
3435
sol, partials = scalar_nlsolve_ad(prob, alg, args...; kwargs...)
3536
return SciMLBase.build_solution(prob, alg, Dual{T, V, P}(sol.u, partials), sol.resid;
3637
retcode = sol.retcode)
3738
end
38-
function SciMLBase.solve(prob::NonlinearProblem{<:Union{Number, SVector}, iip,
39+
function SciMLBase.solve(prob::NonlinearProblem{<:Union{Number, StaticArraysCore.SVector},
40+
iip,
3941
<:AbstractArray{<:Dual{T, V, P}}},
4042
alg::SimpleNewtonRaphson, args...; kwargs...) where {iip, T, V, P}
4143
sol, partials = scalar_nlsolve_ad(prob, alg, args...; kwargs...)

0 commit comments

Comments
 (0)