Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Changelog

## [2.0.0] - Planned
## [2.0.0] - 2026-01-06

### Breaking
- remove solver + precon API which is not based on precs or directly overloading `\`.
- Remove solver + precon API which is not based on precs or directly overloading `\`.
Fully rely on LinearSolve (besides `\`)
- Move AMGBuilder, ILUZeroBuilder etc. to the corresponding packages (depending on the PRs)
- remove "old" SparseMatrixLNK (need to benchmark before)
- Move AMGBuilder etc to corresponding packages (depending on the PRs)
- Keep ILUZeroPreconBuilder, JacobiPreconBuilder
- ExtendableSparseMatrix is now GenericExtendableSparseMatrix{SparseMatrixLNK}
- Changes should be non-breaking if only ExtendableSparseMatrix was used, and no solvers or preconditioners
For those, see LinearSolve.jl.

## [1.7.0] - 2025-02-06
- Bump Pardiso to 1.0 and LinearSolve to 3.0
Expand Down
77 changes: 33 additions & 44 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,33 +1,55 @@
name = "ExtendableSparse"
uuid = "95c220a8-a1cf-11e9-0c77-dbfce5f500b3"
version = "2.0.0"
authors = ["Juergen Fuhrmann <juergen.fuhrmann@wias-berlin.de>", "Daniel Runge"]
version = "1.7.1"

[deps]
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
ILUZero = "88f59080-6952-5380-9ea5-54057fb9a43f"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
SciMLPublic = "431bcebd-1456-4ced-9d72-93c2757fff0b"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Sparspak = "e56a9233-b9d6-4f03-8d0f-1825330902ac"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
SuiteSparse = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[weakdeps]
AMGCLWrap = "4f76b812-4ba5-496d-b042-d70715554288"
AlgebraicMultigrid = "2169fc97-5a83-5252-b627-83903c6c433c"
IncompleteLU = "40713840-3770-5561-ab4c-a76e7d0d7895"
LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2"

[extensions]
ExtendableSparseAMGCLWrapExt = "AMGCLWrap"
ExtendableSparseAlgebraicMultigridExt = "AlgebraicMultigrid"
ExtendableSparseIncompleteLUExt = "IncompleteLU"
ExtendableSparsePardisoExt = "Pardiso"
ExtendableSparseLinearSolveExt = "LinearSolve"

[compat]
AMGCLWrap = "2"
AlgebraicMultigrid = "0.4, 0.5, 0.6, 1"
Aqua = "0.8"
BenchmarkTools = "1"
ChunkSplitters = "2, 3"
DocStringExtensions = "0.8, 0.9"
ExplicitImports = "1"
ExtendableGrids = "1.9"
ForwardDiff = "0.10, 1"
ILUZero = "0.2"
IncompleteLU = "^0.2.1"
InteractiveUtils = "1.11.0"
IterativeSolvers = "0.9"
LinearAlgebra = "1.9"
LinearSolve = "2.36.0, 3.7.1"
Metis = "1"
MultiFloats = "1, 2"
OhMyThreads = "0.6, 0.7, 0.8"
Printf = "1.9"
Random = "1.9"
RecursiveFactorization = "0.2"
SciMLPublic = "1.0.1"
SparseArrays = "1.9"
Sparspak = "0.3.6"
StaticArrays = "1"
Test = "1.9"
julia = "1.9"

[extras]
AMGCLWrap = "4f76b812-4ba5-496d-b042-d70715554288"
AlgebraicMultigrid = "2169fc97-5a83-5252-b627-83903c6c433c"
Expand All @@ -38,48 +60,15 @@ ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7"
ExtendableGrids = "cfc395e8-590f-11e8-1f13-43a2532b2fa8"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
IncompleteLU = "40713840-3770-5561-ab4c-a76e7d0d7895"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153"
LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
Metis = "2679e427-3c69-5b7f-982b-ece356f1e94b"
MultiFloats = "bdf0d083-296b-4888-a5b6-7498122e68a5"
OhMyThreads = "67456a42-1dca-4109-a031-0a68de7e3ad5"
Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
RecursiveFactorization = "f2c3362d-daeb-58d1-803e-2bc74f2840b4"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
AMGCLWrap = "2"
AlgebraicMultigrid = "0.4, 0.5, 0.6, 1"
DocStringExtensions = "0.8, 0.9"
ExtendableGrids = "1.9"
ILUZero = "0.2"
IncompleteLU = "^0.2.1"
IterativeSolvers = "0.9"
LinearSolve = "2.36.0, 3.7.1"
Pardiso = "0.5.1, 1"
Sparspak = "0.3.6"
StaticArrays = "1.5.24"
julia = "1.9"

[targets]
test = [
"AMGCLWrap",
"AlgebraicMultigrid",
"Aqua",
"BenchmarkTools",
"ChunkSplitters",
"ExplicitImports",
"ExtendableGrids",
"ForwardDiff",
"IncompleteLU",
"IterativeSolvers",
"LinearSolve",
"Metis",
"MultiFloats",
"OhMyThreads",
"Pardiso",
"Random",
"RecursiveFactorization",
"Test",
]
test = ["AMGCLWrap", "AlgebraicMultigrid", "Aqua", "BenchmarkTools", "ChunkSplitters", "ExplicitImports", "ExtendableGrids", "ForwardDiff", "IncompleteLU", "IterativeSolvers", "LinearSolve", "Metis", "MultiFloats", "OhMyThreads", "Random", "RecursiveFactorization", "Test"]
24 changes: 2 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![Build status](https://github.com/WIAS-PDELib/ExtendableSparse.jl/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/WIAS-PDELib/ExtendableSparse.jl/actions/workflows/ci.yml?query=branch%3Amaster)
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://WIAS-PDELib.github.io/ExtendableSparse.jl/stable)
[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://WIAS-PDELib.github.io/ExtendableSparse.jl/dev)
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3530554.svg)](https://doi.org/10.5281/zenodo.3530554)
[![code style: runic](https://img.shields.io/badge/code_style-%E1%9A%B1%E1%9A%A2%E1%9A%BE%E1%9B%81%E1%9A%B2-black)](https://github.com/fredrikekre/Runic.jl)

Expand Down Expand Up @@ -42,7 +43,7 @@ With the help of [Sparspak.jl](https://github.com/PetrKryslUCSD/Sparspak.jl), th
`sparse(A)` creates a standard `SparseMatrixCSC` from a filled `ExtendableSparseMatrix` which can be used e.g. to create preconditioners. So one can instead perform e.g.

```
LinearSolve.solve(p, KrylovJL_CG(); Pl = ILUZero.ilu0(sparse(A)))
LinearSolve.solve(p, KrylovJL_CG(; precs=ILUZeroPreconBuilder()))
```

## Rationale
Expand Down Expand Up @@ -94,27 +95,6 @@ triggering two index searches, one for `getindex!` and another one for `setindex

See [Julia issue #15630](https://github.com/JuliaLang/julia/issues/15630) for a discussion on this.

## Factorizations and Preconditioners

The package provides a common API for factorizations and preconditioners supporting
series of solutions of similar problem as they occur during nonlinear and transient solves.
For details, see the [corresponding documentation](https://WIAS-PDELib.github.io/ExtendableSparse.jl/stable/iter/).

With the advent of LinearSolve.jl, this functionality probably will be reduced to some core cases.

### Interfaces to other packages

The package directly provides interfaces to other sparse matrix solvers and preconditioners. Dependencies on these
packages are handled via [Requires.jl](https://github.com/JuliaPackaging/Requires.jl).
Currently, support includes:

- [Pardiso.jl](https://github.com/JuliaSparse/Pardiso.jl) (both ["project Pardiso"](https://pardiso-project.org)
and [MKL Pardiso](https://software.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-fortran/top/sparse-solver-routines/onemkl-pardiso-parallel-direct-sparse-solver-interface.html))
- [IncompleteLU.jl](https://github.com/haampie/IncompleteLU.jl)
- [AlgebraicMultigrid.jl](https://github.com/JuliaLinearAlgebra/AlgebraicMultigrid.jl) (Ruge-Stüben AMG)

For a similar approach, see [Preconditioners.jl](https://github.com/mohamed82008/Preconditioners.jl)

## Alternatives

You may also evaluate alternatives to this package:
Expand Down
7 changes: 2 additions & 5 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
ExtendableSparse = "95c220a8-a1cf-11e9-0c77-dbfce5f500b3"
ILUZero = "88f59080-6952-5380-9ea5-54057fb9a43f"
IncompleteLU = "40713840-3770-5561-ab4c-a76e7d0d7895"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153"
LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
MultiFloats = "bdf0d083-296b-4888-a5b6-7498122e68a5"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Sparspak = "e56a9233-b9d6-4f03-8d0f-1825330902ac"

[compat]
Documenter = "1.0"
IterativeSolvers = "0.9"
LinearSolve = "2.36.0"
10 changes: 5 additions & 5 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Documenter, ExtendableSparse, AlgebraicMultigrid, IncompleteLU, Sparspak, LinearAlgebra
using Documenter, ExtendableSparse, AlgebraicMultigrid, IncompleteLU, Sparspak, LinearAlgebra, SparseArrays, Base, InteractiveUtils

function mkdocs()
return makedocs(;
Expand All @@ -10,13 +10,13 @@ function mkdocs()
authors = "J. Fuhrmann",
repo = "https://github.com/WIAS-PDELib/ExtendableSparse.jl",
pages = [
"Home" => "index.md",
"Home" => "home.md",
"example.md",
"extsparse.md",
"extensions.md",
"linearsolve.md",
"internal.md",
"iter.md",
"changes.md",
"misc.md",
"index.md",
]
)
end
Expand Down
26 changes: 26 additions & 0 deletions docs/src/extensions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Matrix extensions

## AbstractSparseMatrixExtension
```@docs
ExtendableSparse.AbstractSparseMatrixExtension
```

## SparseMatrixLNK

```@autodocs
Modules = [ExtendableSparse]
Pages = ["sparsematrixlnk.jl"]
```

## SparseMatrixDILNKC

```@autodocs
Modules = [ExtendableSparse]
Pages = ["sparsematrixdilnkc.jl"]
```

## SparseMatrixDict
```@autodocs
Modules = [ExtendableSparse]
Pages = ["sparsematrixdict.jl"]
```
80 changes: 66 additions & 14 deletions docs/src/extsparse.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,79 @@
# Sparse matrix handling
# Extendable matrices
The type hierarchy of extendable matrices in this package is as follows:

## Matrix creation and update API
[`ExtendableSparse.AbstractExtendableSparseMatrixCSC`](@ref) `<: SparseArrays.AbstractSparseMatrixCSC <: SparseArrays.AbstractSparseMatrix <: AbstractMatrix`

The package defines two [subtypes](#Subtypes-of-AbstractExtendableSparseMatrixCSC) of [`ExtendableSparse.AbstractExtendableSparseMatrixCSC`](@ref) which are parametrized by types of [extension matrices](/extensions/#Matrix-extensions):
- [`ExtendableSparse.GenericExtendableSparseMatrixCSC`](@ref) for single threaded assembly
- [`ExtendableSparse.GenericMTExtendableSparseMatrixCSC`](@ref) for multithreaded assembly

User facing defaults are defined by [type aliases](#Type-aliases):
- `const MTExtendableSparseMatrixCSC = GenericMTExtendableSparseMatrixCSC{SparseMatrixDILNKC}`
- `const STExtendableSparseMatrixCSC = GenericExtendableSparseMatrixCSC{SparseMatrixLNK}`
- `const ExtendableSparseMatrixCSC = STExtendableSparseMatrixCSC`
- `const ExtendableSparseMatrix = ExtendableSparseMatrixCSC`

## Abstract type
```@docs
ExtendableSparse.AbstractExtendableSparseMatrixCSC
```
## Subtypes of AbstractExtendableSparseMatrixCSC
```@docs
ExtendableSparse.GenericExtendableSparseMatrixCSC
ExtendableSparse.GenericMTExtendableSparseMatrixCSC
```

## Type aliases
```@docs
MTExtendableSparseMatrixCSC
STExtendableSparseMatrixCSC
ExtendableSparseMatrixCSC
ExtendableSparseMatrix
```

```@autodocs
Modules = [ExtendableSparse]
Pages = ["extendable.jl"]

## Required methods
```@docs
SparseArrays.sparse
ExtendableSparse.rawupdateindex!
ExtendableSparse.flush!
ExtendableSparse.reset!
```

## AbstractSparseMatrixCSC interface
See [SparseArrways#395](https://github.com/JuliaSparse/SparseArrays.jl/pull/395) for a discussion.


```@docs
ExtendableSparse.lu
LinearAlgebra.lu!
SparseArrays.nnz
SparseArrays.nonzeros
SparseArrays.rowvals
SparseArrays.findnz
SparseArrays.dropzeros!
SparseArrays.getcolptr
SparseArrays.SparseMatrixCSC
Base.size
Base.eltype
Base.show
```

## Linear Algebra
```@docs
Base.:\
LinearAlgebra.ldiv!
LinearAlgebra.mul!
LinearAlgebra.norm
LinearAlgebra.opnorm
LinearAlgebra.cond
LinearAlgebra.issymmetric
```

## Algebraic operations
```@docs
Base.:+
Base.:-
Base.:*

```

## Handling of homogeneous Dirichlet BC
Expand All @@ -23,10 +82,3 @@ mark_dirichlet
eliminate_dirichlet!
eliminate_dirichlet
```

## Test matrix creation

```@autodocs
Modules = [ExtendableSparse]
Pages = ["sprand.jl"]
```
3 changes: 3 additions & 0 deletions docs/src/home.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```@docs
ExtendableSparse
```
10 changes: 1 addition & 9 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
````@eval
using Markdown
Markdown.parse("""
$(read("../../README.md",String))
""")
````


## Index
# Index
```@index
```
32 changes: 0 additions & 32 deletions docs/src/internal.md

This file was deleted.

Loading
Loading