@@ -32,13 +32,8 @@ function alg_cache(alg::ImplicitEM,prob,u,ΔW,ΔZ,rate_prototype,noise_rate_prot
32
32
fsalfirst = zeros (rate_prototype)
33
33
k = zeros (rate_prototype)
34
34
35
- uf = UJacobianWrapper (f,t,tmp,dz)
36
- if alg_autodiff (alg)
37
- jac_config = ForwardDiff. JacobianConfig (uf,du1,uprev,
38
- ForwardDiff. Chunk {determine_chunksize(u,alg)} ())
39
- else
40
- jac_config = nothing
41
- end
35
+ uf = DiffEqDiffTools. UJacobianWrapper (f,t)
36
+ jac_config = build_jac_config (alg,f,uf,du1,uprev,u,tmp,dz)
42
37
ηold = one (uEltypeNoUnits)
43
38
44
39
if alg. κ != nothing
73
68
74
69
function alg_cache (alg:: ImplicitEM ,prob,u,ΔW,ΔZ,rate_prototype,noise_rate_prototype,
75
70
uEltypeNoUnits,tTypeNoUnits,uprev,f,t,:: Type{Val{false}} )
76
- uf = UDerivativeWrapper (f,t)
71
+ uf = DiffEqDiffTools . UDerivativeWrapper (f,t)
77
72
ηold = one (uEltypeNoUnits)
78
73
79
74
if alg. κ != nothing
@@ -125,13 +120,8 @@ function alg_cache(alg::ImplicitEulerHeun,prob,u,ΔW,ΔZ,rate_prototype,noise_ra
125
120
fsalfirst = zeros (rate_prototype)
126
121
k = zeros (rate_prototype)
127
122
128
- uf = UJacobianWrapper (f,t,tmp,dz)
129
- if alg_autodiff (alg)
130
- jac_config = ForwardDiff. JacobianConfig (uf,du1,uprev,
131
- ForwardDiff. Chunk {determine_chunksize(u,alg)} ())
132
- else
133
- jac_config = nothing
134
- end
123
+ uf = DiffEqDiffTools. UJacobianWrapper (f,t)
124
+ jac_config = build_jac_config (alg,f,uf,du1,uprev,u,tmp,dz)
135
125
ηold = one (uEltypeNoUnits)
136
126
137
127
if alg. κ != nothing
162
152
163
153
function alg_cache (alg:: ImplicitEulerHeun ,prob,u,ΔW,ΔZ,rate_prototype,noise_rate_prototype,
164
154
uEltypeNoUnits,tTypeNoUnits,uprev,f,t,:: Type{Val{false}} )
165
- uf = UDerivativeWrapper (f,t)
155
+ uf = DiffEqDiffTools . UDerivativeWrapper (f,t)
166
156
ηold = one (uEltypeNoUnits)
167
157
168
158
if alg. κ != nothing
@@ -215,13 +205,8 @@ function alg_cache(alg::ImplicitRKMil,prob,u,ΔW,ΔZ,rate_prototype,noise_rate_p
215
205
fsalfirst = zeros (rate_prototype)
216
206
k = zeros (rate_prototype)
217
207
218
- uf = UJacobianWrapper (f,t,tmp,dz)
219
- if alg_autodiff (alg)
220
- jac_config = ForwardDiff. JacobianConfig (uf,du1,uprev,
221
- ForwardDiff. Chunk {determine_chunksize(u,alg)} ())
222
- else
223
- jac_config = nothing
224
- end
208
+ uf = DiffEqDiffTools. UJacobianWrapper (f,t)
209
+ jac_config = build_jac_config (alg,f,uf,du1,uprev,u,tmp,dz)
225
210
ηold = one (uEltypeNoUnits)
226
211
227
212
if alg. κ != nothing
253
238
254
239
function alg_cache (alg:: ImplicitRKMil ,prob,u,ΔW,ΔZ,rate_prototype,noise_rate_prototype,
255
240
uEltypeNoUnits,tTypeNoUnits,uprev,f,t,:: Type{Val{false}} )
256
- uf = UDerivativeWrapper (f,t)
241
+ uf = DiffEqDiffTools . UDerivativeWrapper (f,t)
257
242
ηold = one (uEltypeNoUnits)
258
243
259
244
if alg. κ != nothing
0 commit comments