From: Wolfgang Bangerth Date: Wed, 27 Mar 2013 12:22:58 +0000 (+0000) Subject: Add a test that currently crashes. X-Git-Tag: v8.0.0~316^2~82 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f6d759199785afd1a44eb396d90223db33a74bc;p=dealii.git Add a test that currently crashes. git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@29063 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/mpi/trilinos_vector_ghosts_01.cc b/tests/mpi/trilinos_vector_ghosts_01.cc new file mode 100644 index 0000000000..d5a39eb601 --- /dev/null +++ b/tests/mpi/trilinos_vector_ghosts_01.cc @@ -0,0 +1,100 @@ +//--------------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2009, 2010, 2011, 2013 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//--------------------------------------------------------------------------- + + +// Test VectorTools::trilinos_vector_ghosts_01 for parallel computations. we +// interpolate a linear function onto the grid with a symmetric mesh. the mean +// value of the interpolation must be the mean of the linear function + +#include "../tests.h" +#include "coarse_grid_common.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + + +template +class LinearFunction : public Function +{ + public: + double value (const Point &p, + const unsigned int) const + { + return p[0] + 2; + } +}; + + +void test() +{ + parallel::distributed::Triangulation<2> tr(MPI_COMM_WORLD); + + GridGenerator::hyper_cube(tr); + tr.refine_global (2); + + const FE_Q<2> fe(2); + DoFHandler<2> dofh(tr); + dofh.distribute_dofs (fe); + + TrilinosWrappers::MPI::Vector interpolated(dofh.locally_owned_dofs(), + MPI_COMM_WORLD); + Assert (interpolated.has_ghost_elements() == false, + ExcInternalError()); +} + + +int main(int argc, char *argv[]) +{ +#ifdef DEAL_II_WITH_MPI + MPI_Init (&argc,&argv); +#else + (void)argc; + (void)argv; +#endif + + unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD); + + + deallog.push(Utilities::int_to_string(myid)); + + if (myid == 0) + { + std::ofstream logfile(output_file_for_mpi("trilinos_vector_ghosts_01").c_str()); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + } + + test(); + +#ifdef DEAL_II_WITH_MPI + MPI_Finalize(); +#endif +} diff --git a/tests/mpi/trilinos_vector_ghosts_01/ncpu_10/cmp/generic b/tests/mpi/trilinos_vector_ghosts_01/ncpu_10/cmp/generic new file mode 100644 index 0000000000..75c95df4c9 --- /dev/null +++ b/tests/mpi/trilinos_vector_ghosts_01/ncpu_10/cmp/generic @@ -0,0 +1,3 @@ + +DEAL:0:2d::mean=2.00000 +DEAL:0:3d::mean=2.00000 diff --git a/tests/mpi/trilinos_vector_ghosts_01/ncpu_4/cmp/generic b/tests/mpi/trilinos_vector_ghosts_01/ncpu_4/cmp/generic new file mode 100644 index 0000000000..75c95df4c9 --- /dev/null +++ b/tests/mpi/trilinos_vector_ghosts_01/ncpu_4/cmp/generic @@ -0,0 +1,3 @@ + +DEAL:0:2d::mean=2.00000 +DEAL:0:3d::mean=2.00000