@@ -107,7 +107,11 @@ function DiffEqBase.auto_dt_reset!(integrator::SDDEIntegrator)
107107 end
108108
109109 # determine initial time step
110- sde_prob = SDEProblem (f,g, prob. u0, prob. tspan, prob. p)
110+ sde_prob = SDEProblem (f,g, prob. u0, prob. tspan, prob. p;
111+ noise_rate_prototype = prob. noise_rate_prototype,
112+ noise = prob. noise,
113+ seed = prob. seed,
114+ prob. kwargs... )
111115 integrator. dt = StochasticDiffEq. sde_determine_initdt (integrator. u, integrator. t,
112116 integrator. tdir, integrator. opts. dtmax, integrator. opts. abstol, integrator. opts. reltol,
113117 integrator. opts. internalnorm, sde_prob, StochasticDiffEq. get_current_alg_order (getalg (integrator. alg), integrator. cache), integrator)
@@ -244,7 +248,7 @@ function DiffEqBase.u_modified!(integrator::SDDEIntegrator, bool::Bool)
244248end
245249
246250get_proposed_dt (integrator:: SDDEIntegrator ) = integrator. dtpropose
247- set_proposed_dt! (integrator:: SDDEIntegrator ,dt:: Number ) = (integrator. dtpropose = dt)
251+ set_proposed_dt! (integrator:: SDDEIntegrator ,dt:: Number ) = (integrator. dtpropose = dt; integrator . dtcache = dt )
248252
249253function set_proposed_dt! (integrator:: SDDEIntegrator ,integrator2:: SDDEIntegrator )
250254 integrator. dtpropose = integrator2. dtpropose
337341 ! isnothing (integrator. W) && DiffEqNoiseProcess. save_noise! (integrator. W)
338342 ! isnothing (integrator. P) && DiffEqNoiseProcess. save_noise! (integrator. P)
339343end
344+
345+ @inline DiffEqBase. get_tmp_cache (integrator:: SDDEIntegrator ) =
346+ get_tmp_cache (integrator, integrator. alg, integrator. cache)
347+ # avoid method ambiguity
348+ for typ in (StochasticDiffEq. StochasticDiffEqAlgorithm,StochasticDiffEq. StochasticDiffEqNewtonAdaptiveAlgorithm)
349+ @eval @inline DiffEqBase. get_tmp_cache (integrator:: SDDEIntegrator , alg:: $typ , cache:: StochasticDiffEq.StochasticDiffEqConstantCache ) = nothing
350+ end
351+ @inline DiffEqBase. get_tmp_cache (integrator:: SDDEIntegrator , alg, cache) = (cache. tmp,)
352+ @inline DiffEqBase. get_tmp_cache (integrator:: SDDEIntegrator , alg:: StochasticDiffEq.StochasticDiffEqNewtonAdaptiveAlgorithm , cache) =
353+ (cache. nlsolver. tmp, cache. nlsolver. ztmp)
354+ @inline DiffEqBase. get_tmp_cache (integrator:: SDDEIntegrator , alg:: StochasticDiffEq.StochasticCompositeAlgorithm , cache) =
355+ get_tmp_cache (integrator, alg. algs[1 ], cache. caches[1 ])
0 commit comments