Skip to content

Commit 73d8385

Browse files
committed
Use a completely type stable workflow for precompiling
1 parent 12009e3 commit 73d8385

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/BoundaryValueDiffEq.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,13 @@ end
7474
TwoPointBVProblem(f1, (bc1_a, bc1_b), u0, tspan; bcresid_prototype),
7575
]
7676

77+
jac_alg = BVPJacobianAlgorithm(AutoForwardDiff(; chunksize = 2))
78+
7779
@compile_workload begin
78-
for prob in probs, alg in (MIRK2(), MIRK3(), MIRK4(), MIRK5(), MIRK6())
80+
for prob in probs,
81+
alg in (MIRK2(; jac_alg), MIRK3(; jac_alg), MIRK4(; jac_alg),
82+
MIRK5(; jac_alg), MIRK6(; jac_alg))
83+
7984
solve(prob, alg; dt = 0.2)
8085
end
8186
end

src/solve/mirk.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ function SciMLBase.solve!(cache::MIRKCache)
139139

140140
while SciMLBase.successful_retcode(info) && defect_norm > abstol
141141
nlprob = __construct_nlproblem(cache, recursive_flatten(y₀))
142-
sol_nlprob = solve(nlprob, alg.nlsolve; abstol, kwargs...)
142+
sol_nlprob = __solve(nlprob, alg.nlsolve; abstol, kwargs...)
143143
recursive_unflatten!(cache.y₀, sol_nlprob.u)
144144

145145
info = sol_nlprob.retcode

0 commit comments

Comments
 (0)