From: Daniel Arndt Date: Mon, 13 Jul 2015 20:29:38 +0000 (+0200) Subject: Restrict DoFs that can be used in constraints to those in the IndexSet X-Git-Tag: v8.4.0-rc2~756^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afeb523f33bb4578e0838b84ff7baff9e58dd4d8;p=dealii.git Restrict DoFs that can be used in constraints to those in the IndexSet --- diff --git a/include/deal.II/lac/constraint_matrix.h b/include/deal.II/lac/constraint_matrix.h index 85fe21b231..4afd5f892f 100644 --- a/include/deal.II/lac/constraint_matrix.h +++ b/include/deal.II/lac/constraint_matrix.h @@ -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