-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Infrastructure for factorizations including Pardiso
Infrastructure for factorizations including Pardiso * Reusable LU factorization * infrastructure for Pardiso, AlgebraicMultigrid, IncompleteLU etc. based on Require.jl * minmal julia version -> 1.5 (because of lu!) * Unittests for packages loaded via require * Documentation update * Define generic default methods for factorizations, specialize only if necessary.
- Loading branch information
Showing
22 changed files
with
609 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
name = "ExtendableSparse" | ||
uuid = "95c220a8-a1cf-11e9-0c77-dbfce5f500b3" | ||
authors = ["Juergen Fuhrmann <[email protected]>"] | ||
version = "0.4.2" | ||
version = "0.5.0" | ||
|
||
[deps] | ||
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" | ||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" | ||
Requires = "ae029012-a4dd-5104-9daa-d747884805df" | ||
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" | ||
SuiteSparse = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
||
[compat] | ||
DocStringExtensions = "^0.8.0" | ||
julia = "1" | ||
Requires = "^1.1.3" | ||
julia = "^1.5" | ||
|
||
[extras] | ||
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
[deps] | ||
AlgebraicMultigrid = "2169fc97-5a83-5252-b627-83903c6c433c" | ||
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" | ||
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8" | ||
ExtendableSparse = "95c220a8-a1cf-11e9-0c77-dbfce5f500b3" | ||
|
||
IncompleteLU = "40713840-3770-5561-ab4c-a76e7d0d7895" | ||
Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
# Sparse matrix handling | ||
|
||
## Matrix creation and update API | ||
```@autodocs | ||
Modules = [ExtendableSparse] | ||
Pages = ["sparsematrixlnk.jl","sparsematrixcsc.jl","extendable.jl", "sprand.jl"] | ||
Pages = ["extendable.jl"] | ||
``` | ||
|
||
## Test matrix creation | ||
```@autodocs | ||
Modules = [ExtendableSparse] | ||
Pages = ["sprand.jl"] | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Internal API | ||
|
||
|
||
## Linked List Sparse Matrix format | ||
```@autodocs | ||
Modules = [ExtendableSparse] | ||
Pages = ["sparsematrixlnk.jl"] | ||
``` | ||
|
||
## Some methods for SparseMatrixCSC | ||
```@autodocs | ||
Modules = [ExtendableSparse] | ||
Pages = ["sparsematrixcsc.jl"] | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,27 @@ | ||
# Preconditioners | ||
# Factorizations & Preconditioners | ||
|
||
## Factorizations | ||
|
||
In this package, preconditioners and LU factorizations are subcategories are both seen | ||
as complete or approximate _factorizations_. Correspondingly there is a common API for | ||
their creation. | ||
|
||
Factorizations from these package know the matrices which have been factorized. | ||
|
||
```@autodocs | ||
Modules = [ExtendableSparse] | ||
Pages = ["preconditioners.jl", "ilu0.jl", "jacobi.jl", "parallel_jacobi.jl","simple_iteration.jl"] | ||
Pages = ["factorizations.jl"] | ||
``` | ||
|
||
## LU Factorizations | ||
```@autodocs | ||
Modules = [ExtendableSparse] | ||
Pages = ["umfpack_lu.jl", "pardiso_lu.jl"] | ||
``` | ||
|
||
## Preconditioners | ||
```@autodocs | ||
Modules = [ExtendableSparse] | ||
Pages = ["jacobi.jl","ilu0.jl","parallel_jacobi.jl","ilut.jl","amg.jl"] | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,41 @@ | ||
module ExtendableSparse | ||
using DocStringExtensions | ||
using SparseArrays | ||
using LinearAlgebra | ||
using SuiteSparse | ||
using Requires | ||
|
||
using DocStringExtensions | ||
|
||
|
||
|
||
include("sparsematrixcsc.jl") | ||
include("sparsematrixlnk.jl") | ||
include("extendable.jl") | ||
|
||
export SparseMatrixLNK,ExtendableSparseMatrix,flush!,nnz, updateindex!, rawupdateindex!, colptrs | ||
|
||
include("preconditioners.jl") | ||
include("factorizations.jl") | ||
export JacobiPreconditioner, ILU0Preconditioner, ParallelJacobiPreconditioner | ||
export issolver | ||
export factorize,factorize!, update! | ||
export ILUTPreconditioner, AMGPreconditioner | ||
|
||
include("simple_iteration.jl") | ||
export simple,simple! | ||
|
||
|
||
|
||
|
||
include("sprand.jl") | ||
export sprand!,sprand_sdd!, fdrand,fdrand!,fdrand_coo | ||
|
||
|
||
function __init__() | ||
@require Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2" include("pardiso_lu.jl") | ||
@require IncompleteLU = "40713840-3770-5561-ab4c-a76e7d0d7895" include("ilut.jl") | ||
@require AlgebraicMultigrid = "2169fc97-5a83-5252-b627-83903c6c433c" include("amg.jl") | ||
end | ||
|
||
|
||
|
||
end # module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
""" | ||
$(TYPEDEF) | ||
""" | ||
mutable struct AMGPreconditioner{Tv, Ti} <: AbstractExtendableSparsePreconditioner{Tv,Ti} | ||
A::ExtendableSparseMatrix{Tv,Ti} | ||
fact | ||
end | ||
|
||
""" | ||
``` | ||
AMGPreconditioner(extmatrix) | ||
``` | ||
""" | ||
function AMGPreconditioner(A::ExtendableSparseMatrix{Tv,Ti}) where {Tv,Ti} | ||
@inbounds flush!(A) | ||
p=AlgebraicMultigrid.aspreconditioner(AlgebraicMultigrid.ruge_stuben(A.cscmatrix)) | ||
AMGPreconditioner{Tv,Ti}(A,p) | ||
end | ||
|
||
function update!(precon::AMGPreconditioner{Tv,Ti}) where {Tv,Ti} | ||
@inbounds flush!(precon.A) | ||
precon.fact=AlgebraicMultigrid.aspreconditioner(AlgebraicMultigrid.ruge_stuben(precon.A.cscmatrix)) | ||
end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
3129487
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
3129487
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/34054
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: