diff --git a/Project.toml b/Project.toml index bd6935f76f..d4d3a68cc8 100644 --- a/Project.toml +++ b/Project.toml @@ -133,7 +133,7 @@ PrecompileTools = "1" Preferences = "1.3" RecursiveArrayTools = "2.36, 3" Reexport = "1.0" -SciMLBase = "2.53.2" +SciMLBase = "2.69" SciMLOperators = "0.3" SciMLStructures = "1" SimpleNonlinearSolve = "1, 2" diff --git a/lib/OrdinaryDiffEqCore/Project.toml b/lib/OrdinaryDiffEqCore/Project.toml index f5f381c9a0..2b5faad3ba 100644 --- a/lib/OrdinaryDiffEqCore/Project.toml +++ b/lib/OrdinaryDiffEqCore/Project.toml @@ -70,7 +70,7 @@ Random = "<0.0.1, 1" RecursiveArrayTools = "2.36, 3" Reexport = "1.0" SafeTestsets = "0.1.0" -SciMLBase = "2.62" +SciMLBase = "2.68" SciMLOperators = "0.3" SciMLStructures = "1" SimpleUnPack = "1" diff --git a/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl b/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl index fbfcd66dd3..008b1e3745 100644 --- a/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl +++ b/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl @@ -60,7 +60,7 @@ using DiffEqBase: check_error!, @def, _vec, _reshape using FastBroadcast: @.., True, False -using SciMLBase: NoInit, CheckInit, OverrideInit, AbstractDEProblem, _unwrap_val +using SciMLBase: NoInit, CheckInit, OverrideInit, AbstractDEProblem, _unwrap_val, ODEAliasSpecifier import SciMLBase: AbstractNonlinearProblem, alg_order diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index 42fd07a5bf..ffaa61ace0 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -69,8 +69,7 @@ function DiffEqBase.__init( userdata = nothing, allow_extrapolation = alg_extrapolates(alg), initialize_integrator = true, - alias_u0 = false, - alias_du0 = false, + alias = ODEAliasSpecifier(), initializealg = DefaultInit(), kwargs...) where {recompile_flag} if prob isa DiffEqBase.AbstractDAEProblem && alg isa OrdinaryDiffEqAlgorithm @@ -158,19 +157,62 @@ function DiffEqBase.__init( else _alg = alg end - f = prob.f - p = prob.p - # Get the control variables + use_old_kwargs = haskey(kwargs,:alias_u0) || haskey(kwargs,:alias_du0) - if alias_u0 + if use_old_kwargs + aliases = ODEAliasSpecifier() + if haskey(kwargs, :alias_u0) + message = "`alias_u0` keyword argument is deprecated, to set `alias_u0`, + please use an ODEAliasSpecifier, e.g. `solve(prob, alias = ODEAliasSpecifier(alias_u0 = true))" + Base.depwarn(message, :init) + Base.depwarn(message, :solve) + aliases = ODEAliasSpecifier(alias_u0 = values(kwargs).alias_u0) + else + aliases = ODEAliasSpecifier(alias_u0 = nothing) + end + + if haskey(kwargs, :alias_du0) + message = "`alias_du0` keyword argument is deprecated, to set `alias_du0`, + please use an ODEAliasSpecifier, e.g. `solve(prob, alias = ODEAliasSpecifier(alias_du0 = true))" + Base.depwarn(message, :init) + Base.depwarn(message, :solve) + aliases = ODEAliasSpecifier(alias_u0 = aliases.alias_u0, alias_du0 = values(kwargs).alias_du0) + else + aliases = ODEAliasSpecifier(alias_u0 = aliases.alias_u0, alias_du0 = nothing) + end + + aliases + + else + # If alias isa Bool, all fields of ODEAliases set to alias + if alias isa Bool + aliases = ODEAliasSpecifier(alias = alias) + elseif alias isa ODEAliasSpecifier + aliases = alias + end + end + + if isnothing(aliases.alias_f) || aliases.alias_f + f = prob.f + else + f = deepcopy(prob.f) + end + + if isnothing(aliases.alias_p) || aliases.alias_p + p = prob.p + else + p = recursivecopy(prob.p) + end + + if !isnothing(aliases.alias_u0) && aliases.alias_u0 u = prob.u0 else u = recursivecopy(prob.u0) end if _alg isa DAEAlgorithm - if alias_du0 + if !isnothing(aliases.alias_du0) && aliases.alias_du0 du = prob.du0 else du = recursivecopy(prob.du0) @@ -242,6 +284,12 @@ function DiffEqBase.__init( resType = typeof(res_prototype) end + if isnothing(aliases.alias_tstops) || aliases.alias_tstops + tstops = tstops + else + tstops = recursivecopy(tstops) + end + if tstops isa AbstractArray || tstops isa Tuple || tstops isa Number _tstops = nothing else diff --git a/lib/OrdinaryDiffEqLowStorageRK/test/ode_low_storage_rk_tests.jl b/lib/OrdinaryDiffEqLowStorageRK/test/ode_low_storage_rk_tests.jl index e4c5eece35..5bdc9109b1 100644 --- a/lib/OrdinaryDiffEqLowStorageRK/test/ode_low_storage_rk_tests.jl +++ b/lib/OrdinaryDiffEqLowStorageRK/test/ode_low_storage_rk_tests.jl @@ -101,13 +101,13 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 2 integ = init(prob_ode_large, alg2, dt = 1.e-2, save_start = false, save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 integ = init(prob_ode_large, alg2, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -116,7 +116,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -146,13 +146,13 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 2 integ = init(prob_ode_large, alg2, dt = 1.e-2, save_start = false, save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 integ = init(prob_ode_large, alg2, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -161,7 +161,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -191,13 +191,13 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 2 integ = init(prob_ode_large, alg2, dt = 1.e-2, save_start = false, save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 integ = init(prob_ode_large, alg2, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -206,7 +206,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -236,13 +236,13 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 2 integ = init(prob_ode_large, alg2, dt = 1.e-2, save_start = false, save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 integ = init(prob_ode_large, alg2, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -251,7 +251,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -281,13 +281,13 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 2 integ = init(prob_ode_large, alg2, dt = 1.e-2, save_start = false, save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 integ = init(prob_ode_large, alg2, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -296,7 +296,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -326,13 +326,13 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 2 integ = init(prob_ode_large, alg2, dt = 1.e-2, save_start = false, save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 integ = init(prob_ode_large, alg2, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -341,7 +341,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -371,13 +371,13 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 2 integ = init(prob_ode_large, alg2, dt = 1.e-2, save_start = false, save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 integ = init(prob_ode_large, alg2, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -386,7 +386,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -416,13 +416,13 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 2 integ = init(prob_ode_large, alg2, dt = 1.e-2, save_start = false, save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 integ = init(prob_ode_large, alg2, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -431,7 +431,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -461,13 +461,13 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 2 integ = init(prob_ode_large, alg2, dt = 1.e-2, save_start = false, save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 integ = init(prob_ode_large, alg2, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -476,7 +476,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -499,7 +499,7 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -508,7 +508,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -531,7 +531,7 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -540,7 +540,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -593,7 +593,7 @@ test_problems_nonlinear_BigFloat = [prob_nonlinear_A, prob_nonlinear_B] save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 7 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 6 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -602,7 +602,7 @@ test_problems_nonlinear_BigFloat = [prob_nonlinear_A, prob_nonlinear_B] save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -628,7 +628,7 @@ end save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 7 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 6 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -637,7 +637,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -663,7 +663,7 @@ end save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 7 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 6 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -672,7 +672,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -698,7 +698,7 @@ end save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 7 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 6 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -707,7 +707,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -733,7 +733,7 @@ end save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 7 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 6 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -742,7 +742,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -768,7 +768,7 @@ end save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 10 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 9 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -777,7 +777,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -803,7 +803,7 @@ end save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 10 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 9 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -812,7 +812,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -838,7 +838,7 @@ end save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 10 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 9 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -847,7 +847,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -873,7 +873,7 @@ end save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 10 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 9 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -882,7 +882,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -908,7 +908,7 @@ end save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 10 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 9 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -917,7 +917,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -943,7 +943,7 @@ end save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 10 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 9 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -952,7 +952,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -978,7 +978,7 @@ end save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 12 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 11 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -987,7 +987,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -1013,7 +1013,7 @@ end save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 12 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 11 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -1022,7 +1022,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -1048,7 +1048,7 @@ end save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 12 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 11 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -1057,7 +1057,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -1083,7 +1083,7 @@ end save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 12 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 11 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -1092,7 +1092,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -1118,7 +1118,7 @@ end save_end = false, save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 14 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 13 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -1127,7 +1127,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -1153,7 +1153,7 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 5 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -1162,7 +1162,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -1186,7 +1186,7 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 5 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -1195,7 +1195,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -1219,7 +1219,7 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 5 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -1228,7 +1228,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -1254,7 +1254,7 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 5 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -1263,7 +1263,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -1286,7 +1286,7 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 5 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -1295,7 +1295,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -1319,7 +1319,7 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 5 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -1328,7 +1328,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -1353,7 +1353,7 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 5 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -1362,7 +1362,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -1387,7 +1387,7 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 5 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -1396,7 +1396,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -1422,7 +1422,7 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 6 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 5 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -1431,7 +1431,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -1456,7 +1456,7 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 6 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 5 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -1465,7 +1465,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -1488,7 +1488,7 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 6 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 5 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -1497,7 +1497,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -1521,7 +1521,7 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 6 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 5 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -1530,7 +1530,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -1555,7 +1555,7 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 6 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 5 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -1564,7 +1564,7 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end @@ -1587,7 +1587,7 @@ end save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 6 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 5 # test whether aliasing u0 is bad new_prob_ode_nonlinear_inplace = ODEProblem(prob_ode_nonlinear_inplace.f, [1.0], @@ -1596,6 +1596,6 @@ end save_start = false) sol_new = solve( new_prob_ode_nonlinear_inplace, alg, dt = 1.e-4, save_everystep = false, - save_start = false, alias_u0 = true) + save_start = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test sol_old[end] ≈ sol_new[end] end diff --git a/lib/OrdinaryDiffEqSSPRK/test/ode_ssprk_tests.jl b/lib/OrdinaryDiffEqSSPRK/test/ode_ssprk_tests.jl index ec0c73f11b..444ec1b7d5 100644 --- a/lib/OrdinaryDiffEqSSPRK/test/ode_ssprk_tests.jl +++ b/lib/OrdinaryDiffEqSSPRK/test/ode_ssprk_tests.jl @@ -80,7 +80,7 @@ integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = fal save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 println("KYKSSPRK42") @@ -134,7 +134,7 @@ integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = fal save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 println("SSPRK53") @@ -160,7 +160,7 @@ integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = fal save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 5 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 println("SSPRK53_2N1") @@ -186,7 +186,7 @@ integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = fal save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 # for SSPRK53_2N2 to be in asymptotic range @@ -214,7 +214,7 @@ integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = fal save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 3 dts = 1 .// 2 .^ (9:-1:5) @@ -241,7 +241,7 @@ integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = fal save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 5 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 4 #reverting back to original dts @@ -334,7 +334,7 @@ integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = fal save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 6 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 5 println("SSPRK432") @@ -368,7 +368,7 @@ integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = fal save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 6 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 5 alg = SSPRKMSVS32() @@ -423,7 +423,7 @@ integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = fal save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 6 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 5 println("SSPRK54") @@ -470,7 +470,7 @@ integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = fal save_everystep = false) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 6 integ = init(prob_ode_large, alg, dt = 1.e-2, save_start = false, save_end = false, - save_everystep = false, alias_u0 = true) + save_everystep = false, alias = ODEAliasSpecifier(alias_u0 = true)) @test Base.summarysize(integ) ÷ Base.summarysize(u0_large) <= 5 println("KYK2014DGSSPRK_3S2") diff --git a/test/interface/aliasing_tests.jl b/test/interface/aliasing_tests.jl new file mode 100644 index 0000000000..4e2bfe0bc7 --- /dev/null +++ b/test/interface/aliasing_tests.jl @@ -0,0 +1,10 @@ +using OrdinaryDiffEq, Test + +import ODEProblemLibrary: prob_ode_linear + +# Test that the old keyword works, and that the new AliasSpecier works. +u0_old_alias_kwarg_sol = solve(prob_ode_linear, Tsit5(), alias_u0 = true) +u0_new_alias_kwarg_sol = solve(prob_ode_linear, Tsit5(), alias = ODEAliasSpecifier(alias_u0 = true)) + +@test u0_old_alias_kwarg_sol == u0_new_alias_kwarg_sol + diff --git a/test/runtests.jl b/test/runtests.jl index 55b58486ab..28b3d74199 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -56,6 +56,7 @@ end @time @safetestset "Inplace Interpolation Tests" include("interface/inplace_interpolation.jl") @time @safetestset "Algebraic Interpolation Tests" include("interface/algebraic_interpolation.jl") @time @safetestset "Interpolation and Cache Stripping Tests" include("interface/ode_strip_test.jl") + @time @safetestset "Aliasing Tests" include("interface/aliasing_tests.jl") end if !is_APPVEYOR && (GROUP == "All" || GROUP == "InterfaceII" || GROUP == "Interface")