]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix warnings in tests, gcc-8
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 30 May 2018 18:57:21 +0000 (20:57 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 31 May 2018 06:48:11 +0000 (08:48 +0200)
31 files changed:
tests/base/function_parser_04.cc
tests/base/functions_constant_function_00.cc
tests/base/utilities_pack_unpack_06.cc
tests/bits/find_cell_13.cc
tests/distributed_grids/intergrid_transfer_representation_parallel.cc
tests/dofs/dof_tools_04.cc
tests/dofs/dof_tools_04a.cc
tests/dofs/range_based_for_tria.cc
tests/fe/fe_series_04.cc
tests/full_matrix/full_matrix_invert_01.cc
tests/grid/enclosing_sphere_01.cc
tests/grid/measure_of_3d_face_01.cc
tests/grid/real_to_unit_cell_affine_approx.cc
tests/grid/refine_and_coarsen_fixed_number.cc
tests/lac/vector_memory.cc
tests/mappings/mapping_q_eulerian_08.cc
tests/mappings/mapping_real_to_unit_q1_singular.cc
tests/matrix_free/interpolate_to_mg.cc
tests/matrix_free/stokes_computation.cc
tests/mpi/collective_02_dealii_vector.cc
tests/mpi/collective_02_dealii_vector_in_place.cc
tests/mpi/parallel_partitioner_06.cc
tests/mpi/parallel_partitioner_07.cc
tests/mpi/parallel_vector_18.cc
tests/mpi/trilinos_ghost_03_linfty.cc
tests/mpi/trilinos_sadd_01.cc
tests/numerics/project_to_surface_02.cc
tests/numerics/project_to_surface_03.cc
tests/petsc_complex/vector_02.cc
tests/trilinos/amg_nondeterministic_02.cc
tests/trilinos/precondition.cc

index d3a92539fc7d143b8893bf3b9dbf1902a762c517..bf3adba7a2b1116f375c029073c463303ccf23ab 100644 (file)
@@ -82,7 +82,7 @@ test2()
                   copy_data());
   std::cout << "result: " << result << std::endl;
 
-  Assert(result == v.size(), ExcMessage("uhuh!"));
+  Assert((unsigned int)result == v.size(), ExcMessage("uhuh!"));
 }
 
 
index 5b90088c4b4a4d54524a0b08f08e77e0b874fa23..bccc7ed4432b17201f063b48cd6e80b08c0715f7 100644 (file)
@@ -76,14 +76,14 @@ test_one_object(const TESTEE<dim> &f,
     deallog << std::endl;
     std::vector<Number> return_values(n_points);
     f.value_list(points, return_values /*, component = 0*/);
-    for (int i = 0; i < n_points; ++i)
+    for (unsigned int i = 0; i < n_points; ++i)
       {
         deallog << return_values[i] << ' ';
       }
     deallog << std::endl;
 
     f.value_list(points, return_values, std::min(n_component - 1, 3u));
-    for (int i = 0; i < n_points; ++i)
+    for (unsigned int i = 0; i < n_points; ++i)
       {
         deallog << return_values[i] << ' ';
       }
@@ -96,7 +96,7 @@ test_one_object(const TESTEE<dim> &f,
     std::vector<Vector<Number>> return_values(n_points,
                                               Vector<Number>(n_component));
     f.vector_value_list(points, return_values);
-    for (int p = 0; p < n_points; ++p)
+    for (unsigned int p = 0; p < n_points; ++p)
       {
         for (unsigned int c = 0; c < n_component; ++c)
           deallog << return_values[p][c] << ' ';
index d75593708f00616dd6fcd38fb910bde4243e8fbd..2a1e2a64dab26c50e4c798ef5a71f8f02805e998 100644 (file)
@@ -120,7 +120,7 @@ check(const double (&array)[N], const Point<dim>(&point))
       Point<dim> forbidden = Utilities::unpack<Point<dim>>(
         point_compressed.cbegin(), point_compressed.cend(), false);
     }
-  catch (boost::archive::archive_exception)
+  catch (const boost::archive::archive_exception &)
     {
       deallog << "unpacking compressed point without decompression failed!"
               << std::endl;
@@ -131,7 +131,7 @@ check(const double (&array)[N], const Point<dim>(&point))
       Utilities::unpack(
         array_compressed.cbegin(), array_compressed.cend(), forbidden, false);
     }
-  catch (boost::archive::archive_exception)
+  catch (const boost::archive::archive_exception &)
     {
       deallog << "unpacking compressed array without decompression failed!"
               << std::endl;
@@ -142,7 +142,7 @@ check(const double (&array)[N], const Point<dim>(&point))
       Point<dim> forbidden = Utilities::unpack<Point<dim>>(
         point_uncompressed.cbegin(), point_uncompressed.cend(), true);
     }
-  catch (boost::archive::archive_exception)
+  catch (const boost::archive::archive_exception &)
     {
       deallog << "unpacking uncompressed point with decompression failed!"
               << std::endl;
@@ -155,7 +155,7 @@ check(const double (&array)[N], const Point<dim>(&point))
                         forbidden,
                         true);
     }
-  catch (boost::archive::archive_exception)
+  catch (const boost::archive::archive_exception &)
     {
       deallog << "unpacking uncompressed array with decompression failed!"
               << std::endl;
index 4629c026ed39c84acf09c4d17354aa68f3bfdac3..5be937c302cd09c752d3828f75ad40ffaee96776 100644 (file)
@@ -64,7 +64,7 @@ void check(Triangulation<2> &tria)
               << " Point: " << p;
       deallog << std::endl; // Flush deallog buffer
     }
-  catch (GridTools::ExcPointNotFound<2>)
+  catch (const GridTools::ExcPointNotFound<2> &)
     {
       deallog
         << "The first call to the function find_closest_vertex() has thrown "
index a58eeed826ead42e817e62e1bfa1a916964b651b..95dceb4331bfed9d0d07c7ffb22afbdf79b46431 100644 (file)
@@ -67,7 +67,7 @@ test(unsigned n_refinements)
   // do some local refinement
   Point<dim> p0;
   p0 *= 0.;
-  for (int i = 0; i < n_refinements; ++i)
+  for (unsigned int i = 0; i < n_refinements; ++i)
     {
       typename Triangulation<dim>::active_cell_iterator cell;
       for (cell = tria2.begin_active(); cell != tria2.end(); ++cell)
index 44a438c780f62279792eea854f6a5a223772c83d..8f480e5c7f32ea4e7f375a886d65a0b3c037d07a 100644 (file)
@@ -39,9 +39,9 @@ check_this(const DoFHandler<dim> &dof_handler)
     if (hanging_node_dofs[dof])
       AssertThrow(constraints.is_constrained(dof), ExcInternalError());
 
-  AssertThrow(std::count(hanging_node_dofs.begin(),
-                         hanging_node_dofs.end(),
-                         true) == constraints.n_constraints(),
+  AssertThrow((unsigned int)std::count(hanging_node_dofs.begin(),
+                                       hanging_node_dofs.end(),
+                                       true) == constraints.n_constraints(),
               ExcInternalError());
   output_bool_vector(hanging_node_dofs);
 }
index 4bf9e4db3f490b5ad2783f07a41b5918cc84365b..c5d2f468b61b2d2e195f8ab2291f68b7dffb3450 100644 (file)
@@ -64,9 +64,9 @@ check_this(const DoFHandler<dim> &dof_handler)
     if (is_hanging_node_constrained[dof])
       AssertThrow(constraints.is_constrained(dof), ExcInternalError());
 
-  AssertThrow(std::count(is_hanging_node_constrained.begin(),
-                         is_hanging_node_constrained.end(),
-                         true) == constraints.n_constraints(),
+  AssertThrow((unsigned int)(std::count(is_hanging_node_constrained.begin(),
+                                        is_hanging_node_constrained.end(),
+                                        true)) == constraints.n_constraints(),
               ExcInternalError());
 
   deallog << "OK" << std::endl;
index 44bf5a5c15351d7d0cb6995c07a608f668cd583f..c27b54c18f6bbfb0f6b46de8020556d922eb75fa 100644 (file)
@@ -61,7 +61,7 @@ check()
 
       for (auto cell : tr.cell_iterators())
         AssertThrow((cell->user_flag_set() == !cell->has_children()) ||
-                      (l != cell->level()),
+                      (l != (unsigned int)cell->level()),
                     ExcInternalError());
     }
 
index fccf4e9ae62c87cc56274cce65f215702a237bd6..9e3705f02c102dc1561eda741c584139a830aa51 100644 (file)
@@ -165,8 +165,8 @@ test_legendre_orthonormal(const unsigned int N)
 
   QGauss<dim> quadrature(8);
   deallog << "orthogonality: " << std::endl;
-  for (int k1 = 0; k1 < N; k1++)
-    for (int k2 = 0; k2 < N; k2++)
+  for (unsigned int k1 = 0; k1 < N; k1++)
+    for (unsigned int k2 = 0; k2 < N; k2++)
       {
         double ortho = 0;
         for (unsigned int q = 0; q < quadrature.size(); ++q)
index 283b71ff7e74c338f9968c1256e9d1c95d5e6bbb..b7a7a614bca6a3b085e40ca4b84a9fbb31303e37 100644 (file)
@@ -100,8 +100,8 @@ template <typename number>
 void
 check()
 {
-  int nFails = 0;
-  int maxDim = 10;
+  unsigned int nFails = 0;
+  unsigned int maxDim = 10;
   for (unsigned int i = 1; i <= maxDim; ++i)
     {
       for (unsigned int j = 1; j <= maxDim; ++j)
index d057035b8ea34bccd4ea9980b003aa5a7738cc17..d6f69915aaf6bfd7b067a6501daab7535da469fe 100644 (file)
@@ -193,7 +193,7 @@ test()
 
       // Check that all the vertices are within the sphere
       // (sphere with thickness 100. *std::numeric_limits<double>::epsilon())
-      for (int v = 0; v < GeometryInfo<dim>::vertices_per_cell; ++v)
+      for (unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_cell; ++v)
         AssertThrow(std::fabs(center.distance(tria.begin_active()->vertex(v))) <
                       radius + 100. * std::numeric_limits<double>::epsilon(),
                     ExcInternalError());
index 29141f90d7654ca3f3419ac0e847165e365ec3e0..9ffa95ad9ed996cab15f00ed3fe97df149763a12 100644 (file)
@@ -42,7 +42,7 @@ Point<3> distort_planar(Point<3> p)
 // a saddle surface
 Point<3> distort_twisted(Point<3> p)
 {
-  if (p(2) > 0.5 && (p(0) > 0.5 ^ p(1) > 0.5))
+  if (p(2) > 0.5 && ((p(0) > 0.5) ^ (p(1) > 0.5)))
     {
       p(2) += 1;
     }
index e82f2c68ea421379692cb3b932a0b897383751a6..575fa99f5682a267790edd83afd92d3610e51a07 100644 (file)
@@ -49,7 +49,7 @@ do_test(const Triangulation<dim, spacedim> &tria, const Point<spacedim> &p)
             deallog << mapping_point[d] << " ";
           deallog << std::endl;
         }
-      catch (typename Mapping<dim, spacedim>::ExcTransformationFailed)
+      catch (const typename Mapping<dim, spacedim>::ExcTransformationFailed &)
         {
           deallog << "No MappingQ transform possible for this cell and point."
                   << std::endl;
index 71365944c0aef8fd654d06a25f358ecedfd7fa2a..aec7f0a5e9b1e2f141118306bb01eb4455d46e39 100644 (file)
@@ -37,7 +37,7 @@ main(int argc, const char *argv[])
   tria.refine_global(4);
 
   Vector<float> indicator(tria.n_active_cells());
-  for (int i = 0; i != indicator.size(); ++i)
+  for (unsigned int i = 0; i != indicator.size(); ++i)
     {
       indicator[i] = i;
     }
@@ -50,7 +50,7 @@ main(int argc, const char *argv[])
   deallog << "n_active_cells: " << tria.n_active_cells() << std::endl;
 
   indicator.reinit(tria.n_active_cells());
-  for (int i = 0; i != indicator.size(); ++i)
+  for (unsigned int i = 0; i != indicator.size(); ++i)
     {
       indicator[i] = i;
     }
index 897fe2a42fa999cd1fb5fa5cb03bfce33f440940..c076a2e660e6d82660344da203335c7aa37b9c5b 100644 (file)
@@ -81,7 +81,7 @@ main()
       test_leak<Vector<double>>();
       test_leak<Vector<float>>();
     }
-  catch (StandardExceptions::ExcMemoryLeak e)
+  catch (const StandardExceptions::ExcMemoryLeak &e)
     {
       deallog << "Exception: " << e.get_exc_name() << std::endl;
     }
index 70304101dbc2c83550ee3c8c63a8b0b0272d92ec..90a229913e6f8235f9e42bbea95b1d633c80cde6 100644 (file)
@@ -139,8 +139,8 @@ test(const unsigned int n_ref = 0)
            cell != triangulation.end();
            ++cell)
         if (cell->is_locally_owned() &&
-            (cell->center().norm() < 0.5 &&
-               (cell->level() < 5 || cell->center().norm() > 0.45) ||
+            ((cell->center().norm() < 0.5 &&
+              (cell->level() < 5 || cell->center().norm() > 0.45)) ||
              (dim == 2 && cell->center().norm() > 1.2)))
           cell->set_refine_flag();
       triangulation.execute_coarsening_and_refinement();
index a074717dfe16d6cd90f194c701c10b31d1d19324..a17f174a1b4dd17f6014e4d11e4da05297245d7f 100644 (file)
@@ -49,7 +49,7 @@ test_real_to_unit_cell()
     {
       mapping.transform_real_to_unit_cell(cell, point);
     }
-  catch (typename Mapping<dim>::ExcTransformationFailed)
+  catch (const typename Mapping<dim>::ExcTransformationFailed &)
     {
       deallog << "Transformation for point " << point << " on cell with "
               << "center " << cell->center() << " is not invertible"
index e105da5eb17f052b6eef21cab71224a4ef4ddd39..e1f50e0fa17a553ce8c5e4424f74c4203c8e5df8 100644 (file)
@@ -117,8 +117,8 @@ test(const unsigned int n_glob_ref = 2, const unsigned int n_ref = 0)
            cell != triangulation.end();
            ++cell)
         if (cell->is_locally_owned() &&
-            (cell->center().norm() < 0.5 &&
-               (cell->level() < 5 || cell->center().norm() > 0.45) ||
+            ((cell->center().norm() < 0.5 &&
+              (cell->level() < 5 || cell->center().norm() > 0.45)) ||
              (dim == 2 && cell->center().norm() > 1.2)))
           cell->set_refine_flag();
       triangulation.execute_coarsening_and_refinement();
index 8657c4c7832f14b27c00f71d582206cc84d6a3a9..33dca3257078e034a8b5f298c2987eaee7dcbcce 100644 (file)
@@ -1356,7 +1356,7 @@ namespace StokesClass
                      distributed_stokes_rhs,
                      preconditioner_cheap);
       }
-    catch (SolverControl::NoConvergence)
+    catch (const SolverControl::NoConvergence &)
       {
         deallog
           << "********************************************************************"
index 915b149dd7b8f137e1ee4e9e2de96276cead5f21..5f40a01031cfd202ce3fda80903b401c26176672 100644 (file)
@@ -26,8 +26,8 @@
 void
 test()
 {
-  unsigned int       myid = Utilities::MPI::this_mpi_process(MPI_COMM_WORLD);
-  const unsigned int numprocs = Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD);
+  unsigned int myid     = Utilities::MPI::this_mpi_process(MPI_COMM_WORLD);
+  const int    numprocs = Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD);
 
   {
     Vector<int> values(2);
index ecb496c97b156589e44622b84553a65b1a77a4fa..b6e1d497a6c33b276ee0e87ed78d354924a2cde8 100644 (file)
@@ -34,8 +34,8 @@ test()
     sums[0] = 1;
     sums[1] = 2;
     Utilities::MPI::sum(sums, MPI_COMM_WORLD, sums);
-    Assert(sums[0] == numprocs, ExcInternalError());
-    Assert(sums[1] == 2 * numprocs, ExcInternalError());
+    Assert((unsigned int)sums[0] == numprocs, ExcInternalError());
+    Assert((unsigned int)sums[1] == 2 * numprocs, ExcInternalError());
 
     if (myid == 0)
       deallog << sums[0] << ' ' << sums[1] << std::endl;
index 2a57809a43e2d033592dcf100bfaadd3e516ce4a..75884298de82ce0678373c73fa892e69ae395f81 100644 (file)
@@ -83,7 +83,7 @@ test()
 
   IndexSet local_relevant_3(global_size);
   local_relevant_3.add_index(2);
-  if (myid > 0 < my_start)
+  if (myid > 0 && my_start > 0)
     local_relevant_3.add_range(my_start - 10, my_start);
   Utilities::MPI::Partitioner x(local_owned, MPI_COMM_WORLD);
   x.set_ghost_indices(local_relevant_3, v.ghost_indices());
index 28750e299c10e2330f2a2bb30f1892d955c4f8f1..2ccf7613cbfccd807cfdc05379e8be00320be396 100644 (file)
@@ -83,7 +83,7 @@ test()
 
   IndexSet local_relevant_3(global_size);
   local_relevant_3.add_index(2);
-  if (myid > 0 < my_start)
+  if (myid > 0 && my_start > 0)
     local_relevant_3.add_range(my_start - 10, my_start);
   Utilities::MPI::Partitioner x(local_owned, MPI_COMM_WORLD);
   x.set_ghost_indices(local_relevant_3, v.ghost_indices());
index bd045df5863661b2f8f098c07604867e52fa9fe8..2dff270855a8e1c2aca6d3192c505d5d76de5fee 100644 (file)
@@ -54,8 +54,8 @@ test()
   // set local values
   if (myid < 8)
     {
-      types::global_dof_index n_elements = 2;
-      types::global_dof_index indices[n_elements];
+      constexpr types::global_dof_index n_elements = 2;
+      types::global_dof_index           indices[n_elements];
       indices[0] = myid * 2;
       indices[1] = myid * 2 + 1;
       float values[2];
index 322a9bca5f2bce58589f4e62fc0956fb3a6be5a4..90ad57a236ccd3ac0c4d2989be980ccc0f90a5af 100644 (file)
@@ -65,7 +65,7 @@ test()
     {
       norm = v_tmp.linfty_norm();
     }
-  catch (TrilinosWrappers::MPI::Vector::ExcTrilinosError e)
+  catch (const TrilinosWrappers::MPI::Vector::ExcTrilinosError &e)
     {
       deallog << e.get_exc_name() << std::endl;
       exc = true;
index c80478cdd5a74913e5d3662550e09180fce8d021..33310ecc1ed1888cfa75b960cfc9bae30d86e33e 100644 (file)
@@ -67,19 +67,19 @@ test()
   if (my_id == 0)
     {
       deallog << "Distributed:" << std::endl;
-      for (unsigned int i = begin_index; i < end_index; ++i)
+      for (int i = begin_index; i < end_index; ++i)
         deallog << i << ": " << distributed(i) << std::endl;
 
       deallog << "Ghosted:" << std::endl;
-      for (unsigned int i = local_begin; i < local_end; ++i)
+      for (int i = local_begin; i < local_end; ++i)
         deallog << i << ": " << ghosted(i) << std::endl;
     }
 
   // verify correct value
-  for (unsigned int i = begin_index; i < end_index; ++i)
+  for (int i = begin_index; i < end_index; ++i)
     Assert(distributed(i) == 3, ExcInternalError());
 
-  for (unsigned int i = local_begin; i < local_end; ++i)
+  for (int i = local_begin; i < local_end; ++i)
     Assert(ghosted(i) == 3, ExcInternalError());
 }
 
index 3f3df450f969449d57e71af4cf088b30ec2d97f1..97b8c78e3243e6748ad5d887cf5141fc0dd901ce 100644 (file)
@@ -77,6 +77,30 @@ create_triangulation(const bool rotate, Triangulation<dim> &tria)
     do_rotate(tria);
 }
 
+template <int dim>
+typename Triangulation<dim>::quad_iterator
+get_quad_iterator(const typename Triangulation<dim>::active_cell_iterator &cell,
+                  const unsigned int quad);
+
+template <>
+typename Triangulation<2>::quad_iterator
+get_quad_iterator<2>(
+  const typename Triangulation<2>::active_cell_iterator &cell,
+  const unsigned int /*quad*/)
+{
+  return *reinterpret_cast<const typename Triangulation<2>::quad_iterator *>(
+    &cell);
+}
+
+template <>
+typename Triangulation<3>::quad_iterator
+get_quad_iterator<3>(
+  const typename Triangulation<3>::active_cell_iterator &cell,
+  const unsigned int                                     quad)
+{
+  return cell->quad(quad);
+}
+
 
 template <int dim>
 void
@@ -100,10 +124,7 @@ test()
       for (unsigned int e = 0; e < GeometryInfo<dim>::quads_per_cell; ++e)
         {
           const typename Triangulation<dim>::quad_iterator quad =
-            (dim > 2 ?
-               cell->quad(e) :
-               *reinterpret_cast<
-                 const typename Triangulation<dim>::quad_iterator *>(&cell));
+            get_quad_iterator<dim>(cell, e);
 
           deallog << "    Quad " << e << ", projected point=";
 
index af20d423d9fb895e262169968e192875d064e720..0ebeb57dbfe2da6bb5437a2cd619a506392b723e 100644 (file)
 #include "../tests.h"
 
 
+template <int dim>
+typename Triangulation<dim>::quad_iterator
+get_quad_iterator(const typename Triangulation<dim>::active_cell_iterator &cell,
+                  const unsigned int quad);
+
+template <>
+typename Triangulation<2>::quad_iterator
+get_quad_iterator<2>(
+  const typename Triangulation<2>::active_cell_iterator &cell,
+  const unsigned int /*quad*/)
+{
+  return *reinterpret_cast<const typename Triangulation<2>::quad_iterator *>(
+    &cell);
+}
+
+template <>
+typename Triangulation<3>::quad_iterator
+get_quad_iterator<3>(
+  const typename Triangulation<3>::active_cell_iterator &cell,
+  const unsigned int                                     quad)
+{
+  return cell->quad(quad);
+}
+
 
 template <int dim>
 void
@@ -67,10 +91,7 @@ test()
       for (unsigned int e = 0; e < GeometryInfo<dim>::quads_per_cell; ++e)
         {
           const typename Triangulation<dim>::quad_iterator quad =
-            (dim > 2 ?
-               cell->quad(e) :
-               *reinterpret_cast<
-                 const typename Triangulation<dim>::quad_iterator *>(&cell));
+            get_quad_iterator<dim>(cell, e);
 
           deallog << "    Quad " << e << ", projected point=";
 
index 8f03ce51978f4a998c97a1e3f54a53c6579fe493..7ccfadd41459340c56b621c1b6b86e23a0ea4626 100644 (file)
@@ -37,7 +37,7 @@ test()
   v.compress(VectorOperation::insert);
 
   PETScWrappers::MPI::Vector v2(MPI_COMM_WORLD, s, s);
-  for (int k = 0; k < v2.size(); ++k)
+  for (int k = 0; (unsigned int)k < v2.size(); ++k)
     v2(k) = PetscScalar(k, -k);
 
   v2.compress(VectorOperation::insert);
index 1eef81cb3c2a76326c03b214a36033215a981837..29e28035ad2cfe28ded9960d6bc89efea524be7b 100644 (file)
@@ -523,7 +523,7 @@ run()
   for (unsigned int i = 0; i < n; ++i)
     sp.add(mati[i], matj[i]);
 
-  for (unsigned int i = 0; i < dim; ++i)
+  for (int i = 0; i < dim; ++i)
     sp.add(i, i);
 
   sp.compress();
@@ -533,7 +533,7 @@ run()
   TrilinosWrappers::MPI::Vector  x2(owned, MPI_COMM_WORLD);
   TrilinosWrappers::MPI::Vector  b(owned, MPI_COMM_WORLD);
 
-  for (unsigned int i = 0; i < dim; ++i)
+  for (int i = 0; i < dim; ++i)
     mat.set(i, i, 1.0);
 
 
index 2fb6980c98d7d430f603eb38a9468fb6d7cf03e9..2c53625abea6e42aaa52e93d069ba8d3fdab5dd8 100644 (file)
@@ -222,8 +222,8 @@ Step4<dim>::solve(int cycle)
 
   {
     deallog.push("Jacobi");
-    static constexpr std::array<int, 2>  lower{49, 100};
-    TrilinosWrappers::PreconditionJacobi preconditioner;
+    static constexpr std::array<unsigned int, 2> lower{49, 100};
+    TrilinosWrappers::PreconditionJacobi         preconditioner;
     solution = 0;
     SolverControl solver_control(1000, 1e-10);
     SolverCG<>    solver(solver_control);
@@ -238,8 +238,8 @@ Step4<dim>::solve(int cycle)
 
   {
     deallog.push("SSOR");
-    static constexpr std::array<int, 2> lower{40, 77};
-    TrilinosWrappers::PreconditionSSOR  preconditioner;
+    static constexpr std::array<unsigned int, 2> lower{40, 77};
+    TrilinosWrappers::PreconditionSSOR           preconditioner;
     solution = 0;
     SolverControl solver_control(1000, 1e-10);
     SolverCG<>    solver(solver_control);
@@ -254,8 +254,8 @@ Step4<dim>::solve(int cycle)
 
   {
     deallog.push("SOR");
-    static constexpr std::array<int, 2> lower{31, 62};
-    TrilinosWrappers::PreconditionSOR   preconditioner;
+    static constexpr std::array<unsigned int, 2> lower{31, 62};
+    TrilinosWrappers::PreconditionSOR            preconditioner;
     solution = 0;
     SolverControl    solver_control(1000, 1e-5);
     SolverBicgstab<> solver(solver_control);
@@ -270,7 +270,7 @@ Step4<dim>::solve(int cycle)
 
   {
     deallog.push("BlockJacobi");
-    static constexpr std::array<int, 2>                       lower{73, 145};
+    static constexpr std::array<unsigned int, 2>              lower{73, 145};
     TrilinosWrappers::PreconditionBlockJacobi                 preconditioner;
     TrilinosWrappers::PreconditionBlockJacobi::AdditionalData data;
     data.block_size = 16;
@@ -288,7 +288,7 @@ Step4<dim>::solve(int cycle)
 
   {
     deallog.push("BlockSSOR");
-    static constexpr std::array<int, 2>                     lower{30, 59};
+    static constexpr std::array<unsigned int, 2>            lower{30, 59};
     TrilinosWrappers::PreconditionBlockSSOR                 preconditioner;
     TrilinosWrappers::PreconditionBlockSSOR::AdditionalData data;
     data.block_size = 16;
@@ -307,7 +307,7 @@ Step4<dim>::solve(int cycle)
 
   {
     deallog.push("BlockSOR");
-    static constexpr std::array<int, 2>                    lower{18, 37};
+    static constexpr std::array<unsigned int, 2>           lower{18, 37};
     TrilinosWrappers::PreconditionBlockSOR                 preconditioner;
     TrilinosWrappers::PreconditionBlockSOR::AdditionalData data;
     data.block_size = 16;
@@ -326,8 +326,8 @@ Step4<dim>::solve(int cycle)
 
   {
     deallog.push("IC");
-    static constexpr std::array<int, 2> lower{49, 67};
-    TrilinosWrappers::PreconditionIC    preconditioner;
+    static constexpr std::array<unsigned int, 2> lower{49, 67};
+    TrilinosWrappers::PreconditionIC             preconditioner;
     solution = 0;
     SolverControl solver_control(1000, 1e-10);
     SolverCG<>    solver(solver_control);
@@ -341,7 +341,7 @@ Step4<dim>::solve(int cycle)
   }
 
   {
-    static constexpr std::array<int, 2> lower{30, 56};
+    static constexpr std::array<unsigned int, 2> lower{30, 56};
     deallog.push("ILU");
     TrilinosWrappers::PreconditionILU preconditioner;
     solution = 0;
@@ -358,7 +358,7 @@ Step4<dim>::solve(int cycle)
 
   {
     deallog.push("ILUT");
-    static constexpr std::array<int, 2>                lower{11, 19};
+    static constexpr std::array<unsigned int, 2>       lower{11, 19};
     TrilinosWrappers::PreconditionILUT                 preconditioner;
     TrilinosWrappers::PreconditionILUT::AdditionalData data;
     data.ilut_drop = 1e-6;
@@ -377,7 +377,7 @@ Step4<dim>::solve(int cycle)
 
   {
     deallog.push("Chebyshev");
-    static constexpr std::array<int, 2>                     lower{23, 46};
+    static constexpr std::array<unsigned int, 2>            lower{23, 46};
     TrilinosWrappers::PreconditionChebyshev                 preconditioner;
     TrilinosWrappers::PreconditionChebyshev::AdditionalData data;
     data.max_eigenvalue = 2.5;
@@ -404,8 +404,8 @@ Step4<dim>::solve(int cycle)
     check_solver_within_range(
       solver.solve(system_matrix, solution, system_rhs, preconditioner),
       solver_control.last_step(),
-      1,
-      1);
+      1U,
+      1U);
     deallog.pop();
   }
 

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.