From: bangerth Date: Wed, 6 Jul 2011 07:44:02 +0000 (+0000) Subject: Add an assertion without which we probably compute garbage. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ef81b4d5df3dd93f80a285a889e958193aeeb61;p=dealii-svn.git Add an assertion without which we probably compute garbage. git-svn-id: https://svn.dealii.org/trunk@23920 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/lac/constraint_matrix.cc b/deal.II/source/lac/constraint_matrix.cc index b3e01a6663..09c327f9ea 100644 --- a/deal.II/source/lac/constraint_matrix.cc +++ b/deal.II/source/lac/constraint_matrix.cc @@ -1843,6 +1843,8 @@ template<> void ConstraintMatrix::distribute (TrilinosWrappers::MPI::Vector &vec) const { + Assert (sorted==true, ExcMatrixIsClosed()); + //TODO: not implemented yet, we need to fix //LocalRange() first to only include //"owned" indices. For this we need to keep @@ -1928,6 +1930,8 @@ template<> void ConstraintMatrix::distribute (TrilinosWrappers::MPI::BlockVector &vec) const { + Assert (sorted==true, ExcMatrixIsClosed()); + IndexSet my_indices (vec.size()); for (unsigned int block=0; block void ConstraintMatrix::distribute (PETScWrappers::MPI::Vector &vec) const { + Assert (sorted==true, ExcMatrixIsClosed()); + typedef std::vector::const_iterator constraint_iterator; ConstraintLine index_comparison; index_comparison.line = vec.local_range().first; @@ -2097,6 +2103,7 @@ template<> void ConstraintMatrix::distribute (PETScWrappers::MPI::BlockVector &/*vec*/) const { + Assert (sorted==true, ExcMatrixIsClosed()); AssertThrow (false, ExcNotImplemented()); }