Skip to content

Commit ac88d49

Browse files
fix: properly namespace array variables passed to subcomponents
1 parent 7ccd5ab commit ac88d49

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/ModelingToolkit.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ import Symbolics: rename, get_variables!, _solve, hessian_sparsity,
7272
ParallelForm, SerialForm, MultithreadedForm, build_function,
7373
rhss, lhss, prettify_expr, gradient,
7474
jacobian, hessian, derivative, sparsejacobian, sparsehessian,
75-
substituter, scalarize, getparent, hasderiv, hasdiff
75+
substituter, scalarize, getparent, hasderiv, hasdiff, Arr
7676

7777
import DiffEqBase: @add_kwonly
7878
export independent_variables, unknowns, parameters, full_parameters, continuous_events,

src/systems/abstractsystem.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,6 +1112,7 @@ end
11121112

11131113
apply_to_variables(f::F, ex) where {F} = _apply_to_variables(f, ex)
11141114
apply_to_variables(f::F, ex::Num) where {F} = wrap(_apply_to_variables(f, unwrap(ex)))
1115+
apply_to_variables(f::F, ex::Arr) where {F} = wrap(_apply_to_variables(f, unwrap(ex)))
11151116
function _apply_to_variables(f::F, ex) where {F}
11161117
if isvariable(ex)
11171118
return f(ex)

0 commit comments

Comments
 (0)