From: denis.davydov Date: Fri, 2 May 2014 12:16:43 +0000 (+0000) Subject: call update_number_cache () for shared tria when appropriate X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c070b195f9822678b3fff14a99db0bc685c13c7;p=dealii-svn.git call update_number_cache () for shared tria when appropriate git-svn-id: https://svn.dealii.org/branches/branch_sharedtria@32874 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/distributed/shared_tria.cc b/deal.II/source/distributed/shared_tria.cc index f28b69291a..28991d5ab9 100644 --- a/deal.II/source/distributed/shared_tria.cc +++ b/deal.II/source/distributed/shared_tria.cc @@ -147,6 +147,7 @@ namespace parallel Triangulation::execute_coarsening_and_refinement () { dealii::Triangulation::execute_coarsening_and_refinement (); dealii::GridTools::partition_triangulation (num_subdomains, *this); + update_number_cache (); } template @@ -166,6 +167,7 @@ namespace parallel AssertThrow (false, ExcInternalError()); } dealii::GridTools::partition_triangulation (num_subdomains, *this); + update_number_cache (); } diff --git a/deal.II/source/dofs/dof_handler_policy.cc b/deal.II/source/dofs/dof_handler_policy.cc index 4f8fe256fb..b95e4641ab 100644 --- a/deal.II/source/dofs/dof_handler_policy.cc +++ b/deal.II/source/dofs/dof_handler_policy.cc @@ -1004,12 +1004,15 @@ namespace internal dealii::DoFHandler &dof_handler, NumberCache &number_cache_current) const { - NumberCache number_cache = Sequential::renumber_dofs (new_numbers,dof_handler,number_cache_current); + NumberCache number_cache = Sequential::renumber_dofs (new_numbers,dof_handler,number_cache_current); //update current number cache number_cache_current = number_cache; //correct number_cache: number_cache.locally_owned_dofs_per_processor = DoFTools::locally_owned_dofs_with_subdomain (dof_handler); number_cache.locally_owned_dofs = number_cache.locally_owned_dofs_per_processor[dof_handler.get_tria().locally_owned_subdomain()]; + for (unsigned int i = 0; i < number_cache.n_locally_owned_dofs_per_processor.size(); i++) + number_cache.n_locally_owned_dofs_per_processor[i] = number_cache.locally_owned_dofs_per_processor[i].n_elements(); + number_cache.n_locally_owned_dofs = number_cache.n_locally_owned_dofs_per_processor[dof_handler.get_tria().locally_owned_subdomain()]; return number_cache; }