* The remaining question is how to identify the set of indices that
* correspond to degrees of freedom we need to worry about on each
* processor. To this end, you can use the
- * DoFTools::extract_locally_owned_dofs() function to get at all the
+ * DoFHandler::locally_owned_dofs() function to get at all the
* indices a processor owns. Note that this is a subset of the degrees
* of freedom that are defined on the locally owned cells (since some
* of the degrees of freedom at the interface between two different
- template <typename DoFHandlerType>
- void
- extract_locally_owned_dofs(const DoFHandlerType &dof_handler,
- IndexSet & dof_set)
- {
- // collect all the locally owned dofs
- dof_set = dof_handler.locally_owned_dofs();
- dof_set.compress();
- }
-
-
-
template <typename DoFHandlerType>
void
extract_locally_active_dofs(const DoFHandlerType &dof_handler,
const unsigned int level,
IndexSet & dof_set);
- template void
- extract_locally_owned_dofs<
- DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
- const DoFHandler<deal_II_dimension, deal_II_space_dimension>
- & dof_handler,
- IndexSet &dof_set);
-
template void
extract_locally_active_dofs<
DoFHandler<deal_II_dimension, deal_II_space_dimension>>(
constraints.close();
IndexSet locally_owned_dofs, locally_relevant_dofs;
- DoFTools::extract_locally_owned_dofs(dof_handler, locally_owned_dofs);
+ locally_owned_dofs = dof_handler.locally_owned_dofs();
DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
PETScWrappers::MPI::Vector vec(locally_owned_dofs, MPI_COMM_WORLD);