From: denis.davydov Date: Fri, 16 May 2014 19:19:21 +0000 (+0000) Subject: fixed policy renumbering; component wise works with the new dynamic cast X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28586c59b9b1b645d953a9a963d2c4c785e0f746;p=dealii-svn.git fixed policy renumbering; component wise works with the new dynamic cast git-svn-id: https://svn.dealii.org/branches/branch_sharedtria@32928 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/dofs/dof_handler_policy.cc b/deal.II/source/dofs/dof_handler_policy.cc index ddeb7c2df9..24b50802f3 100644 --- a/deal.II/source/dofs/dof_handler_policy.cc +++ b/deal.II/source/dofs/dof_handler_policy.cc @@ -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 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 "< 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; diff --git a/deal.II/source/dofs/dof_renumbering.cc b/deal.II/source/dofs/dof_renumbering.cc index 654ac53e24..58a48e43b8 100644 --- a/deal.II/source/dofs/dof_renumbering.cc +++ b/deal.II/source/dofs/dof_renumbering.cc @@ -771,8 +771,8 @@ namespace DoFRenumbering const unsigned int n_buckets = fe_collection.n_components(); std::vector shifts(n_buckets); - if (const parallel::distributed::Triangulation *tria - = (dynamic_cast*> + if (const parallel::Triangulation *tria + = (dynamic_cast*> (&start->get_dof_handler().get_tria()))) { #ifdef DEAL_II_WITH_P4EST