From 7eeb358d131daa02137d23e3a225cd67e2d3ee70 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Fri, 29 Jan 2021 17:44:44 +0100 Subject: [PATCH] Fixed minor warnings. --- examples/step-70/step-70.cc | 2 +- source/grid/grid_in.cc | 2 +- source/grid/grid_out.cc | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/step-70/step-70.cc b/examples/step-70/step-70.cc index 165f7c0798..62fcc1d57f 100644 --- a/examples/step-70/step-70.cc +++ b/examples/step-70/step-70.cc @@ -1013,7 +1013,7 @@ namespace Step70 // levels of the tree: std::vector> 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()); diff --git a/source/grid/grid_in.cc b/source/grid/grid_in.cc index a0b57ff5b2..bcbe801a8e 100644 --- a/source/grid/grid_in.cc +++ b/source/grid/grid_in.cc @@ -2195,7 +2195,7 @@ GridIn::read_msh(const std::string &fname) // Vertex renumbering, by dealii type const std::vector> gmsh_to_dealii = { - {{{0}}, + {{0}, {{0, 1}}, {{0, 1, 2}}, {{0, 1, 3, 2}}, diff --git a/source/grid/grid_out.cc b/source/grid/grid_out.cc index 74d95b4812..829d560c66 100644 --- a/source/grid/grid_out.cc +++ b/source/grid/grid_out.cc @@ -1485,7 +1485,7 @@ GridOut::write_msh(const Triangulation &tria, // Vertex renumbering, by dealii type const std::vector> dealii_to_gmsh = { - {{{0}}, + {{0}, {{0, 1}}, {{0, 1, 2}}, {{0, 1, 3, 2}}, @@ -1531,7 +1531,7 @@ GridOut::write_msh(const Triangulation &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 &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 &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 &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); -- 2.39.5