}
+
+ SparsityPattern::SparsityPattern (SparsityPattern &&other)
+ :
+ Subscriptor(std::move(other)),
+ column_space_map(std::move(other.column_space_map)),
+ graph(std::move(other.graph)),
+ nonlocal_graph(std::move(other.nonlocal_graph))
+ {}
+
+
// Copy function only works if the
// sparsity pattern is empty.
SparsityPattern::SparsityPattern (const SparsityPattern &input_sparsity)
--- /dev/null
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2017 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+
+#include "../tests.h"
+#include <deal.II/lac/trilinos_sparsity_pattern.h>
+#include <deal.II/base/utilities.h>
+
+int main (int argc, char **argv)
+{
+ initlog();
+
+ Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv, testing_max_num_threads());
+
+ IndexSet partitioning(3);
+
+ partitioning.add_range(0, 3);
+
+ // Add element (2,1) to the matrix
+ TrilinosWrappers::SparsityPattern A(partitioning);
+ A.add(2,1);
+ A.compress();
+
+ TrilinosWrappers::SparsityPattern B(std::move(A));
+ for (unsigned int i=0; i<3; ++i)
+ for (unsigned int j=0; j<3; ++j)
+ {
+ if ((i == 2) && (j == 1))
+ {
+ AssertThrow(B.exist(i,j) == true, ExcInternalError());
+ }
+ else
+ {
+ AssertThrow(B.exist(i,j) == false, ExcInternalError());
+ }
+ }
+
+ deallog << "OK" << std::endl;
+}