Skip to content

Commit 342d488

Browse files
Merge pull request #1134 from SciML/ChrisRackauckas-patch-6
Remove more deprecated code
2 parents 8dc8f1e + 7d7df48 commit 342d488

File tree

2 files changed

+0
-56
lines changed

2 files changed

+0
-56
lines changed

src/common_defaults.jl

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -114,51 +114,3 @@ ODE_DEFAULT_UNSTABLE_CHECK(dt, u, p, t) = false
114114
function ODE_DEFAULT_UNSTABLE_CHECK(dt, u::Union{Number, AbstractArray{<:Number}}, p, t)
115115
INFINITE_OR_GIANT(u)
116116
end
117-
118-
# Nonlinear Solve Norm (norm(_, 2))
119-
NONLINEARSOLVE_DEFAULT_NORM(u::Union{AbstractFloat, Complex}) = @fastmath abs(u)
120-
function NONLINEARSOLVE_DEFAULT_NORM(f::F,
121-
u::Union{AbstractFloat, Complex}) where {F}
122-
return @fastmath abs(f(u))
123-
end
124-
125-
function NONLINEARSOLVE_DEFAULT_NORM(u::Array{
126-
T}) where {T <: Union{AbstractFloat, Complex}}
127-
x = zero(T)
128-
@inbounds @fastmath for ui in u
129-
x += abs2(ui)
130-
end
131-
return Base.FastMath.sqrt_fast(real(x))
132-
end
133-
134-
function NONLINEARSOLVE_DEFAULT_NORM(f::F,
135-
u::Union{Array{T}, Iterators.Zip{<:Tuple{Vararg{Array{T}}}}}) where {
136-
F, T <: Union{AbstractFloat, Complex}}
137-
x = zero(T)
138-
@inbounds @fastmath for ui in u
139-
x += abs2(f(ui))
140-
end
141-
return Base.FastMath.sqrt_fast(real(x))
142-
end
143-
144-
function NONLINEARSOLVE_DEFAULT_NORM(u::StaticArraysCore.StaticArray{
145-
<:Tuple, T}) where {T <: Union{AbstractFloat, Complex}}
146-
return Base.FastMath.sqrt_fast(real(sum(abs2, u)))
147-
end
148-
149-
function NONLINEARSOLVE_DEFAULT_NORM(f::F,
150-
u::StaticArraysCore.StaticArray{<:Tuple, T}) where {
151-
F, T <: Union{AbstractFloat, Complex}}
152-
return Base.FastMath.sqrt_fast(real(sum(abs2 f, u)))
153-
end
154-
155-
function NONLINEARSOLVE_DEFAULT_NORM(u::AbstractArray)
156-
return Base.FastMath.sqrt_fast(UNITLESS_ABS2(u))
157-
end
158-
159-
function NONLINEARSOLVE_DEFAULT_NORM(f::F, u::AbstractArray) where {F}
160-
return Base.FastMath.sqrt_fast(UNITLESS_ABS2(f, u))
161-
end
162-
163-
NONLINEARSOLVE_DEFAULT_NORM(u) = norm(u)
164-
NONLINEARSOLVE_DEFAULT_NORM(f::F, u) where {F} = norm(f.(u))

src/utils.jl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,6 @@ end
127127
@inline __add_and_norm(::typeof(Base.Fix2(norm, Inf)), x, y) = __maximum_abs(+, x, y)
128128
@inline __add_and_norm(f::F, x, y) where {F} = __norm_op(f, +, x, y)
129129

130-
@inline function __apply_termination_internalnorm(::Nothing, u)
131-
Base.depwarn("Not specifying the internal norm of termination conditions has been \
132-
deprecated. Using inf-norm currently.",
133-
:__apply_termination_internalnorm)
134-
return __apply_termination_internalnorm(Base.Fix1(maximum, abs), u)
135-
end
136-
@inline __apply_termination_internalnorm(f::F, u) where {F} = f(u)
137-
138130
struct DualEltypeChecker{T, T2}
139131
x::T
140132
counter::T2

0 commit comments

Comments
 (0)