]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Restrict DoFs that can be used in constraints to those in the IndexSet 1129/head
authorDaniel Arndt <d.arndt@math.uni-goettingen.de>
Mon, 13 Jul 2015 20:29:38 +0000 (22:29 +0200)
committerDaniel Arndt <d.arndt@math.uni-goettingen.de>
Mon, 13 Jul 2015 20:29:38 +0000 (22:29 +0200)
include/deal.II/lac/constraint_matrix.h

index 85fe21b2312bf7a3edbc2893e446405488724caf..4afd5f892f5b1f864478ecd8b8aa8c076a9957d1 100644 (file)
@@ -1081,6 +1081,19 @@ public:
                   << " should not be stored by this object, but a constraint "
                   << "is being added.");
 
+  /**
+   * Exception
+   *
+   * @ingroup Exceptions
+   */
+  DeclException2 (ExcColumnNotStoredHere,
+                  size_type,
+                  size_type,
+                  << "The index set given to this constraint matrix indicates "
+                  << "constraints using degree of freedom " << arg2
+                  << " should not be stored by this object, but a constraint "
+                  << "for degree of freedom " << arg1 <<" uses it.");
+
   /**
    * Exception
    *
@@ -1404,6 +1417,8 @@ ConstraintMatrix::add_entry (const size_type line,
   // exists, since we don't want to enter it twice
   Assert (lines_cache[calculate_line_index(line)] != numbers::invalid_size_type,
           ExcInternalError());
+  Assert (!local_lines.size() || local_lines.is_element(column),
+          ExcColumnNotStoredHere(line, column));
   ConstraintLine *line_ptr = &lines[lines_cache[calculate_line_index(line)]];
   Assert (line_ptr->line == line, ExcInternalError());
   for (ConstraintLine::Entries::const_iterator

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.