]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Minor clean-ups. 10867/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Mon, 31 Aug 2020 23:45:33 +0000 (17:45 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Mon, 31 Aug 2020 23:49:12 +0000 (17:49 -0600)
source/base/data_out_base.cc
source/grid/grid_out.cc

index ba2054af34a671a6c0b8dbd025bc3498493cf678..79faad781ee917e3c51cf39742de1eb836177d87 100644 (file)
@@ -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, ...;
index 197c523a22b900da4d0b52e93894ddb3def3eb60..1dac38b7568203803f8c9612a09f381b17d181c8 100644 (file)
@@ -889,7 +889,7 @@ GridOut::write_dx(const Triangulation<dim, spacedim> &tria,
 
       for (const auto &cell : tria.active_cell_iterators())
         {
-          for (auto f : cell->face_indices())
+          for (const auto f : cell->face_indices())
             {
               typename Triangulation<dim, spacedim>::face_iterator face =
                 cell->face(f);

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.