From eb190d95d2535c68c5ce02b126980125eb2dd63f Mon Sep 17 00:00:00 2001 From: David Wells Date: Sat, 13 Aug 2016 15:54:08 -0400 Subject: [PATCH] Remove some unused variables. These were found by cppcheck. --- include/deal.II/lac/sparse_vanka.templates.h | 1 - include/deal.II/matrix_free/matrix_free.templates.h | 2 -- .../deal.II/multigrid/mg_transfer_component.templates.h | 6 ------ include/deal.II/numerics/vector_tools.templates.h | 3 --- source/base/data_out_base.cc | 3 --- source/base/parameter_handler.cc | 5 ----- source/grid/grid_tools.cc | 1 - source/numerics/point_value_history.cc | 9 --------- 8 files changed, 30 deletions(-) diff --git a/include/deal.II/lac/sparse_vanka.templates.h b/include/deal.II/lac/sparse_vanka.templates.h index 112ef7ef2f..254b6934e2 100644 --- a/include/deal.II/lac/sparse_vanka.templates.h +++ b/include/deal.II/lac/sparse_vanka.templates.h @@ -532,7 +532,6 @@ SparseBlockVanka::compute_dof_masks (const SparseMatrix &M, // be used to store the // indices each Lagrange dof // accesses - std::map local_index; const SparsityPattern &structure = M.get_sparsity_pattern(); for (size_type row=0; row::initialize_indices AssertDimension (n_fe, constraint.size()); std::vector local_dof_indices; - std::vector > > lexicographic_inv(n_fe); internal::MatrixFreeFunctions::ConstraintValues constraint_values; - std::vector constraint_indices; for (unsigned int no=0; no::do_copy_from_mg_add ( OutVector &dst, const MGLevelObject > &src) const { - const FiniteElement &fe = mg_dof_handler.get_fe(); - const unsigned int dofs_per_cell = fe.dofs_per_cell; - - std::vector global_dof_indices (dofs_per_cell); - std::vector level_dof_indices (dofs_per_cell); - typename DoFHandler::active_cell_iterator level_cell = mg_dof_handler.begin_active(); const typename DoFHandler::active_cell_iterator diff --git a/include/deal.II/numerics/vector_tools.templates.h b/include/deal.II/numerics/vector_tools.templates.h index afef9d25b5..cbf59ca6b1 100644 --- a/include/deal.II/numerics/vector_tools.templates.h +++ b/include/deal.II/numerics/vector_tools.templates.h @@ -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 dofs_on_cell (fe.max_dofs_per_cell()); - std::vector > rep_points (max_rep_points); // get space for the values of the // function at the rep support points. diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index 5f195ee6ff..3fbe0e9837 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -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) { diff --git a/source/base/parameter_handler.cc b/source/base/parameter_handler.cc index fa50f9ea77..33056d14c8 100644 --- a/source/base/parameter_handler.cc +++ b/source/base/parameter_handler.cc @@ -468,7 +468,6 @@ namespace Patterns bool Selection::match (const std::string &test_string) const { - std::vector 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("value"); - // print name and value out << std::setw(overall_indent_level*2) << "" << "set " diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index 4141fb98f0..bc8b262c14 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -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 subdomain_ids; for (; adjacent_cell!=end_adj_cell; ++adjacent_cell) if ((*adjacent_cell)->subdomain_id()!=cell->subdomain_id()) { diff --git a/source/numerics/point_value_history.cc b/source/numerics/point_value_history.cc index 21109d40ea..f8abf0d354 100644 --- a/source/numerics/point_value_history.cc +++ b/source/numerics/point_value_history.cc @@ -191,11 +191,6 @@ void PointValueHistory // points locations are dofs locations AssertThrow (dof_handler->get_fe ().has_support_points (), ExcNotImplemented ()); - // FEValues object to extract quadrature - // points from - std::vector > - 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 // points locations are dofs locations AssertThrow (dof_handler->get_fe ().has_support_points (), ExcNotImplemented ()); - // FEValues object to extract quadrature - // points from - std::vector > 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 -- 2.39.5