From: Timo Heister Date: Sun, 26 May 2013 22:14:22 +0000 (+0000) Subject: That test looked pretty broken to me. X-Git-Tag: v8.0.0~408 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7b56a13327f9f9b2e6e4b4c94044134dcaf0438;p=dealii.git That test looked pretty broken to me. git-svn-id: https://svn.dealii.org/trunk@29629 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/mpi/trilinos_distribute_02.cc b/tests/mpi/trilinos_distribute_02.cc index c597c33182..bc0ab1f2de 100644 --- a/tests/mpi/trilinos_distribute_02.cc +++ b/tests/mpi/trilinos_distribute_02.cc @@ -12,7 +12,7 @@ //--------------------------------------------------------------------------- -// check ConstraintMatrix.distribute() for a petsc vector +// check ConstraintMatrix.distribute() for a trilinos vector // // we do this by creating a vector where each processor has 100 // elements but no ghost elements. then we add constraints on each @@ -34,7 +34,7 @@ #include "../tests.h" #include -#include +#include #include #include @@ -48,13 +48,18 @@ void test() const unsigned int n_processes = Utilities::MPI::n_mpi_processes (MPI_COMM_WORLD); // create a vector that consists of elements indexed from 0 to n - PETScWrappers::MPI::Vector vec (MPI_COMM_WORLD, 100 * n_processes, 100); + TrilinosWrappers::MPI::Vector vec; + { + IndexSet is (100*n_processes); + is.add_range (100*myid, 100*myid+100); + vec.reinit (is, MPI_COMM_WORLD); + } Assert (vec.local_size() == 100, ExcInternalError()); Assert (vec.local_range().first == 100*myid, ExcInternalError()); Assert (vec.local_range().second == 100*myid+100, ExcInternalError()); for (unsigned int i=vec.local_range().first; i