]> 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:46:57 +0000 (19:46 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 7 Oct 2004 19:46:57 +0000 (19:46 +0000)
git-svn-id: https://svn.dealii.org/trunk@9697 0785d39b-7218-0410-832d-ea1e28bc413d

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

index e99ebf9ecf09b9c7fdd05f78a849235beb8c741c..29fefb2181dd76902f9dd05862a46246890908fa 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 83a2ea5765bcf7f2ed62835469cff15d58af8bfa..efc9e3e99d4d70555682b5e26c4c27f0cb3fe49d 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.