Skip to content

Commit 7704db2

Browse files
committed
Add some coverage
1 parent 1a611dc commit 7704db2

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/multilevel.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ function __solve!(x, ml, cycle::Cycle, b, lvl)
234234
x
235235
end
236236

237-
238237
### CommonSolve.jl spec
239238
struct AMGSolver{T}
240239
ml::MultiLevel

test/runtests.jl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,6 @@ ml = ruge_stuben(A)
140140
x = AlgebraicMultigrid._solve(ml, A * ones(100))
141141
@test sum(abs2, x - zeros(100)) < 1e-6
142142

143-
144-
145-
146143
end
147144

148145
@testset "Preconditioning" begin
@@ -310,15 +307,16 @@ for sz in [10, 5, 2]
310307
end
311308

312309
# Issue #46
313-
for f in (smoothed_aggregation, ruge_stuben)
310+
for f in ((smoothed_aggregation, SmoothedAggregationAMG),
311+
(ruge_stuben, RugeStubenAMG))
314312

315313
a = load("bug.jld2")["G"]
316-
ml = f(a)
314+
ml = f[1](a)
317315
p = aspreconditioner(ml)
318316
b = zeros(size(a,1))
319317
b[1] = 1
320318
b[2] = -1
321-
@test sum(abs2, a * AlgebraicMultigrid._solve(ml, b) - b) < 1e-10
319+
@test sum(abs2, a * solve(a, b, f[2]()) - b) < 1e-10
322320
@test sum(abs2, a * cg(a, b, Pl = p, maxiter = 1000) - b) < 1e-10
323321

324322
end

0 commit comments

Comments
 (0)