namespace
{
- // Helper function for DoFRenumbering::hierarchical(). this function
+ // Helper function for DoFRenumbering::hierarchical(). This function
// recurses into the given cell or, if that should be an active (terminal)
// cell, renumbers DoF indices on it. The function starts renumbering with
// 'next_free_dof_index' and returns the first still unused DoF index at the
- template <int dim>
+ template <typename DoFHandlerType>
void
- hierarchical(DoFHandler<dim> &dof_handler)
+ hierarchical(DoFHandlerType &dof_handler)
{
+ const int dim = DoFHandlerType::dimension;
+ const int spacedim = DoFHandlerType::space_dimension;
+
std::vector<types::global_dof_index> renumbering(
dof_handler.n_locally_owned_dofs(), numbers::invalid_dof_index);
// DoFs for all previous processes
types::global_dof_index my_starting_index = 0;
- if (const parallel::Triangulation<dim> *tria =
- dynamic_cast<const parallel::Triangulation<dim> *>(
+ if (const parallel::Triangulation<dim, spacedim> *tria =
+ dynamic_cast<const parallel::Triangulation<dim, spacedim> *>(
&dof_handler.get_triangulation()))
{
const std::vector<types::global_dof_index>
types::global_dof_index(0));
}
- if (const parallel::distributed::Triangulation<dim> *tria =
- dynamic_cast<const parallel::distributed::Triangulation<dim> *>(
- &dof_handler.get_triangulation()))
+ if (const parallel::distributed::Triangulation<dim, spacedim> *tria =
+ dynamic_cast<const parallel::distributed::Triangulation<dim, spacedim>
+ *>(&dof_handler.get_triangulation()))
{
#ifdef DEAL_II_WITH_P4EST
// this is a distributed Triangulation. we need to traverse the coarse
const unsigned int coarse_cell_index =
tria->get_p4est_tree_to_coarse_cell_permutation()[c];
- const typename DoFHandler<dim>::level_cell_iterator this_cell(
+ const typename DoFHandlerType::level_cell_iterator this_cell(
tria, 0, coarse_cell_index, &dof_handler);
next_free_dof_offset =
{
// this is not a distributed Triangulation, so we can traverse coarse
// cells in the normal order
- for (typename DoFHandler<dim>::cell_iterator cell =
- dof_handler.begin(0);
+ for (typename DoFHandlerType::cell_iterator cell = dof_handler.begin(0);
cell != dof_handler.end(0);
++cell)
next_free_dof_offset =
const DoFHandler<deal_II_dimension, deal_II_space_dimension>
&dof_handler);
+ template void
+ hierarchical(DoFHandler<deal_II_dimension, deal_II_space_dimension> &);
+
+ template void
+ hierarchical(
+ hp::DoFHandler<deal_II_dimension, deal_II_space_dimension> &);
\}
#endif
}
block_wise<deal_II_dimension>(DoFHandler<deal_II_dimension> &,
unsigned int);
- template void
- hierarchical<deal_II_dimension>(DoFHandler<deal_II_dimension> &);
-
template void
cell_wise<DoFHandler<deal_II_dimension>>(
DoFHandler<deal_II_dimension> &,