From cca993cdddc5acbabeb25465cede98a2f311cac0 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Mon, 29 Jul 2024 08:09:16 -0400 Subject: [PATCH 1/8] Fix termination condition deprecation --- Project.toml | 2 +- src/solve.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index a0f11d3..fb5313d 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "SteadyStateDiffEq" uuid = "9672c7b4-1e72-59bd-8a11-6ac3964bc41f" -version = "2.2.0" +version = "2.2.1" [deps] ConcreteStructs = "2569d6c7-a4a2-43d3-a901-331e8e4be471" diff --git a/src/solve.jl b/src/solve.jl index 5816159..acdb089 100644 --- a/src/solve.jl +++ b/src/solve.jl @@ -15,7 +15,7 @@ end function DiffEqBase.__solve(prob::DiffEqBase.AbstractSteadyStateProblem, alg::DynamicSS, args...; abstol = 1e-8, reltol = 1e-6, odesolve_kwargs = (;), - save_idxs = nothing, termination_condition = SteadyStateDiffEqTerminationMode(), + save_idxs = nothing, termination_condition = NormTerminationMode(), kwargs...) tspan = __get_tspan(prob.u0, alg) From 58de2b880c422ee6a6d8cea215da277b3ecfe9fd Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Mon, 29 Jul 2024 19:54:08 -0400 Subject: [PATCH 2/8] Update src/solve.jl --- src/solve.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/solve.jl b/src/solve.jl index acdb089..df95e20 100644 --- a/src/solve.jl +++ b/src/solve.jl @@ -15,7 +15,7 @@ end function DiffEqBase.__solve(prob::DiffEqBase.AbstractSteadyStateProblem, alg::DynamicSS, args...; abstol = 1e-8, reltol = 1e-6, odesolve_kwargs = (;), - save_idxs = nothing, termination_condition = NormTerminationMode(), + save_idxs = nothing, termination_condition = NormTerminationMode(DiffEqBase.ODE_DEFAULT_NORM), kwargs...) tspan = __get_tspan(prob.u0, alg) From 94c92467ccf9119e6b39b93eb3b42ea1994ca4fa Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Mon, 29 Jul 2024 20:17:38 -0400 Subject: [PATCH 3/8] Update solve.jl --- src/solve.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/solve.jl b/src/solve.jl index df95e20..ca5b6ea 100644 --- a/src/solve.jl +++ b/src/solve.jl @@ -13,9 +13,10 @@ function __get_tspan(u0, tspan::Number) (DiffEqBase.value(zero(tspan)), tspan)) end +infnorm(x) = norm(x,Inf) function DiffEqBase.__solve(prob::DiffEqBase.AbstractSteadyStateProblem, alg::DynamicSS, args...; abstol = 1e-8, reltol = 1e-6, odesolve_kwargs = (;), - save_idxs = nothing, termination_condition = NormTerminationMode(DiffEqBase.ODE_DEFAULT_NORM), + save_idxs = nothing, termination_condition = NormTerminationMode(infnorm), kwargs...) tspan = __get_tspan(prob.u0, alg) From be045e34c3b55dee03783326066a1a33549f54ba Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Mon, 29 Jul 2024 21:54:34 -0400 Subject: [PATCH 4/8] Update core.jl --- test/core.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/test/core.jl b/test/core.jl index 7d067f3..666bd12 100644 --- a/test/core.jl +++ b/test/core.jl @@ -76,7 +76,6 @@ sol2 = solve(prob, DynamicSS(Tsit5()); abstol = 1e-4) @test typeof(u0) == typeof(sol2.u) for termination_condition in [ - SteadyStateDiffEqTerminationMode(), SimpleNonlinearSolveTerminationMode(), NormTerminationMode(), RelTerminationMode(), RelNormTerminationMode(), AbsTerminationMode(), AbsNormTerminationMode(), RelSafeTerminationMode(), AbsSafeTerminationMode(), RelSafeBestTerminationMode(), AbsSafeBestTerminationMode() From c356c1c4ce6def4b46dfac3af70d739ae6c48376 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Mon, 29 Jul 2024 22:46:01 -0400 Subject: [PATCH 5/8] Update test/core.jl --- test/core.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core.jl b/test/core.jl index 666bd12..53b0d82 100644 --- a/test/core.jl +++ b/test/core.jl @@ -76,7 +76,7 @@ sol2 = solve(prob, DynamicSS(Tsit5()); abstol = 1e-4) @test typeof(u0) == typeof(sol2.u) for termination_condition in [ - NormTerminationMode(), RelTerminationMode(), RelNormTerminationMode(), + NormTerminationMode(SteadyStateDiffEq.infnorm), RelTerminationMode(), RelNormTerminationMode(), AbsTerminationMode(), AbsNormTerminationMode(), RelSafeTerminationMode(), AbsSafeTerminationMode(), RelSafeBestTerminationMode(), AbsSafeBestTerminationMode() ] From ab2b802b23c5ec54d240c7ab2c8db49b281b9534 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Mon, 29 Jul 2024 22:55:02 -0400 Subject: [PATCH 6/8] Update core.jl --- test/core.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/core.jl b/test/core.jl index 53b0d82..8ec7430 100644 --- a/test/core.jl +++ b/test/core.jl @@ -76,8 +76,8 @@ sol2 = solve(prob, DynamicSS(Tsit5()); abstol = 1e-4) @test typeof(u0) == typeof(sol2.u) for termination_condition in [ - NormTerminationMode(SteadyStateDiffEq.infnorm), RelTerminationMode(), RelNormTerminationMode(), - AbsTerminationMode(), AbsNormTerminationMode(), RelSafeTerminationMode(), + NormTerminationMode(SteadyStateDiffEq.infnorm), RelTerminationMode(), RelNormTerminationMode(SteadyStateDiffEq.infnorm), + AbsTerminationMode(), AbsNormTerminationMode(SteadyStateDiffEq.infnorm), RelSafeTerminationMode(), AbsSafeTerminationMode(), RelSafeBestTerminationMode(), AbsSafeBestTerminationMode() ] sol_tc = solve(prob, DynamicSS(Tsit5()); termination_condition) From a06dbd0da49023e7d23b252e97fa914f26e4cd45 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Mon, 29 Jul 2024 23:03:44 -0400 Subject: [PATCH 7/8] Update core.jl --- test/core.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/core.jl b/test/core.jl index 8ec7430..7cf0de9 100644 --- a/test/core.jl +++ b/test/core.jl @@ -77,8 +77,8 @@ sol2 = solve(prob, DynamicSS(Tsit5()); abstol = 1e-4) for termination_condition in [ NormTerminationMode(SteadyStateDiffEq.infnorm), RelTerminationMode(), RelNormTerminationMode(SteadyStateDiffEq.infnorm), - AbsTerminationMode(), AbsNormTerminationMode(SteadyStateDiffEq.infnorm), RelSafeTerminationMode(), - AbsSafeTerminationMode(), RelSafeBestTerminationMode(), AbsSafeBestTerminationMode() + AbsTerminationMode(), AbsNormTerminationMode(SteadyStateDiffEq.infnorm), RelSafeTerminationMode(SteadyStateDiffEq.infnorm), + AbsSafeTerminationMode(SteadyStateDiffEq.infnorm), RelSafeBestTerminationMode(), AbsSafeBestTerminationMode() ] sol_tc = solve(prob, DynamicSS(Tsit5()); termination_condition) @show sol_tc.retcode, termination_condition From 83be66731388b266844b0e442b12e211ab0f7878 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Tue, 30 Jul 2024 01:37:39 -0400 Subject: [PATCH 8/8] Update test/core.jl --- test/core.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core.jl b/test/core.jl index 7cf0de9..7725265 100644 --- a/test/core.jl +++ b/test/core.jl @@ -78,7 +78,7 @@ sol2 = solve(prob, DynamicSS(Tsit5()); abstol = 1e-4) for termination_condition in [ NormTerminationMode(SteadyStateDiffEq.infnorm), RelTerminationMode(), RelNormTerminationMode(SteadyStateDiffEq.infnorm), AbsTerminationMode(), AbsNormTerminationMode(SteadyStateDiffEq.infnorm), RelSafeTerminationMode(SteadyStateDiffEq.infnorm), - AbsSafeTerminationMode(SteadyStateDiffEq.infnorm), RelSafeBestTerminationMode(), AbsSafeBestTerminationMode() + AbsSafeTerminationMode(SteadyStateDiffEq.infnorm), RelSafeBestTerminationMode(SteadyStateDiffEq.infnorm), AbsSafeBestTerminationMode(SteadyStateDiffEq.infnorm) ] sol_tc = solve(prob, DynamicSS(Tsit5()); termination_condition) @show sol_tc.retcode, termination_condition