* @note This operator is only available if deal.II is configured with
* C++11 support.
*/
- BlockVector (BlockVector &&v)
- {
- swap(v);
- // be nice and reset v to zero
- v.reinit(0, v.get_mpi_communicator(), 0, 0, false);
- }
+ BlockVector (BlockVector &&v);
#endif
/**
#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. @p v is
- * left empty.
+ * @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)
- {
- swap(v);
- // be nice and reset v to zero
- v.reinit(0, v.get_mpi_communicator(), 0, 0, false);
-
- return *this;
- }
+ BlockVector &operator= (BlockVector &&v);
#endif
/**
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 ()
{}
* @note This operator is only available if deal.II is configured with
* C++11 support.
*/
- Vector (Vector &&v)
- {
- swap(v);
- // be nice and reset v to zero
- v.reinit(v.communicator, 0, 0, false);
- }
+ Vector (Vector &&v);
#endif
/**
#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. @p v is
- * left empty.
+ * @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)
- {
- swap(v);
- // be nice and reset v to zero
- v.reinit(v.communicator, 0, 0, false);
-
- return *this;
- }
+ Vector &operator= (Vector &&v);
#endif
/**
+#ifdef DEAL_II_WITH_CXX11
+ inline
+ Vector & Vector::operator= (Vector &&v)
+ {
+ swap(v);
+ return *this;
+ }
+#endif
+
+
+
template <typename number>
inline
Vector &
* @note This constructor is only available if deal.II is configured with
* C++11 support.
*/
- BlockVector (BlockVector &&v)
- {
- swap(v);
- v.reinit (0);
- }
+ BlockVector (BlockVector &&v);
#endif
/**
#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. @p v is
- * left empty.
+ * @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)
- {
- swap(v);
- // be nice and reset v to zero
- v.reinit (0);
-
- return *this;
- }
+ BlockVector &operator= (BlockVector &&v);
#endif
/**
+#ifdef DEAL_II_WITH_CXX11
+ inline
+ BlockVector::BlockVector (BlockVector &&v)
+ {
+ swap(v);
+ }
+#endif
+
+
+
inline
bool
BlockVector::is_compressed () const
* @note This constructor is only available if deal.II is configured with
* C++11 support.
*/
- Vector (Vector &&v)
- {
- swap(v);
- // be nice and reset v to zero
- v.clear();
- }
+ Vector (Vector &&v);
#endif
/**
#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. @p v is
- * left empty.
+ * @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)
- {
- swap(v);
- // be nice and reset v to zero
- v.clear();
-
- return *this;
- }
+ Vector &operator= (Vector &&v);
#endif
/**
// ---------------------------------------------------------------------
//
-// Copyright (C) 2004 - 2014 by the deal.II authors
+// Copyright (C) 2004 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
+#ifdef DEAL_II_WITH_CXX11
+ Vector::Vector (Vector &&v)
+ {
+ swap(v);
+ }
+#endif
+
+
+
Vector::Vector (const MPI_Comm &communicator,
const size_type n,
const size_type local_size)
// ---------------------------------------------------------------------
//
-// Copyright (C) 2008 - 2014 by the deal.II authors
+// Copyright (C) 2008 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
+#ifdef DEAL_II_WITH_CXX11
+ BlockVector &
+ BlockVector::operator= (BlockVector &&v)
+ {
+ swap(v);
+ return *this;
+ }
+#endif
+
+
+
BlockVector &
BlockVector::operator = (const ::dealii::TrilinosWrappers::BlockVector &v)
{
+#ifdef DEAL_II_WITH_CXX11
+ Vector::Vector (Vector &&v)
+ {
+ swap(v);
+ }
+#endif
+
+
+
Vector::Vector (const Epetra_Map &input_map,
const VectorBase &v)
:
+#ifdef DEAL_II_WITH_CXX11
+ Vector & Vector::operator= (Vector &&v)
+ {
+ swap(v);
+ return *this;
+ }
+#endif
+
+
+
Vector &
Vector::operator = (const TrilinosWrappers::Vector &v)
{
PRINTME("copy assignemnt", v);
PRINTME("old object", u);
+ v.clear();
v = std::move(u);
PRINTME("move assignemnt", v);
deallog << "old object size: " << u.size() << std::endl;
PRINTBLOCK("copy assignemnt", v);
PRINTBLOCK("old object", u);
+ v.reinit(0);
v = std::move(u);
PRINTBLOCK("move assignemnt", v);
deallog << "old object size: " << u.n_blocks() << std::endl;