Skip to content

Commit

Permalink
Merge pull request #959 from gridap/bugfix_add_entry
Browse files Browse the repository at this point in the history
Bugfix: add_entry! for PSparseMatrices
  • Loading branch information
amartinhuertas authored Dec 2, 2023
2 parents 4a76c17 + a639b11 commit cc54283
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- `BlockMultiFieldStyle` available for `TransientMultiFieldFESpaces` since PR [#946](https://github.com/gridap/Gridap.jl/pull/946).
- When creating `DiscreteModelPortions`, some of the `FaceLabeling` arrays were being aliased. This caused issues when adding tags to distributed models in debug mode. Since PR [#956](https://github.com/gridap/Gridap.jl/pull/956).
- Function `add_entry!` was inconsistent for `AbstractMatrix` and `AbstractSparseMatrix`. Since PR[#959](https://github.com/gridap/Gridap.jl/pull/959).

## [0.17.20] - 2023-10-01

Expand Down
2 changes: 1 addition & 1 deletion src/Algebra/AlgebraInterfaces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ function add_entry!(combine::Function,A::AbstractSparseMatrix,v::Number,i,j)
k = nz_index(A,i,j)
nz = nonzeros(A)
Aij = nz[k]
nz[k] = combine(v,Aij)
nz[k] = combine(Aij,v)
A
end

Expand Down
2 changes: 1 addition & 1 deletion src/Algebra/SymSparseMatrixCSR.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function add_entry!(combine::Function,A::SymSparseMatrixCSR,v::Number,i,j)
k = nz_index(A,i,j)
nz = nonzeros(A)
Aij = nz[k]
nz[k] = combine(v,Aij)
nz[k] = combine(Aij,v)
end
A
end
Expand Down

0 comments on commit cc54283

Please sign in to comment.