extract_locally_relevant_dofs (const DH &dof_handler,
IndexSet &dof_set);
+ /**
+ * Same as extract_locally_relevant_dofs() but for multigrid DoFs
+ * for the given @p level.
+ */
+ template <class DH>
+ void
+ extract_locally_relevant_mg_dofs (const DH &dof_handler,
+ IndexSet &dof_set,
+ unsigned int level);
+
/**
- * For each DoF, return in the output array to which subdomain (as
- * given by the <tt>cell->subdomain_id()</tt> function) it
- * belongs. The output array is supposed to have the right size
- * already when calling this function.
- *
- * Note that degrees of freedom associated with faces, edges, and
- * vertices may be associated with multiple subdomains if they are
- * sitting on partition boundaries. In these cases, we put them into
- * one of the associated partitions in an undefined way. This may
- * sometimes lead to different numbers of degrees of freedom in
- * partitions, even if the number of cells is perfectly
- * equidistributed. While this is regrettable, it is not a problem
- * in practice since the number of degrees of freedom on partition
- * boundaries is asymptotically vanishing as we refine the mesh as
+ * For each DoF, return in the output array to which subdomain (as given by
+ * the <tt>cell->subdomain_id()</tt> function) it belongs. The output array
+ * is supposed to have the right size already when calling this function.
+ *
+ * Note that degrees of freedom associated with faces, edges, and vertices
+ * may be associated with multiple subdomains if they are sitting on
+ * partition boundaries. In these cases, we put them into one of the
+ * associated partitions in an undefined way. This may sometimes lead to
+ * different numbers of degrees of freedom in partitions, even if the number
+ * of cells is perfectly equidistributed. While this is regrettable, it is
+ * not a problem in practice since the number of degrees of freedom on
+ * partition boundaries is asymptotically vanishing as we refine the mesh as
* long as the number of partitions is kept constant.
*
- * This function returns the association of each DoF with one
- * subdomain. If you are looking for the association of each @em
- * cell with a subdomain, either query the
- * <tt>cell->subdomain_id()</tt> function, or use the
+ * This function returns the association of each DoF with one subdomain. If
+ * you are looking for the association of each @em cell with a subdomain,
+ * either query the <tt>cell->subdomain_id()</tt> function, or use the
* <tt>GridTools::get_subdomain_association</tt> function.
*
- * Note that this function is of questionable use for DoFHandler
- * objects built on parallel::distributed::Triangulation since in
- * that case ownership of individual degrees of freedom by MPI
- * processes is controlled by the DoF handler object, not based on
- * some geometric algorithm in conjunction with subdomain id. In
- * particular, the degrees of freedom identified by the functions in
- * this namespace as associated with a subdomain are not the same
- * the DoFHandler class identifies as those it owns.
+ * Note that this function is of questionable use for DoFHandler objects
+ * built on parallel::distributed::Triangulation since in that case
+ * ownership of individual degrees of freedom by MPI processes is controlled
+ * by the DoF handler object, not based on some geometric algorithm in
+ * conjunction with subdomain id. In particular, the degrees of freedom
+ * identified by the functions in this namespace as associated with a
+ * subdomain are not the same the DoFHandler class identifies as those it
+ * owns.
*/
template <class DH>
void
if (mg_constrained_dofs->at_refinement_edge(level, i1[j]) &&
!mg_constrained_dofs->at_refinement_edge(level, i2[k]))
{
- if ((!mg_constrained_dofs->is_boundary_index(level, i1[j]) &&
- !mg_constrained_dofs->is_boundary_index(level, i2[k]))
+ if ((!mg_constrained_dofs->is_boundary_index(level, i1[j]) &&
+ !mg_constrained_dofs->is_boundary_index(level, i2[k]))
- ||
+ ||
- (mg_constrained_dofs->is_boundary_index(level, i1[j]) &&
- mg_constrained_dofs->is_boundary_index(level, i2[k]) &&
+ (mg_constrained_dofs->is_boundary_index(level, i1[j]) &&
+ mg_constrained_dofs->is_boundary_index(level, i2[k]) &&
- i1[j] == i2[k]))
- G.add(i1[j], i2[k], M(j,k));
+ i1[j] == i2[k]))
+ G.add(i1[j], i2[k], M(j,k));
}
}
if (mg_constrained_dofs->at_refinement_edge(level, i1[j]) &&
!mg_constrained_dofs->at_refinement_edge(level, i2[k]))
{
- if ((!mg_constrained_dofs->is_boundary_index(level, i1[j]) &&
- !mg_constrained_dofs->is_boundary_index(level, i2[k]))
+ if ((!mg_constrained_dofs->is_boundary_index(level, i1[j]) &&
+ !mg_constrained_dofs->is_boundary_index(level, i2[k]))
- ||
+ ||
- (mg_constrained_dofs->is_boundary_index(level, i1[j]) &&
- mg_constrained_dofs->is_boundary_index(level, i2[k]) &&
+ (mg_constrained_dofs->is_boundary_index(level, i1[j]) &&
+ mg_constrained_dofs->is_boundary_index(level, i2[k]) &&
- i1[j] == i2[k]))
- G.add(i1[j], i2[k], M(k,j));
+ i1[j] == i2[k]))
+ G.add(i1[j], i2[k], M(k,j));
}
}