]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid warnings in a few tests 7224/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sat, 22 Sep 2018 05:45:16 +0000 (07:45 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sat, 22 Sep 2018 05:46:44 +0000 (07:46 +0200)
tests/optimization/step-44.h
tests/rol/vector_adaptor_02.cc

index 649d203a1e446ae495173475d9a3243fb809346e..ec1e8a399b82b45b3c2d779df7bda3708f902fb9 100644 (file)
@@ -1328,11 +1328,8 @@ namespace Step44
 
         // Minimization function (exact)
         auto ls_minimization_function =
-          [this,
-           &residual_0,
-           &solution_delta,
-           &newton_update,
-           &tang_mtrx_norm_old](const double ss /*step size*/) {
+          [this, &solution_delta, &newton_update, &tang_mtrx_norm_old](
+            const double ss /*step size*/) {
             // Ensure that the constraints for the Dirichlet BC's are correct,
             // irrespective of the chosen step size.
             BlockVector<double> solution_delta_trial(newton_update);
@@ -1350,10 +1347,10 @@ namespace Step44
             BlockVector<double> residual_trial = this->system_rhs;
             residual_trial *= -1.0; // Residual = -RHS
 
-
             const double tang_mtrx_norm_new =
               tangent_matrix.block(0, 0).frobenius_norm();
 
+            (void)tang_mtrx_norm_new;
             if (ss != 0.0)
               Assert(tang_mtrx_norm_new != tang_mtrx_norm_old,
                      ExcInternalError());
index ec21970509dd5f30d768c7af0a0c9aa42681a2d8..616fbb338c205bfbeb37672fd3f12e49a498fdc4 100644 (file)
@@ -51,7 +51,7 @@ private:
 
 public:
   Real
-  value(const ROL::Vector<Real> &x, Real &tol)
+  value(const ROL::Vector<Real> &x, Real & /*tol*/)
   {
     Assert(x.dimension() == 2, ExcInternalError());
 
@@ -59,7 +59,7 @@ public:
   }
 
   void
-  gradient(ROL::Vector<Real> &g, const ROL::Vector<Real> &x, Real &tol)
+  gradient(ROL::Vector<Real> &g, const ROL::Vector<Real> &x, Real & /*tol*/)
   {
     Teuchos::RCP<const VectorType> xp = this->get_rcp_to_VectorType(x);
     Teuchos::RCP<VectorType>       gp = this->get_rcp_to_VectorType(g);
@@ -101,7 +101,7 @@ test(const double x, const double y)
 }
 
 int
-main(int argc, char **argv)
+main()
 {
   try
     {

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.