]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
In operator = function we need to compress before we call MatZeroEntries.
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 24 May 2004 14:55:27 +0000 (14:55 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 24 May 2004 14:55:27 +0000 (14:55 +0000)
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

index 6f6ae79eb47667d1d6db8454caa979c0ebfcccef..2de5b4a5ace5c6b4d050f4574cbbc6090fab984d 100644 (file)
@@ -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));

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.