From: Wolfgang Bangerth Date: Wed, 19 Jul 2017 02:48:16 +0000 (-0600) Subject: Instantiate the ParallelDistributed policy for hp::DoFHandler. X-Git-Tag: v9.0.0-rc1~1398^2~9 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c56ee25f1387c0256dc7fcc7751d1ab619ecfd5b;p=dealii.git Instantiate the ParallelDistributed policy for hp::DoFHandler. --- diff --git a/source/dofs/dof_handler_policy.cc b/source/dofs/dof_handler_policy.cc index 637ea607a2..4523734dc5 100644 --- a/source/dofs/dof_handler_policy.cc +++ b/source/dofs/dof_handler_policy.cc @@ -2220,7 +2220,7 @@ namespace internal /* --------------------- class ParallelShared ---------------- */ - template + template ParallelShared:: ParallelShared (DoFHandlerType &dof_handler) : @@ -2239,7 +2239,7 @@ namespace internal * consequently, be called at a point when we are still distributing degrees * of freedom. */ - template + template std::vector get_dof_subdomain_association (const DoFHandlerType &dof_handler, const types::global_dof_index n_dofs, @@ -2303,7 +2303,7 @@ namespace internal - template + template NumberCache ParallelShared:: distribute_dofs () const @@ -2461,7 +2461,7 @@ namespace internal - template + template std::vector ParallelShared:: distribute_mg_dofs () const @@ -2478,7 +2478,7 @@ namespace internal - template + template NumberCache ParallelShared:: renumber_dofs (const std::vector &new_numbers) const @@ -2619,7 +2619,7 @@ namespace internal - template + template NumberCache ParallelShared:: renumber_mg_dofs (const unsigned int /*level*/, @@ -3004,10 +3004,10 @@ namespace internal - template + template void communicate_mg_ghost_cells(const typename parallel::distributed::Triangulation &tria, - DoFHandler &dof_handler, + DoFHandlerType &dof_handler, const std::vector &coarse_cell_to_p4est_tree_permutation, const std::vector &p4est_tree_to_coarse_cell_permutation) { @@ -3020,7 +3020,7 @@ namespace internal ++it) neighbor_cell_list.insert(std::make_pair(*it, CellDataTransferBuffer())); - for (typename DoFHandler::level_cell_iterator + for (typename DoFHandlerType::level_cell_iterator cell = dof_handler.begin(0); cell != dof_handler.end(0); ++cell) @@ -3083,7 +3083,7 @@ namespace internal // store the dof indices for each cell for (unsigned int c=0; c::level_cell_iterator + typename DoFHandlerType::level_cell_iterator cell (&dof_handler.get_triangulation(), 0, p4est_tree_to_coarse_cell_permutation[cell_data_transfer_buffer.tree_index[c]], @@ -3134,7 +3134,7 @@ namespace internal dealii::types::global_dof_index *dofs = cell_data_transfer_buffer.dof_numbers_and_indices.data(); for (unsigned int c=0; c::level_cell_iterator + typename DoFHandlerType::level_cell_iterator cell (&tria, 0, p4est_tree_to_coarse_cell_permutation[cell_data_transfer_buffer.tree_index[c]], @@ -3182,12 +3182,25 @@ namespace internal - template + template + void + communicate_mg_ghost_cells(const typename parallel::distributed::Triangulation<1,spacedim> &, + hp::DoFHandler<1,spacedim> &, + const std::vector &, + const std::vector &) + { + Assert (false, ExcNotImplemented()); + } + + + + + template void set_dofindices_recursively ( const parallel::distributed::Triangulation &tria, const typename dealii::internal::p4est::types::quadrant &p4est_cell, - const typename DoFHandler::level_cell_iterator &dealii_cell, + const CellIteratorType &dealii_cell, const typename dealii::internal::p4est::types::quadrant &quadrant, dealii::types::global_dof_index *dofs) { @@ -3217,17 +3230,11 @@ namespace internal complete=false; if (!complete) - const_cast - ::level_cell_iterator &> - (dealii_cell)->set_user_flag(); + const_cast(dealii_cell)->set_user_flag(); else - const_cast - ::level_cell_iterator &> - (dealii_cell)->clear_user_flag(); + const_cast(dealii_cell)->clear_user_flag(); - const_cast - ::level_cell_iterator &> - (dealii_cell)->set_dof_indices(dof_indices); + const_cast(dealii_cell)->set_dof_indices(dof_indices); return; } @@ -3243,9 +3250,9 @@ namespace internal internal::p4est::init_quadrant_children(p4est_cell, p4est_child); for (unsigned int c=0; c::max_children_per_cell; ++c) - set_dofindices_recursively (tria, p4est_child[c], - dealii_cell->child(c), - quadrant, dofs); + set_dofindices_recursively (tria, p4est_child[c], + dealii_cell->child(c), + quadrant, dofs); } @@ -3263,10 +3270,23 @@ namespace internal - template + template + void + communicate_dof_indices_on_marked_cells + (const hp::DoFHandler<1,spacedim> &, + const std::map > &, + const std::vector &, + const std::vector &) + { + Assert (false, ExcNotImplemented()); + } + + + + template void communicate_dof_indices_on_marked_cells - (const DoFHandler &dof_handler, + (const DoFHandlerType &dof_handler, const std::map > &vertices_with_ghost_neighbors, const std::vector &coarse_cell_to_p4est_tree_permutation, const std::vector &p4est_tree_to_coarse_cell_permutation) @@ -3275,6 +3295,8 @@ namespace internal (void)vertices_with_ghost_neighbors; Assert (false, ExcNotImplemented()); #else + const unsigned int dim = DoFHandlerType::dimension; + const unsigned int spacedim = DoFHandlerType::space_dimension; const parallel::distributed::Triangulation *triangulation = (dynamic_cast*> @@ -3288,7 +3310,7 @@ namespace internal cellmap_t; cellmap_t needs_to_get_cells; - for (typename DoFHandler::level_cell_iterator + for (typename DoFHandlerType::level_cell_iterator cell = dof_handler.begin(0); cell != dof_handler.end(0); ++cell) @@ -3338,7 +3360,7 @@ namespace internal std::set senders; { std::vector local_dof_indices; - typename DoFHandler::active_cell_iterator + typename DoFHandlerType::active_cell_iterator cell, endc = dof_handler.end(); for (cell = dof_handler.begin_active(); cell != endc; ++cell) @@ -3392,7 +3414,7 @@ namespace internal // indices itself. for (unsigned int c=0; c::level_cell_iterator + const typename DoFHandlerType::level_cell_iterator cell (&dof_handler.get_triangulation(), 0, p4est_tree_to_coarse_cell_permutation[cell_data_transfer_buffer.tree_index[c]], @@ -3403,11 +3425,11 @@ namespace internal Assert(cell->get_fe().dofs_per_cell==dofs[0], ExcInternalError()); - set_dofindices_recursively (*triangulation, - p4est_coarse_cell, - cell, - cell_data_transfer_buffer.quadrants[c], - (dofs+1)); + set_dofindices_recursively (*triangulation, + p4est_coarse_cell, + cell, + cell_data_transfer_buffer.quadrants[c], + (dofs+1)); } } diff --git a/source/dofs/dof_handler_policy.inst.in b/source/dofs/dof_handler_policy.inst.in index 34c7e1e339..2e3e261584 100644 --- a/source/dofs/dof_handler_policy.inst.in +++ b/source/dofs/dof_handler_policy.inst.in @@ -32,6 +32,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS template class ParallelShared >; template class ParallelDistributed >; + template class ParallelDistributed >; \} \} \}