]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
do not simply compress() before an assignment, but fail instead.
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 13 Feb 2013 15:35:05 +0000 (15:35 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 13 Feb 2013 15:35:05 +0000 (15:35 +0000)
git-svn-id: https://svn.dealii.org/trunk@28380 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/lac/petsc_parallel_vector.cc

index 888f451a5a60691df26dbb54e1ed1cc5f4a7db1c..d0b3b27923a4366545792b1938ff780fade348a3 100644 (file)
@@ -164,9 +164,11 @@ namespace PETScWrappers
     Vector &
     Vector::operator = (const PETScWrappers::Vector &v)
     {
-      // first flush buffers
-      compress ();
-
+      Assert(last_action==VectorOperation::unknown,
+          ExcMessage("Call to compress() required before calling operator=."));
+      //TODO [TH]: can not access v.last_action here. Implement is_compressed()?
+      //Assert(v.last_action==VectorOperation::unknown,
+      //    ExcMessage("Call to compress() required before calling operator=."));
       int ierr;
 
       // get a pointer to the local memory of

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.