Skip to content

Commit c8a1209

Browse files
committed
Use Graphs.jl instead of LightGraphs.jl
1 parent ab4cbca commit c8a1209

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ version = "0.3.5"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
8+
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
89
KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
9-
LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d"
1010
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1111
Metis = "2679e427-3c69-5b7f-982b-ece356f1e94b"
1212
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
@@ -25,16 +25,16 @@ KrylovPreconditionersOneAPIExt = "oneAPI"
2525
AMDGPU = "2"
2626
Adapt = "4"
2727
CUDA = "5.7.3"
28-
oneAPI = "2.0.1"
28+
Graphs = "1.13.0"
2929
KernelAbstractions = "0.9"
3030
Krylov = "0.10.0"
31-
LightGraphs = "1"
3231
LinearAlgebra = "1.10"
3332
Metis = "1"
3433
Random = "1.10"
3534
SparseArrays = "1.10"
3635
Test = "1.10"
3736
julia = "1.10"
37+
oneAPI = "2.0.1"
3838

3939
[extras]
4040
Krylov = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7"

src/KrylovPreconditioners.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ const KA = KernelAbstractions
99
using LinearAlgebra: checksquare, BlasReal, BlasFloat
1010
import LinearAlgebra: ldiv!
1111

12+
using Graphs, Metis
13+
1214
# Operators
1315
include("krylov_operators.jl")
1416
include("triangular_operators.jl")

src/block_jacobi.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
export BlockJacobiPreconditioner
22

3-
using LightGraphs, Metis
4-
53
"""
64
overlap(Graph, subset, level)
75
@@ -10,7 +8,7 @@ subset2 contains subset and all of its adjacent vertices.
108
"""
119
function overlap(Graph, subset; level=1)
1210
@assert level > 0
13-
subset2 = [LightGraphs.neighbors(Graph, v) for v in subset]
11+
subset2 = [Graphs.neighbors(Graph, v) for v in subset]
1412
subset2 = reduce(vcat, subset2)
1513
subset2 = unique(vcat(subset, subset2))
1614

@@ -77,7 +75,7 @@ function BlockJacobiPreconditioner(J, npart::Int64, device=CPU(), olevel=0)
7775
"least 2 for partitioning in Metis")
7876
end
7977
adj = build_adjmatrix(SparseMatrixCSC(J))
80-
g = LightGraphs.Graph(adj)
78+
g = Graphs.Graph(adj)
8179
part = Metis.partition(g, npart)
8280
partitions = Vector{Vector{Int64}}()
8381
for i in 1:npart

0 commit comments

Comments
 (0)