From 72c96c480f4901ccae77716a882282a60878e757 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sat, 24 Feb 2024 06:46:06 -0500 Subject: [PATCH] Update symbol_indexing.jl --- test/downstream/symbol_indexing.jl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/downstream/symbol_indexing.jl b/test/downstream/symbol_indexing.jl index a437fa46..3e481e84 100644 --- a/test/downstream/symbol_indexing.jl +++ b/test/downstream/symbol_indexing.jl @@ -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],