Skip to content

Commit eca18ce

Browse files
committed
update
1 parent d14ad58 commit eca18ce

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

ext/CatalystHomotopyContinuationExtension/homotopy_continuation_extension.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ end
4444

4545
# For a given reaction system, parameter values, and initial conditions, find the polynomial that HC solves to find steady states.
4646
function steady_state_polynomial(rs_in::ReactionSystem, ps, u0)
47-
rs = ModelingToolkit.@set rs_in.rxs = [expand_registered_functions(rx) for rx in rn.rxs]
47+
rs = ModelingToolkit.@set rs_in.rxs = [Catalyst.expand_registered_functions(rx) for rx in rs_in.rxs]
4848
ns = convert(NonlinearSystem, rs; remove_conserved = true)
4949
pre_varmap = [symmap_to_varmap(rs,u0)..., symmap_to_varmap(rs,ps)...]
5050
conservationlaw_errorcheck(rs, pre_varmap)

src/registered_functions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ function expand_registered_functions(expr)
128128
return args[3]*(args[1]^args[5])/((args[1])^args[5] + (args[2])^args[5] + (args[4])^args[5])
129129
end
130130
for i = 1:length(args)
131-
args[i] = expand_registered_functions!(args[i])
131+
args[i] = expand_registered_functions(args[i])
132132
end
133133
return expr
134134
end

test/extensions/homotopy_continuation.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,12 @@ end
7979

8080
# Tests that non-scalar reaction rates work.
8181
# Tests that rational polynomial steady state systems work.
82+
# Tests that Hill function is correctly expanded even if nested.
8283
# Test filter_negative=false works.
83-
# tests than non-integer exponents throws an error.
84+
# Tests than non-integer exponents throws an error.
8485
let
8586
rs = @reaction_network begin
86-
0.1 + hill(X,v,K,n), 0 --> X
87+
v*(0.1/v + hill(X,1,K,n)), 0 --> X
8788
d, X --> 0
8889
end
8990
ps = [:v => 5.0, :K => 2.5, :n => 3, :d => 1.0]

0 commit comments

Comments
 (0)