From 7d95293fc72aec0e71c594b11fdac001842ef449 Mon Sep 17 00:00:00 2001 From: heltai Date: Tue, 15 May 2007 23:48:41 +0000 Subject: [PATCH] Fixed find_cells_adjacent_to_vertex in coherently to the test case. git-svn-id: https://svn.dealii.org/trunk@14675 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/grid/grid_tools.cc | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/deal.II/deal.II/source/grid/grid_tools.cc b/deal.II/deal.II/source/grid/grid_tools.cc index 6c0bec81b5..b3089f32a8 100644 --- a/deal.II/deal.II/source/grid/grid_tools.cc +++ b/deal.II/deal.II/source/grid/grid_tools.cc @@ -667,7 +667,25 @@ GridTools::find_cells_adjacent_to_vertex(const Container &container, break; } if (!found) - adjacent_cells.push_back(nb); + // The + // coarser + // cell + // needs to + // be added + // only + // once. In + // order to + // do so, we + // add it + // only if + // the + // current + // cell face + // is child + // zero of + // its face. + if(cell->neighbor_of_coarser_neighbor(face).second == 0) + adjacent_cells.push_back(nb); } } } -- 2.39.5