*/
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 <tt>block_sizes.size()</tt>
* and initialize each block with <tt>block_sizes[i]</tt> zero elements.
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
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<IndexSet> ¶llel_partitioning,
const MPI_Comm &communicator)
return *this;
}
-#ifdef DEAL_II_WITH_CXX11
- inline
- BlockVector &
- BlockVector::operator= (BlockVector &&v)
- {
- swap(v);
- return *this;
- }
-#endif
-
inline
BlockVector::~BlockVector ()
{}
*/
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.
*/
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
-#ifdef DEAL_II_WITH_CXX11
- inline
- Vector &Vector::operator= (Vector &&v)
- {
- swap(v);
- return *this;
- }
-#endif
-
-
-
template <typename number>
inline
Vector &
-#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)