From: Timo Heister Date: Wed, 13 Feb 2013 15:35:05 +0000 (+0000) Subject: do not simply compress() before an assignment, but fail instead. X-Git-Tag: v8.0.0~1307 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e5a4037cb23d69afd7cce21a0f4732bcce329fb;p=dealii.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