]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix TriangulationBase::reset_global_cell_indices() 11901/head
authorPeter Munch <peterrmuench@gmail.com>
Sat, 13 Mar 2021 14:14:47 +0000 (15:14 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Sun, 14 Mar 2021 15:57:06 +0000 (16:57 +0100)
source/distributed/tria_base.cc
source/dofs/dof_handler.cc

index c497bc94c54c64b793656a90f84eb91cbf04626d..515081dac294d4b13a63f7ade0e76baabd7d4710 100644 (file)
@@ -400,14 +400,17 @@ namespace parallel
           for (unsigned int i = 0; i < n_subdomains; ++i)
             cell_counter[i + 1] += cell_counter[i];
 
+          AssertDimension(cell_counter.back(), this->n_active_cells());
+
           // create partitioners
-          IndexSet is_local(cell_counter.back());
+          IndexSet is_local(this->n_active_cells());
           is_local.add_range(cell_counter[my_subdomain],
                              cell_counter[my_subdomain + 1]);
-          IndexSet is_ghost(cell_counter.back());
           number_cache.active_cell_index_partitioner =
             std::make_shared<const Utilities::MPI::Partitioner>(
-              is_local, is_ghost, this->mpi_communicator);
+              is_local,
+              complete_index_set(this->n_active_cells()),
+              this->mpi_communicator);
 
           // set global active cell indices and increment process-local counters
           for (const auto &cell : this->active_cell_iterators())
index eb430f395f141f7fbd4d427582fe6a6b99256808..e7ba6ba8a24a8603ab1c5939870e7e0be222eef9 100644 (file)
@@ -2711,11 +2711,8 @@ DoFHandler<dim, spacedim>::prepare_coarsening_and_refinement(
         dynamic_cast<const parallel::TriangulationBase<dim, spacedim> *>(
           &(*tria)))
     {
-      const auto &partitioner =
-        *parallel_tria->global_active_cell_index_partitioner().lock();
-      future_levels.reinit(partitioner.locally_owned_range(),
-                           partitioner.ghost_indices(),
-                           partitioner.get_mpi_communicator());
+      future_levels.reinit(
+        parallel_tria->global_active_cell_index_partitioner().lock());
     }
   else
     {

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.