]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix build warnings and errors for complex PETSc 7608/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 17 Jan 2019 22:40:24 +0000 (23:40 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 18 Jan 2019 21:44:36 +0000 (22:44 +0100)
source/numerics/data_out_stack.cc
source/numerics/matrix_tools_once.cc

index 336ddeba53f128445d445af3b1fffb43433602dc..63617f359f8806c5cd28dbfedafdcc170e056193 100644 (file)
@@ -104,6 +104,7 @@ DataOutStack<dim, spacedim, DoFHandlerType>::declare_data_vector(
   const std::vector<std::string> &names,
   const VectorType                vector_type)
 {
+#ifdef DEBUG
   // make sure this function is
   // not called after some parameter
   // values have already been
@@ -114,7 +115,6 @@ DataOutStack<dim, spacedim, DoFHandlerType>::declare_data_vector(
   // used twice
   for (const auto &name : names)
     {
-      (void)name;
       for (const auto &data_set : dof_data)
         for (const auto &data_set_name : data_set.names)
           Assert(name != data_set_name, ExcNameAlreadyUsed(name));
@@ -123,6 +123,7 @@ DataOutStack<dim, spacedim, DoFHandlerType>::declare_data_vector(
         for (const auto &data_set_name : data_set.names)
           Assert(name != data_set_name, ExcNameAlreadyUsed(name));
     }
+#endif
 
   switch (vector_type)
     {
index 21efb2f41f07ad8917b4d052d5f3abe02b925f16..a6414907809987196aa9514fa916aed23e814ab3 100644 (file)
@@ -135,9 +135,8 @@ namespace MatrixTools
             }
         solution.set(indices, solution_values);
 
-        // now also set appropriate values for
-        // the rhs
-        for (double &solution_value : solution_values)
+        // now also set appropriate values for the rhs
+        for (auto &solution_value : solution_values)
           solution_value *= average_nonzero_diagonal_entry;
 
         right_hand_side.set(indices, solution_values);

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.