]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix test.
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 31 May 2013 12:49:55 +0000 (12:49 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 31 May 2013 12:49:55 +0000 (12:49 +0000)
git-svn-id: https://svn.dealii.org/trunk@29681 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/constraint_matrix.templates.h
tests/mpi/constraint_matrix_trilinos_bug.cc
tests/mpi/constraint_matrix_trilinos_bug/ncpu_10/cmp/generic
tests/mpi/constraint_matrix_trilinos_bug/ncpu_4/cmp/generic

index 24063ce28cfdcc14e39a3e8addfb65635d3df940..7bd390272efe7832b14e62cebd647b4452715414 100644 (file)
@@ -989,8 +989,17 @@ namespace internal
                                        TrilinosWrappers::MPI::Vector       &output,
                                        const internal::bool2type<false>     /*is_block_vector*/)
     {
-      output.reinit (needed_elements,
-                     dynamic_cast<const Epetra_MpiComm *>(&vec.vector_partitioner().Comm())->GetMpiComm());
+      Assert(!vec.has_ghost_elements(),
+             typename TrilinosWrappers::VectorBase::ExcGhostsPresent());
+#ifdef DEAL_II_WITH_MPI
+      const Epetra_MpiComm *mpi_comm
+        = dynamic_cast<const Epetra_MpiComm *>(&vec.trilinos_vector().Comm());
+
+      Assert (mpi_comm != 0, ExcInternalError());
+      output.reinit (needed_elements, mpi_comm->GetMpiComm());
+#else
+      output.reinit (needed_elements, MPI_COMM_WORLD);
+#endif
       output = vec;
     }
 #endif
index e0c397d24aae2418f4664cd1919aa0f32600e5fd..a8c7445d5e0c0e409904dd95dd570a2499895e53 100644 (file)
@@ -78,9 +78,6 @@ void test()
 
   IndexSet owned_set = dofh.locally_owned_dofs();
 
-  IndexSet dof_set;
-  DoFTools::extract_locally_active_dofs (dofh, dof_set);
-
   IndexSet relevant_set;
   DoFTools::extract_locally_relevant_dofs (dofh, relevant_set);
 
index c3ced6c764dc30aef04316912352721e30023995..03bf519fa3ce5580731df5e74bd006d3c1287f64 100644 (file)
@@ -1,12 +1,12 @@
 
 DEAL:0:2d::Exception: 
 --------------------------------------------------------
-An error occurred in file <trilinos_vector_base.h> in function
-    void dealii::TrilinosWrappers::VectorBase::set(unsigned int, const unsigned int*, const double*)
+An error occurred in file <constraint_matrix.templates.h> in function
+    void dealii::internal::{anonymous}::import_vector_with_ghost_elements(const dealii::TrilinosWrappers::MPI::Vector&, const dealii::IndexSet&, const dealii::IndexSet&, dealii::TrilinosWrappers::MPI::Vector&, dealii::internal::bool2type<false>)
 The violated condition was: 
-    !has_ghost_elements()
+    !vec.has_ghost_elements()
 The name and call sequence of the exception was:
-    ExcGhostsPresent()
+    typename TrilinosWrappers::VectorBase::ExcGhostsPresent()
 Additional Information: 
 (none)
 --------------------------------------------------------
index c3ced6c764dc30aef04316912352721e30023995..03bf519fa3ce5580731df5e74bd006d3c1287f64 100644 (file)
@@ -1,12 +1,12 @@
 
 DEAL:0:2d::Exception: 
 --------------------------------------------------------
-An error occurred in file <trilinos_vector_base.h> in function
-    void dealii::TrilinosWrappers::VectorBase::set(unsigned int, const unsigned int*, const double*)
+An error occurred in file <constraint_matrix.templates.h> in function
+    void dealii::internal::{anonymous}::import_vector_with_ghost_elements(const dealii::TrilinosWrappers::MPI::Vector&, const dealii::IndexSet&, const dealii::IndexSet&, dealii::TrilinosWrappers::MPI::Vector&, dealii::internal::bool2type<false>)
 The violated condition was: 
-    !has_ghost_elements()
+    !vec.has_ghost_elements()
 The name and call sequence of the exception was:
-    ExcGhostsPresent()
+    typename TrilinosWrappers::VectorBase::ExcGhostsPresent()
 Additional Information: 
 (none)
 --------------------------------------------------------

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.