From: Matthias Maier Date: Mon, 4 May 2015 12:39:04 +0000 (+0200) Subject: Remove move operators and constructors from PETSc variants X-Git-Tag: v8.3.0-rc1~202^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c211f1aa3f3b57587841eb24e825b2d36c454a9;p=dealii.git Remove move operators and constructors from PETSc variants --- diff --git a/include/deal.II/lac/petsc_parallel_block_vector.h b/include/deal.II/lac/petsc_parallel_block_vector.h index 24b435a984..92524109a5 100644 --- a/include/deal.II/lac/petsc_parallel_block_vector.h +++ b/include/deal.II/lac/petsc_parallel_block_vector.h @@ -105,17 +105,6 @@ namespace PETScWrappers */ BlockVector (const BlockVector &V); -#ifdef DEAL_II_WITH_CXX11 - /** - * Move constructor. Creates a new vector by stealing the internal data - * of the vector @p v. - * - * @note This operator is only available if deal.II is configured with - * C++11 support. - */ - BlockVector (BlockVector &&v); -#endif - /** * Constructor. Set the number of blocks to block_sizes.size() * and initialize each block with block_sizes[i] zero elements. @@ -160,17 +149,6 @@ namespace PETScWrappers BlockVector & operator= (const BlockVector &V); -#ifdef DEAL_II_WITH_CXX11 - /** - * Move the given vector. This operator replaces the present vector with - * @p v by efficiently swapping the internal data structures. - * - * @note This operator is only available if deal.II is configured with - * C++11 support. - */ - BlockVector &operator= (BlockVector &&v); -#endif - /** * Copy the given sequential (non-distributed) block vector into the * present parallel block vector. It is assumed that they have the same @@ -358,14 +336,6 @@ namespace PETScWrappers this->components[i] = v.components[i]; } -#ifdef DEAL_II_WITH_CXX11 - inline - BlockVector::BlockVector (BlockVector &&v) - { - swap(v); - } -#endif - inline BlockVector::BlockVector (const std::vector ¶llel_partitioning, const MPI_Comm &communicator) @@ -409,16 +379,6 @@ namespace PETScWrappers return *this; } -#ifdef DEAL_II_WITH_CXX11 - inline - BlockVector & - BlockVector::operator= (BlockVector &&v) - { - swap(v); - return *this; - } -#endif - inline BlockVector::~BlockVector () {} diff --git a/include/deal.II/lac/petsc_parallel_vector.h b/include/deal.II/lac/petsc_parallel_vector.h index ea6137f65d..1b987c3417 100644 --- a/include/deal.II/lac/petsc_parallel_vector.h +++ b/include/deal.II/lac/petsc_parallel_vector.h @@ -185,21 +185,6 @@ namespace PETScWrappers */ Vector (); -#ifdef DEAL_II_WITH_CXX11 - // explicitly declare default variant, such that below move constructor - // does not dissallow it - Vector (const Vector &) = default; - - /** - * Move constructor. Creates a new vector by stealing the internal data - * of the vector @p v. - * - * @note This operator is only available if deal.II is configured with - * C++11 support. - */ - Vector (Vector &&v); -#endif - /** * Constructor. Set dimension to @p n and initialize all elements with * zero. @@ -283,17 +268,6 @@ namespace PETScWrappers */ Vector &operator= (const Vector &v); -#ifdef DEAL_II_WITH_CXX11 - /** - * Move the given vector. This operator replaces the present vector with - * @p v by efficiently swapping the internal data structures. - * - * @note This operator is only available if deal.II is configured with - * C++11 support. - */ - Vector &operator= (Vector &&v); -#endif - /** * Copy the given sequential (non-distributed) vector into the present * parallel vector. It is assumed that they have the same size, and this @@ -552,17 +526,6 @@ namespace PETScWrappers -#ifdef DEAL_II_WITH_CXX11 - inline - Vector &Vector::operator= (Vector &&v) - { - swap(v); - return *this; - } -#endif - - - template inline Vector & diff --git a/source/lac/petsc_parallel_vector.cc b/source/lac/petsc_parallel_vector.cc index c6d0749f31..87fde1ad6e 100644 --- a/source/lac/petsc_parallel_vector.cc +++ b/source/lac/petsc_parallel_vector.cc @@ -41,23 +41,6 @@ namespace PETScWrappers -#ifdef DEAL_II_WITH_CXX11 - Vector::Vector (Vector &&v) - { - // this is an invalid empty vector, so we can just as well create a - // sequential one to avoid all the overhead incurred by parallelism - const int n = 0; - const int ierr - = VecCreateSeq (PETSC_COMM_SELF, n, &vector); - AssertThrow (ierr == 0, ExcPETScError(ierr)); - ghosted = false; - - swap(v); - } -#endif - - - Vector::Vector (const MPI_Comm &communicator, const size_type n, const size_type local_size)