]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
call update_number_cache () for shared tria when appropriate
authordenis.davydov <denis.davydov@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 2 May 2014 12:16:43 +0000 (12:16 +0000)
committerdenis.davydov <denis.davydov@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 2 May 2014 12:16:43 +0000 (12:16 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_sharedtria@32874 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/distributed/shared_tria.cc
deal.II/source/dofs/dof_handler_policy.cc

index f28b69291a049f26dd5dd96afe117ef971589853..28991d5ab96fa78c7db2f636ea4206a604bbb0b6 100644 (file)
@@ -147,6 +147,7 @@ namespace parallel
     Triangulation<dim,spacedim>::execute_coarsening_and_refinement () {
          dealii::Triangulation<dim,spacedim>::execute_coarsening_and_refinement ();
          dealii::GridTools::partition_triangulation (num_subdomains, *this);
+         update_number_cache ();
     }
     
     template <int dim, int spacedim>
@@ -166,6 +167,7 @@ namespace parallel
           AssertThrow (false, ExcInternalError());
         }
       dealii::GridTools::partition_triangulation (num_subdomains, *this);
+      update_number_cache ();
     }
 
 
index 4f8fe256fb576aebc77693f585d788fbc4dedc9e..b95e4641ab32bda3b71affbf91253dafd93c6375 100644 (file)
@@ -1004,12 +1004,15 @@ namespace internal
                      dealii::DoFHandler<dim,spacedim> &dof_handler,
                      NumberCache &number_cache_current) const
       {
-          NumberCache number_cache = Sequential<dim,spacedim>::renumber_dofs (new_numbers,dof_handler,number_cache_current);
+         NumberCache number_cache = Sequential<dim,spacedim>::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;
       }
 

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.