]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Two patches that are necessary for the upgrade to petsc 2.2.1
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 7 Oct 2004 19:48:52 +0000 (19:48 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 7 Oct 2004 19:48:52 +0000 (19:48 +0000)
git-svn-id: https://svn.dealii.org/branches/Branch-5-0@9698 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/petsc_matrix_base.cc
deal.II/lac/source/petsc_vector_base.cc

index de15e68d7c81eb66193bf002d82cf516af77cfb9..d297e8052746ff2575066b20b81472afb21943d0 100644 (file)
@@ -102,6 +102,12 @@ namespace PETScWrappers
   MatrixBase::operator = (const double d)
   {
     Assert (d==0, ExcScalarAssignmentOnlyForZeroValue());    
+
+                                     // flush previously cached elements. this
+                                     // seems to be necessary since petsc
+                                     // 2.2.1, at least for parallel vectors
+                                     // (see test bits/petsc_64)
+    compress ();
     
     const int ierr = MatZeroEntries (matrix);
     AssertThrow (ierr == 0, ExcPETScError(ierr));
index 1ddfb78601d178649b7f0254fd47c5499977b700..bf2c92031a7451df93e9cd8cd2dfd5b133fd7a5a 100644 (file)
@@ -121,6 +121,12 @@ namespace PETScWrappers
   VectorBase &
   VectorBase::operator = (const PetscScalar s)
   {
+                                     // flush previously cached elements. this
+                                     // seems to be necessary since petsc
+                                     // 2.2.1, at least for parallel vectors
+                                     // (see test bits/petsc_65)
+    compress ();
+    
     const int ierr = VecSet (&s, vector);
     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.