Skip to content

Commit e0d3029

Browse files
Merge pull request #4532 from SciML/as/no-inline-scc-jac
test: use `inline_linear_sccs = false` for tests that pass `jac = true`
2 parents a84e002 + 6a77c69 commit e0d3029

4 files changed

Lines changed: 15 additions & 5 deletions

File tree

lib/ModelingToolkitBase/test/initial_values.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,11 @@ end
292292
0 ~ x^2 + y^2 - w2^2,
293293
]
294294

295-
@mtkcompile sys = System(eqs, t)
295+
if @isdefined(ModelingToolkit)
296+
@mtkcompile sys = System(eqs, t) reassemble_alg = StructuralTransformations.DefaultReassembleAlgorithm(; inline_linear_sccs = false)
297+
else
298+
@mtkcompile sys = System(eqs, t)
299+
end
296300

297301
u0 = [
298302
D(x) => 2.0,

lib/ModelingToolkitBase/test/jacobiansparsity.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ if @isdefined(ModelingToolkit)
124124
D(D(y)) ~ λ * y - g
125125
x^2 + y^2 ~ 1
126126
]
127-
@mtkcompile pend = System(eqs, t)
127+
@mtkcompile pend = System(eqs, t) reassemble_alg = StructuralTransformations.DefaultReassembleAlgorithm(; inline_linear_sccs = false)
128128

129129
u0 = [x => 1, y => 0]
130130
prob = ODEProblem(
@@ -161,7 +161,7 @@ if @isdefined(ModelingToolkit)
161161
D(D(y)) ~ λ * y - g
162162
x^2 + y^2 ~ 1
163163
]
164-
@mtkcompile pend = System(eqs, t)
164+
@mtkcompile pend = System(eqs, t) reassemble_alg = StructuralTransformations.DefaultReassembleAlgorithm(; inline_linear_sccs = false)
165165
prob = ODEProblem(
166166
pend, [x => 0.0, D(x) => 1.0, g => 1.0], (0.0, 1.0);
167167
guesses = [y => 1.0, λ => 1.0], jac = true, sparse = true

test/semilinearodeproblem.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,10 @@ using ModelingToolkit: t_nounits as t, D_nounits as D
143143
] # 14: M
144144

145145
prob = ODEProblem(Nelson!, u0, tspan, params)
146-
sys = mtkcompile(modelingtoolkitize(prob))
146+
sys = mtkcompile(
147+
modelingtoolkitize(prob);
148+
reassemble_alg = StructuralTransformations.DefaultReassembleAlgorithm(; inline_linear_sccs = false)
149+
)
147150
A, B, C = ModelingToolkit.calculate_semiquadratic_form(sys)
148151
@test A !== nothing
149152
@test B !== nothing

test/state_selection.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,10 @@ let
280280

281281
# solution -------------------------------------------------------------------
282282
@named catapult = System(eqs, t, vars, params, initial_conditions = defs)
283-
sys = mtkcompile(catapult)
283+
sys = mtkcompile(
284+
catapult;
285+
reassemble_alg = StructuralTransformations.DefaultReassembleAlgorithm(; inline_linear_sccs = false)
286+
)
284287
prob = ODEProblem(sys, [l_2f => 0.55, damp => 1.0e7], (0.0, 0.1); jac = true)
285288
@test solve(prob, Rodas4()).retcode == ReturnCode.Success
286289
end

0 commit comments

Comments
 (0)