Skip to content

Commit 091a92d

Browse files
committed
Add a test for jacobi prolongation
1 parent 88fee87 commit 091a92d

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

test/ref_R.jld

16.1 KB
Binary file not shown.

test/runtests.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,4 +261,8 @@ end
261261
@testset "Gauss Seidel" begin
262262
test_gauss_seidel()
263263
end
264+
265+
@testset "Jacobi Prolongation" begin
266+
test_jacobi_prolongator()
267+
end
264268
end

test/sa_tests.jl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,5 +301,14 @@ function test_gauss_seidel()
301301
resid2 = norm(A*x,2)
302302
@test resid1 < 0.01 && resid2 < 0.01
303303
@test isapprox(resid1, resid2)
304-
304+
305+
end
306+
307+
# Test jacobi smooth prolongator with local weighting
308+
function test_jacobi_prolongator()
309+
A = poisson(100)
310+
T = poisson(100)
311+
x = smooth_prolongator(JacobiProlongation(4/3), A, T, 1, 1)
312+
ref = load("ref_R.jld")["G"]
313+
@test sum(abs2, x - ref) < 1e-6
305314
end

0 commit comments

Comments
 (0)