From: heltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
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-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d95293fc72aec0e71c594b11fdac001842ef449;p=dealii-svn.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<dim> &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);
 			     }
 		       }
                   }