From: kronbichler Date: Tue, 21 Dec 2010 15:30:55 +0000 (+0000) Subject: Compress index sets for locally_owned_dofs: We need to make sure that queries to... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=939bb619ef9d696c57d4407610a5c2a1087dd8e5;p=dealii-svn.git Compress index sets for locally_owned_dofs: We need to make sure that queries to IndexSet like index_within_set or nth_index_in_set are thread-safe. But that is only the case if we avoid calls to IndexSet::do_compress(). git-svn-id: https://svn.dealii.org/trunk@23058 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/dofs/dof_handler_policy.cc b/deal.II/source/dofs/dof_handler_policy.cc index 8f2e46db9a..845eda1fe9 100644 --- a/deal.II/source/dofs/dof_handler_policy.cc +++ b/deal.II/source/dofs/dof_handler_policy.cc @@ -510,6 +510,7 @@ namespace internal = IndexSet (number_cache.n_global_dofs); number_cache.locally_owned_dofs.add_range (0, number_cache.n_global_dofs); + number_cache.locally_owned_dofs.compress(); number_cache.n_locally_owned_dofs_per_processor = std::vector (1, @@ -546,6 +547,7 @@ namespace internal = IndexSet (number_cache.n_global_dofs); number_cache.locally_owned_dofs.add_range (0, number_cache.n_global_dofs); + number_cache.locally_owned_dofs.compress(); number_cache.n_locally_owned_dofs_per_processor = std::vector (1, @@ -1163,6 +1165,7 @@ namespace internal number_cache.locally_owned_dofs .add_range(shift, shift+number_cache.n_locally_owned_dofs); + number_cache.locally_owned_dofs.compress(); // fill global_dof_indexsets number_cache.locally_owned_dofs_per_processor.resize(n_cpus);