Skip to content

Commit df3d104

Browse files
committed
Bug fixes, rename :umfpacklu -> :umfpack
1 parent 3129487 commit df3d104

File tree

6 files changed

+25
-25
lines changed

6 files changed

+25
-25
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ExtendableSparse"
22
uuid = "95c220a8-a1cf-11e9-0c77-dbfce5f500b3"
33
authors = ["Juergen Fuhrmann <juergen.fuhrmann@wias-berlin.de>"]
4-
version = "0.5.0"
4+
version = "0.5.1"
55

66
[deps]
77
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"

src/factorizations.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ $(_myprint(default_options))
7474
7575
"""
7676
const default_options=Dict{Symbol,Any}(
77-
:kind => :umfpacklu,
77+
:kind => :umfpack,
7878
:droptol => 1.0e-3,
7979
:ensurelu => false,
8080
)
@@ -101,7 +101,7 @@ end
101101
"""
102102
```
103103
factorize(matrix)
104-
factorize(matrix; kind=:umfpacklu)
104+
factorize(matrix; kind=:umfpack)
105105
```
106106
Default Julia LU factorization based on UMFPACK.
107107
@@ -144,7 +144,7 @@ Create the [`AMGPreconditioner`](@ref) wrapping the Ruge-Stüben AMG preconditi
144144
"""
145145
function factorize(A::ExtendableSparseMatrix; kwargs...)
146146
opt=options(;kwargs...)
147-
opt[:kind]==:umfpacklu && return ExtendableSparseUmfpackLU(A)
147+
opt[:kind]==:umfpack && return ExtendableSparseUmfpackLU(A)
148148
opt[:kind]==:pardiso && return PardisoLU(A,ps=Pardiso.PardisoSolver())
149149
opt[:kind]==:mklpardiso && return PardisoLU(A,ps=Pardiso.MKLPardisoSolver())
150150
if opt[:ensurelu]

src/ilut.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function ILUTPreconditioner(A::ExtendableSparseMatrix; droptol=1.0e-3)
1919
ILUTPreconditioner(A,IncompleteLU.ilu(A.cscmatrix,τ=droptol),droptol)
2020
end
2121

22-
function update!(precon::ILUTPreconditioner, A::ExtendableSparseMatrix)
22+
function update!(precon::ILUTPreconditioner)
2323
A=precon.A
2424
@inbounds flush!(A)
2525
precon.fact=IncompleteLU.ilu(A.cscmatrix,τ=precon.droptol)

src/jacobi.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ $(TYPEDEF)
33
44
Jacobi preconditoner
55
"""
6-
struct JacobiPreconditioner{Tv, Ti} <: AbstractExtendableSparsePreconditioner{Tv,Ti}
7-
extmatrix::ExtendableSparseMatrix{Tv,Ti}
6+
mutable struct JacobiPreconditioner{Tv, Ti} <: AbstractExtendableSparsePreconditioner{Tv,Ti}
7+
A::ExtendableSparseMatrix{Tv,Ti}
88
invdiag::Array{Tv,1}
99
end
1010

1111
function update!(precon::JacobiPreconditioner)
12-
cscmatrix=precon.extmatrix.cscmatrix
12+
cscmatrix=precon.A.cscmatrix
1313
invdiag=precon.invdiag
1414
n=cscmatrix.n
1515
@inbounds for i=1:n
@@ -20,15 +20,15 @@ end
2020

2121
"""
2222
```
23-
JacobiPreconditioner(extmatrix)
23+
JacobiPreconditioner(A)
2424
JacobiPreconditioner(cscmatrix)
2525
```
2626
"""
27-
function JacobiPreconditioner(extmatrix::ExtendableSparseMatrix{Tv,Ti}) where {Tv,Ti}
28-
@assert size(extmatrix,1)==size(extmatrix,2)
29-
flush!(extmatrix)
30-
invdiag=Array{Tv,1}(undef,extmatrix.cscmatrix.n)
31-
precon=JacobiPreconditioner{Tv, Ti}(extmatrix,invdiag)
27+
function JacobiPreconditioner(A::ExtendableSparseMatrix{Tv,Ti}) where {Tv,Ti}
28+
@assert size(A,1)==size(A,2)
29+
flush!(A)
30+
invdiag=Array{Tv,1}(undef,A.cscmatrix.n)
31+
precon=JacobiPreconditioner{Tv, Ti}(A,invdiag)
3232
update!(precon)
3333
end
3434

src/parallel_jacobi.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ $(TYPEDEF)
33
44
Parallel Jacobi preconditioner
55
"""
6-
struct ParallelJacobiPreconditioner{Tv, Ti} <: AbstractExtendableSparsePreconditioner{Tv,Ti}
7-
extmatrix::ExtendableSparseMatrix{Tv,Ti}
6+
mutable struct ParallelJacobiPreconditioner{Tv, Ti} <: AbstractExtendableSparsePreconditioner{Tv,Ti}
7+
A::ExtendableSparseMatrix{Tv,Ti}
88
invdiag::Array{Tv,1}
99
end
1010

1111
function update!(precon::ParallelJacobiPreconditioner)
12-
cscmatrix=precon.extmatrix.cscmatrix
12+
cscmatrix=precon.A.cscmatrix
1313
invdiag=precon.invdiag
1414
n=cscmatrix.n
1515
Threads.@threads for i=1:n
@@ -20,15 +20,15 @@ end
2020

2121
"""
2222
```
23-
ParallelJacobiPreconditioner(extmatrix)
23+
ParallelJacobiPreconditioner(A)
2424
ParallelJacobiPreconditioner(cscmatrix)
2525
```
2626
"""
27-
function ParallelJacobiPreconditioner(extmatrix::ExtendableSparseMatrix{Tv,Ti}) where {Tv,Ti}
28-
@assert size(extmatrix,1)==size(extmatrix,2)
29-
flush!(extmatrix)
30-
invdiag=Array{Tv,1}(undef,extmatrix.cscmatrix.n)
31-
precon=JacobiPreconditioner{Tv, Ti}(extmatrix,invdiag)
27+
function ParallelJacobiPreconditioner(A::ExtendableSparseMatrix{Tv,Ti}) where {Tv,Ti}
28+
@assert size(A,1)==size(A,2)
29+
flush!(A)
30+
invdiag=Array{Tv,1}(undef,A.cscmatrix.n)
31+
precon=JacobiPreconditioner{Tv, Ti}(A,invdiag)
3232
update!(precon)
3333
end
3434

test/runtests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ end
285285

286286

287287

288-
function test_lu(k,l,m; kind=:umfpacklu)
288+
function test_lu(k,l,m; kind=:umfpack)
289289
Acsc=fdrand(k,l,m,rand=()->1,matrixtype=SparseMatrixCSC)
290290
b=rand(k*l*m)
291291
LUcsc=lu(Acsc)
@@ -307,7 +307,7 @@ function test_lu(k,l,m; kind=:umfpacklu)
307307
x1cscx1ext && x2csc x2ext
308308
end
309309

310-
function test_lupattern1(k,l,m; kind=:umfpacklu)
310+
function test_lupattern1(k,l,m; kind=:umfpack)
311311
Aext=fdrand(k,l,m,rand=()->1,matrixtype=ExtendableSparseMatrix)
312312
b=rand(k*l*m)
313313
LUext=lu(Aext,kind=kind)

0 commit comments

Comments
 (0)