From 9ef81b4d5df3dd93f80a285a889e958193aeeb61 Mon Sep 17 00:00:00 2001 From: bangerth Date: Wed, 6 Jul 2011 07:44:02 +0000 Subject: [PATCH] Add an assertion without which we probably compute garbage. git-svn-id: https://svn.dealii.org/trunk@23920 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/lac/constraint_matrix.cc | 7 +++++++ 1 file changed, 7 insertions(+) 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()); } -- 2.39.5