]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add an assertion without which we probably compute garbage.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 6 Jul 2011 07:44:02 +0000 (07:44 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 6 Jul 2011 07:44:02 +0000 (07:44 +0000)
git-svn-id: https://svn.dealii.org/trunk@23920 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/lac/constraint_matrix.cc

index b3e01a6663ce598519f5789a66a6bd3d16a3e9ca..09c327f9ea5eda4e6b45b30ef3c0442b851634b9 100644 (file)
@@ -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<vec.n_blocks(); ++block)
     {
@@ -2030,6 +2034,8 @@ template<>
 void
 ConstraintMatrix::distribute (PETScWrappers::MPI::Vector &vec) const
 {
+  Assert (sorted==true, ExcMatrixIsClosed());
+
   typedef std::vector<ConstraintLine>::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());
 }
 

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.