]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
fixed policy renumbering; component wise works with the new dynamic cast
authordenis.davydov <denis.davydov@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 16 May 2014 19:19:21 +0000 (19:19 +0000)
committerdenis.davydov <denis.davydov@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 16 May 2014 19:19:21 +0000 (19:19 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_sharedtria@32928 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/dofs/dof_handler_policy.cc
deal.II/source/dofs/dof_renumbering.cc

index ddeb7c2df9108fb5235cfec2a067cc8492b9d12a..24b50802f347acc229b3e66699b196549ef198c8 100644 (file)
@@ -1017,8 +1017,25 @@ namespace internal
                                                 (&dof_handler.get_tria()));
                          Assert (tr != 0, ExcInternalError());
                          const unsigned int n_cpu = Utilities::MPI::n_mpi_processes(tr->get_communicator());
+                         const unsigned int this_process =  Utilities::MPI::this_mpi_process(tr->get_communicator());
                          std::vector<types::global_dof_index> gathered_new_numbers(dof_handler.n_dofs(),0);
 
+                         //debug (TODO: remove when everything works):
+                         if (false)
+                         {
+                                unsigned int cur_process = 0;
+                            while(cur_process!=n_cpu){
+                             if(cur_process==this_process){
+                               std::cout<<"process "<<this_process<<": "<<std::endl;
+                               for(types::global_dof_index i=0; i< new_numbers.size(); i++)
+                                       std::cout<<new_numbers[i]<<" ";
+                               std::cout<<std::endl<<std::flush;
+                             }
+                             MPI_Barrier(MPI_COMM_WORLD);
+                             cur_process++;
+                           }
+                         }
+
                          //gather new numbers among processors into one vector
                          {
                                  std::vector<types::global_dof_index> new_numbers_copy(new_numbers);
@@ -1037,7 +1054,7 @@ namespace internal
                                  for (types::global_dof_index ind = 0; ind < iset.n_elements(); ind++)
                                  {
                                          const types::global_dof_index target = iset.nth_index_in_set(ind);
-                                         const types::global_dof_index value  = shift + gathered_new_numbers[shift+ind];
+                                         const types::global_dof_index value  = gathered_new_numbers[shift+ind];
                                          Assert(target < dof_handler.n_dofs(), ExcInternalError() );
                                          Assert(value  < dof_handler.n_dofs(), ExcInternalError() );
                                          global_gathered_numbers[target] = value;
index 654ac53e248e6147d7d4eeac5399aae8368015e1..58a48e43b81d8f21758d90ad3872c69c934cbce9 100644 (file)
@@ -771,8 +771,8 @@ namespace DoFRenumbering
     const unsigned int n_buckets = fe_collection.n_components();
     std::vector<types::global_dof_index> shifts(n_buckets);
 
-    if (const parallel::distributed::Triangulation<dim,spacedim> *tria
-        = (dynamic_cast<const parallel::distributed::Triangulation<dim,spacedim>*>
+    if (const parallel::Triangulation<dim,spacedim> *tria
+        = (dynamic_cast<const parallel::Triangulation<dim,spacedim>*>
            (&start->get_dof_handler().get_tria())))
       {
 #ifdef DEAL_II_WITH_P4EST

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.