@@ -136,12 +136,11 @@ ps = [p => 1.0] # Value for `d` is missing
136
136
@test_throws ModelingToolkit. MissingVariablesError ODEProblem (sys, u0, tspan, ps)
137
137
@test_nowarn ODEProblem (sys, u0, tspan, [ps... , d => 1.0 ])
138
138
139
-
140
139
# JET tests
141
140
142
141
# scalar parameters only
143
142
function level1 ()
144
- @parameters p1= 0.5 [tunable = true ] p2 = 1 [tunable= true ] p3 = 3 [tunable = false ] p4= 3 [tunable = true ] y0= 1
143
+ @parameters p1= 0.5 [tunable = true ] p2= 1 [tunable = true ] p3= 3 [tunable = false ] p4= 3 [tunable = true ] y0= 1
145
144
@variables x (t)= 2 y (t)= y0
146
145
D = Differential (t)
147
146
@@ -183,14 +182,14 @@ end
183
182
184
183
@testset " level$i " for (i, prob) in enumerate ([level1 (), level2 (), level3 ()])
185
184
ps = prob. p
186
- @testset " Type stability of $portion " for portion in [Tunable (), Discrete (), Constants ()]
185
+ @testset " Type stability of $portion " for portion in [
186
+ Tunable (), Discrete (), Constants ()]
187
187
@test_call canonicalize (portion, ps)
188
188
# @inferred canonicalize(portion, ps)
189
- broken =
190
- (i ∈ [2 ,3 ] && portion == Tunable ())
189
+ broken = (i ∈ [2 , 3 ] && portion == Tunable ())
191
190
192
191
# broken because the size of a vector of vectors can't be determined at compile time
193
- @test_opt broken= broken target_modules = (ModelingToolkit,) canonicalize (
192
+ @test_opt broken= broken target_modules= (ModelingToolkit,) canonicalize (
194
193
portion, ps)
195
194
196
195
buffer, repack, alias = canonicalize (portion, ps)
200
199
@test_opt target_modules= (ModelingToolkit,) SciMLStructures. replace (
201
200
portion, ps, ones (length (buffer)))
202
201
203
- @test_call target_modules = (ModelingToolkit,) SciMLStructures. replace! (
202
+ @test_call target_modules= (ModelingToolkit,) SciMLStructures. replace! (
204
203
portion, ps, ones (length (buffer)))
205
204
@inferred SciMLStructures. replace! (portion, ps, ones (length (buffer)))
206
205
@test_opt target_modules= (ModelingToolkit,) SciMLStructures. replace! (
0 commit comments