From: Ralf Hartmann Date: Mon, 24 May 2004 14:54:15 +0000 (+0000) Subject: In operator = function we need to compress before we call MatZeroEntries. X-Git-Tag: v8.0.0~15140 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f190752e3af1aa60b3014e1560244918774f078;p=dealii.git In operator = function we need to compress before we call MatZeroEntries. git-svn-id: https://svn.dealii.org/trunk@9302 0785d39b-7218-0410-832d-ea1e28bc413d --- 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));