diff --git a/Project.toml b/Project.toml index cea2ae5b29..5c8f190add 100644 --- a/Project.toml +++ b/Project.toml @@ -85,7 +85,7 @@ PrecompileTools = "1" RecursiveArrayTools = "2.3" Reexport = "0.2, 1" RuntimeGeneratedFunctions = "0.5.9" -SciMLBase = "1.76.1" +SciMLBase = "2.0.1" Setfield = "0.7, 0.8, 1" SimpleNonlinearSolve = "0.1.0" SpecialFunctions = "0.7, 0.8, 0.9, 0.10, 1.0, 2" diff --git a/src/systems/diffeqs/sdesystem.jl b/src/systems/diffeqs/sdesystem.jl index 31ac69e58a..30d0e10666 100644 --- a/src/systems/diffeqs/sdesystem.jl +++ b/src/systems/diffeqs/sdesystem.jl @@ -583,7 +583,7 @@ function DiffEqBase.SDEProblem{iip}(sys::SDESystem, u0map = [], tspan = get_tspa noise_rate_prototype = zeros(eltype(u0), size(noiseeqs)) end - SDEProblem{iip}(f, f.g, u0, tspan, p; callback = cbs, + SDEProblem{iip}(f, u0, tspan, p; callback = cbs, noise_rate_prototype = noise_rate_prototype, kwargs...) end @@ -648,7 +648,7 @@ function SDEProblemExpr{iip}(sys::SDESystem, u0map, tspan, tspan = $tspan p = $p noise_rate_prototype = $noise_rate_prototype - SDEProblem(f, f.g, u0, tspan, p; noise_rate_prototype = noise_rate_prototype, + SDEProblem(f, u0, tspan, p; noise_rate_prototype = noise_rate_prototype, $(kwargs...)) end !linenumbers ? striplines(ex) : ex diff --git a/test/sdesystem.jl b/test/sdesystem.jl index 3cee548743..a520a9d58e 100644 --- a/test/sdesystem.jl +++ b/test/sdesystem.jl @@ -25,10 +25,10 @@ f = eval(generate_diffusion_function(de)[1]) @test f(ones(3), rand(3), nothing) == 0.1ones(3) f = SDEFunction(de) -prob = SDEProblem(SDEFunction(de), f.g, [1.0, 0.0, 0.0], (0.0, 100.0), (10.0, 26.0, 2.33)) +prob = SDEProblem(SDEFunction(de), [1.0, 0.0, 0.0], (0.0, 100.0), (10.0, 26.0, 2.33)) sol = solve(prob, SRIW1(), seed = 1) -probexpr = SDEProblem(SDEFunction(de), f.g, [1.0, 0.0, 0.0], (0.0, 100.0), +probexpr = SDEProblem(SDEFunction(de), [1.0, 0.0, 0.0], (0.0, 100.0), (10.0, 26.0, 2.33)) solexpr = solve(eval(probexpr), SRIW1(), seed = 1) @@ -55,7 +55,7 @@ f(du, [1, 2, 3.0], [0.1, 0.2, 0.3], nothing) 0.2 0.3 0.01*3] f = SDEFunction(de) -prob = SDEProblem(SDEFunction(de), f.g, [1.0, 0.0, 0.0], (0.0, 100.0), (10.0, 26.0, 2.33), +prob = SDEProblem(SDEFunction(de), [1.0, 0.0, 0.0], (0.0, 100.0), (10.0, 26.0, 2.33), noise_rate_prototype = zeros(3, 3)) sol = solve(prob, EM(), dt = 0.001)