Skip to content

Commit 6a58169

Browse files
committed
update readme, version bump
1 parent 4948d5c commit 6a58169

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

Project.toml

+1-1
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 <[email protected]>"]
4-
version = "0.2.7"
4+
version = "0.3.0"
55

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

README.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,31 @@
88

99
Sparse matrix class with efficient successive insertion of entries and entry update.
1010

11-
Without an intermediate data structure, efficient successive insertion/update of possibly duplicate entries in random order into a standard compressed colume storage structure appears to be not possible. The package introduces `ExtendableSparseMatrix`, a delegating wrapper containing a Julia standard `SparseMatrixCSC` struct for performing linear algebra operations and a `SparseMatrixLNK` struct realising a linked list based (but realised in vectors) format collecting new entries.
11+
Without an intermediate data structure, efficient successive insertion/update of possibly duplicate entries in random order into a standard compressed column storage structure appears to be not possible. The package introduces `ExtendableSparseMatrix`, a delegating wrapper containing a Julia standard `SparseMatrixCSC` struct for performing linear algebra operations and a `SparseMatrixLNK` struct realising a linked list based (but realised in vectors) format collecting new entries.
1212

1313
The later is modeled after the linked list sparse matrix format described in the [whitepaper](https://www-users.cs.umn.edu/~saad/software/SPARSKIT/paper.ps) by Y. Saad. See also exercise P.3-16 in his [book](https://www-users.cs.umn.edu/~saad/IterMethBook_2ndEd.pdf).
1414

1515
Any linear algebra method on `ExtendableSparseMatrix` starts with a `flush!` method which adds the LNK entries and the existing CSC entries into a new CSC struct and resets the LNK struct.
1616

1717
`ExtendableSparseMatrix` is aimed to work as a drop-in replacement to `SparseMatrixCSC` in finite element and finite volume codes especally in those cases where the sparsity structure is hard to detect a priori and where working with an intermediadte COO representation appears to be not convenient.
1818

19+
In particular, it cooperates with [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) when it comes to the assembly of a sparse jacobian. For a function 'f!(y,x)' returning it's result in a vector `y`, one can use e.g.
20+
````
21+
x=...
22+
y=zeros(n)
23+
dresult=DiffResults.DiffResult(zeros(n),ExtendableSparseMatrix(n,n))
24+
x=ForwardDiff.jacobian!(dresult,f!,y,x)
25+
jac=DiffResults.jacobian(dresult)
26+
h=jac\x
27+
````
28+
1929
In addition, the package provides a method `updateindex!(A,op,v,i,j)` for both `SparseMatrixCSC` and for `ExtendableSparse` which allows to update a matrix element with one index search instead of two. It allows to replace e.g. `A[i,j]+=v` by `updateindex!(A,+,v,i,j)`. The former operation is lowered to
2030
````
2131
%1 = Base.getindex(A, 1, 2)
2232
%2 = %1 + 3
2333
Base.setindex!(A, %2, 1, 2)
2434
````
25-
triggering two index searches, one for `getindex!` and another one for `setindex!`.
35+
triggering two index searches, one for `getindex!` and another one for `setindex!`.
2636

2737

2838

docs/src/changes.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Changes
2+
## v0.3.0, April 10, 2020
3+
- Don't create new entry if the value to be assigned is zero, making things consistent with SparseMatrixCSC and ForwardDiff
4+
as suggested by @MaximilianJHuber
5+
26
## v0.2.5, Jan 26, 2020
37
- fixed allocations in Base.+
48
- added updateindex! method

0 commit comments

Comments
 (0)