Skip to content

Commit 658af34

Browse files
test: test SCC sorted order
1 parent 3d037d0 commit 658af34

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/scc_nonlinear_problem.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ using ModelingToolkit: t_nounits as t, D_nounits as D
3939
@test prob.u0 isa SVector
4040
@test !SciMLBase.isinplace(prob)
4141
end
42+
43+
# Test BLT sorted
44+
@test istril(StructuralTransformations.sorted_incidence_matrix(model), 2)
4245
end
4346

4447
@testset "With parameters" begin
@@ -90,6 +93,9 @@ end
9093
sccsol = solve(sccprob, SimpleNewtonRaphson(); abstol = 1e-9)
9194
@test SciMLBase.successful_retcode(sccsol)
9295
@test norm(sccsol.resid) < norm(sol.resid)
96+
97+
# Test BLT sorted
98+
@test istril(StructuralTransformations.sorted_incidence_matrix(sys), 1)
9399
end
94100

95101
@testset "Transistor amplifier" begin
@@ -149,6 +155,9 @@ end
149155
sccsol = solve(sccprob, NewtonRaphson(); abstol = 1e-12)
150156

151157
@test sol.usccsol.u atol=1e-10
158+
159+
# Test BLT sorted
160+
@test istril(StructuralTransformations.sorted_incidence_matrix(sys), 1)
152161
end
153162

154163
@testset "Expression caching" begin

0 commit comments

Comments
 (0)