From 4aed6802ffb09f4462db1a01ebe12d6422a34bf4 Mon Sep 17 00:00:00 2001 From: Hao-Wei Pang Date: Fri, 8 Sep 2023 14:32:54 -0400 Subject: [PATCH] Use SciMLBase.Success instead of :Success as it is deprecated with Julia v1.9 --- iJulia/Gas-Catalyst Interface.ipynb | 2 +- src/EdgeAnalysis.jl | 6 +++--- src/Simulation.jl | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/iJulia/Gas-Catalyst Interface.ipynb b/iJulia/Gas-Catalyst Interface.ipynb index 91282687..c07cfad2 100644 --- a/iJulia/Gas-Catalyst Interface.ipynb +++ b/iJulia/Gas-Catalyst Interface.ipynb @@ -102,7 +102,7 @@ "metadata": {}, "outputs": [], "source": [ - "sol.retcode == :Success" + "sol.retcode == SciMLBase.Success" ] }, { diff --git a/src/EdgeAnalysis.jl b/src/EdgeAnalysis.jl index 9256679e..9029cfe7 100644 --- a/src/EdgeAnalysis.jl +++ b/src/EdgeAnalysis.jl @@ -987,7 +987,7 @@ function selectobjects(react,edgereact,coreedgedomains,coreedgeinters,domains,in invalidobjects = [] terminated = false conversion = 0.0 - code = :Success + code = SciMLBase.Success if tolbranchrxntocore != 0.0 branchfactor = 1.0/tolbranchrxntocore @@ -1006,7 +1006,7 @@ function selectobjects(react,edgereact,coreedgedomains,coreedgeinters,domains,in firsttime = true nsteps = 0 - while t < tf && Symbol(code) == :Success + while t < tf && code == SciMLBase.Success step!(inte) nsteps += 1 code = check_error(inte) @@ -1028,7 +1028,7 @@ function selectobjects(react,edgereact,coreedgedomains,coreedgeinters,domains,in end end - if Symbol(code) == :Success + if code == SciMLBase.Success return (terminated,false,invalidobjects,unimolecularthreshold, bimolecularthreshold,trimolecularthreshold,maxedgespeciesrateratios,t,conversion) else diff --git a/src/Simulation.jl b/src/Simulation.jl index 025819e2..3b800eb8 100644 --- a/src/Simulation.jl +++ b/src/Simulation.jl @@ -66,7 +66,7 @@ function Simulation(sol::Q, domain::W, reducedmodelmappings::ReducedModelMapping u = [unlumpsol(t) for t in sol.t] t = sol.t - sol = SciMLBase.build_solution(sol.prob, sol.alg, t, u, retcode=:Success) + sol = SciMLBase.build_solution(sol.prob, sol.alg, t, u, retcode=SciMLBase.Success) species_range = 1:length(getphasespecies(domain.phase)) names = getfield.(getphasespecies(domain.phase), :name)