From d5da05dd79af41d5bbc320ce0432a73841f045f1 Mon Sep 17 00:00:00 2001 From: Bruno Turcksin Date: Wed, 30 Sep 2015 14:30:08 -0500 Subject: [PATCH] Improve documentation for the function vertex_to_cell_map. --- include/deal.II/grid/grid_tools.h | 8 ++++++-- source/grid/grid_tools.cc | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/deal.II/grid/grid_tools.h b/include/deal.II/grid/grid_tools.h index 5daf06dd66..38ec4d33cd 100644 --- a/include/deal.II/grid/grid_tools.h +++ b/include/deal.II/grid/grid_tools.h @@ -632,8 +632,12 @@ namespace GridTools /** - * Return the adjacent cells of all the vertices. The vertices are ordered by - * their ID. + * Return the adjacent cells of all the vertices. If a vertex is also a + * hanging node, the associated coarse cell is also returned. The vertices + * are ordered by the vertex index. This is the number returned by the + * function cell-@>vertex_index(). Notice that only the + * indices marked in the array returned by + * Triangulation::get_used_vertices() are used. */ template std::vector::active_cell_iterator> > diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index 828d0ccd92..9756b80b16 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -1611,7 +1611,7 @@ next_cell: for (; cell!=endc; ++cell) for (unsigned int i=0; i::faces_per_cell; ++i) { - if ((cell->neighbor_level(i)>=0) && (cell->neighbor_level(i)level())) + if ((cell->at_boundary(i)==false) && (cell->neighbor_level(i)level())) { typename Triangulation::active_cell_iterator adjacent_cell = cell->neighbor(i); -- 2.39.5