Skip to content

Commit 860381c

Browse files
fixup! refactor: use new LinearizationFunction instead of closure in linearization_function
1 parent ab71126 commit 860381c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/linearization.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ function (linfun::LinearizationFunction)(u, p, t)
158158
p = todict(p)
159159
newps = copy(parameter_values(linfun.prob))
160160
for (k, v) in p
161-
if is_parameter(sys, k)
161+
if is_parameter(linfun, k)
162162
v = fixpoint_sub(v, p)
163-
setp(sys, k)(newps, v)
163+
setp(linfun, k)(newps, v)
164164
end
165165
end
166166
p = newps
@@ -190,7 +190,7 @@ function (linfun::LinearizationFunction)(u, p, t)
190190
linfun.num_states == 0 ||
191191
error("Number of unknown variables (0) does not match the number of input unknowns ($(length(u)))")
192192
fg_xz = zeros(0, 0)
193-
h_xz = fg_u = zeros(0, length(inputs))
193+
h_xz = fg_u = zeros(0, length(linfun.input_idxs))
194194
end
195195
hp = let u = u, t = t, h = linfun.h
196196
_hp(p) = h(u, p, t)

0 commit comments

Comments
 (0)