Skip to content

Commit 89bcde3

Browse files
committed
Remove unwanted deps
1 parent 3dc9d6e commit 89bcde3

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

Project.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
1919
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
2020
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
2121
SparseDiffTools = "47a9eef4-7e08-11e9-0b38-333d64bd3804"
22-
Static = "aedffcd0-7271-4cad-89d0-dc628f76c6d3"
2322
TruncatedStacktraces = "781d530d-4396-4725-bb49-402e4bee1e77"
2423
UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"
2524

src/BoundaryValueDiffEq.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module BoundaryValueDiffEq
22

33
using Adapt, BandedMatrices, ForwardDiff, LinearAlgebra, PreallocationTools,
4-
RecursiveArrayTools, Reexport, Setfield, SparseArrays, Static
4+
RecursiveArrayTools, Reexport, Setfield, SparseArrays
55
@reexport using ADTypes, DiffEqBase, NonlinearSolve, SparseDiffTools, SciMLBase
66

77
import ADTypes: AbstractADType
@@ -10,7 +10,7 @@ import ConcreteStructs: @concrete
1010
import DiffEqBase: solve
1111
import ForwardDiff: pickchunksize
1212
import RecursiveArrayTools: ArrayPartition, DiffEqArray
13-
import SciMLBase: AbstractDiffEqInterpolation, StandardBVProblem, __solve
13+
import SciMLBase: AbstractDiffEqInterpolation, StandardBVProblem, __solve, _unwrap_val
1414
import SparseDiffTools: AbstractSparseADType
1515
import TruncatedStacktraces: @truncate_stacktrace
1616
import UnPack: @unpack

src/solve/multiple_shooting.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ function __solve(prob::BVProblem, _alg::MultipleShooting; odesolve_kwargs = (;),
33
@unpack f, tspan = prob
44

55
ig, T, N, Nig, u0 = __extract_problem_details(prob; dt = 0.1)
6-
has_initial_guess = known(ig)
6+
has_initial_guess = _unwrap_val(ig)
77

88
bcresid_prototype, resid_size = __get_bcresid_prototype(prob, u0)
99
iip, bc, u0, u0_size = isinplace(prob), prob.f.bc, deepcopy(u0), size(u0)
@@ -224,7 +224,7 @@ function __solve(prob::BVProblem, _alg::MultipleShooting; odesolve_kwargs = (;),
224224
odesolve_kwargs, nlsolve_kwargs, verbose, kwargs...)
225225
end
226226

227-
@views function multiple_shooting_initialize(prob, alg::MultipleShooting, ::True,
227+
@views function multiple_shooting_initialize(prob, alg::MultipleShooting, ::Val{true},
228228
nshoots; odesolve_kwargs = (;), verbose = true, kwargs...)
229229
@unpack f, u0, tspan, p = prob
230230
@unpack ode_alg = alg
@@ -237,7 +237,7 @@ end
237237
return nodes, u_at_nodes
238238
end
239239

240-
@views function multiple_shooting_initialize(prob, alg::MultipleShooting, ::False,
240+
@views function multiple_shooting_initialize(prob, alg::MultipleShooting, ::Val{false},
241241
nshoots; odesolve_kwargs = (;), verbose = true, kwargs...)
242242
@unpack f, u0, tspan, p = prob
243243
@unpack ode_alg = alg
@@ -278,7 +278,7 @@ end
278278
nshoots, old_nshoots, ig; odesolve_kwargs = (;), kwargs...)
279279
@unpack f, u0, tspan, p = prob
280280
nodes = range(tspan[1], tspan[2]; length = nshoots + 1)
281-
N = known(ig) ? length(first(u0)) : length(u0)
281+
N = _unwrap_val(ig) ? length(first(u0)) : length(u0)
282282

283283
u_at_nodes = similar(u_at_nodes_prev, N + nshoots * N)
284284
u_at_nodes[1:N] .= u_at_nodes_prev[1:N]

src/solve/single_shooting.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function __solve(prob::BVProblem, alg::Shooting; odesolve_kwargs = (;),
22
nlsolve_kwargs = (;), verbose = true, kwargs...)
33
ig, T, _, _, u0 = __extract_problem_details(prob; dt = 0.1)
4-
known(ig) && verbose &&
4+
_unwrap_val(ig) && verbose &&
55
@warn "Initial guess provided, but will be ignored for Shooting!"
66

77
bcresid_prototype, resid_size = __get_bcresid_prototype(prob, u0)

src/utils.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,13 @@ end
125125
function __extract_problem_details(prob, u0::AbstractVector{<:AbstractArray}; kwargs...)
126126
# Problem has Initial Guess
127127
_u0 = first(u0)
128-
return True(), eltype(_u0), length(_u0), (length(u0) - 1), _u0
128+
return Val(true), eltype(_u0), length(_u0), (length(u0) - 1), _u0
129129
end
130130
function __extract_problem_details(prob, u0; dt = 0.0, check_positive_dt::Bool = false)
131131
# Problem does not have Initial Guess
132132
check_positive_dt && dt 0 && throw(ArgumentError("dt must be positive"))
133133
t₀, t₁ = prob.tspan
134-
return False(), eltype(u0), length(u0), Int(cld(t₁ - t₀, dt)), prob.u0
134+
return Val(false), eltype(u0), length(u0), Int(cld(t₁ - t₀, dt)), prob.u0
135135
end
136136

137137
__initial_state_from_prob(prob::BVProblem, mesh) = __initial_state_from_prob(prob.u0, mesh)

0 commit comments

Comments
 (0)