Skip to content

Commit 5cc940a

Browse files
authored
Merge branch 'master' into qqy/bvp_opt
2 parents f710cd7 + 42cdbce commit 5cc940a

12 files changed

Lines changed: 73 additions & 25 deletions

File tree

lib/BoundaryValueDiffEqAscher/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "BoundaryValueDiffEqAscher"
22
uuid = "7227322d-7511-4e07-9247-ad6ff830280e"
33
authors = ["Qingyu Qu <erikqqy123@gmail.com>"]
4-
version = "1.7.0"
4+
version = "1.8.0"
55

66
[deps]
77
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"

lib/BoundaryValueDiffEqCore/Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "BoundaryValueDiffEqCore"
22
uuid = "56b672f2-a5fe-4263-ab2d-da677488eb3a"
33
authors = ["Qingyu Qu <erikqqy123@gmail.com>"]
4-
version = "1.10.0"
4+
version = "1.11.1"
55

66
[deps]
77
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
@@ -43,7 +43,7 @@ Reexport = "1.2"
4343
SciMLBase = "2.82"
4444
Setfield = "1"
4545
SparseArrays = "1.10"
46-
SparseConnectivityTracer = "0.6.13"
46+
SparseConnectivityTracer = "0.6.13, 1"
4747
SparseMatrixColorings = "0.4.13"
4848
Test = "1.10"
4949
julia = "1.10"

lib/BoundaryValueDiffEqCore/src/utils.jl

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -301,18 +301,22 @@ end
301301

302302
function __initial_guess(f::F, p::P, t::T; fit_parameters = false) where {F, P, T}
303303
if hasmethod(f, Tuple{P, T})
304-
p isa SciMLBase.NullParameters &&
305-
throw(ArgumentError("`fit_parameters` is true but `prob.p` is not set."))
306-
fit_parameters && return vcat(f(p, t), p)
304+
if fit_parameters
305+
p isa SciMLBase.NullParameters &&
306+
throw(ArgumentError("`fit_parameters` is true but `prob.p` is not set."))
307+
return vcat(f(p, t), p)
308+
end
307309
return f(p, t)
308310
elseif hasmethod(f, Tuple{T})
309311
Base.depwarn("initial guess function must take 2 inputs `(p, t)` instead of just \
310312
`t`. The single argument version has been deprecated and will be \
311313
removed in the next major release of SciMLBase.",
312314
:__initial_guess)
313-
p isa SciMLBase.NullParameters &&
314-
throw(ArgumentError("`fit_parameters` is true but `prob.p` is not set."))
315-
fit_parameters && return vcat(f(t), p)
315+
if fit_parameters
316+
p isa SciMLBase.NullParameters &&
317+
throw(ArgumentError("`fit_parameters` is true but `prob.p` is not set."))
318+
return vcat(f(t), p)
319+
end
316320
return f(t)
317321
else
318322
throw(ArgumentError("`initial_guess` must be a function of the form `f(p, t)`"))

lib/BoundaryValueDiffEqFIRK/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "BoundaryValueDiffEqFIRK"
22
uuid = "85d9eb09-370e-4000-bb32-543851f73618"
3-
version = "1.8.1"
3+
version = "1.9.0"
44

55
[deps]
66
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"

lib/BoundaryValueDiffEqFIRK/test/expanded/firk_basic_tests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ end
449449
bcresid_prototype = (zeros(2), zeros(1)), fit_parameters = true)
450450
sol = solve(bvp, RadauIIa5(), dt = 0.05)
451451

452-
@test sol.prob.p [17.09658] atol=1e-5
452+
@test sol.prob.p[17.09658] atol=1e-5
453453

454454
tspan = (0.0, pi)
455455
function f!(du, u, p, t)
@@ -468,5 +468,5 @@ end
468468
bcresid_prototype = (zeros(2), zeros(1)), fit_parameters = true)
469469
sol = solve(bvp, RadauIIa5(), dt = 0.05)
470470

471-
@test sol.prob.p [17.09658] atol=1e-5
471+
@test sol.prob.p[17.09658] atol=1e-5
472472
end

lib/BoundaryValueDiffEqFIRK/test/nested/firk_basic_tests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ end
540540
bcresid_prototype = (zeros(2), zeros(1)), fit_parameters = true)
541541
sol = solve(bvp, RadauIIa5(; nested_nlsolve = true), dt = 0.05)
542542

543-
@test sol.prob.p [17.09658] atol=1e-5
543+
@test sol.prob.p[17.09658] atol=1e-5
544544

545545
tspan = (0.0, pi)
546546
function f!(du, u, p, t)
@@ -559,5 +559,5 @@ end
559559
bcresid_prototype = (zeros(2), zeros(1)), fit_parameters = true)
560560
sol = solve(bvp, RadauIIa5(; nested_nlsolve = true), dt = 0.05)
561561

562-
@test sol.prob.p [17.09658] atol=1e-5
562+
@test sol.prob.p[17.09658] atol=1e-5
563563
end

lib/BoundaryValueDiffEqMIRK/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "BoundaryValueDiffEqMIRK"
22
uuid = "1a22d4ce-7765-49ea-b6f2-13c8438986a6"
3-
version = "1.8.1"
3+
version = "1.9.0"
44

55
[deps]
66
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"

lib/BoundaryValueDiffEqMIRK/test/mirk_basic_tests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ end
441441
bcresid_prototype = (zeros(2), zeros(1)), fit_parameters = true)
442442
sol = solve(bvp, MIRK4(), dt = 0.05)
443443

444-
@test sol.prob.p [17.09658] atol=1e-5
444+
@test sol.prob.p[17.09658] atol=1e-5
445445

446446
tspan = (0.0, pi)
447447
function f!(du, u, p, t)
@@ -460,7 +460,7 @@ end
460460
bcresid_prototype = (zeros(2), zeros(1)), fit_parameters = true)
461461
sol = solve(bvp, MIRK4(), dt = 0.05)
462462

463-
@test sol.prob.p [17.09658] atol=1e-5
463+
@test sol.prob.p[17.09658] atol=1e-5
464464
end
465465

466466
@testitem "Convergence with optimization based solver" setup=[MIRKConvergenceTests] begin

lib/BoundaryValueDiffEqMIRKN/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "BoundaryValueDiffEqMIRKN"
22
uuid = "9255f1d6-53bf-473e-b6bd-23f1ff009da4"
33
authors = ["Qingyu Qu <erikqqy123@gmail.com>"]
4-
version = "1.7.1"
4+
version = "1.8.0"
55

66
[deps]
77
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"

lib/BoundaryValueDiffEqShooting/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "BoundaryValueDiffEqShooting"
22
uuid = "ed55bfe0-3725-4db6-871e-a1dc9f42a757"
3-
version = "1.8.1"
3+
version = "1.9.0"
44

55
[deps]
66
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"

0 commit comments

Comments
 (0)