From: Wolfgang Bangerth Date: Mon, 31 Aug 2020 23:45:33 +0000 (-0600) Subject: Minor clean-ups. X-Git-Tag: v9.3.0-rc1~1154^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F10867%2Fhead;p=dealii.git Minor clean-ups. --- diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index ba2054af34..79faad781e 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -5364,14 +5364,13 @@ namespace DataOutBase // If a user set to output high order cells, we treat n_subdivisions // as a cell order and adjust variables accordingly, otherwise // each patch is written as a linear cell. - unsigned int n_points_per_cell = - ReferenceCell::internal::Info::get_cell(patches[0].reference_cell_type) - .n_vertices(); + const unsigned int n_points_per_cell = + (flags.write_higher_order_cells == false ? + ReferenceCell::internal::Info::get_cell(patches[0].reference_cell_type) + .n_vertices() : + n_nodes / patches.size()); if (flags.write_higher_order_cells) - { - n_cells = patches.size(); - n_points_per_cell = n_nodes / n_cells; - } + n_cells = patches.size(); // in gmv format the vertex coordinates and the data have an order that is a // bit unpleasant (first all x coordinates, then all y coordinate, ...; diff --git a/source/grid/grid_out.cc b/source/grid/grid_out.cc index 197c523a22..1dac38b756 100644 --- a/source/grid/grid_out.cc +++ b/source/grid/grid_out.cc @@ -889,7 +889,7 @@ GridOut::write_dx(const Triangulation &tria, for (const auto &cell : tria.active_cell_iterators()) { - for (auto f : cell->face_indices()) + for (const auto f : cell->face_indices()) { typename Triangulation::face_iterator face = cell->face(f);