Skip to content

Commit 1deef67

Browse files
committed
Pin JET version
1 parent fda020d commit 1deef67

39 files changed

+522
-369
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ FastClosures = "0.3.2"
4646
ForwardDiff = "0.10.38"
4747
Hwloc = "3.3"
4848
InteractiveUtils = "<0.0.1, 1"
49-
JET = "0.9"
49+
JET = "0.9.19"
5050
LinearAlgebra = "1.10"
5151
LinearSolve = "3.9"
5252
NonlinearSolveFirstOrder = "1.3"

ext/BoundaryValueDiffEqODEInterfaceExt.jl

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,17 @@ function SciMLBase.__solve(prob::BVProblem, alg::BVPM2; dt = 0.0, reltol = 1e-3,
6161
@closure (t, u, du) -> du .= vec(prob.f(reshape(u, u0_size), prob.p, t))
6262
end
6363
bvp2m_bc = if SciMLBase.isinplace(prob)
64-
@closure (ya, yb, bca, bcb) -> begin
64+
@closure (ya,
65+
yb,
66+
bca,
67+
bcb) -> begin
6568
prob.f.bc[1](reshape(bca, left_bc_size), reshape(ya, u0_size), prob.p)
6669
prob.f.bc[2](reshape(bcb, right_bc_size), reshape(yb, u0_size), prob.p)
6770
return nothing
6871
end
6972
else
70-
@closure (ya, yb, bca, bcb) -> begin
73+
@closure (
74+
ya, yb, bca, bcb) -> begin
7175
bca .= vec(prob.f.bc[1](reshape(ya, u0_size), prob.p))
7276
bcb .= vec(prob.f.bc[2](reshape(yb, u0_size), prob.p))
7377
return nothing
@@ -140,15 +144,18 @@ function SciMLBase.__solve(prob::BVProblem, alg::BVPSOL; maxiters = 1000,
140144
end
141145

142146
bvpsol_bc = if SciMLBase.isinplace(prob)
143-
@closure (ya, yb, r) -> begin
147+
@closure (ya, yb,
148+
r) -> begin
144149
left_bc = reshape(@view(r[1:no_left_bc]), left_bc_size)
145150
right_bc = reshape(@view(r[(no_left_bc + 1):end]), right_bc_size)
146151
prob.f.bc[1](left_bc, reshape(ya, u0_size), prob.p)
147152
prob.f.bc[2](right_bc, reshape(yb, u0_size), prob.p)
148153
return nothing
149154
end
150155
else
151-
@closure (ya, yb, r) -> begin
156+
@closure (ya,
157+
yb,
158+
r) -> begin
152159
r[1:no_left_bc] .= vec(prob.f.bc[1](reshape(ya, u0_size), prob.p))
153160
r[(no_left_bc + 1):end] .= vec(prob.f.bc[2](reshape(yb, u0_size), prob.p))
154161
return nothing

lib/BoundaryValueDiffEqAscher/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ FastClosures = "0.3.2"
3232
ForwardDiff = "0.10.38"
3333
Hwloc = "3"
3434
InteractiveUtils = "<0.0.1, 1"
35-
JET = "0.9"
35+
JET = "0.9.19"
3636
LinearAlgebra = "1.10"
3737
PreallocationTools = "0.4.24"
3838
Random = "1.10"

lib/BoundaryValueDiffEqAscher/src/adaptivity.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,15 +188,13 @@ function error_estimate!(cache::AscherCache)
188188
# in valstr in case they prove to be needed later for an error estimate.
189189
x = mesh[i] + (mesh_dt[i]) * 2.0 / 3.0
190190
@views approx(cache, x, valstr[i][3])
191-
error[i] .= wgterr .*
192-
abs.(valstr[i][3] .-
191+
error[i] .= wgterr .* abs.(valstr[i][3] .-
193192
(isodd(i) ? valstr[Int((i + 1) / 2)][2] : valstr[Int(i / 2)][4]))
194193

195194
x = mesh[i] + (mesh_dt[i]) / 3.0
196195
@views approx(cache, x, valstr[i][2])
197196
error[i] .= error[i] .+
198-
wgterr .*
199-
abs.(valstr[i][2] .-
197+
wgterr .* abs.(valstr[i][2] .-
200198
(isodd(i) ? valstr[Int((i + 1) / 2)][1] : valstr[Int(i / 2)][3]))
201199
end
202200
return maximum(reduce(hcat, error), dims = 2)

lib/BoundaryValueDiffEqAscher/src/algorithms.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ for stage in (1, 2, 3, 4, 5, 6, 7)
1818
- `zeta`: side condition points, should always be provided.
1919
2020
!!! note
21+
2122
For type-stability, the chunksizes for ForwardDiff ADTypes in
2223
`BVPJacobianAlgorithm` must be provided.
2324

lib/BoundaryValueDiffEqAscher/src/ascher.jl

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ function SciMLBase.__init(prob::BVProblem, alg::AbstractAscher; dt = 0.0,
100100

101101
iip = isinplace(prob)
102102

103-
f, bc = if prob.u0 isa AbstractVector
103+
f,
104+
bc = if prob.u0 isa AbstractVector
104105
prob.f, prob.f.bc
105106
elseif iip
106107
vecf! = @closure (du, u, p, t) -> __vec_f!(du, u, p, t, prob.f, size(u0))
@@ -160,8 +161,9 @@ function SciMLBase.solve!(cache::AscherCache{iip, T}) where {iip, T}
160161

161162
if adaptive
162163
while SciMLBase.successful_retcode(info) && norm(error_norm) > abstol
163-
z, y, info, error_norm = __perform_ascher_iteration(
164-
cache, abstol, adaptive; kwargs...)
164+
z, y,
165+
info,
166+
error_norm = __perform_ascher_iteration(cache, abstol, adaptive; kwargs...)
165167
end
166168
end
167169
u = [vcat(zᵢ, yᵢ) for (zᵢ, yᵢ) in zip(z, y)]
@@ -338,10 +340,11 @@ function __construct_nlproblem(cache::AscherCache{iip, T}) where {iip, T}
338340
end
339341

340342
jac = if iip
341-
@closure (J, u, p) -> __ascher_mpoint_jacobian!(
342-
J, u, diffmode, jac_cache, loss, lz, cache.p)
343+
@closure (J, u,
344+
p) -> __ascher_mpoint_jacobian!(J, u, diffmode, jac_cache, loss, lz, cache.p)
343345
else
344-
@closure (u, p) -> __ascher_mpoint_jacobian(
346+
@closure (u,
347+
p) -> __ascher_mpoint_jacobian(
345348
jac_prototype, u, diffmode, jac_cache, loss, cache.p)
346349
end
347350

lib/BoundaryValueDiffEqAscher/src/collocation.jl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
function Φ!(cache::AscherCache{iip, T}, z, res, pt::StandardBVProblem) where {iip, T}
2-
(; f, mesh, mesh_dt, ncomp, ny, bc, k, p, zeta, residual, zval, yval, gval, delz, dmz, deldmz, g, w, v, ipvtg, ipvtw, TU) = cache
2+
(; f, mesh, mesh_dt, ncomp, ny, bc, k, p, zeta, residual, zval,
3+
yval, gval, delz, dmz, deldmz, g, w, v, ipvtg, ipvtw, TU) = cache
34
(; acol, rho) = TU
45
ncy = ncomp + ny
56
n = length(mesh) - 1
@@ -156,7 +157,8 @@ function Φ!(cache::AscherCache{iip, T}, z, res, pt::StandardBVProblem) where {i
156157
end
157158

158159
function Φ!(cache::AscherCache{iip, T}, z, res, pt::TwoPointBVProblem) where {iip, T}
159-
(; f, mesh, mesh_dt, ncomp, ny, bc, k, p, zeta, bcresid_prototype, residual, zval, yval, gval, delz, dmz, deldmz, g, w, v, dmzo, ipvtg, ipvtw, TU) = cache
160+
(; f, mesh, mesh_dt, ncomp, ny, bc, k, p, zeta, bcresid_prototype, residual,
161+
zval, yval, gval, delz, dmz, deldmz, g, w, v, dmzo, ipvtg, ipvtw, TU) = cache
160162
(; acol, rho) = TU
161163
ncy = ncomp + ny
162164
n = length(mesh) - 1
@@ -319,7 +321,8 @@ end
319321
@inline __get_value(z) = isa(z, ForwardDiff.Dual) ? z.value : z
320322

321323
function Φ(cache::AscherCache{iip, T}, z, pt::StandardBVProblem) where {iip, T}
322-
(; f, mesh, mesh_dt, ncomp, ny, bc, k, p, zeta, residual, zval, yval, gval, delz, dmz, deldmz, g, w, v, dmzo, ipvtg, ipvtw, TU) = cache
324+
(; f, mesh, mesh_dt, ncomp, ny, bc, k, p, zeta, residual, zval, yval,
325+
gval, delz, dmz, deldmz, g, w, v, dmzo, ipvtg, ipvtw, TU) = cache
323326
(; acol, rho) = TU
324327
ncy = ncomp + ny
325328
n = length(mesh) - 1
@@ -476,7 +479,8 @@ function Φ(cache::AscherCache{iip, T}, z, pt::StandardBVProblem) where {iip, T}
476479
end
477480

478481
function Φ(cache::AscherCache{iip, T}, z, pt::TwoPointBVProblem) where {iip, T}
479-
(; f, mesh, mesh_dt, ncomp, ny, bc, k, p, zeta, residual, zval, yval, gval, delz, dmz, deldmz, g, w, v, dmzo, ipvtg, ipvtw, TU) = cache
482+
(; f, mesh, mesh_dt, ncomp, ny, bc, k, p, zeta, residual, zval, yval,
483+
gval, delz, dmz, deldmz, g, w, v, dmzo, ipvtg, ipvtw, TU) = cache
480484
(; acol, rho) = TU
481485
ncy = ncomp + ny
482486
n = length(mesh) - 1

lib/BoundaryValueDiffEqCore/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ ConcreteStructs = "0.2.3"
3232
DiffEqBase = "6.167"
3333
ForwardDiff = "0.10.38"
3434
InteractiveUtils = "<0.0.1, 1"
35-
JET = "0.9"
35+
JET = "0.9.19"
3636
LineSearch = "0.1.4"
3737
LinearAlgebra = "1.10"
3838
Logging = "1.10"

lib/BoundaryValueDiffEqCore/src/types.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
end
77

88
@inline __materialize_jacobian_algorithm(_, alg::BVPJacobianAlgorithm) = alg
9-
@inline __materialize_jacobian_algorithm(_, alg::ADTypes.AbstractADType) = BVPJacobianAlgorithm(alg)
9+
@inline __materialize_jacobian_algorithm(
10+
_, alg::ADTypes.AbstractADType) = BVPJacobianAlgorithm(alg)
1011
@inline __materialize_jacobian_algorithm(::Nothing, ::Nothing) = BVPJacobianAlgorithm()
1112
@inline function __materialize_jacobian_algorithm(nlsolve::N, ::Nothing) where {N}
1213
ad = hasfield(N, :jacobian_ad) ? nlsolve.jacobian_ad : missing

lib/BoundaryValueDiffEqFIRK/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ FastClosures = "0.3.2"
4141
ForwardDiff = "0.10.38"
4242
Hwloc = "3"
4343
InteractiveUtils = "<0.0.1, 1"
44-
JET = "0.9"
44+
JET = "0.9.19"
4545
LinearAlgebra = "1.10"
4646
LinearSolve = "2.36.2, 3"
4747
OrdinaryDiffEq = "6.93"

0 commit comments

Comments
 (0)