From 52568ed52b77dd7ed3468d077c0ddad4e7518c98 Mon Sep 17 00:00:00 2001 From: JordiManyer Date: Sat, 2 Dec 2023 10:17:42 +1100 Subject: [PATCH 1/2] Bugfix: add_entry! for PSparseMatrices --- src/Algebra/AlgebraInterfaces.jl | 2 +- src/Algebra/SymSparseMatrixCSR.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Algebra/AlgebraInterfaces.jl b/src/Algebra/AlgebraInterfaces.jl index 45d18f6dc..3f313f9fb 100644 --- a/src/Algebra/AlgebraInterfaces.jl +++ b/src/Algebra/AlgebraInterfaces.jl @@ -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 diff --git a/src/Algebra/SymSparseMatrixCSR.jl b/src/Algebra/SymSparseMatrixCSR.jl index 6b8151099..b045f3887 100644 --- a/src/Algebra/SymSparseMatrixCSR.jl +++ b/src/Algebra/SymSparseMatrixCSR.jl @@ -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 From a639b11decec7032d6ed93a29f25b53d7b8f8832 Mon Sep 17 00:00:00 2001 From: JordiManyer Date: Sat, 2 Dec 2023 10:22:54 +1100 Subject: [PATCH 2/2] Updated NEWS --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index f10532d98..aa86ef2e5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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