]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add an assertion
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 18 Sep 2006 19:57:12 +0000 (19:57 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 18 Sep 2006 19:57:12 +0000 (19:57 +0000)
git-svn-id: https://svn.dealii.org/trunk@13923 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/dofs/dof_constraints.h

index 2f7321cf6516dee075975bfb7a5ae3f51dca4bcf..611a97af0225db0e6c9b1cb0bf09a3df84ff4ad6 100644 (file)
@@ -1068,6 +1068,8 @@ ConstraintMatrix::add_entry (const unsigned int line,
                              const double       value)
 {
   Assert (sorted==false, ExcMatrixIsClosed());
+  Assert (line != column,
+         ExcMessage ("Can't constrain a degree of freedom to itself"));
 
   std::vector<ConstraintLine>::iterator line_ptr;
   const std::vector<ConstraintLine>::const_iterator start=lines.begin();

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.