From: wolf Date: Wed, 17 Feb 1999 12:55:34 +0000 (+0000) Subject: Fix a bug which showed up in 3d, where constraints were erroneously X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d29d194887ae2d688e65370a57a2cb387f727655;p=dealii-svn.git Fix a bug which showed up in 3d, where constraints were erroneously entered twice (the check to avoid this was already there, but the function was not left). git-svn-id: https://svn.dealii.org/trunk@833 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/dofs/dof_constraints.cc b/deal.II/deal.II/source/dofs/dof_constraints.cc index 38180a324d..81283580d3 100644 --- a/deal.II/deal.II/source/dofs/dof_constraints.cc +++ b/deal.II/deal.II/source/dofs/dof_constraints.cc @@ -61,18 +61,22 @@ void ConstraintMatrix::add_entry (const unsigned int line, // point to 'line' then Assert (line_ptr->line==line, ExcLineInexistant(line)); - -#ifdef DEBUG // if in debug mode, check whether an // entry for this column already // exists and if its the same as // the one entered at present + // + // in any case: exit the function if an + // entry for this column already exists, + // since we don't want to enter it twice for (vector >::const_iterator p=line_ptr->entries.begin(); p != line_ptr->entries.end(); ++p) if (p->first == column) - Assert (p->second == value, - ExcEntryAlreadyExists(line, column, p->second, value)); -#endif + { + Assert (p->second == value, + ExcEntryAlreadyExists(line, column, p->second, value)); + return; + }; line_ptr->entries.push_back (make_pair(column,value)); };