From 9e45803aefaba1e7a9cfadcd643d1cf9130eb620 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Tue, 20 Dec 2022 17:45:56 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: David Wells --- doc/news/changes/minor/20221220StefanoZampini-b | 2 +- include/deal.II/lac/petsc_block_sparse_matrix.h | 2 +- source/lac/petsc_parallel_block_sparse_matrix.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/news/changes/minor/20221220StefanoZampini-b b/doc/news/changes/minor/20221220StefanoZampini-b index d49048b788..3d1e8e361e 100644 --- a/doc/news/changes/minor/20221220StefanoZampini-b +++ b/doc/news/changes/minor/20221220StefanoZampini-b @@ -1,3 +1,3 @@ New: PETScWrappers:BlockSparseMatrix now is also a PETSc MATNEST type.
-(StefanZampini, 2022/12/20) +(Stefano Zampini, 2022/12/20) diff --git a/include/deal.II/lac/petsc_block_sparse_matrix.h b/include/deal.II/lac/petsc_block_sparse_matrix.h index 8bb025586d..f62d718b2a 100644 --- a/include/deal.II/lac/petsc_block_sparse_matrix.h +++ b/include/deal.II/lac/petsc_block_sparse_matrix.h @@ -279,7 +279,7 @@ namespace PETScWrappers * particular, it should only be used for read-only operations into the * matrix. */ - operator Mat() const; + operator const Mat &() const; /** * Return a reference to the underlying PETSc type. It can be used to diff --git a/source/lac/petsc_parallel_block_sparse_matrix.cc b/source/lac/petsc_parallel_block_sparse_matrix.cc index d744d72f2b..49911c8dee 100644 --- a/source/lac/petsc_parallel_block_sparse_matrix.cc +++ b/source/lac/petsc_parallel_block_sparse_matrix.cc @@ -35,7 +35,7 @@ namespace PETScWrappers BlockSparseMatrix::~BlockSparseMatrix() { PetscErrorCode ierr = destroy_matrix(petsc_nest_matrix); - AssertThrow(ierr == 0, ExcPETScError(ierr)); + AssertNothrow(ierr == 0, ExcPETScError(ierr)); } # ifndef DOXYGEN -- 2.39.5