From eb16c951882a770923848d4fceae20b6502e37fe Mon Sep 17 00:00:00 2001 From: ErikQQY <2283984853@qq.com> Date: Thu, 7 Sep 2023 23:40:47 +0800 Subject: [PATCH 01/14] Refactor SDEProblem constructor Signed-off-by: ErikQQY <2283984853@qq.com> --- Project.toml | 2 +- test/commutative_tests.jl | 4 ++-- test/iif_methods.jl | 8 ++++---- test/mass_matrix_tests.jl | 6 +++--- test/multivariate_geometric.jl | 4 ++-- test/noncommutative_tests.jl | 4 ++-- test/nondiagonal_tests.jl | 4 ++-- test/ode_convergence_regression.jl | 6 +++--- test/sde/sde_additive_tests.jl | 2 +- test/sde/sde_dynamical.jl | 4 ++-- test/sparsediff_tests.jl | 2 +- test/split_tests.jl | 14 +++++++------- test/utility_tests.jl | 20 ++++++++++---------- test/weak_convergence/iip_weak.jl | 2 +- test/weak_convergence/weak_srockc2.jl | 2 +- 15 files changed, 42 insertions(+), 42 deletions(-) diff --git a/Project.toml b/Project.toml index 5e1583672..58426b184 100644 --- a/Project.toml +++ b/Project.toml @@ -49,7 +49,7 @@ OrdinaryDiffEq = "6.52" RandomNumbers = "1.5.3" RecursiveArrayTools = "2" Reexport = "0.2, 1.0" -SciMLBase = "1.70" +SciMLBase = "1.96.3" SciMLOperators = "0.2.9, 0.3" SparseDiffTools = "2" StaticArrays = "0.11, 0.12, 1.0" diff --git a/test/commutative_tests.jl b/test/commutative_tests.jl index 535f3a964..fc893e5a4 100644 --- a/test/commutative_tests.jl +++ b/test/commutative_tests.jl @@ -44,7 +44,7 @@ end ff_commute = SDEFunction(f_commute,σ,analytic=f_commute_analytic) -prob = SDEProblem(ff_commute,σ,u0,(0.0,1.0),noise_rate_prototype=rand(2,4)) +prob = SDEProblem(ff_commute,u0,(0.0,1.0),noise_rate_prototype=rand(2,4)) sol = solve(prob,RKMilCommute(),dt=1/2^(8)) sol = solve(prob,RKMilGeneral(ii_approx=IICommutative()),dt=1/2^(8)) @@ -67,7 +67,7 @@ sim2 = test_convergence(dts,prob,RKMilGeneral(p=2),trajectories=Int(2e2)) ff_commute_oop = SDEFunction(f_commute_oop,σ_oop,analytic=f_commute_analytic) -proboop = SDEProblem(ff_commute_oop,σ_oop,u0,(0.0,1.0),noise_rate_prototype=rand(2,4)) +proboop = SDEProblem(ff_commute_oop,u0,(0.0,1.0),noise_rate_prototype=rand(2,4)) sol = solve(proboop,RKMilCommute(),dt=1/2^(8)) sol = solve(proboop,RKMilGeneral(ii_approx=IICommutative()),dt=1/2^(8)) diff --git a/test/iif_methods.jl b/test/iif_methods.jl index c571d0420..8abae4ef6 100644 --- a/test/iif_methods.jl +++ b/test/iif_methods.jl @@ -12,9 +12,9 @@ f1_no_noise(u,p,t) = μ f1_no_noise_analytic(u0,p,t,W) = u0.*exp.(2μ*t) ff1_μ = SplitSDEFunction(f1_μ,f2,σ,analytic=f1_μ_analytic) -prob = SDEProblem(ff1_μ,σ,1/2,(0.0,1.0)) +prob = SDEProblem(ff1_μ,1/2,(0.0,1.0)) ff1_no_noise = SplitSDEFunction(f1_no_noise,f2,no_noise,analytic=f1_no_noise_analytic) -no_noise_prob = SDEProblem(ff1_no_noise,no_noise,1/2,(0.0,1.0)) +no_noise_prob = SDEProblem(ff1_no_noise,1/2,(0.0,1.0)) sol = solve(prob,IIF1M(),dt=1/10) @@ -74,7 +74,7 @@ end f2(du,u,p,t) = du .= μ .* u ff1_A = SplitSDEFunction(f1_A,f2,σ,analytic=f1_A_analytic) -prob = SDEProblem(ff1_A,σ,u0,(0.0,1.0),noise_rate_prototype=rand(2,2)) +prob = SDEProblem(ff1_A,u0,(0.0,1.0),noise_rate_prototype=rand(2,2)) f1_no_noise(du,u,p,t) = A f2(du,u,p,t) = (du .= μ .* u) @@ -86,7 +86,7 @@ function f1_no_noise_analytic(u0,p,t,W) exp(tmp)*u0 end ff1_A = SplitSDEFunction(f1_no_noise,f2,σ22,analytic=f1_no_noise_analytic) -prob_no_noise = SDEProblem(ff1_A,σ22,u0,(0.0,1.0),noise_rate_prototype=rand(2,2)) +prob_no_noise = SDEProblem(ff1_A,u0,(0.0,1.0),noise_rate_prototype=rand(2,2)) sol = solve(prob,IIF1M(),dt=1/10) diff --git a/test/mass_matrix_tests.jl b/test/mass_matrix_tests.jl index 183341745..95af08267 100644 --- a/test/mass_matrix_tests.jl +++ b/test/mass_matrix_tests.jl @@ -23,8 +23,8 @@ function g!(du,u,p,t) @. du = 0.0 end -prob2 = SDEProblem(SDEFunction(mm_g,g!;analytic=mm_analytic),g!,ones(3),(0.0,1.0)) -prob = SDEProblem(SDEFunction(mm_f,g!;analytic=mm_analytic,mass_matrix=mm_A),g!, +prob2 = SDEProblem(SDEFunction(mm_g,g!;analytic=mm_analytic),ones(3),(0.0,1.0)) +prob = SDEProblem(SDEFunction(mm_f,g!;analytic=mm_analytic,mass_matrix=mm_A), ones(3),(0.0,1.0)) sol = solve(prob, ImplicitRKMil(theta=1), dt = 0.01, adaptive = false) @@ -60,7 +60,7 @@ function mm_g2(du,u,p,t) mul!(du,mm_A,u) end prob2 = SDEProblem(no_mm_f2,no_mm_g2,ones(3),(0.0,1.0)) -prob = SDEProblem(SDEFunction(mm_f2,no_mm_g2;mass_matrix=mm_A),no_mm_g2,ones(3),(0.0,1.0)) +prob = SDEProblem(SDEFunction(mm_f2,no_mm_g2;mass_matrix=mm_A),ones(3),(0.0,1.0)) Random.seed!(1) sol = solve(prob, ImplicitEM(theta=1), dt = 0.01, adaptive = false) diff --git a/test/multivariate_geometric.jl b/test/multivariate_geometric.jl index 3f1b8bc5b..20eb342b5 100644 --- a/test/multivariate_geometric.jl +++ b/test/multivariate_geometric.jl @@ -19,7 +19,7 @@ function f_analytic(u0,p,t,W) exp(tmp)*u0 end -prob2 = SDEProblem(SDEFunction(f,σ,analytic=f_analytic),σ,u0,(0.0,1.0),noise_rate_prototype=rand(2,2)) +prob2 = SDEProblem(SDEFunction(f,σ,analytic=f_analytic),u0,(0.0,1.0),noise_rate_prototype=rand(2,2)) sol2 = solve(prob2,EM(),dt=1/100) @@ -51,7 +51,7 @@ function f_analytic_iip(u0,p,t,W) exp(tmp)*u0 end -prob2 = SDEProblem(SDEFunction(f_iip,σ_iip,analytic=f_analytic_iip),σ_iip,u0,(0.0,1.0),noise_rate_prototype=rand(2,2)) +prob2 = SDEProblem(SDEFunction(f_iip,σ_iip,analytic=f_analytic_iip),u0,(0.0,1.0),noise_rate_prototype=rand(2,2)) sol2 = solve(prob2,EM(),dt=1/100) diff --git a/test/noncommutative_tests.jl b/test/noncommutative_tests.jl index 194f1a65c..f73c3f106 100644 --- a/test/noncommutative_tests.jl +++ b/test/noncommutative_tests.jl @@ -44,7 +44,7 @@ end ff_noncommute = SDEFunction(f_noncommute,g_noncommute,analytic=f_noncommute_analytic) -prob = SDEProblem(ff_noncommute,g_noncommute,u0,(0.0,1.0),noise_rate_prototype=rand(4,m)) +prob = SDEProblem(ff_noncommute,u0,(0.0,1.0),noise_rate_prototype=rand(4,m)) sol = solve(prob,EM(),dt=1/2^(8)) sol = solve(prob,RKMilGeneral(p=10),dt=1/2^(8)) @@ -58,7 +58,7 @@ sim3 = test_convergence(dts,prob,RKMilGeneral(p=2),trajectories=Int(1e2)) @test abs(sim3.𝒪est[:final] - 1) < 0.2 ff_noncommute_stratonovich = SDEFunction(f_noncommute,g_noncommute,analytic=f_noncommute_analytic_stratonovich) -prob_stratonovich = SDEProblem(ff_noncommute_stratonovich,g_noncommute,u0,(0.0,1.0),noise_rate_prototype=rand(4,m)) +prob_stratonovich = SDEProblem(ff_noncommute_stratonovich,u0,(0.0,1.0),noise_rate_prototype=rand(4,m)) sim4 = test_convergence(dts,prob_stratonovich,EulerHeun(),trajectories=Int(1e2)) @test abs(sim4.𝒪est[:final] - 1.0) < 0.2 diff --git a/test/nondiagonal_tests.jl b/test/nondiagonal_tests.jl index e292708b4..7bfa6374e 100644 --- a/test/nondiagonal_tests.jl +++ b/test/nondiagonal_tests.jl @@ -47,8 +47,8 @@ function ggprime(du, u, p, t) du .= coeff*u end -prob = SDEProblem(SDEFunction(f_nondiag,g_nondiag,analytic=f_analytic_nondiag),g_nondiag,u0,(0.0,1.0),noise_rate_prototype=zeros(2,2)) -probiip = SDEProblem(SDEFunction(f_nondiag_iip,g_nondiag_iip,analytic=f_analytic_nondiag),g_nondiag_iip,u0,(0.0,1.0),noise_rate_prototype=zeros(2,2)) +prob = SDEProblem(SDEFunction(f_nondiag,g_nondiag,analytic=f_analytic_nondiag),u0,(0.0,1.0),noise_rate_prototype=zeros(2,2)) +probiip = SDEProblem(SDEFunction(f_nondiag_iip,g_nondiag_iip,analytic=f_analytic_nondiag),u0,(0.0,1.0),noise_rate_prototype=zeros(2,2)) ## Just solve to test compatibility IEM = solve(probiip,ImplicitEM()) diff --git a/test/ode_convergence_regression.jl b/test/ode_convergence_regression.jl index 4449e028c..01d65ea68 100644 --- a/test/ode_convergence_regression.jl +++ b/test/ode_convergence_regression.jl @@ -3,7 +3,7 @@ using StochasticDiffEq, DiffEqDevTools, Test linear = (u,p,t) -> (p*u) g = (u,p,t) -> zero(u) linear_analytic = (u0,p,t,W) -> u0*exp(p*t) -prob = SDEProblem(SDEFunction(linear,g,analytic=linear_analytic),g, +prob = SDEProblem(SDEFunction(linear,g,analytic=linear_analytic), 1/2,(0.0,1.0),1.01) dts = (1/2) .^ (7:-1:4) #14->7 good plot @@ -14,7 +14,7 @@ sim2 = test_convergence(dts,prob,SKenCarp(),trajectories=20) linear = (du,u,p,t) -> (du.=p.*u) g = (du,u,p,t) -> (du.=0) linear_analytic = (u0,p,t,W) -> u0*exp.(p.*t) -prob = SDEProblem(SDEFunction(linear,g,analytic=linear_analytic),g, +prob = SDEProblem(SDEFunction(linear,g,analytic=linear_analytic), rand(4,2),(0.0,1.0),1.01) dts = (1/2) .^ (7:-1:4) #14->7 good plot @@ -28,7 +28,7 @@ sim2 = test_convergence(dts,prob,SKenCarp(),trajectories=20) linear = (u,p,t) -> (p*u) g = (u,p,t) -> zero(u) linear_analytic = (u0,p,t,W) -> u0*exp(p*t) -prob = SDEProblem(SDEFunction(linear,g,analytic=linear_analytic),g, 1/2,(0.0,1.0),1.01) +prob = SDEProblem(SDEFunction(linear,g,analytic=linear_analytic), 1/2,(0.0,1.0),1.01) dts = 1 .//2 .^(10:-1:2) sim2 = test_convergence(dts,prob, DRI1(),trajectories=20) diff --git a/test/sde/sde_additive_tests.jl b/test/sde/sde_additive_tests.jl index b0e4b5141..3a64b8c32 100644 --- a/test/sde/sde_additive_tests.jl +++ b/test/sde/sde_additive_tests.jl @@ -7,7 +7,7 @@ println("Bunch of additive solves") f_bm(u,p,t) = 0.0 f_analytic_bm(u0,p,t,W) = W g_bm(u,p,t) = 1.0 -prob = SDEProblem(SDEFunction(f_bm,g_bm,analytic=f_analytic_bm),g_bm,0.0,(0.0,1.0)) +prob = SDEProblem(SDEFunction(f_bm,g_bm,analytic=f_analytic_bm),0.0,(0.0,1.0)) sol1 = solve(prob,SRA1(),dt=1/2^(3),adaptive=false) sol2 = solve(prob,SOSRA(),dt=1/2^(3),adaptive=false) sol3 = solve(prob,SKenCarp(),dt=1/2^(3),adaptive=false) diff --git a/test/sde/sde_dynamical.jl b/test/sde/sde_dynamical.jl index 730db5bc4..a0a259810 100644 --- a/test/sde/sde_dynamical.jl +++ b/test/sde/sde_dynamical.jl @@ -11,7 +11,7 @@ g(u,p,t) = 1 v0 = 1 ff_harmonic = DynamicalSDEFunction(f1_harmonic,f2_harmonic,g) - prob1 = DynamicalSDEProblem(ff_harmonic,g,v0,u0,(0.0,5.0)) + prob1 = DynamicalSDEProblem(ff_harmonic,v0,u0,(0.0,5.0)) dts = (1/2) .^ (8:-1:4) @@ -31,7 +31,7 @@ end g_iip(du,u,p,t) = du .= g(u,p,t) ff_harmonic = DynamicalSDEFunction(f1_harmonic,f2_harmonic,g) - prob1 = DynamicalSDEProblem(ff_harmonic,g,v0,u0,(0.0,5.0)) + prob1 = DynamicalSDEProblem(ff_harmonic,v0,u0,(0.0,5.0)) sol1 = solve(prob1,BAOAB(gamma=γ);dt=1/10,save_noise=true) prob2 = DynamicalSDEProblem(f1_harmonic_iip,f2_harmonic_iip,g_iip,v0,u0,(0.0,5.0); noise=NoiseWrapper(sol1.W)) diff --git a/test/sparsediff_tests.jl b/test/sparsediff_tests.jl index 7bfeacab1..be2025cda 100644 --- a/test/sparsediff_tests.jl +++ b/test/sparsediff_tests.jl @@ -40,7 +40,7 @@ colorvec = repeat(1:3,10)[1:10] u0=[1.,2.,3,4,5,5,4,3,2,1] tspan=(0.,10.) sdefun_sp= SDEFunction(f,g,colorvec=colorvec,jac_prototype=jac_sp) -prob_sp = SDEProblem(sdefun_sp,g,u0,tspan) +prob_sp = SDEProblem(sdefun_sp,u0,tspan) prob_std = SDEProblem(f,g,u0,tspan) sol_sp=solve(prob_sp,SKenCarp(autodiff=false)) diff --git a/test/split_tests.jl b/test/split_tests.jl index 1a8517706..efa4704b7 100644 --- a/test/split_tests.jl +++ b/test/split_tests.jl @@ -17,7 +17,7 @@ sol2 = solve(prob,EM(),dt=1/10) u0 = rand(4) ff_split = SplitSDEFunction(f1,f2,σ,analytic=f_split_analytic) -prob = SplitSDEProblem(ff_split,σ,u0,(0.0,1.0)) +prob = SplitSDEProblem(ff_split,u0,(0.0,1.0)) sol = solve(prob,SplitEM(),dt=1/10,save_noise=true) @@ -40,7 +40,7 @@ ff2 = (u,p,t) -> 0.0 σ2 = (u,p,t) -> α*β./sqrt.(1+t) ff1_analytic(u0,p,t,W) = @. u0/sqrt(1+t) + β*(t+α*W)/sqrt(1+t) f_ff1 = SplitSDEFunction(ff1,ff2,σ2,analytic=ff1_analytic) -prob = SplitSDEProblem(f_ff1,σ2,1.,(0.0,1.0)) +prob = SplitSDEProblem(f_ff1,1.,(0.0,1.0)) sol = solve(prob,EM(),dt=1/10) @@ -60,7 +60,7 @@ ff1 = (u,p,t) -> 0.0 ff2 = (u,p,t) -> β./sqrt.(1+t) - u./(2*(1+t)) σ2 = (u,p,t) -> α*β./sqrt.(1+t) f_ff1 = SplitSDEFunction(ff1,ff2,σ2,analytic=ff1_analytic) -prob = SplitSDEProblem(f_ff1,σ2,1.,(0.0,1.0)) +prob = SplitSDEProblem(f_ff1,1.,(0.0,1.0)) sol = solve(prob,EM(),dt=1/10) sol2 = solve(prob,SKenCarp(),dt=1/10,seed=1) @@ -79,7 +79,7 @@ ff1 = (u,p,t) -> β./sqrt.(1+t) ff2 = (u,p,t) -> - u./(2*(1+t)) σ2 = (u,p,t) -> α*β./sqrt.(1+t) f_ff1 = SplitSDEFunction(ff1,ff2,σ2,analytic=ff1_analytic) -prob = SplitSDEProblem(f_ff1,σ2,1.,(0.0,1.0)) +prob = SplitSDEProblem(f_ff1,1.,(0.0,1.0)) sol = solve(prob,EM(),dt=1/10) sol2 = solve(prob,SKenCarp(),dt=1/10) @@ -102,7 +102,7 @@ ff1 = (du,u,p,t) -> @. du = β/sqrt(1+t) - u/(2*(1+t)) ff2 = (du,u,p,t) -> @. du = 0.0 σ2 = (du,u,p,t) -> @. du = α*β/sqrt(1+t) f_ff1 = SplitSDEFunction(ff1,ff2,σ2,analytic=ff1_analytic) -prob = SplitSDEProblem(f_ff1,σ2,[1.],(0.0,1.0)) +prob = SplitSDEProblem(f_ff1,[1.],(0.0,1.0)) sol = solve(prob,EM(),dt=1/10) sol2 = solve(prob,SKenCarp(),dt=1/10) @@ -121,7 +121,7 @@ ff1 = (du,u,p,t) -> @. du = 0.0 ff2 = (du,u,p,t) -> @. du = β/sqrt(1+t) - u/(2*(1+t)) σ2 = (du,u,p,t) -> @. du = α*β/sqrt(1+t) f_ff1 = SplitSDEFunction(ff1,ff2,σ2,analytic=ff1_analytic) -prob = SplitSDEProblem(f_ff1,σ2,[1.],(0.0,1.0)) +prob = SplitSDEProblem(f_ff1,[1.],(0.0,1.0)) sol = solve(prob,EM(),dt=1/10) sol2 = solve(prob,SKenCarp(),dt=1/10) @@ -140,7 +140,7 @@ ff1 = (du,u,p,t) -> @. du = β/sqrt(1+t) ff2 = (du,u,p,t) -> @. du = - u/(2*(1+t)) σ2 = (du,u,p,t) -> @. du = α*β/sqrt(1+t) f_ff1 = SplitSDEFunction(ff1,ff2,σ2,analytic=ff1_analytic) -prob = SplitSDEProblem(f_ff1,σ2,[1.],(0.0,1.0)) +prob = SplitSDEProblem(f_ff1,[1.],(0.0,1.0)) sol = solve(prob,EM(),dt=1/10) sol2 = solve(prob,SKenCarp(),dt=1/10) diff --git a/test/utility_tests.jl b/test/utility_tests.jl index dbff8b5f8..2311ff57b 100644 --- a/test/utility_tests.jl +++ b/test/utility_tests.jl @@ -15,7 +15,7 @@ using StochasticDiffEq.SciMLOperators: MatrixOperator fun = SDEFunction(_f, _g; mass_matrix=mm, jac=(u,p,t) -> A) - prob = SDEProblem(fun, _g, u0, tspan) + prob = SDEProblem(fun, u0, tspan) integrator = init(prob, ImplicitEM(theta=1); adaptive=false, dt=dt) W = integrator.cache.nlsolver.cache.W calc_W!(W, integrator, integrator.cache.nlsolver, integrator.cache, dtgamma, false) @@ -27,7 +27,7 @@ using StochasticDiffEq.SciMLOperators: MatrixOperator fun = SDEFunction(_f, _g; mass_matrix=mm, jac_prototype=MatrixOperator(A)) - prob = SDEProblem(fun, _g, u0, tspan) + prob = SDEProblem(fun, u0, tspan) integrator = init(prob, ImplicitEM(theta=1); adaptive=false, dt=dt) W = integrator.cache.nlsolver.cache.W calc_W!(W, integrator, integrator.cache.nlsolver, integrator.cache, dtgamma, false) @@ -50,11 +50,11 @@ using StochasticDiffEq.SciMLOperators: MatrixOperator _f = (u,p,t) -> t*(A*u); _f_ip = (du,u,p,t) -> lmul!(t,mul!(du,A,u)) _g = (u,p,t) -> σ*u; _g_ip = (du,u,p,t) -> mul!(du,σ,u) - prob1 = SDEProblem(SDEFunction(_f, _g; mass_matrix=mm), _g, u0, tspan) - prob2 = SDEProblem(SDEFunction(_f, _g; mass_matrix=mm, jac=(u,p,t) -> t*A), _g, u0, tspan) - prob1_ip = SDEProblem(SDEFunction(_f_ip, _g_ip; mass_matrix=mm), _g_ip, u0, tspan) + prob1 = SDEProblem(SDEFunction(_f, _g; mass_matrix=mm), u0, tspan) + prob2 = SDEProblem(SDEFunction(_f, _g; mass_matrix=mm, jac=(u,p,t) -> t*A), u0, tspan) + prob1_ip = SDEProblem(SDEFunction(_f_ip, _g_ip; mass_matrix=mm), u0, tspan) jac_prototype=MatrixOperator(similar(A); update_func! = (J,u,p,t) -> (J .= t .* A; J)) - prob2_ip = SDEProblem(SDEFunction(_f_ip, _g_ip; mass_matrix=mm, jac_prototype=jac_prototype), _g_ip, u0, tspan) + prob2_ip = SDEProblem(SDEFunction(_f_ip, _g_ip; mass_matrix=mm, jac_prototype=jac_prototype), u0, tspan) for Alg in [ImplicitEM, ISSEM] println(Alg) @@ -68,10 +68,10 @@ using StochasticDiffEq.SciMLOperators: MatrixOperator σ = 1.0 _g = (u,p,t) -> σ; _g_ip = (du,u,p,t) -> (du .= σ) - prob1 = SDEProblem(SDEFunction(_f, _g), _g, u0, tspan) - prob2 = SDEProblem(SDEFunction(_f, _g; jac=(u,p,t) -> t*A), _g, u0, tspan) - prob1_ip = SDEProblem(SDEFunction(_f_ip, _g_ip), _g_ip, u0, tspan) - prob2_ip = SDEProblem(SDEFunction(_f_ip, _g_ip; jac_prototype=jac_prototype), _g_ip, u0, tspan) + prob1 = SDEProblem(SDEFunction(_f, _g), u0, tspan) + prob2 = SDEProblem(SDEFunction(_f, _g; jac=(u,p,t) -> t*A), u0, tspan) + prob1_ip = SDEProblem(SDEFunction(_f_ip, _g_ip), u0, tspan) + prob2_ip = SDEProblem(SDEFunction(_f_ip, _g_ip; jac_prototype=jac_prototype), u0, tspan) println(SKenCarp) Random.seed!(0); sol1 = solve(prob1, SKenCarp(); adaptive=false, dt=0.01) diff --git a/test/weak_convergence/iip_weak.jl b/test/weak_convergence/iip_weak.jl index 45fdd76ce..a4ae51c7f 100644 --- a/test/weak_convergence/iip_weak.jl +++ b/test/weak_convergence/iip_weak.jl @@ -7,7 +7,7 @@ f_linear_iip(du,u,p,t) = @.(du = 1.01*u) linear_analytic(u0,p,t,W) = @.(u0*exp(0.63155t+0.87W)) prob_sde_linear_iip = SDEProblem(SDEFunction(f_linear_iip,σ_linear_iip, - analytic=linear_analytic),σ_linear_iip,[1/2],(0.0,1.0)) + analytic=linear_analytic),[1/2],(0.0,1.0)) Random.seed!(100) dts = 1 .//2 .^(7:-1:3) #14->7 good plot diff --git a/test/weak_convergence/weak_srockc2.jl b/test/weak_convergence/weak_srockc2.jl index 691dbcb93..fba480814 100644 --- a/test/weak_convergence/weak_srockc2.jl +++ b/test/weak_convergence/weak_srockc2.jl @@ -8,7 +8,7 @@ f_linear_iip(du,u,p,t) = @.(du = 1.01*u) linear_analytic(u0,p,t,W) = @.(u0*exp(0.63155t+0.87W)) prob_sde_linear_iip = SDEProblem(SDEFunction(f_linear_iip,σ_linear_iip, - analytic=linear_analytic),σ_linear_iip,[1/2],(0.0,1.0)) + analytic=linear_analytic),[1/2],(0.0,1.0)) Random.seed!(100) dts = 1 .//2 .^(7:-1:3) #14->7 good plot From cf11f60dc5183507f27c41285a5cf6a8fb1210d7 Mon Sep 17 00:00:00 2001 From: ErikQQY <2283984853@qq.com> Date: Fri, 22 Sep 2023 22:26:39 +0800 Subject: [PATCH 02/14] Update SciMLBase Signed-off-by: ErikQQY <2283984853@qq.com> --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 58426b184..fff79d6cd 100644 --- a/Project.toml +++ b/Project.toml @@ -49,7 +49,7 @@ OrdinaryDiffEq = "6.52" RandomNumbers = "1.5.3" RecursiveArrayTools = "2" Reexport = "0.2, 1.0" -SciMLBase = "1.96.3" +SciMLBase = "2.0.1" SciMLOperators = "0.2.9, 0.3" SparseDiffTools = "2" StaticArrays = "0.11, 0.12, 1.0" From eaa0ca4a92bccfe0e749f6e738abaec6a72260a6 Mon Sep 17 00:00:00 2001 From: ErikQQY <2283984853@qq.com> Date: Sat, 23 Sep 2023 11:54:33 +0800 Subject: [PATCH 03/14] Fix more tests Signed-off-by: ErikQQY <2283984853@qq.com> --- test/outofplace_arrays.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/outofplace_arrays.jl b/test/outofplace_arrays.jl index a6ee6c339..ac66e4a06 100644 --- a/test/outofplace_arrays.jl +++ b/test/outofplace_arrays.jl @@ -5,7 +5,7 @@ A = [-1.0 0.0; 0.0 -0.5] u0 = [1.0, 1.0]; tspan = (0.0,1.0) _f = (u,p,t) -> t*(A*u) _g = (u,p,t) -> 1.0 -prob = SDEProblem(SDEFunction(_f, _g), _g, u0, tspan) +prob = SDEProblem(SDEFunction(_f, _g), u0, tspan) integrator = init(prob, SKenCarp(); adaptive=false, dt=0.01) step!(integrator) @test_broken solve(prob, SOSRI(); adaptive=false, dt=0.01) isa RODESolution @@ -18,7 +18,7 @@ solve(prob, SOSRA2(); adaptive=false, dt=0.01) println("Vector g") _g = (u,p,t) -> [1.0, 1.0] -prob = SDEProblem(SDEFunction(_f, _g), _g, u0, tspan) +prob = SDEProblem(SDEFunction(_f, _g), u0, tspan) println("Implicit EM") integrator = init(prob, ImplicitEM(); adaptive=false, dt=0.01) step!(integrator) From c76efd77d912b00e14c03e9e02130db302ea581e Mon Sep 17 00:00:00 2001 From: ErikQQY <2283984853@qq.com> Date: Sat, 23 Sep 2023 15:36:17 +0800 Subject: [PATCH 04/14] Bump DiffEqBase Signed-off-by: ErikQQY <2283984853@qq.com> --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index fff79d6cd..a78bea74b 100644 --- a/Project.toml +++ b/Project.toml @@ -35,7 +35,7 @@ UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" Adapt = "3" ArrayInterface = "6, 7" DataStructures = "0.18" -DiffEqBase = "6.122" +DiffEqBase = "6.130.1" DiffEqNoiseProcess = "5.13" DocStringExtensions = "0.8, 0.9" FillArrays = "0.6, 0.7, 0.8, 0.9, 0.10, 0.11, 0.12, 0.13, 1" From f79799893ab726f0263455a1fa0a37920789f123 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Mon, 25 Sep 2023 13:33:03 -0400 Subject: [PATCH 05/14] up --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 5e1583672..cdf581b39 100644 --- a/Project.toml +++ b/Project.toml @@ -49,7 +49,7 @@ OrdinaryDiffEq = "6.52" RandomNumbers = "1.5.3" RecursiveArrayTools = "2" Reexport = "0.2, 1.0" -SciMLBase = "1.70" +SciMLBase = "1.70, 2" SciMLOperators = "0.2.9, 0.3" SparseDiffTools = "2" StaticArrays = "0.11, 0.12, 1.0" From 0e396bfa4d1a2a9bf4a2a2be9ea79842f8c4a5a3 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Mon, 25 Sep 2023 13:36:03 -0400 Subject: [PATCH 06/14] Revert "up" This reverts commit f79799893ab726f0263455a1fa0a37920789f123. --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index cdf581b39..5e1583672 100644 --- a/Project.toml +++ b/Project.toml @@ -49,7 +49,7 @@ OrdinaryDiffEq = "6.52" RandomNumbers = "1.5.3" RecursiveArrayTools = "2" Reexport = "0.2, 1.0" -SciMLBase = "1.70, 2" +SciMLBase = "1.70" SciMLOperators = "0.2.9, 0.3" SparseDiffTools = "2" StaticArrays = "0.11, 0.12, 1.0" From 81e489c7f923edbae3e1d13e9730d9bc9e7d8fff Mon Sep 17 00:00:00 2001 From: Qingyu Qu <52615090+ErikQQY@users.noreply.github.com> Date: Wed, 27 Sep 2023 00:08:12 +0800 Subject: [PATCH 07/14] Update Project.toml --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index a78bea74b..86b2a1589 100644 --- a/Project.toml +++ b/Project.toml @@ -49,7 +49,7 @@ OrdinaryDiffEq = "6.52" RandomNumbers = "1.5.3" RecursiveArrayTools = "2" Reexport = "0.2, 1.0" -SciMLBase = "2.0.1" +SciMLBase = "2.0.2" SciMLOperators = "0.2.9, 0.3" SparseDiffTools = "2" StaticArrays = "0.11, 0.12, 1.0" From f2cd6f47d54fdcaa865eaf2e56b3c1448b6d2089 Mon Sep 17 00:00:00 2001 From: Qingyu Qu <52615090+ErikQQY@users.noreply.github.com> Date: Wed, 27 Sep 2023 18:25:54 +0800 Subject: [PATCH 08/14] Update Project.toml --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 86b2a1589..1530a47db 100644 --- a/Project.toml +++ b/Project.toml @@ -49,7 +49,7 @@ OrdinaryDiffEq = "6.52" RandomNumbers = "1.5.3" RecursiveArrayTools = "2" Reexport = "0.2, 1.0" -SciMLBase = "2.0.2" +SciMLBase = "2.0.3" SciMLOperators = "0.2.9, 0.3" SparseDiffTools = "2" StaticArrays = "0.11, 0.12, 1.0" From 76493513be1d4e9f419d0c8b7e65cfdb92a6d4fd Mon Sep 17 00:00:00 2001 From: Qingyu Qu <52615090+ErikQQY@users.noreply.github.com> Date: Thu, 28 Sep 2023 17:34:34 +0800 Subject: [PATCH 09/14] Update Project.toml --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 1530a47db..4933cea3d 100644 --- a/Project.toml +++ b/Project.toml @@ -49,7 +49,7 @@ OrdinaryDiffEq = "6.52" RandomNumbers = "1.5.3" RecursiveArrayTools = "2" Reexport = "0.2, 1.0" -SciMLBase = "2.0.3" +SciMLBase = "2.0.4" SciMLOperators = "0.2.9, 0.3" SparseDiffTools = "2" StaticArrays = "0.11, 0.12, 1.0" From 0f273c4bb6ff73d45e4d7954ed0f451ec2e7ea5c Mon Sep 17 00:00:00 2001 From: ErikQQY <2283984853@qq.com> Date: Thu, 28 Sep 2023 18:44:53 +0800 Subject: [PATCH 10/14] Fix constructor in linear adaptive tests Signed-off-by: ErikQQY <2283984853@qq.com> --- test/adaptive/sde_linearadaptive_tests.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/adaptive/sde_linearadaptive_tests.jl b/test/adaptive/sde_linearadaptive_tests.jl index cc1901654..0101e3f37 100644 --- a/test/adaptive/sde_linearadaptive_tests.jl +++ b/test/adaptive/sde_linearadaptive_tests.jl @@ -11,8 +11,8 @@ add_probs[2] = prob_sde_additivesystem for i in 1:2 global sol,sol2,err1 - bigprob = SDEProblem(probs[i].f,probs[i].g,big.(probs[i].u0),(big.(probs[i].tspan[1]),big.(probs[i].tspan[2])),noise=probs[i].noise) - add_bigprob = SDEProblem(add_probs[i].f,add_probs[i].g,big.(add_probs[i].u0),(big.(add_probs[i].tspan[1]),big.(add_probs[i].tspan[2])),noise=add_probs[i].noise) + bigprob = SDEProblem(probs[i].f,big.(probs[i].u0),(big.(probs[i].tspan[1]),big.(probs[i].tspan[2])),noise=probs[i].noise) + add_bigprob = SDEProblem(add_probs[i].f,big.(add_probs[i].u0),(big.(add_probs[i].tspan[1]),big.(add_probs[i].tspan[2])),noise=add_probs[i].noise) ## SRIW1 Random.seed!(100) From 3a62496ece2761126505465e18dcb7dd4c8e39ca Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Fri, 29 Sep 2023 04:13:14 -0400 Subject: [PATCH 11/14] Update Project.toml --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 4933cea3d..813418809 100644 --- a/Project.toml +++ b/Project.toml @@ -49,7 +49,7 @@ OrdinaryDiffEq = "6.52" RandomNumbers = "1.5.3" RecursiveArrayTools = "2" Reexport = "0.2, 1.0" -SciMLBase = "2.0.4" +SciMLBase = "2.0.5" SciMLOperators = "0.2.9, 0.3" SparseDiffTools = "2" StaticArrays = "0.11, 0.12, 1.0" From 500a725732b74157dc837ae371f0661c6facb9e2 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Fri, 29 Sep 2023 06:08:39 -0400 Subject: [PATCH 12/14] Update Project.toml --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 813418809..226f7b12a 100644 --- a/Project.toml +++ b/Project.toml @@ -49,7 +49,7 @@ OrdinaryDiffEq = "6.52" RandomNumbers = "1.5.3" RecursiveArrayTools = "2" Reexport = "0.2, 1.0" -SciMLBase = "2.0.5" +SciMLBase = "2.0.6" SciMLOperators = "0.2.9, 0.3" SparseDiffTools = "2" StaticArrays = "0.11, 0.12, 1.0" From 4f45192d3ab1f8961c6bf2b1a8c3afc6dee578da Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Fri, 29 Sep 2023 13:01:41 -0400 Subject: [PATCH 13/14] Update Project.toml --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 226f7b12a..15ae8d314 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "StochasticDiffEq" uuid = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0" authors = ["Chris Rackauckas "] -version = "6.62.0" +version = "6.63.0" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" From 90250e7a77a4a6b586d1b8d8ac4b9c58e789fd85 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Fri, 29 Sep 2023 13:07:28 -0400 Subject: [PATCH 14/14] Fix downstream DiffEqNoiseProcess test The bridge tests got a lot more intense and so they are in a separate group that requires the better machines. Just lop them off the downstream. --- .github/workflows/Downstream.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Downstream.yml b/.github/workflows/Downstream.yml index 2ca759e05..86d9c4013 100644 --- a/.github/workflows/Downstream.yml +++ b/.github/workflows/Downstream.yml @@ -18,7 +18,7 @@ jobs: os: [ubuntu-latest] package: - {user: SciML, repo: StochasticDelayDiffEq.jl, group: All} - - {user: SciML, repo: DiffEqNoiseProcess.jl, group: All} + - {user: SciML, repo: DiffEqNoiseProcess.jl, group: Core1} steps: - uses: actions/checkout@v4