]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove some unused variables. 2957/head
authorDavid Wells <wellsd2@rpi.edu>
Sat, 13 Aug 2016 19:54:08 +0000 (15:54 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Sun, 14 Aug 2016 13:18:38 +0000 (09:18 -0400)
These were found by cppcheck.

include/deal.II/lac/sparse_vanka.templates.h
include/deal.II/matrix_free/matrix_free.templates.h
include/deal.II/multigrid/mg_transfer_component.templates.h
include/deal.II/numerics/vector_tools.templates.h
source/base/data_out_base.cc
source/base/parameter_handler.cc
source/grid/grid_tools.cc
source/numerics/point_value_history.cc

index 112ef7ef2fb15fae0e338cb1d5ac3a20d88012da..254b6934e2d073aee14f6fa946a8a18db28a84a4 100644 (file)
@@ -532,7 +532,6 @@ SparseBlockVanka<number>::compute_dof_masks (const SparseMatrix<number> &M,
       // be used to store the
       // indices each Lagrange dof
       // accesses
-      std::map<size_type, size_type> local_index;
       const SparsityPattern &structure = M.get_sparsity_pattern();
 
       for (size_type row=0; row<M.m(); ++row)
index cad735532976ca973a15bcf737d96424bb1f9f83..1ef930c6c73cc62f865258e46c685d60a03f9430 100644 (file)
@@ -473,10 +473,8 @@ void MatrixFree<dim,Number>::initialize_indices
   AssertDimension (n_fe, constraint.size());
 
   std::vector<types::global_dof_index> local_dof_indices;
-  std::vector<std::vector<std::vector<unsigned int> > > lexicographic_inv(n_fe);
 
   internal::MatrixFreeFunctions::ConstraintValues<double> constraint_values;
-  std::vector<unsigned int> constraint_indices;
 
   for (unsigned int no=0; no<n_fe; ++no)
     {
index 6bbfd460b1d508832e07866a83bce16d6c2d7980..7012e7eebba0199362c91700432474eee1eaff56 100644 (file)
@@ -181,12 +181,6 @@ MGTransferSelect<number>::do_copy_from_mg_add (
   OutVector                            &dst,
   const MGLevelObject<Vector<number> > &src) const
 {
-  const FiniteElement<dim> &fe = mg_dof_handler.get_fe();
-  const unsigned int dofs_per_cell = fe.dofs_per_cell;
-
-  std::vector<types::global_dof_index> global_dof_indices (dofs_per_cell);
-  std::vector<types::global_dof_index> level_dof_indices (dofs_per_cell);
-
   typename DoFHandler<dim,spacedim>::active_cell_iterator
   level_cell = mg_dof_handler.begin_active();
   const typename DoFHandler<dim,spacedim>::active_cell_iterator
index afef9d25b5f9c3b481253f07e4b64f041c16db22..cbf59ca6b1f03ec574ba6602a49b5156adfaf646 100644 (file)
@@ -190,10 +190,7 @@ namespace VectorTools
                ExcInternalError());
       }
 
-    const unsigned int max_rep_points = *std::max_element (n_rep_points.begin(),
-                                                           n_rep_points.end());
     std::vector<types::global_dof_index> dofs_on_cell (fe.max_dofs_per_cell());
-    std::vector<Point<spacedim> >  rep_points (max_rep_points);
 
     // get space for the values of the
     // function at the rep support points.
index 5f195ee6ffd5903b9c7ed08a5438412c54d530e5..3fbe0e9837d05fcfd70be015ef130e84c7c983f9 100644 (file)
@@ -5535,8 +5535,6 @@ namespace DataOutBase
     for (; patch != patches.end(); ++patch)
       {
         n_subdivisions = patch->n_subdivisions;
-        n = n_subdivisions + 1;
-
         for (unsigned int i2 = 0; i2 < n_subdivisions; ++i2)
           {
             for (unsigned int i1 = 0; i1 < n_subdivisions; ++i1)
@@ -5606,7 +5604,6 @@ namespace DataOutBase
     for (patch = patches.begin(); patch != patches.end(); ++patch)
       {
         n_subdivisions = patch->n_subdivisions;
-        n = n_subdivisions + 1;
 
         for (unsigned int i2 = 0; i2 < n_subdivisions; ++i2)
           {
index fa50f9ea775c701cfc4b63c6beca81ae9a115748..33056d14c8f72fb3e1b29f204ab42cc99a34fa77 100644 (file)
@@ -468,7 +468,6 @@ namespace Patterns
 
   bool Selection::match (const std::string &test_string) const
   {
-    std::vector<std::string> choices;
     std::string tmp(sequence);
     // check the different possibilities
     while (tmp.find('|') != std::string::npos)
@@ -2020,8 +2019,6 @@ ParameterHandler::declare_alias(const std::string &existing_entry_name,
 
 void ParameterHandler::enter_subsection (const std::string &subsection)
 {
-  const std::string current_path = get_current_path ();
-
   // if necessary create subsection
   if (!entries->get_child_optional (get_current_full_path(subsection)))
     entries->add_child (get_current_full_path(subsection),
@@ -2612,8 +2609,6 @@ ParameterHandler::print_parameters_section (std::ostream      &out,
            p != current_section.not_found(); ++p)
         if (is_parameter_node (p->second) == true)
           {
-            const std::string value = p->second.get<std::string>("value");
-
             // print name and value
             out << std::setw(overall_indent_level*2) << ""
                 << "set "
index 4141fb98f0e05ed80228af57698a7b947e02207c..bc8b262c14ab0725edba3de93740d003d2e84757 100644 (file)
@@ -1737,7 +1737,6 @@ next_cell:
                         // Store the information that will be sent to the adjacent cells
                         // on other subdomains
                         adjacent_cell = vertex_to_cell[cell->vertex_index(i)].begin();
-                        std::vector<types::subdomain_id> subdomain_ids;
                         for (; adjacent_cell!=end_adj_cell; ++adjacent_cell)
                           if ((*adjacent_cell)->subdomain_id()!=cell->subdomain_id())
                             {
index 21109d40ea05e2e9c523142faa9fb1be21d7973a..f8abf0d354462c428c8d88f90599835473614e39 100644 (file)
@@ -191,11 +191,6 @@ void PointValueHistory<dim>
   // points locations are dofs locations
   AssertThrow (dof_handler->get_fe ().has_support_points (), ExcNotImplemented ());
 
-  // FEValues object to extract quadrature
-  // points from
-  std::vector <Point <dim> >
-  unit_support_points = dof_handler->get_fe ().get_unit_support_points ();
-
   // While in general quadrature points seems
   // to refer to Gauss quadrature points, in
   // this case the quadrature points are
@@ -342,10 +337,6 @@ void PointValueHistory<dim>
   // points locations are dofs locations
   AssertThrow (dof_handler->get_fe ().has_support_points (), ExcNotImplemented ());
 
-  // FEValues object to extract quadrature
-  // points from
-  std::vector <Point <dim> > unit_support_points = dof_handler->get_fe ().get_unit_support_points ();
-
   // While in general quadrature points seems
   // to refer to Gauss quadrature points, in
   // this case the quadrature points are

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.