Skip to content

Commit 300d5e0

Browse files
committed
up
1 parent 218d503 commit 300d5e0

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

ext/CatalystHomotopyContinuationExtension/homotopy_continuation_extension.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function make_int_exps(expr)
6767
wrap(Rewriters.Postwalk(Rewriters.PassThrough(___make_int_exps))(unwrap(expr))).val
6868
end
6969
function ___make_int_exps(expr)
70-
!istree(expr) && return expr
70+
!iscall(expr) && return expr
7171
if (operation(expr) == ^)
7272
if isinteger(arguments(expr)[2])
7373
return arguments(expr)[1]^Int64(arguments(expr)[2])

src/reactionsystem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1479,4 +1479,4 @@ function validate(rs::ReactionSystem, info::String = "")
14791479
end
14801480

14811481
# Checks if a unit consist of exponents with base 1 (and is this unitless).
1482-
unitless_exp(u) = istree(u) && (operation(u) == ^) && (arguments(u)[1] == 1)
1482+
unitless_exp(u) = iscall(u) && (operation(u) == ^) && (arguments(u)[1] == 1)

src/reactionsystem_serialisation/serialisation_support.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ const SKIPPED_METADATA = [ModelingToolkit.MTKVariableTypeCtx, Symbolics.Variable
240240
# Potentially strips the call for a symbolics. E.g. X(t) becomes X (but p remains p). This is used
241241
# when variables are written to files, as in code they are used without the call part.
242242
function strip_call(sym)
243-
return istree(sym) ? Sym{Real}(Symbolics.getname(sym)) : sym
243+
return iscall(sym) ? Sym{Real}(Symbolics.getname(sym)) : sym
244244
end
245245

246246
# For an vector of symbolics, creates a dictionary taking each symbolics to each call-stripped form.

test/dsl/dsl_options.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,8 +574,8 @@ let
574574
end
575575
end
576576
V,W = getfield.(observed(rn), :lhs)
577-
@test isequal(arguments(ModelingToolkit.unwrap(V)), Any[Catalyst.get_iv(rs), Catalyst.get_sivs(rn)[1], Catalyst.get_sivs(rn)[2]])
578-
@test isequal(arguments(ModelingToolkit.unwrap(W)), Any[Catalyst.get_iv(rs), Catalyst.get_sivs(rn)[2]])
577+
@test isequal(arguments(ModelingToolkit.unwrap(V)), Any[Catalyst.get_iv(rn), Catalyst.get_sivs(rn)[1], Catalyst.get_sivs(rn)[2]])
578+
@test isequal(arguments(ModelingToolkit.unwrap(W)), Any[Catalyst.get_iv(rn), Catalyst.get_sivs(rn)[2]])
579579
end
580580

581581
# Checks that metadata is written properly.

test/reactionsystem_core/coupled_equation_crn_systems.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ let
4747
# Checks that the correct steady state is found through ODEProblem.
4848
oprob = ODEProblem(coupled_rs, u0, tspan, ps)
4949
osol = solve(oprob, Vern7(); abstol = 1e-8, reltol = 1e-8)
50-
@test osol[end] [2.0, 1.0]
50+
@test osol.u[end] [2.0, 1.0]
5151

5252
# Checks that the correct steady state is found through NonlinearProblem.
5353
nlprob = NonlinearProblem(coupled_rs, u0, ps)
@@ -116,7 +116,7 @@ let
116116
for coupled_rs in [coupled_rs_prog, coupled_rs_extended, coupled_rs_dsl]
117117
oprob = ODEProblem(coupled_rs, u0, tspan, ps)
118118
osol = solve(oprob, Vern7(); abstol = 1e-8, reltol = 1e-8)
119-
osol[end] [10.0, 10.0, 11.0, 11.0]
119+
osol.u[end] [10.0, 10.0, 11.0, 11.0]
120120
end
121121
end
122122

@@ -160,7 +160,7 @@ let
160160
# Checks that the correct steady state is found through ODEProblem.
161161
oprob = ODEProblem(coupled_rs, u0, tspan, ps; structural_simplify = true)
162162
osol = solve(oprob, Rosenbrock23(); abstol = 1e-8, reltol = 1e-8)
163-
@test osol[end] [2.0, 3.0]
163+
@test osol.u[end] [2.0, 3.0]
164164

165165
# Checks that the correct steady state is found through NonlinearProblem.
166166
nlprob = NonlinearProblem(coupled_rs, u0, ps)
@@ -207,7 +207,7 @@ let
207207
osol = solve(oprob, Rosenbrock23(); abstol = 1e-8, reltol = 1e-8)
208208
sssol = solve(ssprob, DynamicSS(Rosenbrock23()); abstol = 1e-8, reltol = 1e-8)
209209
nlsol = solve(nlprob; abstol = 1e-8, reltol = 1e-8)
210-
@test osol[end] sssol nlsol
210+
@test osol.u[end] sssol nlsol
211211
end
212212

213213

test/reactionsystem_core/reactionsystem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ let
356356
oprob1 = ODEProblem(osys, u0map, tspan, pmap)
357357
sts = [B, D, E, C]
358358
syms = [:B, :D, :E, :C]
359-
ofun = ODEFunction(f!; syms)
359+
ofun = ODEFunction(f!; sys = ModelingToolkit.SymbolCache(syms))
360360
oprob2 = ODEProblem(ofun, u0, tspan, p)
361361
saveat = tspan[2] / 50
362362
abstol = 1e-10

0 commit comments

Comments
 (0)