]> https://gitweb.dealii.org/ - dealii.git/commitdiff
These were caught by cppcheck.
authorDavid Wells <wellsd2@rpi.edu>
Thu, 18 Aug 2016 03:04:59 +0000 (23:04 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Thu, 18 Aug 2016 03:04:59 +0000 (23:04 -0400)
include/deal.II/lac/matrix_lib.templates.h
include/deal.II/lac/solver_minres.h
include/deal.II/matrix_free/shape_info.templates.h
source/distributed/tria.cc

index 3b9ade0aa47914f7d3838a52b522a82ea169b72a..9c1f7f805a826c6925ecc1afd566750698bfe131 100644 (file)
@@ -76,8 +76,6 @@ MeanValueFilter::filter(BlockVector<number> &v) const
   for (unsigned int i=0; i<v.n_blocks(); ++i)
     if (i == component)
       vmult(v.block(i), v.block(i));
-    else
-      v.block(i) = v.block(i);
 }
 
 
index 23d825839bda6617f25bd98fc3ecba47b70b1501..e790f8efeeae9d2520328f7e16fe0f33e87da56e 100644 (file)
@@ -203,8 +203,6 @@ SolverMinRes<VectorType>::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<VectorType>::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)
index 42af09ee407a0221355cbf946c3b0cb0470c65b1..b49ded7650df68359a563437e01d5f9d654ca7cc 100644 (file)
@@ -53,8 +53,7 @@ namespace internal
                                const FiniteElement<dim> &fe_in,
                                const unsigned int base_element_number)
     {
-      const FiniteElement<dim> *fe = &fe_in;
-      fe = &fe_in.base_element(base_element_number);
+      const FiniteElement<dim> *fe = &fe_in.base_element(base_element_number);
 
       Assert (fe->n_components() == 1,
               ExcMessage("FEEvaluation only works for scalar finite elements."));
index 2276533de144662c047a2a39fa52cdc6151b4732..e3c2104b21ff30dd5d43443b58756e6cc05fa4b0 100644 (file)
@@ -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;

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.