From ecdfea55166dce6b6916d9e3b636f9b14dddbff4 Mon Sep 17 00:00:00 2001 From: kanschat Date: Sun, 30 Oct 2011 21:53:05 +0000 Subject: [PATCH] make_child_patches git-svn-id: https://svn.dealii.org/trunk@24706 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/dofs/dof_tools.h | 5 +++- deal.II/source/dofs/dof_tools.cc | 36 +++++++++++++++++++++--- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/deal.II/include/deal.II/dofs/dof_tools.h b/deal.II/include/deal.II/dofs/dof_tools.h index 540158a2d7..ff900bc669 100644 --- a/deal.II/include/deal.II/dofs/dof_tools.h +++ b/deal.II/include/deal.II/dofs/dof_tools.h @@ -1609,7 +1609,10 @@ namespace DoFTools * which would have excluded by * interior_dofs_only, * but are lying on the boundary - * of the domain, and thus need smoothing. + * of the domain, and thus need + * smoothing. This parameter has + * no effect if + * interior_dofs_only is false. */ template void make_child_patches(SparsityPattern& block_list, diff --git a/deal.II/source/dofs/dof_tools.cc b/deal.II/source/dofs/dof_tools.cc index 2a89f8b8c4..e503a985b2 100644 --- a/deal.II/source/dofs/dof_tools.cc +++ b/deal.II/source/dofs/dof_tools.cc @@ -5944,7 +5944,7 @@ namespace DoFTools for (unsigned int block = 0;pcell != endc;++pcell) { - if (pcell->has_children()) continue; + if (!pcell->has_children()) continue; for (unsigned int child=0;childn_children();++child) { cell = pcell->child(child); @@ -5958,8 +5958,31 @@ namespace DoFTools std::fill(exclude.begin(), exclude.end(), false); cell->get_mg_dof_indices(indices); - Assert(!interior_dofs_only, ExcNotImplemented()); - Assert(!boundary_dofs, ExcNotImplemented()); + if (interior_dofs_only) + { + // Eliminate dofs on + // faces of the child + // which are on faces + // of the parent + const unsigned int dpf = fe.dofs_per_face; + + for (unsigned int d=0;d::vertex_to_face[child][d]; + for (unsigned int i=0;i::faces_per_cell;++face) + if (cell->at_boundary(face)) + for (unsigned int i=0;i indices; std::vector exclude; -- 2.39.5