Skip to content

Commit

Permalink
Update symbol_indexing.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas authored Feb 24, 2024
1 parent 351cb40 commit 72c96c4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/downstream/symbol_indexing.jl
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
using RecursiveArrayTools, ModelingToolkit, OrdinaryDiffEq, SymbolicIndexingInterface, Test
using ModelingToolkit: t_nounits as t, D_nounits as D

include("../testutils.jl")

@variables t x(t)
@variables x(t)
@parameters τ
D = Differential(t)
@variables RHS(t)
@named fol_separate = ODESystem([RHS ~ (1 - x) / τ,
@mtkbuild fol_separate = ODESystem([RHS ~ (1 - x) / τ,
D(x) ~ RHS])
fol_simplified = structural_simplify(fol_separate)

prob = ODEProblem(fol_simplified, [x => 0.0], (0.0, 10.0), [τ => 3.0])
prob = ODEProblem(fol_separate, [x => 0.0], (0.0, 10.0), [τ => 3.0])
sol = solve(prob, Tsit5())

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

0 comments on commit 72c96c4

Please sign in to comment.