From 58a2f07b05267a44a4c6273d6312c749ba73dca0 Mon Sep 17 00:00:00 2001 From: heister Date: Wed, 13 Feb 2013 15:35:05 +0000 Subject: [PATCH] do not simply compress() before an assignment, but fail instead. git-svn-id: https://svn.dealii.org/trunk@28380 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/lac/petsc_parallel_vector.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 -- 2.39.5