Skip to content

Commit 4587ae0

Browse files
committed
refactor: delete more code
1 parent 8a22202 commit 4587ae0

File tree

5 files changed

+1
-163
lines changed

5 files changed

+1
-163
lines changed

Project.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63"
1313
FastClosures = "9aa1b823-49e4-5ca5-8b0f-3971ec8bab6a"
1414
FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41"
1515
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
16-
LazyArrays = "5078a376-72f3-5289-bfd5-ec5146d43c02"
1716
LineSearch = "87fe0de2-c867-4266-b59a-2f0a94fc965b"
1817
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1918
LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
2019
MaybeInplace = "bb5d69b7-63fc-4a16-80bd-7e42200c7bdb"
2120
NonlinearSolveBase = "be0214bd-f91f-a760-ac4e-3421ce2b2da0"
21+
NonlinearSolveFirstOrder = "5959db7a-ea39-4486-b5fe-2dd0bf03d60d"
2222
NonlinearSolveQuasiNewton = "9a2c21bd-3a47-402d-9113-8faf9a0ee114"
2323
NonlinearSolveSpectralMethods = "26075421-4e9a-44e1-8bd1-420ed7ad02b2"
2424
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
@@ -81,7 +81,6 @@ FixedPointAcceleration = "0.3"
8181
ForwardDiff = "0.10.36"
8282
Hwloc = "3"
8383
InteractiveUtils = "<0.0.1, 1"
84-
LazyArrays = "1.8.2, 2"
8584
LeastSquaresOptim = "0.8.5"
8685
LineSearch = "0.1.4"
8786
LineSearches = "7.3"

src/NonlinearSolve.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ using CommonSolve: solve, init, solve!
99
using ConcreteStructs: @concrete
1010
using DiffEqBase: DiffEqBase # Needed for `init` / `solve` dispatches
1111
using FastClosures: @closure
12-
using LazyArrays: LazyArrays, ApplyArray, cache
1312
using LinearAlgebra: LinearAlgebra, Diagonal, I, LowerTriangular, Symmetric,
1413
UpperTriangular, axpy!, cond, diag, diagind, dot, issuccess, istril,
1514
istriu, lu, mul!, norm, pinv, tril!, triu!
@@ -72,15 +71,12 @@ const DI = DifferentiationInterface
7271
const True = Val(true)
7372
const False = Val(false)
7473

75-
include("abstract_types.jl")
7674
include("timer_outputs.jl")
7775
include("internal/helpers.jl")
7876

7977
include("globalization/trust_region.jl")
8078

81-
include("core/generic.jl")
8279
include("core/generalized_first_order.jl")
83-
include("core/noinit.jl")
8480

8581
include("algorithms/raphson.jl")
8682
include("algorithms/pseudo_transient.jl")

src/core/generic.jl

Lines changed: 0 additions & 66 deletions
This file was deleted.

src/core/noinit.jl

Lines changed: 0 additions & 37 deletions
This file was deleted.

src/utils.jl

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,3 @@
1-
# Helper Functions
2-
@generated function __getproperty(s::S, ::Val{X}) where {S, X}
3-
hasfield(S, X) && return :(s.$X)
4-
return :(missing)
5-
end
6-
7-
@inline @generated function _vec(v)
8-
hasmethod(vec, Tuple{typeof(v)}) || return :(vec(v))
9-
return :(v)
10-
end
11-
@inline _vec(v::Number) = v
12-
@inline _vec(v::AbstractVector) = v
13-
14-
@inline _restructure(y, x) = restructure(y, x)
15-
@inline _restructure(y::Number, x::Number) = x
16-
17-
@inline __maybe_unaliased(x::Union{Number, SArray}, ::Bool) = x
18-
@inline function __maybe_unaliased(x::AbstractArray, alias::Bool)
19-
# Spend time coping iff we will mutate the array
20-
(alias || !__can_setindex(typeof(x))) && return x
21-
return deepcopy(x)
22-
end
23-
@inline __maybe_unaliased(x::AbstractSciMLOperator, ::Bool) = x
24-
25-
@inline __copy(x::AbstractArray) = copy(x)
26-
@inline __copy(x::Number) = x
27-
@inline __copy(x) = x
28-
29-
# LazyArrays for tracing
30-
__zero(x::AbstractArray) = zero(x)
31-
__zero(x) = x
32-
LazyArrays.applied_eltype(::typeof(__zero), x) = eltype(x)
33-
LazyArrays.applied_ndims(::typeof(__zero), x) = ndims(x)
34-
LazyArrays.applied_size(::typeof(__zero), x) = size(x)
35-
LazyArrays.applied_axes(::typeof(__zero), x) = axes(x)
36-
37-
# Use Symmetric Matrices if known to be efficient
38-
@inline __maybe_symmetric(x) = Symmetric(x)
39-
@inline __maybe_symmetric(x::Number) = x
40-
## LinearSolve with `nothing` doesn't dispatch correctly here
41-
@inline __maybe_symmetric(x::StaticArray) = x
42-
@inline __maybe_symmetric(x::AbstractSparseMatrix) = x
43-
@inline __maybe_symmetric(x::AbstractSciMLOperator) = x
44-
45-
# Simple Checks
46-
@inline __is_present(::Nothing) = false
47-
@inline __is_present(::Missing) = false
48-
@inline __is_present(::Any) = true
49-
@inline __is_present(::NoLineSearch) = false
50-
511
@inline __is_complex(::Type{ComplexF64}) = true
522
@inline __is_complex(::Type{ComplexF32}) = true
533
@inline __is_complex(::Type{Complex}) = true
@@ -76,10 +26,6 @@ end
7626
return fx_idx, idx
7727
end
7828

79-
@inline __can_setindex(x) = can_setindex(x)
80-
@inline __can_setindex(::Number) = false
81-
82-
@inline __dot(x, y) = dot(_vec(x), _vec(y))
8329

8430
"""
8531
pickchunksize(x) = pickchunksize(length(x))

0 commit comments

Comments
 (0)