From: Timo Heister Date: Fri, 19 Dec 2014 15:01:59 +0000 (-0500) Subject: Merge branch 'master' into parmg X-Git-Tag: v8.4.0-rc2~277^2~40 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8fac36883cb8164d4a94aea2a98fdec8c246cc65;p=dealii.git Merge branch 'master' into parmg Conflicts: examples/step-16/step-16.cc examples/step-50/step-50.cc include/deal.II/dofs/dof_tools.h include/deal.II/meshworker/simple.h --- 8fac36883cb8164d4a94aea2a98fdec8c246cc65 diff --cc include/deal.II/dofs/dof_tools.h index 30737de05d,b58895a56b..1270247778 --- a/include/deal.II/dofs/dof_tools.h +++ b/include/deal.II/dofs/dof_tools.h @@@ -1525,47 -1482,34 +1482,44 @@@ namespace DoFTool 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 + 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 cell->subdomain_id() 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 cell->subdomain_id() 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 - * cell->subdomain_id() 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 cell->subdomain_id() function, or use the * GridTools::get_subdomain_association 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 void diff --cc include/deal.II/meshworker/simple.h index aa304eeda8,ee39e96b4c..511fdc00db --- a/include/deal.II/meshworker/simple.h +++ b/include/deal.II/meshworker/simple.h @@@ -995,13 -967,13 +967,13 @@@ namespace MeshWorke 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)); } } @@@ -1025,13 -997,13 +997,13 @@@ 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)); } } diff --cc include/deal.II/multigrid/mg_constrained_dofs.h index 50c8c3b58a,b6986b4f7a..6dcd4484f0 --- a/include/deal.II/multigrid/mg_constrained_dofs.h +++ b/include/deal.II/multigrid/mg_constrained_dofs.h @@@ -135,23 -144,8 +144,8 @@@ public */ bool set_boundary_values () const DEAL_II_DEPRECATED; -private: +//private: - /** - * @warning This function generates an inconsistent object if not - * called from the other initialize() in this class. - * - * Fill the internal data structures with values extracted from the dof - * handler object. - * - * This function ensures that on every level, degrees of freedom at interior - * edges of a refinement level are treated corrected but leaves degrees of - * freedom at the boundary of the domain untouched assuming that no - * Dirichlet boundary conditions for them exist. - */ - template - void initialize (const DoFHandler &dof); - /** * The indices of boundary dofs for each level. */