From ca02788992249c59264f6ea97ba0be2cb05f681e Mon Sep 17 00:00:00 2001 From: David Wells Date: Wed, 17 Aug 2016 23:04:59 -0400 Subject: [PATCH] These were caught by cppcheck. --- include/deal.II/lac/matrix_lib.templates.h | 2 -- include/deal.II/lac/solver_minres.h | 5 +---- include/deal.II/matrix_free/shape_info.templates.h | 3 +-- source/distributed/tria.cc | 4 ++-- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/include/deal.II/lac/matrix_lib.templates.h b/include/deal.II/lac/matrix_lib.templates.h index 3b9ade0aa4..9c1f7f805a 100644 --- a/include/deal.II/lac/matrix_lib.templates.h +++ b/include/deal.II/lac/matrix_lib.templates.h @@ -76,8 +76,6 @@ MeanValueFilter::filter(BlockVector &v) const for (unsigned int i=0; i::solve (const MatrixType &A, const VectorType &b, const PreconditionerType &precondition) { - SolverControl::State conv=SolverControl::iterate; - deallog.push("minres"); // Memory allocation @@ -274,8 +272,7 @@ SolverMinRes::solve (const MatrixType &A, m[1]->reinit(b); m[2]->reinit(b); - conv = this->iteration_status(0, r_l2, x); - + SolverControl::State conv = this->iteration_status(0, r_l2, x); while (conv==SolverControl::iterate) { if (delta[1]!=0) diff --git a/include/deal.II/matrix_free/shape_info.templates.h b/include/deal.II/matrix_free/shape_info.templates.h index 42af09ee40..b49ded7650 100644 --- a/include/deal.II/matrix_free/shape_info.templates.h +++ b/include/deal.II/matrix_free/shape_info.templates.h @@ -53,8 +53,7 @@ namespace internal const FiniteElement &fe_in, const unsigned int base_element_number) { - const FiniteElement *fe = &fe_in; - fe = &fe_in.base_element(base_element_number); + const FiniteElement *fe = &fe_in.base_element(base_element_number); Assert (fe->n_components() == 1, ExcMessage("FEEvaluation only works for scalar finite elements.")); diff --git a/source/distributed/tria.cc b/source/distributed/tria.cc index 2276533de1..e3c2104b21 100644 --- a/source/distributed/tria.cc +++ b/source/distributed/tria.cc @@ -3688,8 +3688,8 @@ namespace parallel { //at least one of the children belongs to us, so //make sure we set the level subdomain id - types::subdomain_id mark = numbers::artificial_subdomain_id; - mark = cell->child(0)->level_subdomain_id(); + const types::subdomain_id mark = + cell->child(0)->level_subdomain_id(); Assert(mark != numbers::artificial_subdomain_id, ExcInternalError()); //we should know the child(0) cell->set_level_subdomain_id(mark); break; -- 2.39.5