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
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);
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)
--------------------------------------------------------
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)
--------------------------------------------------------