]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Minor cleanups and spell check.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 11 May 2006 15:58:53 +0000 (15:58 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 11 May 2006 15:58:53 +0000 (15:58 +0000)
git-svn-id: https://svn.dealii.org/trunk@13101 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 93c48ab45b644f60df3bc3815d71616383904461..714871065eff32c916196bb3412ddd81baf8df39 100644 (file)
@@ -482,9 +482,9 @@ GridTools::find_cells_adjacent_to_vertex(const Container<dim> &container,
    
                                    // go through all active cells and look
                                    // if the vertex is part of that cell
-   for(; cell != endc; ++cell)
-      for(unsigned v = 0; v < GeometryInfo<dim>::vertices_per_cell; v++)
-         if(cell->vertex_index(v) == (int)vertex)
+   for (; cell != endc; ++cell)
+      for (unsigned v = 0; v < GeometryInfo<dim>::vertices_per_cell; v++)
+         if (cell->vertex_index(v) == (int)vertex)
             {
                                    // OK, we found a cell that contains
                                    // the particular vertex. We add it
@@ -495,35 +495,54 @@ GridTools::find_cells_adjacent_to_vertex(const Container<dim> &container,
                                    // vertex is not a locally refined
                                    // vertex not being part of the
                                    // neighboring cells. So we loop over
-                                   // all faces to which this vortex
+                                   // all faces to which this vertex
                                    // belongs, check the level of
                                    // the neighbor, and if it is coarser,
                                    // then check whether the vortex is
                                    // part of that neighbor or not.
-               for(unsigned vface = 0; vface < dim; vface++)
+               for (unsigned vface = 0; vface < dim; vface++)
                   {
                      const unsigned face =
                         GeometryInfo<dim>::vertex_to_face[v][vface];
-                     if(!cell->at_boundary(face)) {
-                        typename Container<dim>::cell_iterator
+                     if (!cell->at_boundary(face))
+                      {
+                        typename Container<dim>::cell_iterator
                            nb = cell->neighbor(face);
                         
-                                   // Here we check whether the neighbor
-                                   // is coarser. If it is, we search for
-                                   // the vertex in this coarser cell and
-                                   // only if not found we will add the
-                                   // coarser cell itself
-                           if(nb->level() < cell->level()) {
-                              bool found = false;
-                              for(unsigned v=0; v<GeometryInfo<dim>::vertices_per_cell; v++)
-                                 if(cell->vertex_index(v) == (int)vertex) {
-                                    found = true;
-                                    break;
-                                 }
-                              if(!found)
+                                                         // Here we
+                                                         // check
+                                                         // whether
+                                                         // the
+                                                         // neighbor
+                                                         // is
+                                                         // coarser. If
+                                                         // it is, we
+                                                         // search
+                                                         // for the
+                                                         // vertex in
+                                                         // this
+                                                         // coarser
+                                                         // cell and
+                                                         // only if
+                                                         // not found
+                                                         // we will
+                                                         // add the
+                                                         // coarser
+                                                         // cell
+                                                         // itself
+                           if (nb->level() < cell->level())
+                            {
+                              bool found = false;
+                              for (unsigned v=0; v<GeometryInfo<dim>::vertices_per_cell; v++)
+                                 if (cell->vertex_index(v) == (int)vertex)
+                                  {
+                                    found = true;
+                                    break;
+                                  }
+                              if (!found)
                                  adjacent_cells.push_back(nb);
-                           }
-                     }
+                            }
+                      }
                   }
                
                break;

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.