]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
return from ConstraintMatrix::close() in case of a cycle so we can test this.
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 29 Aug 2012 21:27:03 +0000 (21:27 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 29 Aug 2012 21:27:03 +0000 (21:27 +0000)
git-svn-id: https://svn.dealii.org/trunk@26168 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/lac/constraint_matrix.cc

index dd99a2e5049d8a5c748473ce6b49b2984acd98e4..abc67f62257a734ce6ce1bb78a787d018e3ef7dc 100644 (file)
@@ -386,6 +386,8 @@ void ConstraintMatrix::close ()
                     // there are constraints or dofs in our system, we must have a cycle.
                     ++n_replacements;
                     Assert(n_replacements/2<largest_idx, ExcMessage("Cycle in constraints detected!"));
+                    if (n_replacements/2>=largest_idx)
+                      return; // this enables us to test for this Exception.
 #endif
                   }
                 else

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.