]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fixed find_cells_adjacent_to_vertex in coherently to the test case.
authorheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 15 May 2007 23:48:41 +0000 (23:48 +0000)
committerheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 15 May 2007 23:48:41 +0000 (23:48 +0000)
git-svn-id: https://svn.dealii.org/trunk@14675 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/grid_tools.cc

index 6c0bec81b51f26e36e900b966a2dce00419f7cd4..b3089f32a8ea63e28d7a80b24bdca534f9003e30 100644 (file)
@@ -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);
                             }
                       }
                   }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.