From fd0646dc32e955d9ce1e52a33c301831e9da9002 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Fri, 25 Oct 2024 11:31:28 -0400 Subject: [PATCH 01/24] alias_u0 implementation --- lib/OrdinaryDiffEqCore/src/solve.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index 42fd07a5bf..94f539794d 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -71,6 +71,7 @@ function DiffEqBase.__init( initialize_integrator = true, alias_u0 = false, alias_du0 = false, + alias = ODEAliases(), initializealg = DefaultInit(), kwargs...) where {recompile_flag} if prob isa DiffEqBase.AbstractDAEProblem && alg isa OrdinaryDiffEqAlgorithm @@ -162,8 +163,11 @@ function DiffEqBase.__init( p = prob.p # Get the control variables + if isnothing(alias.alias_u0) + alias = ODEAliases(alias_u0) + end - if alias_u0 + if alias.alias_u0 u = prob.u0 else u = recursivecopy(prob.u0) From 5cf41b06a5a400e6a8155acb57d8735df7ed9aff Mon Sep 17 00:00:00 2001 From: jClugstor Date: Fri, 25 Oct 2024 11:34:00 -0400 Subject: [PATCH 02/24] add comment --- lib/OrdinaryDiffEqCore/src/solve.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index 94f539794d..6bd4595eba 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -163,6 +163,8 @@ function DiffEqBase.__init( p = prob.p # Get the control variables + # If alias kwarg is just default, use alias_u0, which is false by default, or is set by a kwarg to solve + # If alias_u0 is not nothing, use the alias_u0 provided by the user if isnothing(alias.alias_u0) alias = ODEAliases(alias_u0) end From 09515402b14074743a56d40af3868afb09bfd7a5 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Fri, 25 Oct 2024 12:51:47 -0400 Subject: [PATCH 03/24] add error for non ODEAliases alias --- lib/OrdinaryDiffEqCore/src/solve.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index 6bd4595eba..63d743a8c9 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -120,6 +120,10 @@ function DiffEqBase.__init( @warn("Dense output is incompatible with saveat. Please use the SavingCallback from the Callback Library to mix the two behaviors.") end + if !(alias isa ODEAliases) + error("Keyword argument `alias` must be a `ODEAliases`. ") + end + progress && @logmsg(LogLevel(-1), progress_name, _id=progress_id, progress=0) tType = eltype(prob.tspan) From 9666052ea955df722dae69f2aa8ac48a8d8f5f6f Mon Sep 17 00:00:00 2001 From: jClugstor Date: Fri, 25 Oct 2024 12:55:01 -0400 Subject: [PATCH 04/24] no space --- lib/OrdinaryDiffEqCore/src/solve.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index 63d743a8c9..12f8e51dd6 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -121,7 +121,7 @@ function DiffEqBase.__init( end if !(alias isa ODEAliases) - error("Keyword argument `alias` must be a `ODEAliases`. ") + error("Keyword argument `alias` must be a `ODEAliases`.") end progress && @logmsg(LogLevel(-1), progress_name, _id=progress_id, progress=0) From c5b2b9e56c46c3bf0466d2a30612e9a0dd1350cc Mon Sep 17 00:00:00 2001 From: jClugstor Date: Mon, 28 Oct 2024 15:59:07 -0400 Subject: [PATCH 05/24] use ODEAliasSpecifier --- lib/OrdinaryDiffEqCore/src/solve.jl | 48 ++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index 12f8e51dd6..43adda1568 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -69,9 +69,7 @@ function DiffEqBase.__init( userdata = nothing, allow_extrapolation = alg_extrapolates(alg), initialize_integrator = true, - alias_u0 = false, - alias_du0 = false, - alias = ODEAliases(), + alias = ODEAliasSpecifier(), initializealg = DefaultInit(), kwargs...) where {recompile_flag} if prob isa DiffEqBase.AbstractDAEProblem && alg isa OrdinaryDiffEqAlgorithm @@ -120,10 +118,6 @@ function DiffEqBase.__init( @warn("Dense output is incompatible with saveat. Please use the SavingCallback from the Callback Library to mix the two behaviors.") end - if !(alias isa ODEAliases) - error("Keyword argument `alias` must be a `ODEAliases`.") - end - progress && @logmsg(LogLevel(-1), progress_name, _id=progress_id, progress=0) tType = eltype(prob.tspan) @@ -166,21 +160,47 @@ function DiffEqBase.__init( f = prob.f p = prob.p - # Get the control variables - # If alias kwarg is just default, use alias_u0, which is false by default, or is set by a kwarg to solve - # If alias_u0 is not nothing, use the alias_u0 provided by the user - if isnothing(alias.alias_u0) - alias = ODEAliases(alias_u0) + use_old_kwargs = haskey(kwargs,:alias_u0) || haskey(kwargs,:alias_du0) + + if use_old_kwargs + if haskey(kwargs, :alias_u0) + Base.depwarn("alias_u0 keyword argument is deprecated, to set `alias_u0`, + please use an ODEAliasSpecifier, e.g. `solve(prob, alias = ODEAliasSpecifier(alias_u0 = true))", :alias_u0) + old_alias_u0 = values(kwargs).alias_u0 + else + old_alias_u0 = false + + end + + if haskey(kwargs, :alias_du0) + Base.depwarn("alias_du0 keyword argument is deprecated, to set `alias_du0`, + please use an ODEAliasSpecifier, e.g. `solve(prob, alias = ODEAliasSpecifier(alias_du0 = true))", :alias_du0) + old_alias_du0 = values(kwargs).alias_du0 + else + old_alias_du0 = false + end + + aliases = ODEAliasSpecifier(alias_u0 = old_alias_u0, alias_du0 = old_alias_du0) + + 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 + else + error("Keyword argument `alias` must be a `Bool` or `ODEAliasSpecifier`.") + end end - if alias.alias_u0 + if aliases.alias_u0 u = prob.u0 else u = recursivecopy(prob.u0) end if _alg isa DAEAlgorithm - if alias_du0 + if aliases.alias_du0 du = prob.du0 else du = recursivecopy(prob.du0) From bb9b54dfeee2fa37ebb97237a3f98a523cbe0e3e Mon Sep 17 00:00:00 2001 From: jClugstor Date: Tue, 29 Oct 2024 14:57:33 -0400 Subject: [PATCH 06/24] fix aliasing --- lib/OrdinaryDiffEqCore/src/solve.jl | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index 43adda1568..79a26ce79f 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -163,33 +163,32 @@ function DiffEqBase.__init( use_old_kwargs = haskey(kwargs,:alias_u0) || haskey(kwargs,:alias_du0) if use_old_kwargs + aliases = ODEAliasSpecifier() if haskey(kwargs, :alias_u0) Base.depwarn("alias_u0 keyword argument is deprecated, to set `alias_u0`, please use an ODEAliasSpecifier, e.g. `solve(prob, alias = ODEAliasSpecifier(alias_u0 = true))", :alias_u0) - old_alias_u0 = values(kwargs).alias_u0 + @reset aliases.alias_u0 = values(kwargs).alias_u0 else - old_alias_u0 = false + @reset aliases.alias_u0 = false end if haskey(kwargs, :alias_du0) Base.depwarn("alias_du0 keyword argument is deprecated, to set `alias_du0`, please use an ODEAliasSpecifier, e.g. `solve(prob, alias = ODEAliasSpecifier(alias_du0 = true))", :alias_du0) - old_alias_du0 = values(kwargs).alias_du0 + @reset aliases.alias_du0 = values(kwargs).alias_du0 else - old_alias_du0 = false + @reset aliases.alias_du0 = false end - aliases = ODEAliasSpecifier(alias_u0 = old_alias_u0, alias_du0 = old_alias_du0) + 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 + elseif alias isa ODEAliasSpecifier || isnothing(alias) aliases = alias - else - error("Keyword argument `alias` must be a `Bool` or `ODEAliasSpecifier`.") end end From 75449c2c36a496457ceeea40ef363e95c1c9df4e Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 30 Oct 2024 11:13:27 -0400 Subject: [PATCH 07/24] change default for ODEAliasSpecifier in init --- lib/OrdinaryDiffEqCore/src/solve.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index 79a26ce79f..333115f919 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -69,7 +69,7 @@ function DiffEqBase.__init( userdata = nothing, allow_extrapolation = alg_extrapolates(alg), initialize_integrator = true, - alias = ODEAliasSpecifier(), + alias = ODEAliasSpecifier(alias_u0 = false, alias_du0 = false), initializealg = DefaultInit(), kwargs...) where {recompile_flag} if prob isa DiffEqBase.AbstractDAEProblem && alg isa OrdinaryDiffEqAlgorithm From 0454f1c65aaa7127a417240cdca31543d2fa04a0 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Tue, 12 Nov 2024 10:49:36 -0500 Subject: [PATCH 08/24] add use of alias_f, alias_p kwargs for ODiffEq --- lib/OrdinaryDiffEqCore/src/solve.jl | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index 333115f919..80c2d4f2f3 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -157,8 +157,18 @@ function DiffEqBase.__init( else _alg = alg end - f = prob.f - p = prob.p + + if aliases.alias_f + f = prob.f + else + f = deepcopy(prob.f) + end + + if aliases.alias_p + p = prob.p + else + p = recursivecopy(prob.p) + end use_old_kwargs = haskey(kwargs,:alias_u0) || haskey(kwargs,:alias_du0) From bdaa14143d449d52b0375867dd68aeb998cec001 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Tue, 12 Nov 2024 11:00:23 -0500 Subject: [PATCH 09/24] fix defaults --- lib/OrdinaryDiffEqCore/src/solve.jl | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index 80c2d4f2f3..c89893c38b 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -69,7 +69,7 @@ function DiffEqBase.__init( userdata = nothing, allow_extrapolation = alg_extrapolates(alg), initialize_integrator = true, - alias = ODEAliasSpecifier(alias_u0 = false, alias_du0 = false), + alias = ODEAliasSpecifier(alias_u0 = false, alias_du0 = false, alias_p = true, alias_f = true), initializealg = DefaultInit(), kwargs...) where {recompile_flag} if prob isa DiffEqBase.AbstractDAEProblem && alg isa OrdinaryDiffEqAlgorithm @@ -158,18 +158,6 @@ function DiffEqBase.__init( _alg = alg end - if aliases.alias_f - f = prob.f - else - f = deepcopy(prob.f) - end - - if aliases.alias_p - p = prob.p - else - p = recursivecopy(prob.p) - end - use_old_kwargs = haskey(kwargs,:alias_u0) || haskey(kwargs,:alias_du0) if use_old_kwargs @@ -202,6 +190,18 @@ function DiffEqBase.__init( end end + if aliases.alias_f || isnothing(aliases.alias_f) + f = prob.f + else + f = deepcopy(prob.f) + end + + if aliases.alias_p || isnothing(aliases.alias_f) + p = prob.p + else + p = recursivecopy(prob.p) + end + if aliases.alias_u0 u = prob.u0 else From 4780e72933baadd43df9bc68470ded083a234f74 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 11 Dec 2024 14:42:02 -0500 Subject: [PATCH 10/24] import ODEAliasSpecifier from SciMLBase --- lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 4d8ae15dad0d61da85736f4198fea72033eb5ee8 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Thu, 12 Dec 2024 13:15:47 -0500 Subject: [PATCH 11/24] fix f vs p --- lib/OrdinaryDiffEqCore/src/solve.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index c89893c38b..52d52d5f9a 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -196,7 +196,7 @@ function DiffEqBase.__init( f = deepcopy(prob.f) end - if aliases.alias_p || isnothing(aliases.alias_f) + if aliases.alias_p || isnothing(aliases.alias_p) p = prob.p else p = recursivecopy(prob.p) From cef2d2957b711afae752ff3f445cbfdaf8752187 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Thu, 12 Dec 2024 13:15:56 -0500 Subject: [PATCH 12/24] account for defaults --- lib/OrdinaryDiffEqCore/src/solve.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index 52d52d5f9a..d6810cad97 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -185,24 +185,24 @@ function DiffEqBase.__init( # If alias isa Bool, all fields of ODEAliases set to alias if alias isa Bool aliases = ODEAliasSpecifier(alias = alias) - elseif alias isa ODEAliasSpecifier || isnothing(alias) + elseif isnothing(alias) || alias isa ODEAliasSpecifier aliases = alias end end - if aliases.alias_f || isnothing(aliases.alias_f) + if isnothing(aliases.alias_f) || aliases.alias_f f = prob.f else f = deepcopy(prob.f) end - if aliases.alias_p || isnothing(aliases.alias_p) + if isnothing(aliases.alias_p) || aliases.alias_p p = prob.p else p = recursivecopy(prob.p) end - if aliases.alias_u0 + if !isnothing(aliases.alias_u0) && aliases.alias_u0 u = prob.u0 else u = recursivecopy(prob.u0) From d2d5f61a9b9162acbb886a57b5038d0cff8ee4c9 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Thu, 12 Dec 2024 14:05:05 -0500 Subject: [PATCH 13/24] tstop aliasing --- lib/OrdinaryDiffEqCore/src/solve.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index d6810cad97..a6ad0933a2 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -281,6 +281,12 @@ function DiffEqBase.__init( resType = typeof(res_prototype) end + if isnothing(aliases.alias_tstops) || aliases.alias_tstops + tstops = tstops + else + tstops = deepcopy(tstops) + end + if tstops isa AbstractArray || tstops isa Tuple || tstops isa Number _tstops = nothing else From c23e54ead503465636d6142e142e476cf704dbb7 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Fri, 13 Dec 2024 11:40:53 -0500 Subject: [PATCH 14/24] use recursivecopy, fix the default AliasSpecifier --- lib/OrdinaryDiffEqCore/src/solve.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index a6ad0933a2..bde6ddea77 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -69,7 +69,7 @@ function DiffEqBase.__init( userdata = nothing, allow_extrapolation = alg_extrapolates(alg), initialize_integrator = true, - alias = ODEAliasSpecifier(alias_u0 = false, alias_du0 = false, alias_p = true, alias_f = true), + alias = ODEAliasSpecifier(), initializealg = DefaultInit(), kwargs...) where {recompile_flag} if prob isa DiffEqBase.AbstractDAEProblem && alg isa OrdinaryDiffEqAlgorithm @@ -284,9 +284,9 @@ function DiffEqBase.__init( if isnothing(aliases.alias_tstops) || aliases.alias_tstops tstops = tstops else - tstops = deepcopy(tstops) + tstops = recursivecopy(tstops) end - + if tstops isa AbstractArray || tstops isa Tuple || tstops isa Number _tstops = nothing else From 78b1a9774df765e3aabda83c7e5d47d23a976618 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Fri, 13 Dec 2024 11:58:41 -0500 Subject: [PATCH 15/24] fix depwarns --- lib/OrdinaryDiffEqCore/src/solve.jl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index bde6ddea77..c816f07ed9 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -163,8 +163,10 @@ function DiffEqBase.__init( if use_old_kwargs aliases = ODEAliasSpecifier() if haskey(kwargs, :alias_u0) - Base.depwarn("alias_u0 keyword argument is deprecated, to set `alias_u0`, - please use an ODEAliasSpecifier, e.g. `solve(prob, alias = ODEAliasSpecifier(alias_u0 = true))", :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) @reset aliases.alias_u0 = values(kwargs).alias_u0 else @reset aliases.alias_u0 = false @@ -172,8 +174,10 @@ function DiffEqBase.__init( end if haskey(kwargs, :alias_du0) - Base.depwarn("alias_du0 keyword argument is deprecated, to set `alias_du0`, - please use an ODEAliasSpecifier, e.g. `solve(prob, alias = ODEAliasSpecifier(alias_du0 = true))", :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) @reset aliases.alias_du0 = values(kwargs).alias_du0 else @reset aliases.alias_du0 = false From b5657e902873c7150cbfab8d2dc2112636b67d52 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Fri, 13 Dec 2024 12:21:09 -0500 Subject: [PATCH 16/24] make tests use aliasing API --- .../test/ode_low_storage_rk_tests.jl | 182 +++++++++--------- .../test/ode_ssprk_tests.jl | 20 +- 2 files changed, 101 insertions(+), 101 deletions(-) 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") From ec1e99fe85e99bfaa91a45909f46a284dda3811c Mon Sep 17 00:00:00 2001 From: jClugstor Date: Fri, 13 Dec 2024 14:00:24 -0500 Subject: [PATCH 17/24] add test --- test/interface/aliasing_tests.jl | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/interface/aliasing_tests.jl diff --git a/test/interface/aliasing_tests.jl b/test/interface/aliasing_tests.jl new file mode 100644 index 0000000000..65f2e55950 --- /dev/null +++ b/test/interface/aliasing_tests.jl @@ -0,0 +1,11 @@ +using OrdinaryDiffEq, Test + +import ODEProblemLibrary: prob_ode_2Dlinear +import DAEProblemLibrary: prob_dae_transamp + +# 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 + From b3351f008f1497cc17e2944d85cba17fca13401e Mon Sep 17 00:00:00 2001 From: jClugstor Date: Fri, 13 Dec 2024 14:01:08 -0500 Subject: [PATCH 18/24] can't use Accessors because no default inner constructors anymore --- lib/OrdinaryDiffEqCore/src/solve.jl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index c816f07ed9..532826169c 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -167,10 +167,9 @@ function DiffEqBase.__init( please use an ODEAliasSpecifier, e.g. `solve(prob, alias = ODEAliasSpecifier(alias_u0 = true))" Base.depwarn(message, :init) Base.depwarn(message, :solve) - @reset aliases.alias_u0 = values(kwargs).alias_u0 + aliases = ODEAliasSpecifier(alias_u0 = values(kwargs).alias_u0) else - @reset aliases.alias_u0 = false - + aliases = ODEAliasSpecifier(alias_u0 = nothing) end if haskey(kwargs, :alias_du0) @@ -178,9 +177,9 @@ function DiffEqBase.__init( please use an ODEAliasSpecifier, e.g. `solve(prob, alias = ODEAliasSpecifier(alias_du0 = true))" Base.depwarn(message, :init) Base.depwarn(message, :solve) - @reset aliases.alias_du0 = values(kwargs).alias_du0 + aliases = ODEAliasSpecifier(alias_u0 = aliases.alias_u0, alias_du0 = values(kwargs).alias_du0) else - @reset aliases.alias_du0 = false + aliases = ODEAliasSpecifier(alias_u0 = aliases.alias_u0, alias_du0 = nothing) end aliases From 4feb5e3c7f625102428cf44ea1545a072b294f92 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Fri, 13 Dec 2024 14:02:03 -0500 Subject: [PATCH 19/24] add to run test --- test/runtests.jl | 1 + 1 file changed, 1 insertion(+) 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") From ba9abe9e40f9ed4f4d7bba7bdeeb50a6204ad500 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sat, 14 Dec 2024 02:47:01 -0100 Subject: [PATCH 20/24] Update Project.toml --- lib/OrdinaryDiffEqCore/Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" From 532c3ffb6189f4a3bb062f30daabb2596f9d2cc2 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Sat, 14 Dec 2024 10:19:19 -0500 Subject: [PATCH 21/24] fix bool problem for alias_du0 --- lib/OrdinaryDiffEqCore/src/solve.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index 532826169c..25c4c0dffc 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -212,7 +212,7 @@ function DiffEqBase.__init( end if _alg isa DAEAlgorithm - if aliases.alias_du0 + if !isnothing(aliases.alias_du0) && aliases.alias_du0 du = prob.du0 else du = recursivecopy(prob.du0) From a2a2954f5f90f646497d3b7d982315b19e6a86b8 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Sat, 14 Dec 2024 10:59:10 -0500 Subject: [PATCH 22/24] get rid of DAE problem, unused --- test/interface/aliasing_tests.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/test/interface/aliasing_tests.jl b/test/interface/aliasing_tests.jl index 65f2e55950..b8892e164c 100644 --- a/test/interface/aliasing_tests.jl +++ b/test/interface/aliasing_tests.jl @@ -1,7 +1,6 @@ using OrdinaryDiffEq, Test import ODEProblemLibrary: prob_ode_2Dlinear -import DAEProblemLibrary: prob_dae_transamp # 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) From affbc1402eff2b08da95995a769333d6d7ef949a Mon Sep 17 00:00:00 2001 From: jClugstor Date: Sat, 14 Dec 2024 11:10:46 -0500 Subject: [PATCH 23/24] nothing checking doesn't make sense here --- lib/OrdinaryDiffEqCore/src/solve.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index 25c4c0dffc..ffaa61ace0 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -188,7 +188,7 @@ function DiffEqBase.__init( # If alias isa Bool, all fields of ODEAliases set to alias if alias isa Bool aliases = ODEAliasSpecifier(alias = alias) - elseif isnothing(alias) || alias isa ODEAliasSpecifier + elseif alias isa ODEAliasSpecifier aliases = alias end end From eacc432f7863a4762c7e898151c2a669c5d2f187 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Sat, 14 Dec 2024 16:13:43 -0500 Subject: [PATCH 24/24] fix test --- test/interface/aliasing_tests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/interface/aliasing_tests.jl b/test/interface/aliasing_tests.jl index b8892e164c..4e2bfe0bc7 100644 --- a/test/interface/aliasing_tests.jl +++ b/test/interface/aliasing_tests.jl @@ -1,6 +1,6 @@ using OrdinaryDiffEq, Test -import ODEProblemLibrary: prob_ode_2Dlinear +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)