Skip to content

Commit 72c96c4

Browse files
Update symbol_indexing.jl
1 parent 351cb40 commit 72c96c4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/downstream/symbol_indexing.jl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
using RecursiveArrayTools, ModelingToolkit, OrdinaryDiffEq, SymbolicIndexingInterface, Test
2+
using ModelingToolkit: t_nounits as t, D_nounits as D
23

34
include("../testutils.jl")
45

5-
@variables t x(t)
6+
@variables x(t)
67
@parameters τ
7-
D = Differential(t)
88
@variables RHS(t)
9-
@named fol_separate = ODESystem([RHS ~ (1 - x) / τ,
9+
@mtkbuild fol_separate = ODESystem([RHS ~ (1 - x) / τ,
1010
D(x) ~ RHS])
11-
fol_simplified = structural_simplify(fol_separate)
1211

13-
prob = ODEProblem(fol_simplified, [x => 0.0], (0.0, 10.0), [τ => 3.0])
12+
prob = ODEProblem(fol_separate, [x => 0.0], (0.0, 10.0), [τ => 3.0])
1413
sol = solve(prob, Tsit5())
1514

1615
sol_new = DiffEqArray(sol.u[1:10],

0 commit comments

Comments
 (0)