]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix a number of warnings produced by ICC.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 27 Feb 2014 21:23:54 +0000 (21:23 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 27 Feb 2014 21:23:54 +0000 (21:23 +0000)
git-svn-id: https://svn.dealii.org/trunk@32579 0785d39b-7218-0410-832d-ea1e28bc413d

16 files changed:
deal.II/source/base/data_out_base.cc
deal.II/source/dofs/dof_handler.cc
deal.II/source/dofs/dof_handler_policy.cc
deal.II/source/dofs/dof_renumbering.cc
deal.II/source/dofs/dof_tools.cc
deal.II/source/dofs/dof_tools_sparsity.cc
deal.II/source/fe/fe_tools.cc
deal.II/source/grid/grid_out.cc
deal.II/source/grid/tria.cc
deal.II/source/lac/sparsity_pattern.cc
deal.II/source/lac/trilinos_sparse_matrix.cc
deal.II/source/multigrid/mg_tools.cc
deal.II/source/numerics/data_out.cc
deal.II/source/numerics/data_out_faces.cc
deal.II/source/numerics/derivative_approximation.cc
deal.II/source/numerics/point_value_history.cc

index 58a8fbd5dc04862794209bcd68beac997401f23f..bc33d4e57f824a360edf4907ab9d111362cdba16 100644 (file)
@@ -2731,11 +2731,9 @@ namespace DataOutBase
       Point<3> v_min, v_max, v_inter;
 
       // Use the Bubblesort algorithm to sort the points with respect to the third coordinate
-      int i, j;
-
-      for (i = 0; i < 2; ++i)
+      for (int i = 0; i < 2; ++i)
         {
-          for (j = 0; j < 2-i; ++j)
+          for (int j = 0; j < 2-i; ++j)
             {
               if (points[j][2] > points[j + 1][2])
                 {
index ce78e1d5d23ddad38a8c715abcda4d60c5574f27..eda98397a2bb5be8ce60b4110432d3deeb15d327 100644 (file)
@@ -1408,10 +1408,7 @@ void DoFHandler<3>::renumber_dofs (const unsigned int  level,
       // level, as those lines logically belong to the same
       // level as the cell, at least for for isotropic
       // refinement
-
-      level_cell_iterator cell = begin(level),
-                          endcell  = end(level);
-      for ( ; cell != endcell ; ++cell)
+      for (level_cell_iterator cell = begin(level) ; cell != end(level) ; ++cell)
         for (unsigned int line=0; line < GeometryInfo<3>::lines_per_cell; ++line)
           cell->line(line)->set_user_flag();
 
@@ -1441,9 +1438,7 @@ void DoFHandler<3>::renumber_dofs (const unsigned int  level,
       // level, as those lines logically belong to the same
       // level as the cell, at least for for isotropic
       // refinement
-      level_cell_iterator cell = begin(level),
-                          endcell  = end(level);
-      for ( ; cell != endcell ; ++cell)
+      for (level_cell_iterator cell = begin(level) ; cell != end(level); ++cell)
         for (unsigned int quad=0; quad < GeometryInfo<3>::faces_per_cell; ++quad)
           cell->face(quad)->set_user_flag();
 
index 2dd018b6d21705ed9941e971da9f422ceea8424b..3af161ec679fb65ec30b308fbf88e6487a30aa39 100644 (file)
@@ -730,9 +730,8 @@ namespace internal
               // level, as those lines logically belong to the same
               // level as the cell, at least for for isotropic
               // refinement
-              typename DoFHandler<2,spacedim>::level_cell_iterator cell = dof_handler.begin(level),
-                                                                   endcell  = dof_handler.end(level);
-              for ( ; cell != endcell; ++cell)
+              for (typename DoFHandler<2,spacedim>::level_cell_iterator cell = dof_handler.begin(level);
+                    cell != dof_handler.end(level); ++cell)
                 for (unsigned int line=0; line < GeometryInfo<2>::faces_per_cell; ++line)
                   cell->face(line)->set_user_flag();
 
@@ -2083,9 +2082,8 @@ namespace internal
         tr->clear_user_flags ();
 
         //mark all own cells for transfer
-        typename DoFHandler<dim,spacedim>::active_cell_iterator
-        cell, endc = dof_handler.end();
-        for (cell = dof_handler.begin_active(); cell != endc; ++cell)
+        for (typename DoFHandler<dim,spacedim>::active_cell_iterator cell = dof_handler.begin_active();
+            cell != dof_handler.end(); ++cell)
           if (!cell->is_artificial())
             cell->set_user_flag();
 
@@ -2120,10 +2118,9 @@ namespace internal
         //check that we are really done
         {
           std::vector<dealii::types::global_dof_index> local_dof_indices;
-          typename DoFHandler<dim,spacedim>::active_cell_iterator
-          cell, endc = dof_handler.end();
 
-          for (cell = dof_handler.begin_active(); cell != endc; ++cell)
+          for (typename DoFHandler<dim,spacedim>::active_cell_iterator cell = dof_handler.begin_active();
+              cell != dof_handler.end(); ++cell)
             if (!cell->is_artificial())
               {
                 local_dof_indices.resize (cell->get_fe().dofs_per_cell);
index d341ce93fcf6c3a1e175b9cedc70998269c0e3bf..654ac53e248e6147d7d4eeac5399aae8368015e1 100644 (file)
@@ -1233,11 +1233,11 @@ namespace DoFRenumbering
               tria->get_p4est_tree_to_coarse_cell_permutation() [c];
 
             const typename DoFHandler<dim>::level_cell_iterator
-            cell (tria, 0, coarse_cell_index, &dof_handler);
+            this_cell (tria, 0, coarse_cell_index, &dof_handler);
 
             next_free = compute_hierarchical_recursive<dim> (next_free,
                                                              renumbering,
-                                                             cell,
+                                                             this_cell,
                                                              locally_owned);
           }
 #else
index 74e9345301a8759517bde4f258153614894b7deb..3ea549933447ed05ab9bf7388230f450e8851844 100644 (file)
@@ -2035,10 +2035,10 @@ namespace DoFTools
         vertex_dof_count[vg] = 0;
 
     // Create a mapping from all vertices to the ones used here
-    unsigned int i=0;
+    unsigned int n_vertex_count=0;
     for (unsigned int vg=0; vg<vertex_mapping.size(); ++vg)
       if (vertex_dof_count[vg] != 0)
-        vertex_mapping[vg] = i++;
+        vertex_mapping[vg] = n_vertex_count++;
 
     // Compactify dof count
     for (unsigned int vg=0; vg<vertex_mapping.size(); ++vg)
@@ -2047,7 +2047,7 @@ namespace DoFTools
 
     // Now that we have all the data, we reduce it to the part we actually
     // want
-    vertex_dof_count.resize(i);
+    vertex_dof_count.resize(n_vertex_count);
 
     // At this point, the list of patches is ready. Now we enter the dofs
     // into the sparsity pattern.
index 6f97a33e9a414fb87730a3d142436d00742b699b..e121a744da7b82e2faeef36e35b74b7c4ccb9e3e 100644 (file)
@@ -294,8 +294,8 @@ namespace DoFTools
                 local_dof_indices_col(dofs_per_cell_col);
                 cell_row_child->get_dof_indices (local_dof_indices_row);
                 cell_col->get_dof_indices (local_dof_indices_col);
-                for (unsigned int i=0; i<dofs_per_cell_row; ++i)
-                  sparsity.add_entries (local_dof_indices_row[i],
+                for (unsigned int r=0; r<dofs_per_cell_row; ++r)
+                  sparsity.add_entries (local_dof_indices_row[r],
                                         local_dof_indices_col.begin(),
                                         local_dof_indices_col.end());
               }
@@ -318,8 +318,8 @@ namespace DoFTools
                 local_dof_indices_col(dofs_per_cell_col);
                 cell_row->get_dof_indices (local_dof_indices_row);
                 cell_col_child->get_dof_indices (local_dof_indices_col);
-                for (unsigned int i=0; i<dofs_per_cell_row; ++i)
-                  sparsity.add_entries (local_dof_indices_row[i],
+                for (unsigned int r=0; r<dofs_per_cell_row; ++r)
+                  sparsity.add_entries (local_dof_indices_row[r],
                                         local_dof_indices_col.begin(),
                                         local_dof_indices_col.end());
               }
@@ -784,7 +784,6 @@ namespace DoFTools
                       if (cell->neighbor_is_coarser(face))
                         continue;
 
-                      typename DH::face_iterator cell_face = cell->face(face);
                       const unsigned int
                       neighbor_face = cell->neighbor_of_neighbor(face);
 
@@ -1013,8 +1012,6 @@ namespace DoFTools
                     if (cell->neighbor_is_coarser(face))
                       continue;
 
-                    typename dealii::hp::DoFHandler<dim,spacedim>::face_iterator
-                    cell_face = cell->face(face);
                     const unsigned int
                     neighbor_face = cell->neighbor_of_neighbor(face);
 
index 87a9685e71d07592322acdb27af4267f5ce44ef3..23470cbfebfe9f681188e26357552bd2d4322db6 100644 (file)
@@ -369,16 +369,16 @@ namespace FETools
                                 element.n_blocks()));
 
     types::global_dof_index k=0;
-    unsigned int i=0;
+    unsigned int count=0;
     for (unsigned int b=0; b<element.n_base_elements(); ++b)
       for (unsigned int m=0; m<element.element_multiplicity(b); ++m)
         {
-          block_data[i++] = (return_start_indices)
+          block_data[count++] = (return_start_indices)
                             ? k
                             : (element.base_element(b).n_dofs_per_cell());
           k += element.base_element(b).n_dofs_per_cell();
         }
-    Assert (i == element.n_blocks(), ExcInternalError());
+    Assert (count == element.n_blocks(), ExcInternalError());
 
     std::vector<types::global_dof_index> start_indices(block_data.size());
     k = 0;
index e2a26b69077d01266f4631e345ec508b33ee6f0c..acb1011e25182028fff6945f023ee7577fbda3cc 100644 (file)
@@ -1411,18 +1411,15 @@ void GridOut::write_svg(const Triangulation<2,2> &tria, std::ostream &out) const
   float x_dimension_perspective, y_dimension_perspective;
 
 
-  Triangulation<2,2>::cell_iterator cell = tria.begin(), endc = tria.end();
-
   // auxiliary variables for the bounding box and the range of cell levels
-  double x_min = cell->vertex(0)[0];
-  double x_max = cell->vertex(0)[0];
-  double y_min = cell->vertex(0)[1];
-  double y_max = cell->vertex(0)[1];
+  double x_min = tria.begin()->vertex(0)[0];
+  double x_max = tria.begin()->vertex(0)[0];
+  double y_min = tria.begin()->vertex(0)[1];
+  double y_max = tria.begin()->vertex(0)[1];
 
   double x_dimension, y_dimension;
 
-  min_level = cell->level();
-  max_level = cell->level();
+  min_level = max_level = tria.begin()->level();
 
   // auxiliary array for the materials being used (material ids 255 max.)
   unsigned int materials[256];
@@ -1448,7 +1445,7 @@ void GridOut::write_svg(const Triangulation<2,2> &tria, std::ostream &out) const
   // bounding box of the given triangulation and check
   // the cells for material id, level number, subdomain id
   // (, and level subdomain id).
-  for (; cell != endc; ++cell)
+  for (Triangulation<2,2>::cell_iterator cell = tria.begin(); cell != tria.end(); ++cell)
     {
       for (unsigned int vertex_index = 0; vertex_index < 4; vertex_index++)
         {
@@ -1582,18 +1579,15 @@ void GridOut::write_svg(const Triangulation<2,2> &tria, std::ostream &out) const
 
 
   // determine the bounding box of the given triangulation on the projection plane of the camera viewing system
-  cell = tria.begin();
-  endc = tria.end();
-
-  point[0] = cell->vertex(0)[0];
-  point[1] = cell->vertex(0)[1];
+  point[0] = tria.begin()->vertex(0)[0];
+  point[1] = tria.begin()->vertex(0)[1];
   point[2] = 0;
 
   float min_level_min_vertex_distance = 0;
 
   if (svg_flags.convert_level_number_to_height)
     {
-      point[2] = svg_flags.level_height_factor * ((float)cell->level() / (float)n_levels) * std::max(x_dimension, y_dimension);
+      point[2] = svg_flags.level_height_factor * ((float)tria.begin()->level() / (float)n_levels) * std::max(x_dimension, y_dimension);
     }
 
   projection_decomposition = GridOut::svg_project_point(point, camera_position, camera_direction, camera_horizontal, camera_focus);
@@ -1604,7 +1598,7 @@ void GridOut::write_svg(const Triangulation<2,2> &tria, std::ostream &out) const
   y_max_perspective = projection_decomposition[1];
   y_min_perspective = projection_decomposition[1];
 
-  for (; cell != endc; ++cell)
+  for (Triangulation<2,2>::cell_iterator cell = tria.begin(); cell != tria.end(); ++cell)
     {
       point[0] = cell->vertex(0)[0];
       point[1] = cell->vertex(0)[1];
@@ -1831,7 +1825,9 @@ void GridOut::write_svg(const Triangulation<2,2> &tria, std::ostream &out) const
 
   for (unsigned int level_index = min_level; level_index <= max_level; level_index++)
     {
-      Triangulation<2,2>::cell_iterator cell = tria.begin(level_index), endc = tria.end(level_index);
+      Triangulation<2,2>::cell_iterator
+          cell = tria.begin(level_index),
+          endc = tria.end(level_index);
 
       for (; cell != endc; ++cell)
         {
index 620b7089efa45db7a592dd8c004705e645198c47..ee0dbe74f9efb611f0eaf70aff1de11efeff3325 100644 (file)
@@ -5723,10 +5723,10 @@ namespace internal
                             for (unsigned int q=0; q<triangulation.faces->quads.cells.size(); ++q)
                               for (unsigned int l=0; l<GeometryInfo<dim>::lines_per_face; ++l)
                                 {
-                                  const int index=triangulation.faces->quads.cells[q].face(l);
-                                  if (index==old_index_0)
+                                  const int this_index=triangulation.faces->quads.cells[q].face(l);
+                                  if (this_index==old_index_0)
                                     triangulation.faces->quads.cells[q].set_face(l,new_index_0);
-                                  else if (index==old_index_1)
+                                  else if (this_index==old_index_1)
                                     triangulation.faces->quads.cells[q].set_face(l,new_index_1);
                                 }
                             // now we have to copy
index 43f4c9ffe8252a7c576e401bc7e73f1b5dbd9885..88d11d479c9e9b581bfb0d57f95246cca2a087de 100644 (file)
@@ -811,8 +811,8 @@ SparsityPattern::add_entries (const size_type row,
           else
             // cannot just append the new range at the end, forward to the
             // other function
-            for (ForwardIterator it = begin; it != end; ++it)
-              add (row, *it);
+            for (ForwardIterator p = begin; p != end; ++p)
+              add (row, *p);
         }
     }
   else
index 0443687b938b914d8a0dade668281b85dc37b4b7..14b547e45bb384faa865c2e7c6f8fca8beafae69 100644 (file)
@@ -955,7 +955,6 @@ namespace TrilinosWrappers
 
 
 
-  inline
   void
   SparseMatrix::compress (::dealii::VectorOperation::values operation)
   {
index 62589b793f103839a6a23a5f20673443de06bbc9..3c4db2437c1c1feb5c12f89ee69767d9a26e9ff8 100644 (file)
@@ -224,8 +224,8 @@ namespace MGTools
 
             if (level_boundary)
               {
-                for (unsigned int i=0; i<fe.dofs_per_cell; ++i)
-                  row_lengths[cell_indices[i]] += fe.dofs_per_face;
+                for (unsigned int local_dof=0; local_dof<fe.dofs_per_cell; ++local_dof)
+                  row_lengths[cell_indices[local_dof]] += fe.dofs_per_face;
                 continue;
               }
 
@@ -243,8 +243,8 @@ namespace MGTools
             if (flux_coupling != DoFTools::none)
               {
                 unsigned int increment = nfe.dofs_per_cell - nfe.dofs_per_face;
-                for (unsigned int i=0; i<fe.dofs_per_cell; ++i)
-                  row_lengths[cell_indices[i]] += increment;
+                for (unsigned int local_dof=0; local_dof<fe.dofs_per_cell; ++local_dof)
+                  row_lengths[cell_indices[local_dof]] += increment;
               }
 
             // Do this only once per
@@ -266,10 +266,10 @@ namespace MGTools
             // the coarse one.
             neighbor_indices.resize(nfe.dofs_per_cell);
             neighbor->get_mg_dof_indices(neighbor_indices);
-            for (unsigned int i=0; i<fe.dofs_per_cell; ++i)
-              row_lengths[cell_indices[i]] += nfe.dofs_per_face;
-            for (unsigned int i=0; i<nfe.dofs_per_cell; ++i)
-              row_lengths[neighbor_indices[i]] += fe.dofs_per_face;
+            for (unsigned int local_dof=0; local_dof<fe.dofs_per_cell; ++local_dof)
+              row_lengths[cell_indices[local_dof]] += nfe.dofs_per_face;
+            for (unsigned int local_dof=0; local_dof<nfe.dofs_per_cell; ++local_dof)
+              row_lengths[neighbor_indices[local_dof]] += fe.dofs_per_face;
           }
       }
     user_flags_triangulation.load_user_flags(old_flags);
@@ -462,8 +462,8 @@ namespace MGTools
 
             if (level_boundary)
               {
-                for (unsigned int i=0; i<fe.dofs_per_cell; ++i)
-                  row_lengths[cell_indices[i]] += fe.dofs_per_face;
+                for (unsigned int local_dof=0; local_dof<fe.dofs_per_cell; ++local_dof)
+                  row_lengths[cell_indices[local_dof]] += fe.dofs_per_face;
                 continue;
               }
 
@@ -480,13 +480,13 @@ namespace MGTools
             // here.
             for (unsigned int base=0; base<nfe.n_base_elements(); ++base)
               for (unsigned int mult=0; mult<nfe.element_multiplicity(base); ++mult)
-                for (unsigned int i=0; i<fe.dofs_per_cell; ++i)
-                  if (couple_face[fe_index](fe.system_to_block_index(i).first,
+                for (unsigned int local_dof=0; local_dof<fe.dofs_per_cell; ++local_dof)
+                  if (couple_face[fe_index](fe.system_to_block_index(local_dof).first,
                                             nfe.first_block_of_base(base) + mult) != DoFTools::none)
                     {
-                      unsigned int increment = nfe.base_element(base).dofs_per_cell
-                                               - nfe.base_element(base).dofs_per_face;
-                      row_lengths[cell_indices[i]] += increment;
+                      const unsigned int dof_increment = nfe.base_element(base).dofs_per_cell
+                                                           - nfe.base_element(base).dofs_per_face;
+                      row_lengths[cell_indices[local_dof]] += dof_increment;
                     }
 
             // Do this only once per
@@ -519,17 +519,17 @@ namespace MGTools
             neighbor->get_mg_dof_indices(neighbor_indices);
             for (unsigned int base=0; base<nfe.n_base_elements(); ++base)
               for (unsigned int mult=0; mult<nfe.element_multiplicity(base); ++mult)
-                for (unsigned int i=0; i<fe.dofs_per_cell; ++i)
-                  if (couple_cell[fe_index](fe.system_to_component_index(i).first,
+                for (unsigned int local_dof=0; local_dof<fe.dofs_per_cell; ++local_dof)
+                  if (couple_cell[fe_index](fe.system_to_component_index(local_dof).first,
                                             nfe.first_block_of_base(base) + mult) != DoFTools::none)
-                    row_lengths[cell_indices[i]]
+                    row_lengths[cell_indices[local_dof]]
                     += nfe.base_element(base).dofs_per_face;
             for (unsigned int base=0; base<fe.n_base_elements(); ++base)
               for (unsigned int mult=0; mult<fe.element_multiplicity(base); ++mult)
-                for (unsigned int i=0; i<nfe.dofs_per_cell; ++i)
-                  if (couple_cell[fe_index](nfe.system_to_component_index(i).first,
+                for (unsigned int local_dof=0; local_dof<nfe.dofs_per_cell; ++local_dof)
+                  if (couple_cell[fe_index](nfe.system_to_component_index(local_dof).first,
                                             fe.first_block_of_base(base) + mult) != DoFTools::none)
-                    row_lengths[neighbor_indices[i]]
+                    row_lengths[neighbor_indices[local_dof]]
                     += fe.base_element(base).dofs_per_face;
           }
       }
index 546d89a21766eacac751d129a4455474d1cd8e07..2249bfc7062e0f1d4a0d43d41514730b810298d8 100644 (file)
@@ -132,10 +132,10 @@ build_one_patch (const std::pair<cell_iterator, unsigned int> *cell_and_index,
       // first fill dof_data
       for (unsigned int dataset=0; dataset<this->dof_data.size(); ++dataset)
         {
-          const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values
+          const FEValuesBase<DH::dimension,DH::space_dimension> &this_fe_patch_values
             = data.get_present_fe_values (dataset);
           const unsigned int n_components =
-            fe_patch_values.get_fe().n_components();
+            this_fe_patch_values.get_fe().n_components();
 
           const DataPostprocessor<DH::space_dimension> *postprocessor=this->dof_data[dataset]->postprocessor;
 
@@ -149,17 +149,17 @@ build_one_patch (const std::pair<cell_iterator, unsigned int> *cell_and_index,
                   // at each point there is only one component of value,
                   // gradient etc.
                   if (update_flags & update_values)
-                    this->dof_data[dataset]->get_function_values (fe_patch_values,
+                    this->dof_data[dataset]->get_function_values (this_fe_patch_values,
                                                                   data.patch_values);
                   if (update_flags & update_gradients)
-                    this->dof_data[dataset]->get_function_gradients (fe_patch_values,
+                    this->dof_data[dataset]->get_function_gradients (this_fe_patch_values,
                                                                      data.patch_gradients);
                   if (update_flags & update_hessians)
-                    this->dof_data[dataset]->get_function_hessians (fe_patch_values,
+                    this->dof_data[dataset]->get_function_hessians (this_fe_patch_values,
                                                                     data.patch_hessians);
 
                   if (update_flags & update_quadrature_points)
-                    data.patch_evaluation_points = fe_patch_values.get_quadrature_points();
+                    data.patch_evaluation_points = this_fe_patch_values.get_quadrature_points();
 
 
                   std::vector<Point<DH::space_dimension> > dummy_normals;
@@ -178,17 +178,17 @@ build_one_patch (const std::pair<cell_iterator, unsigned int> *cell_and_index,
                   // at each point there is a vector valued function and its
                   // derivative...
                   if (update_flags & update_values)
-                    this->dof_data[dataset]->get_function_values (fe_patch_values,
+                    this->dof_data[dataset]->get_function_values (this_fe_patch_values,
                                                                   data.patch_values_system);
                   if (update_flags & update_gradients)
-                    this->dof_data[dataset]->get_function_gradients (fe_patch_values,
+                    this->dof_data[dataset]->get_function_gradients (this_fe_patch_values,
                                                                      data.patch_gradients_system);
                   if (update_flags & update_hessians)
-                    this->dof_data[dataset]->get_function_hessians (fe_patch_values,
+                    this->dof_data[dataset]->get_function_hessians (this_fe_patch_values,
                                                                     data.patch_hessians_system);
 
                   if (update_flags & update_quadrature_points)
-                    data.patch_evaluation_points = fe_patch_values.get_quadrature_points();
+                    data.patch_evaluation_points = this_fe_patch_values.get_quadrature_points();
 
                   std::vector<Point<DH::space_dimension> > dummy_normals;
 
@@ -214,7 +214,7 @@ build_one_patch (const std::pair<cell_iterator, unsigned int> *cell_and_index,
             // reasons.
             if (n_components == 1)
               {
-                this->dof_data[dataset]->get_function_values (fe_patch_values,
+                this->dof_data[dataset]->get_function_values (this_fe_patch_values,
                                                               data.patch_values);
                 for (unsigned int q=0; q<n_q_points; ++q)
                   patch.data(offset,q) = data.patch_values[q];
@@ -222,7 +222,7 @@ build_one_patch (const std::pair<cell_iterator, unsigned int> *cell_and_index,
             else
               {
                 data.resize_system_vectors(n_components);
-                this->dof_data[dataset]->get_function_values (fe_patch_values,
+                this->dof_data[dataset]->get_function_values (this_fe_patch_values,
                                                               data.patch_values_system);
                 for (unsigned int component=0; component<n_components;
                      ++component)
index a14c34428f21b8434bf1eb21b8a4ea8db7d96b89..08ea8fc0a196028920c99ab323110f95cbd4777f 100644 (file)
@@ -139,10 +139,10 @@ build_one_patch (const FaceDescriptor *cell_and_face,
       // first fill dof_data
       for (unsigned int dataset=0; dataset<this->dof_data.size(); ++dataset)
         {
-          const FEValuesBase<dimension> &fe_patch_values
+          const FEValuesBase<dimension> &this_fe_patch_values
             = data.get_present_fe_values (dataset);
           const unsigned int n_components
-            = fe_patch_values.get_fe().n_components();
+            = this_fe_patch_values.get_fe().n_components();
           const DataPostprocessor<dim> *postprocessor=this->dof_data[dataset]->postprocessor;
           if (postprocessor != 0)
             {
@@ -154,24 +154,24 @@ build_one_patch (const FaceDescriptor *cell_and_face,
               // thus does not depend on the number of components of the data
               // vector
               if (update_flags & update_normal_vectors)
-                data.patch_normals=fe_patch_values.get_normal_vectors();
+                data.patch_normals=this_fe_patch_values.get_normal_vectors();
 
               if (n_components == 1)
                 {
                   // at each point there is only one component of value,
                   // gradient etc.
                   if (update_flags & update_values)
-                    this->dof_data[dataset]->get_function_values (fe_patch_values,
+                    this->dof_data[dataset]->get_function_values (this_fe_patch_values,
                                                                   data.patch_values);
                   if (update_flags & update_gradients)
-                    this->dof_data[dataset]->get_function_gradients (fe_patch_values,
+                    this->dof_data[dataset]->get_function_gradients (this_fe_patch_values,
                                                                      data.patch_gradients);
                   if (update_flags & update_hessians)
-                    this->dof_data[dataset]->get_function_hessians (fe_patch_values,
+                    this->dof_data[dataset]->get_function_hessians (this_fe_patch_values,
                                                                     data.patch_hessians);
 
                   if (update_flags & update_quadrature_points)
-                    data.patch_evaluation_points = fe_patch_values.get_quadrature_points();
+                    data.patch_evaluation_points = this_fe_patch_values.get_quadrature_points();
 
                   postprocessor->
                   compute_derived_quantities_scalar(data.patch_values,
@@ -187,17 +187,17 @@ build_one_patch (const FaceDescriptor *cell_and_face,
                   // derivative...
                   data.resize_system_vectors(n_components);
                   if (update_flags & update_values)
-                    this->dof_data[dataset]->get_function_values (fe_patch_values,
+                    this->dof_data[dataset]->get_function_values (this_fe_patch_values,
                                                                   data.patch_values_system);
                   if (update_flags & update_gradients)
-                    this->dof_data[dataset]->get_function_gradients (fe_patch_values,
+                    this->dof_data[dataset]->get_function_gradients (this_fe_patch_values,
                                                                      data.patch_gradients_system);
                   if (update_flags & update_hessians)
-                    this->dof_data[dataset]->get_function_hessians (fe_patch_values,
+                    this->dof_data[dataset]->get_function_hessians (this_fe_patch_values,
                                                                     data.patch_hessians_system);
 
                   if (update_flags & update_quadrature_points)
-                    data.patch_evaluation_points = fe_patch_values.get_quadrature_points();
+                    data.patch_evaluation_points = this_fe_patch_values.get_quadrature_points();
 
                   postprocessor->
                   compute_derived_quantities_vector(data.patch_values_system,
@@ -220,7 +220,7 @@ build_one_patch (const FaceDescriptor *cell_and_face,
             // reasons.
             if (n_components == 1)
               {
-                this->dof_data[dataset]->get_function_values (fe_patch_values,
+                this->dof_data[dataset]->get_function_values (this_fe_patch_values,
                                                               data.patch_values);
                 for (unsigned int q=0; q<n_q_points; ++q)
                   patch.data(offset,q) = data.patch_values[q];
@@ -228,7 +228,7 @@ build_one_patch (const FaceDescriptor *cell_and_face,
             else
               {
                 data.resize_system_vectors(n_components);
-                this->dof_data[dataset]->get_function_values (fe_patch_values,
+                this->dof_data[dataset]->get_function_values (this_fe_patch_values,
                                                               data.patch_values_system);
                 for (unsigned int component=0; component<n_components;
                      ++component)
index 75a4578557aa114bd6d1a36dd4cf96d24d3c4d16..4cf3e4bed69854b6d9468b8c4c649ae7339aa9d5 100644 (file)
@@ -845,19 +845,19 @@ namespace DerivativeApproximation
 
                 // reinit fe values object...
                 x_fe_midpoint_value.reinit (neighbor);
-                const FEValues<dim> &fe_midpoint_value
+                const FEValues<dim> &neighbor_fe_midpoint_value
                 = x_fe_midpoint_value.get_present_fe_values();
 
                 // ...and get the value of the
                 // solution...
                 const typename DerivativeDescription::ProjectedDerivative
                 neighbor_midpoint_value
-                = DerivativeDescription::get_projected_derivative (fe_midpoint_value,
+                = DerivativeDescription::get_projected_derivative (neighbor_fe_midpoint_value,
                                                                    solution, component);
 
                 // ...and the place where it lives
                 const Point<dim>
-                neighbor_center = fe_midpoint_value.quadrature_point(0);
+                neighbor_center = neighbor_fe_midpoint_value.quadrature_point(0);
 
 
                 // vector for the
index c7b849693b6cc991ed42f415b1a79e7fe0ed93d7..ae1c763e57462690942a4c889bbe93f6b3a497fb 100644 (file)
@@ -976,8 +976,6 @@ void PointValueHistory<dim>
 
 
           // write column headings
-          std::map <std::string, std::vector <std::vector <double> > >::iterator
-          data_store_begin = data_store.begin ();
           to_gnuplot << "# <Key> ";
 
           if (indep_names.size() > 0)
@@ -995,7 +993,8 @@ void PointValueHistory<dim>
                 }
             }
 
-          for (; data_store_begin != data_store.end (); data_store_begin++)
+          for (std::map <std::string, std::vector <std::vector <double> > >::iterator
+              data_store_begin = data_store.begin (); data_store_begin != data_store.end (); ++data_store_begin)
             {
               typename std::map <std::string, ComponentMask>::iterator mask = component_mask.find(data_store_begin->first);
               unsigned int n_stored = mask->second.n_selected_components();
@@ -1022,8 +1021,6 @@ void PointValueHistory<dim>
           // write data stored for the point
           for (unsigned int key = 0; key < dataset_key.size (); key++)
             {
-              std::map <std::string, std::vector <std::vector <double> > >::iterator
-              data_store_begin = data_store.begin ();
               to_gnuplot << dataset_key[key];
 
               for (unsigned int component = 0; component < n_indep; component++)
@@ -1031,7 +1028,9 @@ void PointValueHistory<dim>
                   to_gnuplot << " " << independent_values[component][key];
                 }
 
-              for (; data_store_begin != data_store.end (); data_store_begin++)
+              for (std::map <std::string, std::vector <std::vector <double> > >::iterator
+                    data_store_begin = data_store.begin ();
+                   data_store_begin != data_store.end (); ++data_store_begin)
                 {
                   typename std::map <std::string, ComponentMask>::iterator mask = component_mask.find(data_store_begin->first);
                   unsigned int n_stored = mask->second.n_selected_components();

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.