Skip to content

Commit f59ff23

Browse files
committed
Up Manifest
1 parent d687a89 commit f59ff23

File tree

2 files changed

+57
-16
lines changed

2 files changed

+57
-16
lines changed

Manifest.toml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@ version = "7.5.1"
5151
StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c"
5252
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
5353

54-
[[deps.ArrayInterfaceCore]]
55-
deps = ["LinearAlgebra", "SnoopPrecompile", "SparseArrays", "SuiteSparse"]
56-
git-tree-sha1 = "e5f08b5689b1aad068e01751889f2f615c7db36d"
57-
uuid = "30b0a656-2188-435a-8636-2ec0e6a096e2"
58-
version = "0.1.29"
59-
6054
[[deps.ArrayLayouts]]
6155
deps = ["FillArrays", "LinearAlgebra"]
6256
git-tree-sha1 = "af43df5704827c8618afd36eb56fcab20d3041ee"
@@ -493,10 +487,10 @@ version = "0.3.26"
493487
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
494488

495489
[[deps.LoopVectorization]]
496-
deps = ["ArrayInterface", "ArrayInterfaceCore", "CPUSummary", "CloseOpenIntervals", "DocStringExtensions", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "PrecompileTools", "SIMDTypes", "SLEEFPirates", "Static", "StaticArrayInterface", "ThreadingUtilities", "UnPack", "VectorizationBase"]
497-
git-tree-sha1 = "c88a4afe1703d731b1c4fdf4e3c7e77e3b176ea2"
490+
deps = ["ArrayInterface", "CPUSummary", "CloseOpenIntervals", "DocStringExtensions", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "PrecompileTools", "SIMDTypes", "SLEEFPirates", "Static", "StaticArrayInterface", "ThreadingUtilities", "UnPack", "VectorizationBase"]
491+
git-tree-sha1 = "0f5648fbae0d015e3abe5867bca2b362f67a5894"
498492
uuid = "bdcacae8-1622-11e9-2a5c-532679323890"
499-
version = "0.12.165"
493+
version = "0.12.166"
500494
weakdeps = ["ChainRulesCore", "ForwardDiff", "SpecialFunctions"]
501495

502496
[deps.LoopVectorization.extensions]
@@ -565,7 +559,7 @@ version = "1.2.0"
565559

566560
[[deps.NonlinearSolve]]
567561
deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "DiffEqBase", "EnumX", "FastBroadcast", "FiniteDiff", "ForwardDiff", "LineSearches", "LinearAlgebra", "LinearSolve", "PrecompileTools", "RecursiveArrayTools", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SparseArrays", "SparseDiffTools", "StaticArraysCore", "UnPack"]
568-
git-tree-sha1 = "8245eaa4cbe9f1c13e4469bca871d7487ce7c5fa"
562+
git-tree-sha1 = "e81d50179533398546cf93f21dcca45fa658ca38"
569563
repo-rev = "ap/fix_lm"
570564
repo-url = "https://github.com/avik-pal/NonlinearSolve.jl"
571565
uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
@@ -792,12 +786,6 @@ git-tree-sha1 = "5d7e3f4e11935503d3ecaf7186eac40602e7d231"
792786
uuid = "699a6c99-e7fa-54fc-8d76-47d257e15c1d"
793787
version = "0.9.4"
794788

795-
[[deps.SnoopPrecompile]]
796-
deps = ["Preferences"]
797-
git-tree-sha1 = "e760a70afdcd461cf01a575947738d359234665c"
798-
uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c"
799-
version = "1.0.3"
800-
801789
[[deps.Sockets]]
802790
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
803791

src/BoundaryValueDiffEq.jl

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,59 @@ end
8989
solve(prob, alg; dt = 0.2)
9090
end
9191
end
92+
93+
function f1_nlls!(du, u, p, t)
94+
du[1] = u[2]
95+
du[2] = -u[1]
96+
end
97+
98+
f1_nlls(u, p, t) = [u[2], -u[1]]
99+
100+
function bc1_nlls!(resid, sol, p, t)
101+
solₜ₁ = sol[1]
102+
solₜ₂ = sol[end]
103+
resid[1] = solₜ₁[1]
104+
resid[2] = solₜ₂[1] - 1
105+
resid[3] = solₜ₂[2] + 1.729109
106+
return nothing
107+
end
108+
bc1_nlls(sol, p, t) = [sol[1][1], sol[end][1] - 1, sol[end][2] + 1.729109]
109+
110+
bc1_nlls_a!(resid, ua, p) = (resid[1] = ua[1])
111+
bc1_nlls_b!(resid, ub, p) = (resid[1] = ub[1] - 1; resid[2] = ub[2] + 1.729109)
112+
113+
bc1_nlls_a(ua, p) = [ua[1]]
114+
bc1_nlls_b(ub, p) = [ub[1] - 1, ub[2] + 1.729109]
115+
116+
tspan = (0.0, 100.0)
117+
u0 = [0.0, 1.0]
118+
bcresid_prototype1 = Array{Float64}(undef, 3)
119+
bcresid_prototype2 = (Array{Float64}(undef, 1), Array{Float64}(undef, 2))
120+
121+
probs = [
122+
BVProblem(BVPFunction(f1_nlls!, bc1_nlls!; bcresid_prototype = bcresid_prototype1),
123+
u0, tspan),
124+
BVProblem(BVPFunction(f1_nlls, bc1_nlls; bcresid_prototype = bcresid_prototype1),
125+
u0, tspan),
126+
TwoPointBVProblem(f1_nlls!, (bc1_nlls_a!, bc1_nlls_b!), u0, tspan;
127+
bcresid_prototype = bcresid_prototype2),
128+
TwoPointBVProblem(f1_nlls, (bc1_nlls_a, bc1_nlls_b), u0, tspan;
129+
bcresid_prototype = bcresid_prototype2),
130+
]
131+
132+
jac_alg = BVPJacobianAlgorithm(AutoForwardDiff(; chunksize = 2))
133+
134+
nlsolvers = [LevenbergMarquardt(), GaussNewton()]
135+
136+
@compile_workload begin
137+
for prob in probs, nlsolve in nlsolvers,
138+
alg in (MIRK2(; jac_alg, nlsolve), MIRK3(; jac_alg, nlsolve),
139+
MIRK4(; jac_alg, nlsolve), MIRK5(; jac_alg, nlsolve),
140+
MIRK6(; jac_alg, nlsolve))
141+
142+
solve(prob, alg; dt = 0.2)
143+
end
144+
end
92145
end
93146

94147
export Shooting, MultipleShooting

0 commit comments

Comments
 (0)