Skip to content

Commit d832874

Browse files
committed
update to default_t and default_time_deriv
1 parent d46ecfb commit d832874

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

src/reactions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ function get_massaction(kl::Num, reactants::Union{Vector{Num}, Nothing},
168168

169169
function check_args(::Val{true}, x::SymbolicUtils.BasicSymbolic{Real})
170170
for arg in SymbolicUtils.arguments(x)
171-
if isnan(check_args(arg)) || isequal(arg, Catalyst.DEFAULT_IV)
171+
if isnan(check_args(arg)) || isequal(arg, default_t())
172172
return NaN
173173
end
174174
end

test/events.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ using SBMLToolkit
22
using Catalyst, SBMLToolkitTestSuite
33
using Test
44

5-
const IV = Catalyst.DEFAULT_IV
5+
const IV = default_t()
66
@parameters compartment
77
@species S1(IV) S2(IV)
88

test/reactions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ using Test
44

55
cd(@__DIR__)
66
sbmlfile = joinpath("data", "reactionsystem_01.xml")
7-
const IV = Catalyst.DEFAULT_IV
7+
const IV = default_t()
88
@parameters k1, c1
99
@species s1(IV), s2(IV), s1s2(IV)
1010

test/rules.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ using SBML, SBMLToolkitTestSuite
33
using Catalyst, ModelingToolkit, OrdinaryDiffEq
44
using Test
55

6-
const IV = Catalyst.DEFAULT_IV
6+
const IV = default_t()
77
@parameters k1, compartment
88
@species S1(IV), S2(IV)
99

@@ -24,7 +24,7 @@ o_true = [S1 ~ 7 * compartment]
2424
sbml, _, _ = SBMLToolkitTestSuite.read_case("00031") # rateRule
2525
m = readmodel(sbml)
2626
a, o, r = SBMLToolkit.get_rules(m)
27-
r_true = [Differential(IV)(S1) ~ 7 * compartment]
27+
r_true = [default_time_deriv()(S1) ~ 7 * compartment]
2828
@test isequal(r, r_true)
2929

3030
sbml, _, _ = SBMLToolkitTestSuite.read_case("00039") # algebraicRule

test/systems.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ using Test
44

55
cd(@__DIR__)
66
sbmlfile = joinpath("data", "reactionsystem_01.xml")
7-
const IV = Catalyst.DEFAULT_IV
7+
const IV = default_t()
88
@parameters k1, c1
99
@species s1(IV), s2(IV), s1s2(IV)
1010

@@ -79,7 +79,7 @@ rs = ReactionSystem(MODEL2) # Contains reversible reaction
7979

8080
# Test ODESystem constructor
8181
odesys = ODESystem(MODEL1)
82-
trueeqs = Equation[Differential(IV)(s1) ~ k1]
82+
trueeqs = Equation[default_time_deriv()(s1) ~ k1]
8383
@test isequal(Catalyst.get_eqs(odesys), trueeqs)
8484
@test isequal(Catalyst.get_iv(odesys), IV)
8585
@test isequal(Catalyst.get_unknowns(odesys), [s1])
@@ -93,9 +93,9 @@ isequal(nameof(odesys), :odesys)
9393

9494
odesys = ODESystem(readSBML(sbmlfile))
9595
m = readSBML(sbmlfile)
96-
trueeqs = Equation[Differential(IV)(s1) ~ -((k1 * s1 * s2) / c1),
97-
Differential(IV)(s1s2) ~ (k1 * s1 * s2) / c1,
98-
Differential(IV)(s2) ~ -((k1 * s1 * s2) / c1)]
96+
trueeqs = Equation[default_time_deriv()(s1) ~ -((k1 * s1 * s2) / c1),
97+
default_time_deriv()(s1s2) ~ (k1 * s1 * s2) / c1,
98+
default_time_deriv()(s2) ~ -((k1 * s1 * s2) / c1)]
9999
@test isequal(Catalyst.get_eqs(odesys), trueeqs)
100100
@test isequal(Catalyst.get_iv(odesys), IV)
101101
@test isequal(Catalyst.get_unknowns(odesys), [s1, s1s2, s2])

test/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ MODEL1 = SBML.Model(parameters = Dict("D" => PARAM1, "Dv" => PARAM2),
2525
species = Dict("B" => SPECIES1, "Bc" => SPECIES2),
2626
rules = [RULE1])
2727

28-
const IV = Catalyst.DEFAULT_IV
28+
const IV = default_t()
2929
@species s1(IV)
3030
# Test symbolicsRateOf
3131
rate = SBMLToolkit.symbolicsRateOf(s1)

0 commit comments

Comments
 (0)