From 939bb619ef9d696c57d4407610a5c2a1087dd8e5 Mon Sep 17 00:00:00 2001 From: kronbichler Date: Tue, 21 Dec 2010 15:30:55 +0000 Subject: [PATCH] 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 --- deal.II/source/dofs/dof_handler_policy.cc | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.39.5