From: David Wells <wellsd2@rpi.edu>
Date: Mon, 22 May 2017 19:19:55 +0000 (-0400)
Subject: Add tests for update_ghost_values.
X-Git-Tag: v9.0.0-rc1~1579^2
X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4563515c54d5bd96b35e28e89bfe2aca4b7169f;p=dealii.git

Add tests for update_ghost_values.

These functions need to exist (for PETSc and Trilinos vectors and block
vectors) but should not do anything.
---

diff --git a/tests/petsc/update_ghosts.cc b/tests/petsc/update_ghosts.cc
new file mode 100644
index 0000000000..35d55a718b
--- /dev/null
+++ b/tests/petsc/update_ghosts.cc
@@ -0,0 +1,34 @@
+// ---------------------------------------------------------------------
+//
+// 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/petsc_parallel_block_vector.h>
+
+// Check that the base class vector and also the block vector class support
+// update_ghost_values. This method doesn't do anything but is needed for
+// genericity.
+
+int main(int argc, char **argv)
+{
+  using namespace dealii;
+  Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv, 1);
+
+  initlog();
+  PETScWrappers::VectorBase v;
+  v.update_ghost_values();
+  PETScWrappers::MPI::BlockVector bv;
+  bv.update_ghost_values();
+  deallog << "OK" << std::endl;
+}
diff --git a/tests/petsc/update_ghosts.output b/tests/petsc/update_ghosts.output
new file mode 100644
index 0000000000..0fd8fc12f0
--- /dev/null
+++ b/tests/petsc/update_ghosts.output
@@ -0,0 +1,2 @@
+
+DEAL::OK
diff --git a/tests/trilinos/update_ghosts.cc b/tests/trilinos/update_ghosts.cc
new file mode 100644
index 0000000000..053de4453d
--- /dev/null
+++ b/tests/trilinos/update_ghosts.cc
@@ -0,0 +1,35 @@
+// ---------------------------------------------------------------------
+//
+// 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_parallel_block_vector.h>
+
+
+// Check that the base class vector and also the block vector class support
+// update_ghost_values. This method doesn't do anything but is needed for
+// genericity.
+
+int main(int argc, char **argv)
+{
+  using namespace dealii;
+  Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv, 1);
+
+  initlog();
+  TrilinosWrappers::VectorBase v;
+  v.update_ghost_values();
+  TrilinosWrappers::MPI::BlockVector bv;
+  bv.update_ghost_values();
+  deallog << "OK" << std::endl;
+}
diff --git a/tests/trilinos/update_ghosts.output b/tests/trilinos/update_ghosts.output
new file mode 100644
index 0000000000..0fd8fc12f0
--- /dev/null
+++ b/tests/trilinos/update_ghosts.output
@@ -0,0 +1,2 @@
+
+DEAL::OK