]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fixed minor warnings.
authorLuca Heltai <luca.heltai@sissa.it>
Fri, 29 Jan 2021 16:44:44 +0000 (17:44 +0100)
committerLuca Heltai <luca.heltai@sissa.it>
Fri, 29 Jan 2021 16:44:44 +0000 (17:44 +0100)
examples/step-70/step-70.cc
source/grid/grid_in.cc
source/grid/grid_out.cc

index 165f7c079885c0eb58557f517d5f58fc1fef8aa5..62fcc1d57fc1fc72804e88de351f4f979b5dcb96 100644 (file)
@@ -1013,7 +1013,7 @@ namespace Step70
     // levels of the tree:
     std::vector<BoundingBox<spacedim>> all_boxes;
     all_boxes.reserve(fluid_tria.n_locally_owned_active_cells());
-    for (const auto cell : fluid_tria.active_cell_iterators())
+    for (const auto &cell : fluid_tria.active_cell_iterators())
       if (cell->is_locally_owned())
         all_boxes.emplace_back(cell->bounding_box());
 
index a0b57ff5b20e1108d144d69a3cdaaa1a8a6ab0f0..bcbe801a8e9774ce51307965a3e57297119fb2fb 100644 (file)
@@ -2195,7 +2195,7 @@ GridIn<dim, spacedim>::read_msh(const std::string &fname)
 
   // Vertex renumbering, by dealii type
   const std::vector<std::vector<unsigned int>> gmsh_to_dealii = {
-    {{{0}},
+    {{0},
      {{0, 1}},
      {{0, 1, 2}},
      {{0, 1, 3, 2}},
index 74d95b4812c23178fa9dab91ddb88665d7c8e936..829d560c665eebdd49036d77fc1d2707ea151577 100644 (file)
@@ -1485,7 +1485,7 @@ GridOut::write_msh(const Triangulation<dim, spacedim> &tria,
 
   // Vertex renumbering, by dealii type
   const std::vector<std::vector<unsigned int>> dealii_to_gmsh = {
-    {{{0}},
+    {{0},
      {{0, 1}},
      {{0, 1, 2}},
      {{0, 1, 3, 2}},
@@ -1531,7 +1531,7 @@ GridOut::write_msh(const Triangulation<dim, spacedim> &tria,
                f->boundary_id() != numbers::internal_face_boundary_id))
             set_of_pairs.insert({f->boundary_id(), f->manifold_id()});
         if (dim > 2)
-          for (const auto &l : cell->line_indices())
+          for (const auto l : cell->line_indices())
             {
               const auto &f = cell->line(l);
               if (f->manifold_id() != numbers::flat_manifold_id ||
@@ -1564,7 +1564,7 @@ GridOut::write_msh(const Triangulation<dim, spacedim> &tria,
     Assert(entity_tag > 0, ExcInternalError());
     // Add all vertex ids. Make sure we renumber to gmsh, and we add 1 to the
     // global index.
-    for (const auto &v : element->vertex_indices())
+    for (const auto v : element->vertex_indices())
       element_nodes[entity_tag - 1][type].emplace_back(
         element->vertex_index(dealii_to_gmsh[type][v]) + 1);
 
@@ -1608,7 +1608,7 @@ GridOut::write_msh(const Triangulation<dim, spacedim> &tria,
       for (const auto &face : cell->face_iterators())
         maybe_add_element(face, face->boundary_id());
       if (dim > 2)
-        for (const auto &l : cell->line_indices())
+        for (const auto l : cell->line_indices())
           maybe_add_element(cell->line(l), cell->line(l)->boundary_id());
     }
 
@@ -1616,7 +1616,7 @@ GridOut::write_msh(const Triangulation<dim, spacedim> &tria,
   gmsh::initialize();
   gmsh::option::setNumber("General.Verbosity", 0);
   gmsh::model::add("Grid generated in deal.II");
-  for (const auto p : dim_entity_tag)
+  for (const auto &p : dim_entity_tag)
     {
       gmsh::model::addDiscreteEntity(p.first, p.second);
       gmsh::model::mesh::addNodes(p.first, p.second, nodes, coords);

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.