From: Luca Heltai Date: Tue, 15 May 2007 23:48:41 +0000 (+0000) Subject: Fixed find_cells_adjacent_to_vertex in coherently to the test case. X-Git-Tag: v8.0.0~10346 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=622be067cd9fc0ea1b9dea4ccb31c9ba6e6496fa;p=dealii.git 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 --- 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); } } }