]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add tests for update_ghost_values. 4410/head
authorDavid Wells <wellsd2@rpi.edu>
Mon, 22 May 2017 19:19:55 +0000 (15:19 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Tue, 23 May 2017 18:51:37 +0000 (14:51 -0400)
These functions need to exist (for PETSc and Trilinos vectors and block
vectors) but should not do anything.

tests/petsc/update_ghosts.cc [new file with mode: 0644]
tests/petsc/update_ghosts.output [new file with mode: 0644]
tests/trilinos/update_ghosts.cc [new file with mode: 0644]
tests/trilinos/update_ghosts.output [new file with mode: 0644]

diff --git a/tests/petsc/update_ghosts.cc b/tests/petsc/update_ghosts.cc
new file mode 100644 (file)
index 0000000..35d55a7
--- /dev/null
@@ -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 (file)
index 0000000..0fd8fc1
--- /dev/null
@@ -0,0 +1,2 @@
+
+DEAL::OK
diff --git a/tests/trilinos/update_ghosts.cc b/tests/trilinos/update_ghosts.cc
new file mode 100644 (file)
index 0000000..053de44
--- /dev/null
@@ -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 (file)
index 0000000..0fd8fc1
--- /dev/null
@@ -0,0 +1,2 @@
+
+DEAL::OK

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.