From 6f4d7732a5cfb9bf51223653644fc97859c6d735 Mon Sep 17 00:00:00 2001 From: hartmann Date: Mon, 24 May 2004 14:55:27 +0000 Subject: [PATCH] In operator = function we need to compress before we call MatZeroEntries. git-svn-id: https://svn.dealii.org/branches/Branch-5-0@9303 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/source/petsc_matrix_base.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deal.II/lac/source/petsc_matrix_base.cc b/deal.II/lac/source/petsc_matrix_base.cc index 6f6ae79eb4..2de5b4a5ac 100644 --- a/deal.II/lac/source/petsc_matrix_base.cc +++ b/deal.II/lac/source/petsc_matrix_base.cc @@ -101,7 +101,11 @@ namespace PETScWrappers MatrixBase & MatrixBase::operator = (const double d) { - Assert (d==0, ExcScalarAssignmentOnlyForZeroValue()); + Assert (d==0, ExcScalarAssignmentOnlyForZeroValue()); + // first flush the buffers as + // this is not done by + // MatZeroEntries + compress(); const int ierr = MatZeroEntries (matrix); AssertThrow (ierr == 0, ExcPETScError(ierr)); -- 2.39.5