Skip to content

Commit 20948ec

Browse files
committed
fix v0.6 tests
1 parent a495879 commit 20948ec

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/AlgebraicMultigrid.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ using Base.Threads
77

88
using Compat: rmul!
99

10+
if VERSION < v"0.7-"
11+
const mul! = A_mul_B!
12+
end
13+
1014
const MT = false
1115
const AMG = AlgebraicMultigrid
1216

src/multilevel.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ end
5454
abstract type CoarseSolver end
5555
struct Pinv{T} <: CoarseSolver
5656
pinvA::Matrix{T}
57-
Pinv(A) = new{eltype(A)}(pinv(Matrix(A)))
57+
Pinv{T}(A) where T = new{T}(pinv(Matrix(A)))
5858
end
59+
Pinv(A) = Pinv{eltype(A)}(A)
60+
5961
(p::Pinv)(x, b) = mul!(x, p.pinvA, b)
6062

6163
Base.length(ml) = length(ml.levels) + 1

0 commit comments

Comments
 (0)