From: heister Date: Tue, 16 Jul 2013 18:32:49 +0000 (+0000) Subject: fix tests X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e10c8728feaa621de2ff91ff8308d6f8a4a84dba;p=dealii-svn.git fix tests git-svn-id: https://svn.dealii.org/trunk@30016 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/gla/block_mat_01.cc b/tests/gla/block_mat_01.cc index 119fe5a3d5..12b6b59f42 100644 --- a/tests/gla/block_mat_01.cc +++ b/tests/gla/block_mat_01.cc @@ -70,7 +70,7 @@ void test () matrix.add(1,1,1.3); - matrix.compress(); + matrix.compress(VectorOperation::add); if (myid==0) { diff --git a/tests/gla/gla.h b/tests/gla/gla.h index d071575836..1e0a53a057 100644 --- a/tests/gla/gla.h +++ b/tests/gla/gla.h @@ -36,17 +36,20 @@ class LA_Dummy class Vector { public: + + Vector() + {} - Vector(const IndexSet local, const MPI_Comm &comm=MPI_COMM_WORLD) + Vector(const IndexSet local, const MPI_Comm &comm) {} - Vector(const IndexSet &local, const IndexSet &ghost, const MPI_Comm &comm=MPI_COMM_WORLD) + Vector(const IndexSet &local, const IndexSet &ghost, const MPI_Comm &comm) {} - void reinit(const IndexSet local, const MPI_Comm &comm=MPI_COMM_WORLD) + void reinit(const IndexSet local, const MPI_Comm &comm) {} - void reinit(const IndexSet local, const IndexSet &ghost, const MPI_Comm &comm=MPI_COMM_WORLD) + void reinit(const IndexSet local, const IndexSet &ghost, const MPI_Comm &comm) {} void compress(VectorOperation::values op) diff --git a/tests/gla/vec_00.cc b/tests/gla/vec_00.cc index 7b672cd99f..02bf8a99c5 100644 --- a/tests/gla/vec_00.cc +++ b/tests/gla/vec_00.cc @@ -49,24 +49,13 @@ void test () { - //implicit communicator: - typename LA::MPI::Vector v1(local_active); - Assert(!v1.has_ghost_elements(), ExcInternalError()); - Assert(v1.size()==numproc*2, ExcInternalError()); - - v1.reinit(something); - Assert(!v1.has_ghost_elements(), ExcInternalError()); - Assert(v1.size()==100, ExcInternalError()); - - v1.reinit(local_active, local_relevant); - Assert(v1.has_ghost_elements(), ExcInternalError()); - Assert(v1.size()==numproc*2, ExcInternalError()); + typename LA::MPI::Vector v1; v1.reinit(something, MPI_COMM_WORLD); Assert(!v1.has_ghost_elements(), ExcInternalError()); Assert(v1.size()==100, ExcInternalError()); - typename LA::MPI::Vector v2(local_active, local_relevant); + typename LA::MPI::Vector v2(local_active, local_relevant, MPI_COMM_WORLD); Assert(v2.has_ghost_elements(), ExcInternalError()); Assert(v2.size()==numproc*2, ExcInternalError()); diff --git a/tests/gla/vec_01.cc b/tests/gla/vec_01.cc index 3304b9382a..b780218407 100644 --- a/tests/gla/vec_01.cc +++ b/tests/gla/vec_01.cc @@ -40,14 +40,6 @@ void test () local_active.add_range(myid*2,myid*2+2); IndexSet local_relevant(numproc*2); local_relevant.add_range(1,2); - - { - //implicit communicator: - typename LA::MPI::Vector v1(local_active); - typename LA::MPI::Vector v2(local_active, local_relevant); - Assert(!v1.has_ghost_elements(), ExcInternalError()); - Assert(v2.has_ghost_elements(), ExcInternalError()); - } typename LA::MPI::Vector vb(local_active, MPI_COMM_WORLD); typename LA::MPI::Vector v(local_active, local_relevant, MPI_COMM_WORLD); diff --git a/tests/gla/vec_02.cc b/tests/gla/vec_02.cc index 766738ce92..da40836c51 100644 --- a/tests/gla/vec_02.cc +++ b/tests/gla/vec_02.cc @@ -41,9 +41,9 @@ void test () IndexSet local_relevant(numproc*2); local_relevant.add_range(1,2); - typename LA::MPI::Vector vb(local_active); - typename LA::MPI::Vector v(local_active, local_relevant); - typename LA::MPI::Vector v2(local_active, local_relevant); + typename LA::MPI::Vector vb(local_active, MPI_COMM_WORLD); + typename LA::MPI::Vector v(local_active, local_relevant, MPI_COMM_WORLD); + typename LA::MPI::Vector v2(local_active, local_relevant, MPI_COMM_WORLD); vb = 1.0; v2 = vb; diff --git a/tests/gla/vec_03.cc b/tests/gla/vec_03.cc index ef797088e8..2a7c732f50 100644 --- a/tests/gla/vec_03.cc +++ b/tests/gla/vec_03.cc @@ -42,8 +42,8 @@ void test () IndexSet local_relevant(numproc*2); local_relevant.add_range(1,2); - typename LA::MPI::Vector vb(local_active); - typename LA::MPI::Vector v(local_active, local_relevant); + typename LA::MPI::Vector vb(local_active, MPI_COMM_WORLD); + typename LA::MPI::Vector v(local_active, local_relevant, MPI_COMM_WORLD); vb = 1.0;