Skip to content

Commit 07e1681

Browse files
authored
Merge pull request #1733 from SciML/myb/odaesym
Fix syms in ODAEProblem
2 parents 86ddf89 + b53817b commit 07e1681

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/structural_transformation/codegen.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ function build_torn_function(sys;
291291
rhss)
292292

293293
states = fullvars[states_idxs]
294-
syms = map(Symbol, states_idxs)
294+
syms = map(Symbol, states)
295295

296296
pre = get_postprocess_fbody(sys)
297297

test/odesystem.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,5 +861,7 @@ let
861861
@test length(equations(as)) == 1
862862
@test isequal(equations(as)[1].lhs, -der(der(x)))
863863
# TODO: maybe do not emit x_t
864-
@test_nowarn sys4s = structural_simplify(sys4)
864+
sys4s = structural_simplify(sys4)
865+
prob = ODAEProblem(sys4s, [x => 1.0, D(x) => 1.0], (0, 1.0))
866+
@test string.(prob.f.syms) == ["x(t)", "xˍt(t)"]
865867
end

0 commit comments

Comments
 (0)