Skip to content

Commit 013b37a

Browse files
committed
Add a test using file from Circuitscape
1 parent 4b8cff3 commit 013b37a

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

test/onetoall.jld

10.4 KB
Binary file not shown.

test/runtests.jl

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -241,28 +241,31 @@ end
241241

242242
@testset "Symmetric Strength of Connection" begin
243243

244-
test_symmetric_soc()
244+
test_symmetric_soc()
245245
end
246246

247247
@testset "Standard Aggregation" begin
248248

249-
test_standard_aggregation()
249+
test_standard_aggregation()
250250
end
251251

252252
@testset "Fit Candidates" begin
253-
test_fit_candidates()
253+
test_fit_candidates()
254254
end
255255

256256
@testset "Approximate Spectral Radius" begin
257-
test_approximate_spectral_radius()
257+
test_approximate_spectral_radius()
258258
end
259259
end
260260

261261
@testset "Gauss Seidel" begin
262-
test_gauss_seidel()
262+
test_gauss_seidel()
263263
end
264264

265265
@testset "Jacobi Prolongation" begin
266-
test_jacobi_prolongator()
266+
test_jacobi_prolongator()
267+
end
268+
269+
# Issue #24
270+
nodes_not_agg()
267271
end
268-
end

test/sa_tests.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,4 +311,12 @@ function test_jacobi_prolongator()
311311
x = smooth_prolongator(JacobiProlongation(4/3), A, T, 1, 1)
312312
ref = load("ref_R.jld")["G"]
313313
@test sum(abs2, x - ref) < 1e-6
314-
end
314+
end
315+
316+
# Issue #24
317+
function nodes_not_agg()
318+
A = load("onetoall.jld")["G"]
319+
ml = smoothed_aggregation(A)
320+
@test size(ml.levels[2].A) == (11,11)
321+
@test size(ml.final_A) == (2,2)
322+
end

0 commit comments

Comments
 (0)