From: heister Date: Sun, 26 May 2013 22:12:24 +0000 (+0000) Subject: document bug in ConstraintMatrix::distribute() X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afa200f0e86dceca69818aa8725726a75a60ac03;p=dealii-svn.git document bug in ConstraintMatrix::distribute() git-svn-id: https://svn.dealii.org/trunk@29628 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/mpi/trilinos_distribute_03.cc b/tests/mpi/trilinos_distribute_03.cc new file mode 100644 index 0000000000..43eb49104c --- /dev/null +++ b/tests/mpi/trilinos_distribute_03.cc @@ -0,0 +1,76 @@ +//--------------------------------------------------------------------------- +// $Id: trilinos_distribute_02.cc 29593 2013-05-25 12:29:14Z bangerth $ +// Version: $Name$ +// +// Copyright (C) 2009, 2010, 2012, 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. +// +//--------------------------------------------------------------------------- + + +// document bug in the new ConstraintMatrix::distribute() from r29593 +// if one vector owns all DoFs, then distribute() hangs. + +#include "../tests.h" +#include +#include +#include + +#include +#include + + + +void test() +{ + const unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD); + const unsigned int n_processes = Utilities::MPI::n_mpi_processes (MPI_COMM_WORLD); + + // create a vector that consists of elements indexed from 0 to 100 + // everything belongs to proc 0 + IndexSet idx(100); + if (myid==0) + idx.add_range(0,100); + + TrilinosWrappers::MPI::Vector vec (idx, MPI_COMM_WORLD); + + for (unsigned int i=vec.local_range().first; i