]> https://gitweb.dealii.org/ - dealii.git/commitdiff
speed up DoF renumbering for distributed DoFHandler
authorTimo Heister <timo.heister@gmail.com>
Tue, 16 Jul 2013 19:15:59 +0000 (19:15 +0000)
committerTimo Heister <timo.heister@gmail.com>
Tue, 16 Jul 2013 19:15:59 +0000 (19:15 +0000)
git-svn-id: https://svn.dealii.org/trunk@30018 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/dofs/dof_handler_policy.cc

index 6e03ea1eec6ce4134fe0cdd75547f20f6812df82..262f0248bbd0c467e4e69c0ea1b6ec6293d802ee 100644 (file)
@@ -2451,7 +2451,7 @@ namespace internal
             // to blocks. If yes, we can add the block
             // ranges to the IndexSet, otherwise we need
             // to go through the indices once again and
-            // add each element individually (slow!)
+            // add each element individually
             unsigned int sum = 0;
             for (unsigned int i=0; i<n_filled_blocks; ++i)
               sum += block_indices[i].second;
@@ -2461,8 +2461,7 @@ namespace internal
                                                            block_indices[i].first+
                                                            block_indices[i].second);
             else
-              for (it=new_numbers.begin() ; it != new_numbers.end(); ++it)
-                number_cache.locally_owned_dofs.add_index (*it);
+              number_cache.locally_owned_dofs.add_indices(new_numbers.begin(), new_numbers.end());
           }
 
 

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.