Skip to content

Commit 7eb12c8

Browse files
authored
Merge pull request #83 from JuliaLinearAlgebra/RA/omalled
Fix direct interpolation bug
2 parents 7cc34b9 + b908b6e commit 7eb12c8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/classical.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function direct_interpolation(At, T, splitting)
6363

6464
Pp = rs_direct_interpolation_pass1(T, splitting)
6565
Px, Pj, Pp = rs_direct_interpolation_pass2(At, T, splitting, Pp)
66-
R = SparseMatrixCSC(maximum(Pj), size(At, 1), Pp, Pj, Px)
66+
R = SparseMatrixCSC(isempty(Pj) ? 0 : maximum(Pj), size(At, 1), Pp, Pj, Px)
6767
P = R'
6868

6969
P, R

test/runtests.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,3 +322,9 @@ for f in (smoothed_aggregation, ruge_stuben)
322322
end
323323

324324
end
325+
326+
# Issue #56
327+
X = poisson(27_000)+24.0*I
328+
ml = ruge_stuben(X)
329+
b = rand(27_000)
330+
@test solve(ml, b, reltol = 1e-10) X \ b rtol = 1e-10

0 commit comments

Comments
 (0)