]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fixed JPs comments.
authorLuca Heltai <luca.heltai@sissa.it>
Sat, 14 Apr 2018 16:14:07 +0000 (16:14 +0000)
committerLuca Heltai <luca.heltai@sissa.it>
Sat, 14 Apr 2018 16:14:07 +0000 (16:14 +0000)
include/deal.II/grid/grid_tools.h
source/grid/grid_tools.cc

index ee6722b4b178128f2b2a2af91b544cb93835fc48..49e9c23fcd72b7ba41bec59e48725fa605115197 100644 (file)
@@ -2273,14 +2273,14 @@ namespace GridTools
    * Map the given boundary ids to the given manifold ids on faces and
    * edges at the boundary.
    *
-   * This function copies the boundary_ids of the boundary faces and
+   * This function copies the boundary ids of the boundary faces and
    * edges that are present in the parameter @p src_boundary_ids to
    * the corresponding manifold_id in @p dst_manifold_ids, of the same
    * faces and edges.
    *
    * If the optional parameter @p reset_boundary_ids is non empty,
    * each boundary id in @p src_boundary_ids, is replaced with the
-   * corresponding boudnary id in @p reset_boundary_ids.
+   * corresponding boundary id in @p reset_boundary_ids.
    *
    * An exception is thrown if the size of the input vectors do not
    * match. If a boundary id indicated in @p src_boundary_ids is not
@@ -2296,7 +2296,7 @@ namespace GridTools
   void map_boundary_to_manifold_ids(const std::vector<types::boundary_id> &src_boundary_ids,
                                     const std::vector<types::manifold_id> &dst_manifold_ids,
                                     Triangulation<dim, spacedim> &tria,
-                                    const std::vector<types::boundary_id> &reset_boundary_ids= {});
+                                    const std::vector<types::boundary_id> &reset_boundary_ids = {});
 
   /**
    * Copy material ids to manifold ids. The default manifold_id for new
index 55d4267fb29056ed359ba4aeef4e738bb2486a56..be39c27e8ba784cd8cfe3ce9183e45dc3332eb47 100644 (file)
@@ -3273,11 +3273,11 @@ next_cell:
            cell != tria.end(); ++cell)
         for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
           if (cell->face(f)->at_boundary())
-            for (signed int e=0; e<static_cast<signed int>(GeometryInfo<dim>::lines_per_face); ++e)
+            for (unsigned int e=0; e<GeometryInfo<dim>::lines_per_face; ++e)
               {
-                auto bid = cell->face(f)->line(e)->boundary_id();
-                auto ind = std::find(src_boundary_ids.begin(), src_boundary_ids.end(), bid)-
-                           src_boundary_ids.begin();
+                const auto bid = cell->face(f)->line(e)->boundary_id();
+                const auto ind = std::find(src_boundary_ids.begin(), src_boundary_ids.end(), bid)-
+                                 src_boundary_ids.begin();
                 if ((unsigned int)ind < src_boundary_ids.size())
                   cell->face(f)->line(e)->set_manifold_id(dst_manifold_ids[ind]);
               }
@@ -3289,9 +3289,9 @@ next_cell:
       for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
         if (cell->face(f)->at_boundary())
           {
-            auto bid = cell->face(f)->boundary_id();
-            auto ind = std::find(src_boundary_ids.begin(), src_boundary_ids.end(), bid)-
-                       src_boundary_ids.begin();
+            const auto bid = cell->face(f)->boundary_id();
+            const auto ind = std::find(src_boundary_ids.begin(), src_boundary_ids.end(), bid)-
+                             src_boundary_ids.begin();
 
             if ((unsigned int)ind < src_boundary_ids.size())
               {
@@ -3302,11 +3302,11 @@ next_cell:
               }
 
             if (dim >= 3)
-              for (signed int e=0; e<static_cast<signed int>(GeometryInfo<dim>::lines_per_face); ++e)
+              for (unsigned int e=0; e<GeometryInfo<dim>::lines_per_face; ++e)
                 {
-                  auto bid = cell->face(f)->line(e)->boundary_id();
-                  auto ind = std::find(src_boundary_ids.begin(), src_boundary_ids.end(), bid)-
-                             src_boundary_ids.begin();
+                  const auto bid = cell->face(f)->line(e)->boundary_id();
+                  const auto ind = std::find(src_boundary_ids.begin(), src_boundary_ids.end(), bid)-
+                                   src_boundary_ids.begin();
                   if ((unsigned int)ind < src_boundary_ids.size())
                     cell->face(f)->line(e)->set_boundary_id(reset_boundary_ids[ind]);
                 }

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.