From: Martin Kronbichler Date: Mon, 17 Jun 2013 14:00:28 +0000 (+0000) Subject: Avoid inserting elements already present in index set X-Git-Tag: v8.0.0~281 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6ea80ceaca3b363e3cf438f7ed78f0743bc00d1;p=dealii.git Avoid inserting elements already present in index set git-svn-id: https://svn.dealii.org/trunk@29836 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/lac/constraint_matrix.templates.h b/deal.II/include/deal.II/lac/constraint_matrix.templates.h index af6d907509..397be1b7cc 100644 --- a/deal.II/include/deal.II/lac/constraint_matrix.templates.h +++ b/deal.II/include/deal.II/lac/constraint_matrix.templates.h @@ -1117,7 +1117,8 @@ ConstraintMatrix::distribute (VectorType &vec) const it != lines.end(); ++it) if (vec_owned_elements.is_element(it->line)) for (unsigned int i=0; ientries.size(); ++i) - needed_elements.add_index(it->entries[i].first); + if (!vec_owned_elements.is_element(it->entries[i].first)) + needed_elements.add_index(it->entries[i].first); VectorType ghosted_vector; internal::import_vector_with_ghost_elements (vec,