From 7b2d9a9809548c1581efaa9a16840e9454ddf103 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Wed, 21 Dec 2022 12:30:29 +0100 Subject: [PATCH] Support and test assembling of rectangular matrices. --- CHANGELOG.md | 5 +++++ test/runtests.jl | 3 +++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d03a4b..1ce7b08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added + - Rectangular matrices can now be assembled by the new method + `HYPRE.assemble!(::HYPREMatrixAssembler, i::Vector, j::Vector, a::Matrix)` where `i` are + the rows and `j` the columns. ([#7][github-7]) ### Deprecated - The method `HYPRE.assemble!(A::HYPREMatrixAssembler, ij::Vector, a::Matrix)` have been deprecated in favor of `HYPRE.assemble!(A::HYPREMatrixAssembler, i::Vector, j::Vector, @@ -32,6 +36,7 @@ Initial release of HYPRE.jl. [github-2]: https://github.com/fredrikekre/HYPRE.jl/pull/2 [github-5]: https://github.com/fredrikekre/HYPRE.jl/pull/5 [github-6]: https://github.com/fredrikekre/HYPRE.jl/pull/6 +[github-7]: https://github.com/fredrikekre/HYPRE.jl/pull/7 [1.0.0]: https://github.com/fredrikekre/HYPRE.jl/releases/tag/v1.0.0 [1.1.0]: https://github.com/fredrikekre/HYPRE.jl/compare/v1.0.0...v1.1.0 diff --git a/test/runtests.jl b/test/runtests.jl index 868b43f..d10063d 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -310,6 +310,9 @@ end a = rand(2, 2) HYPRE.assemble!(assembler, idx, idx, a) AM[idx, idx] += a + ar = rand(1, 2) + HYPRE.assemble!(assembler, [2], idx, ar) + AM[[2], idx] += ar end f = HYPRE.finish_assemble!(assembler) @test f === A