]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid inserting elements already present in index set
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Mon, 17 Jun 2013 14:00:28 +0000 (14:00 +0000)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Mon, 17 Jun 2013 14:00:28 +0000 (14:00 +0000)
git-svn-id: https://svn.dealii.org/trunk@29836 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/constraint_matrix.templates.h

index af6d9075097328b4b7fb6f42576dd869b8b756c1..397be1b7cc4958975eb21b9c93b251155f74da09 100644 (file)
@@ -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; i<it->entries.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,

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.