From 581cd7347144ab997e97f6de5953108957ad3dc3 Mon Sep 17 00:00:00 2001 From: bangerth Date: Thu, 18 Nov 2010 03:27:32 +0000 Subject: [PATCH] Generalize the extract_boundary_mesh function to arbitrary container types. git-svn-id: https://svn.dealii.org/trunk@22801 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/grid/grid_tools.h | 43 ++++++++++--- deal.II/source/grid/grid_tools.cc | 73 ++++++++++++++--------- deal.II/source/grid/grid_tools.inst.in | 39 +++++++++--- 3 files changed, 110 insertions(+), 45 deletions(-) diff --git a/deal.II/include/deal.II/grid/grid_tools.h b/deal.II/include/deal.II/grid/grid_tools.h index ea4db5ce47..459d10f5cf 100644 --- a/deal.II/include/deal.II/grid/grid_tools.h +++ b/deal.II/include/deal.II/grid/grid_tools.h @@ -795,7 +795,7 @@ class GridTools fix_up_distorted_child_cells (const typename Triangulation::DistortedCellList &distorted_cells, Triangulation &triangulation); - /** + /** * This function implements a boundary * subgrid extraction. Given a * -Triangulation (the @@ -805,7 +805,7 @@ class GridTools * is specified by a list of * boundary_ids. If none is specified * the whole boundary will be extracted. - * + * * It also builds a mapping linking the * cells on the surface mesh to the * corresponding faces on the volume one. @@ -832,17 +832,42 @@ class GridTools * rather than any curved boundary object * you may want to use to determine the * location of new vertices. + * + * @note Oftentimes, the + * Container + * template type will be of kind + * Triangulation; in that case, + * the map that is returned will + * be between Triangulation cell + * iterators of the surface mesh + * and Triangulation face + * iterators of the volume + * mesh. However, one often needs + * to have this mapping between + * DoFHandler (or hp::DoFHandler) + * iterators. In that case, you + * can pass DoFHandler arguments + * as first and second parameter; + * the function will in that case + * re-build the triangulation + * underlying the second argument + * and return a map between + * DoFHandler iterators. However, + * the function will not actually + * distribute degrees of freedom + * on this newly created surface + * mesh. */ - template - static void - extract_boundary_mesh (const Triangulation &volume_mesh, - Triangulation &surface_mesh, - std::map::cell_iterator, - typename Triangulation::face_iterator> + template