From f4563515c54d5bd96b35e28e89bfe2aca4b7169f Mon Sep 17 00:00:00 2001 From: David Wells Date: Mon, 22 May 2017 15:19:55 -0400 Subject: [PATCH] Add tests for update_ghost_values. These functions need to exist (for PETSc and Trilinos vectors and block vectors) but should not do anything. --- tests/petsc/update_ghosts.cc | 34 ++++++++++++++++++++++++++++ tests/petsc/update_ghosts.output | 2 ++ tests/trilinos/update_ghosts.cc | 35 +++++++++++++++++++++++++++++ tests/trilinos/update_ghosts.output | 2 ++ 4 files changed, 73 insertions(+) create mode 100644 tests/petsc/update_ghosts.cc create mode 100644 tests/petsc/update_ghosts.output create mode 100644 tests/trilinos/update_ghosts.cc create mode 100644 tests/trilinos/update_ghosts.output 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 + +// 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 + + +// 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 -- 2.39.5