From: heister Date: Wed, 13 Feb 2013 15:35:05 +0000 (+0000) Subject: do not simply compress() before an assignment, but fail instead. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58a2f07b05267a44a4c6273d6312c749ba73dca0;p=dealii-svn.git do not simply compress() before an assignment, but fail instead. git-svn-id: https://svn.dealii.org/trunk@28380 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/lac/petsc_parallel_vector.cc b/deal.II/source/lac/petsc_parallel_vector.cc index 888f451a5a..d0b3b27923 100644 --- a/deal.II/source/lac/petsc_parallel_vector.cc +++ b/deal.II/source/lac/petsc_parallel_vector.cc @@ -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