]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove some more casts to void. 18549/head
authorDavid Wells <drwells@email.unc.edu>
Thu, 5 Jun 2025 20:10:10 +0000 (16:10 -0400)
committerDavid Wells <drwells@email.unc.edu>
Thu, 5 Jun 2025 20:47:54 +0000 (16:47 -0400)
63 files changed:
include/deal.II/base/mpi_consensus_algorithms.h
include/deal.II/base/tensor.h
include/deal.II/lac/affine_constraints.h
include/deal.II/lac/affine_constraints.templates.h
include/deal.II/lac/block_matrix_base.h
include/deal.II/lac/block_vector.h
include/deal.II/lac/chunk_sparse_matrix.templates.h
include/deal.II/lac/diagonal_matrix.h
include/deal.II/lac/dynamic_sparsity_pattern.h
include/deal.II/lac/full_matrix.h
include/deal.II/lac/full_matrix.templates.h
include/deal.II/lac/petsc_vector_base.h
include/deal.II/lac/relaxation_block.templates.h
include/deal.II/lac/solver_gmres.h
include/deal.II/lac/solver_idr.h
include/deal.II/lac/sparse_matrix.templates.h
include/deal.II/lac/sparse_matrix_ez.templates.h
include/deal.II/lac/tensor_product_matrix.h
include/deal.II/lac/trilinos_sparse_matrix.h
include/deal.II/lac/trilinos_tpetra_block_sparse_matrix.templates.h
include/deal.II/lac/trilinos_tpetra_sparse_matrix.templates.h
include/deal.II/lac/trilinos_tpetra_vector.templates.h
include/deal.II/matrix_free/portable_fe_evaluation.h
include/deal.II/matrix_free/vector_access_internal.h
include/deal.II/meshworker/copy_data.h
include/deal.II/numerics/cell_data_transfer.templates.h
include/deal.II/numerics/error_estimator.templates.h
include/deal.II/numerics/matrix_creator.templates.h
include/deal.II/numerics/vector_tools_constraints.templates.h
include/deal.II/numerics/vector_tools_evaluate.h
include/deal.II/numerics/vector_tools_interpolate.templates.h
include/deal.II/numerics/vector_tools_mean_value.templates.h
source/distributed/cell_weights.cc
source/distributed/shared_tria.cc
source/fe/fe_nothing.cc
source/fe/fe_q_dg0.cc
source/grid/grid_generator.cc
source/grid/grid_tools_dof_handlers.cc
source/grid/tria_description.cc
source/lac/block_sparsity_pattern.cc
source/lac/dynamic_sparsity_pattern.cc
source/lac/lapack_full_matrix.cc
source/lac/petsc_matrix_base.cc
source/lac/petsc_parallel_vector.cc
source/lac/petsc_precondition.cc
source/lac/petsc_solver.cc
source/lac/scalapack.cc
source/lac/sparsity_pattern.cc
source/lac/sparsity_tools.cc
source/lac/trilinos_block_sparse_matrix.cc
source/lac/trilinos_epetra_vector.cc
source/lac/trilinos_precondition_ml.cc
source/lac/trilinos_precondition_muelu.cc
source/lac/trilinos_sparse_matrix.cc
source/lac/trilinos_sparsity_pattern.cc
source/lac/trilinos_vector.cc
source/matrix_free/dof_info.cc
source/multigrid/mg_tools.cc
source/multigrid/mg_transfer_prebuilt.cc
source/numerics/data_out_stack.cc
source/numerics/matrix_tools.cc
source/numerics/matrix_tools_once.cc
source/numerics/point_value_history.cc

index 2d3d846f23b896343325b1425899eb783ffdf0e5..2b92864c979ad46328d75fb2cfa17645761f1370 100644 (file)
@@ -2096,7 +2096,6 @@ namespace Utilities
                       &process_answer,
         const MPI_Comm comm)
       {
-        (void)comm;
         Assert(Utilities::MPI::n_mpi_processes(comm) == 1,
                ExcMessage("You shouldn't use the 'Serial' class on "
                           "communicators that have more than one process "
index 2d1b0b40e7965b12b3218a6832d78d9f69eaaad9..3370bc30463cf81d2e3e80f0051826f45cb91a18 100644 (file)
@@ -1195,7 +1195,6 @@ template <class Iterator>
 inline void
 Tensor<0, dim, Number>::unroll(const Iterator begin, const Iterator end) const
 {
-  (void)end;
   AssertDimension(std::distance(begin, end), n_independent_components);
   Assert(dim != 0,
          ExcMessage("Cannot unroll an object of type Tensor<0,0,Number>"));
@@ -1580,7 +1579,6 @@ constexpr DEAL_II_HOST_DEVICE inline DEAL_II_ALWAYS_INLINE
   Tensor<rank_, dim, Number>::operator=(const Number &d) &
 {
   Assert(numbers::value_is_zero(d), ExcScalarAssignmentOnlyForZeroValue());
-  (void)d;
 
   for (unsigned int i = 0; i < dim; ++i)
     values[i] = internal::NumberType<Number>::value(0.0);
@@ -1820,7 +1818,6 @@ Tensor<rank_, dim, Number>::unroll(const Iterator begin,
     {
       // For rank-1 tensors, we can simply copy the current elements from
       // our linear array into the output range:
-      (void)end;
       Assert(std::distance(begin, end) >= dim,
              ExcMessage(
                "The provided iterator range must contain at least 'dim' "
@@ -1852,7 +1849,6 @@ Tensor<rank_, dim, Number>::unrolled_to_component_indices(const unsigned int i)
   // Work-around nvcc warning
   unsigned int dummy = n_independent_components;
   AssertIndexRange(i, dummy);
-  (void)dummy;
 
   if constexpr (dim == 0)
     {
index 5d571adecf6c6413dfbbffd3221e83f0767eb286..4430e7bc94a3f3eb2da7369ad71f8e37516ce09a 100644 (file)
@@ -2833,7 +2833,6 @@ AffineConstraints<number>::merge(
   const MergeConflictBehavior            merge_conflict_behavior,
   const bool                             allow_different_local_lines)
 {
-  (void)allow_different_local_lines;
   Assert(allow_different_local_lines ||
            local_lines == other_constraints.local_lines,
          ExcMessage(
index 2294f1bf602592ec6f47c0885f3d9d82a6e01178..59e1feb88d632925087d99bd30c7721b7dc44856 100644 (file)
@@ -2410,7 +2410,6 @@ namespace internal
       size_type shift = 0)
     {
       Assert(shift == 0, ExcNotImplemented());
-      (void)shift;
       std::vector<size_type> constrained_local_dofs_host;
       constrained_local_dofs_host.reserve(cm.size());
 
@@ -3672,7 +3671,6 @@ namespace internal
                 const size_type       column,
                 SparseMatrixIterator &matrix_values)
       {
-        (void)row;
         if (value != LocalType())
           {
             while (matrix_values->column() < column)
index 8aa638b1fbaa234b18d5b4d3f7991b43d5106e03..6aadcf2c9a78280d3487bdb1f27a93514c10be59 100644 (file)
@@ -1116,7 +1116,6 @@ namespace BlockMatrixIterators
     : matrix(matrix)
     , base_iterator(matrix->block(0, 0).begin())
   {
-    (void)col;
     Assert(col == 0, ExcNotImplemented());
 
     // check if this is a regular row or
@@ -1316,7 +1315,6 @@ namespace BlockMatrixIterators
     : matrix(matrix)
     , base_iterator(matrix->block(0, 0).begin())
   {
-    (void)col;
     Assert(col == 0, ExcNotImplemented());
     // check if this is a regular row or
     // the end of the matrix
index 1931fbde3e41524e6904753f102a05e16861bac1..b370f06aaa4bf851f714c870f554edb9cbf374ff 100644 (file)
@@ -384,7 +384,6 @@ BlockVector<Number>::BlockVector(const std::vector<size_type> &block_sizes,
   // first set sizes of blocks, but
   // don't initialize them as we will
   // copy elements soon
-  (void)end;
   reinit(block_sizes, true);
   InputIterator start = first;
   for (size_type b = 0; b < block_sizes.size(); ++b)
index 4c9ffdd10703dad3933066cead693f4f5e0d5d9c..f3449ad56273708f3bc07aa0f82e773cb12f62e5 100644 (file)
@@ -298,7 +298,6 @@ template <typename number>
 ChunkSparseMatrix<number> &
 ChunkSparseMatrix<number>::operator=(const ChunkSparseMatrix<number> &m)
 {
-  (void)m;
   Assert(m.cols == nullptr && m.val == nullptr && m.max_len == 0,
          ExcMessage(
            "This operator can only be called if the provided right "
@@ -332,7 +331,6 @@ ChunkSparseMatrix<number>::ChunkSparseMatrix(const ChunkSparsityPattern &c,
   , val(nullptr)
   , max_len(0)
 {
-  (void)id;
   Assert(c.n_rows() == id.m(), ExcDimensionMismatch(c.n_rows(), id.m()));
   Assert(c.n_cols() == id.n(), ExcDimensionMismatch(c.n_cols(), id.n()));
 
@@ -373,7 +371,6 @@ template <typename number>
 ChunkSparseMatrix<number> &
 ChunkSparseMatrix<number>::operator=(const double d)
 {
-  (void)d;
   Assert(d == 0, ExcScalarAssignmentOnlyForZeroValue());
 
   Assert(cols != nullptr, ExcNeedsSparsityPattern());
@@ -414,7 +411,6 @@ template <typename number>
 ChunkSparseMatrix<number> &
 ChunkSparseMatrix<number>::operator=(const IdentityMatrix &id)
 {
-  (void)id;
   Assert(cols->n_rows() == id.m(),
          ExcDimensionMismatch(cols->n_rows(), id.m()));
   Assert(cols->n_cols() == id.n(),
@@ -595,7 +591,6 @@ ChunkSparseMatrix<number>::extract_row_copy(const size_type row,
                                             size_type      *column_indices,
                                             number         *values) const
 {
-  (void)array_length;
   AssertIndexRange(cols->row_length(row), array_length + 1);
   AssertIndexRange(row, m());
   const unsigned int chunk_size  = cols->get_chunk_size();
@@ -1211,8 +1206,6 @@ ChunkSparseMatrix<number>::precondition_Jacobi(Vector<somenumber>       &dst,
                                                const Vector<somenumber> &src,
                                                const number /*om*/) const
 {
-  (void)dst;
-  (void)src;
   Assert(cols != nullptr, ExcNeedsSparsityPattern());
   Assert(val != nullptr, ExcNotInitialized());
   Assert(m() == n(),
@@ -1235,8 +1228,6 @@ ChunkSparseMatrix<number>::precondition_SSOR(Vector<somenumber>       &dst,
 {
   // to understand how this function works you may want to take a look at the
   // CVS archives to see the original version which is much clearer...
-  (void)dst;
-  (void)src;
   Assert(cols != nullptr, ExcNeedsSparsityPattern());
   Assert(val != nullptr, ExcNotInitialized());
   Assert(m() == n(),
@@ -1291,7 +1282,6 @@ void
 ChunkSparseMatrix<number>::SOR(Vector<somenumber> &dst,
                                const number /*om*/) const
 {
-  (void)dst;
   Assert(cols != nullptr, ExcNeedsSparsityPattern());
   Assert(val != nullptr, ExcNotInitialized());
   Assert(m() == n(),
@@ -1308,7 +1298,6 @@ void
 ChunkSparseMatrix<number>::TSOR(Vector<somenumber> &dst,
                                 const number /*om*/) const
 {
-  (void)dst;
   Assert(cols != nullptr, ExcNeedsSparsityPattern());
   Assert(val != nullptr, ExcNotInitialized());
   Assert(m() == n(),
@@ -1328,9 +1317,6 @@ ChunkSparseMatrix<number>::PSOR(
   const std::vector<size_type> &inverse_permutation,
   const number /*om*/) const
 {
-  (void)dst;
-  (void)permutation;
-  (void)inverse_permutation;
   Assert(cols != nullptr, ExcNeedsSparsityPattern());
   Assert(val != nullptr, ExcNotInitialized());
   Assert(m() == n(),
@@ -1355,9 +1341,6 @@ ChunkSparseMatrix<number>::TPSOR(
   const std::vector<size_type> &inverse_permutation,
   const number /*om*/) const
 {
-  (void)dst;
-  (void)permutation;
-  (void)inverse_permutation;
   Assert(cols != nullptr, ExcNeedsSparsityPattern());
   Assert(val != nullptr, ExcNotInitialized());
   Assert(m() == n(),
@@ -1381,8 +1364,6 @@ ChunkSparseMatrix<number>::SOR_step(Vector<somenumber>       &v,
                                     const Vector<somenumber> &b,
                                     const number /*om*/) const
 {
-  (void)v;
-  (void)b;
   Assert(cols != nullptr, ExcNeedsSparsityPattern());
   Assert(val != nullptr, ExcNotInitialized());
   Assert(m() == n(),
@@ -1403,8 +1384,6 @@ ChunkSparseMatrix<number>::TSOR_step(Vector<somenumber>       &v,
                                      const Vector<somenumber> &b,
                                      const number /*om*/) const
 {
-  (void)v;
-  (void)b;
   Assert(cols != nullptr, ExcNeedsSparsityPattern());
   Assert(val != nullptr, ExcNotInitialized());
   Assert(m() == n(),
@@ -1437,7 +1416,6 @@ void
 ChunkSparseMatrix<number>::SSOR(Vector<somenumber> &dst,
                                 const number /*om*/) const
 {
-  (void)dst;
   Assert(cols != nullptr, ExcNeedsSparsityPattern());
   Assert(val != nullptr, ExcNotInitialized());
   Assert(m() == n(),
index 7111ba857135c80722dfe9dc52f9a1448f0b5ad1..3e5be710bd153477f58c3b83ac5825e724f4ab83 100644 (file)
@@ -353,7 +353,6 @@ DiagonalMatrix<VectorType>::operator()(const size_type i,
                                        const size_type j) const
 {
   Assert(i == j, ExcIndexRange(j, i, i + 1));
-  (void)j;
   return diagonal(i);
 }
 
@@ -364,7 +363,6 @@ typename VectorType::value_type &
 DiagonalMatrix<VectorType>::operator()(const size_type i, const size_type j)
 {
   Assert(i == j, ExcIndexRange(j, i, i + 1));
-  (void)j;
   return diagonal(i);
 }
 
index adffb5014822cf47d3f9712db1b2aa7b32207c46..0fa1269a1099ebd9cbcc5f9d0e90863e8fc3dd76 100644 (file)
@@ -963,7 +963,6 @@ namespace DynamicSparsityPatternIterators
   inline int
   Iterator::operator-(const Iterator &other) const
   {
-    (void)other;
     Assert(accessor.sparsity_pattern == other.accessor.sparsity_pattern,
            ExcInternalError());
     DEAL_II_NOT_IMPLEMENTED();
index 6838eaec1cc647763454665ba24dea93bd2623da..39b1d2df373024f097123fb30cb28833cc88e1a1 100644 (file)
@@ -1185,7 +1185,6 @@ FullMatrix<number> &
 FullMatrix<number>::operator=(const number d)
 {
   Assert(d == number(0), ExcScalarAssignmentOnlyForZeroValue());
-  (void)d; // removes -Wunused-parameter warning in optimized mode
 
   if (this->n_elements() != 0)
     this->reset_values();
index e9e160cd247cb7f577243ff255c69b05338c0c24..bca782b77cf1da7a504c46e13497440e26d06c0c 100644 (file)
@@ -1835,7 +1835,6 @@ FullMatrix<number>::gauss_jordan()
   for (size_type i = 0; i < N; ++i)
     diagonal_sum += std::abs((*this)(i, i));
   const double typical_diagonal_element = diagonal_sum / N;
-  (void)typical_diagonal_element;
 
   // initialize the array that holds
   // the permutations that we find
index 54946d375ec6bb873bc12cdc7185a0f79a837f5d..e4c3ae1c566a72a9eeb6ecbc0e0bbc7d72b5514d 100644 (file)
@@ -1352,7 +1352,6 @@ namespace PETScWrappers
            ExcMessage("The serialized value of size (" + std::to_string(size) +
                       ") does not match the current size (" +
                       std::to_string(this->size()) + ")"));
-    (void)size;
     ar &local_range;
     Assert(local_range == this->local_range(),
            ExcMessage("The serialized value of local_range (" +
@@ -1361,7 +1360,6 @@ namespace PETScWrappers
                       ") does not match the current local_range (" +
                       std::to_string(this->local_range().first) + ", " +
                       std::to_string(this->local_range().second) + ")"));
-    (void)local_range;
 
     PetscScalar *array = nullptr;
     int          ierr  = VecGetArray(petsc_vector(), &array);
index b2752324ea81579f920509a2c1bc3f07c976c710..a95c5b237f8a219df1e7fb72cee35c81b750331a 100644 (file)
@@ -187,7 +187,6 @@ namespace internal
     // for a serial computation (don't!), or nobody implemented, instantiated,
     // and tested the parallel version for your vector type.
     Assert(other == nullptr, ExcNotImplemented());
-    (void)other;
     return prev;
   }
 
index 29c92e61e9c1d13e6dc6468cb6747672f3970fec..31fc548bb48a94327d79ac65563065552cf0e715 100644 (file)
@@ -1115,7 +1115,6 @@ namespace internal
     block(VectorType &vector, const unsigned int b)
     {
       AssertDimension(b, 0);
-      (void)b;
       return vector;
     }
 
@@ -1128,7 +1127,6 @@ namespace internal
     block(const VectorType &vector, const unsigned int b)
     {
       AssertDimension(b, 0);
-      (void)b;
       return vector;
     }
 
index 20dc1fac068fa8815055d31f15a1cbe73a6fcf66..32aa33bfb505fda9c09012933b6a414e0f15c717 100644 (file)
@@ -261,7 +261,6 @@ namespace internal
     block(VectorType &vector, const unsigned int b)
     {
       AssertDimension(b, 0);
-      (void)b;
       return vector;
     }
 
index 2830a35c26ced3f1175aa1c9a267aa2a86a58490..d73bf6388bdca91823aae4191bb37a3087fd1294 100644 (file)
@@ -88,7 +88,6 @@ template <typename number>
 SparseMatrix<number> &
 SparseMatrix<number>::operator=(const SparseMatrix<number> &m)
 {
-  (void)m;
   Assert(m.cols == nullptr && m.val == nullptr && m.max_len == 0,
          ExcMessage("This operator can only be called if the provided right "
                     "hand side is an empty matrix. This operator can not be "
@@ -138,7 +137,6 @@ SparseMatrix<number>::SparseMatrix(const SparsityPattern &c,
   , val(nullptr)
   , max_len(0)
 {
-  (void)id;
   Assert(c.n_rows() == id.m(), ExcDimensionMismatch(c.n_rows(), id.m()));
   Assert(c.n_cols() == id.n(), ExcDimensionMismatch(c.n_cols(), id.n()));
 
@@ -164,7 +162,6 @@ template <typename number>
 SparseMatrix<number> &
 SparseMatrix<number>::operator=(const double d)
 {
-  (void)d;
   Assert(d == 0, ExcScalarAssignmentOnlyForZeroValue());
 
   Assert(cols != nullptr, ExcNeedsSparsityPattern());
@@ -204,7 +201,6 @@ template <typename number>
 SparseMatrix<number> &
 SparseMatrix<number>::operator=(const IdentityMatrix &id)
 {
-  (void)id;
   Assert(cols->n_rows() == id.m(),
          ExcDimensionMismatch(cols->n_rows(), id.m()));
   Assert(cols->n_cols() == id.n(),
@@ -407,7 +403,6 @@ SparseMatrix<number>::copy_from(const TrilinosWrappers::SparseMatrix &matrix)
         value_cache.data(),
         reinterpret_cast<TrilinosWrappers::types::int_type *>(
           colnum_cache.data()));
-      (void)ierr;
       Assert(ierr == 0, ExcTrilinosError(ierr));
 
       // resize arrays to the size actually used
index 80b414f807b265aa1f2dca06caae536ad19c236b..1c34ba5cb08f99df5cabf70077f0a320d60dbd3a 100644 (file)
@@ -69,7 +69,6 @@ template <typename number>
 SparseMatrixEZ<number> &
 SparseMatrixEZ<number>::operator=(const SparseMatrixEZ<number> &m)
 {
-  (void)m;
   Assert(m.empty(),
          ExcMessage("This operator can only be called if the provided right "
                     "hand side is an empty matrix. This operator can not be "
@@ -83,7 +82,6 @@ template <typename number>
 SparseMatrixEZ<number> &
 SparseMatrixEZ<number>::operator=(const double d)
 {
-  (void)d;
   Assert(d == 0, ExcScalarAssignmentOnlyForZeroValue());
 
   typename std::vector<Entry>::iterator       e   = data.begin();
index fdedf849ae87c7031ee779194e80ab833a5cff38..581ee642f7b6d68b6bc537ceeaf1473d63d31f4c 100644 (file)
@@ -584,7 +584,6 @@ namespace internal
           std::array<AlignedVector<Number>, dim>  &eigenvalues)
     {
       const unsigned int n_rows_1d = mass_matrix[0].n_cols();
-      (void)n_rows_1d;
 
       for (unsigned int dir = 0; dir < dim; ++dir)
         {
index 6f98f1eea533c2c13506b6f30967628dac1672b0..d8ffa6f33e602a3c6bbf8e269b71d84e01a577bc 100644 (file)
@@ -2010,9 +2010,6 @@ DEAL_II_NAMESPACE_OPEN // Do not convert for module purposes
           Assert(dst.Map().SameAs(mtrx.DomainMap()) == true,
                  ExcMessage("Row map of matrix does not fit with vector map!"));
         }
-      (void)mtrx; // removes -Wunused-variable in optimized mode
-      (void)src;
-      (void)dst;
     }
 
     inline void
@@ -2039,9 +2036,6 @@ DEAL_II_NAMESPACE_OPEN // Do not convert for module purposes
                  ExcMessage(
                    "Row map of operator does not fit with vector map!"));
         }
-      (void)op; // removes -Wunused-variable in optimized mode
-      (void)src;
-      (void)dst;
     }
 
 
index ad20de475cfbbaed78a567f071ced46ed9b5e289..b34e1238260c738c3708e1109704d608aef24303 100644 (file)
@@ -116,8 +116,6 @@ namespace LinearAlgebra
                                       block_sparsity_pattern.n_block_cols()));
 
           const size_type n_block_rows = tpetra_maps.size();
-          (void)n_block_rows;
-
           Assert(n_block_rows == block_sparsity_pattern.n_block_rows(),
                  ExcDimensionMismatch(n_block_rows,
                                       block_sparsity_pattern.n_block_rows()));
index 38cef740f8a07b1c5558302d04a8bc9841c535eb..d2e6da7cf59c4e91d31811d5235b7495175535a1 100644 (file)
@@ -850,7 +850,6 @@ namespace LinearAlgebra
     SparseMatrix<Number, MemorySpace> &
     SparseMatrix<Number, MemorySpace>::operator=(const double d)
     {
-      (void)d;
       Assert(d == 0, ExcScalarAssignmentOnlyForZeroValue());
 
       if (compressed)
index 6aa778e140bd80b3d52533cf7c19d47499d48611..0157e9a4f3e549b0a62143832aca43d437db8b88 100644 (file)
@@ -450,7 +450,6 @@ namespace LinearAlgebra
     Vector<Number, MemorySpace> &
     Vector<Number, MemorySpace>::operator=(const Number s)
     {
-      (void)s;
       Assert(s == Number(0.0),
              ExcMessage("Only 0 can be assigned to a vector."));
 
index a294fcc70878845be192f73e097cb33b3cea364b..613c9a2e523ca88636de9fc7d4b66e8e843c87e3 100644 (file)
@@ -267,7 +267,6 @@ namespace Portable
     , shared_data(data->shared_data)
     , cell_id(data->team_member.league_rank())
   {
-    (void)dof_index;
     AssertIndexRange(dof_index, data->n_dofhandler);
   }
 
index 2458f92e55605cb2913336470c4ee72c7fac2703..b4eae634c9a41be61402c0aa5cadabc1aa5fa257 100644 (file)
@@ -928,9 +928,6 @@ namespace internal
                        VectorizedArrayType             &res,
                        std::bool_constant<true>) const
     {
-      (void)vec_ptr;
-      (void)constant_offset;
-      (void)vec;
       Assert(vec_ptr == vec.begin() + constant_offset, ExcInternalError());
       res.scatter(indices, vec_ptr);
     }
index 4513cb6ea3df3fee373485dbc716a17b7afb8002..24c74509fb616106f68906e18295f90132e78850 100644 (file)
@@ -224,7 +224,6 @@ namespace MeshWorker
     // We permit different numbers of matrices, vectors and DoF index vectors.
     // So we have to be a bit permissive here.
     constexpr int max_index = std::max({n_matrices, n_vectors, n_dof_indices});
-    (void)max_index;
     Assert(index < max_index, ExcIndexRange(index, 0, max_index));
 
     if (index < n_matrices)
index fa16d56fbe1af0842a1801af5e539b52ff39eb3b..8fcd1f17b3cf8319e467c7838b480781ab6fd3a5 100644 (file)
@@ -127,14 +127,7 @@ CellDataTransfer<dim, spacedim, VectorType>::
         }
     }
 
-  if constexpr (running_in_debug_mode())
-    {
-      n_active_cells_pre = triangulation->n_active_cells();
-    }
-  else
-    {
-      (void)n_active_cells_pre;
-    }
+  n_active_cells_pre = triangulation->n_active_cells();
 }
 
 
@@ -151,10 +144,6 @@ CellDataTransfer<dim, spacedim, VectorType>::unpack(const VectorType &in,
       Assert(out.size() == triangulation->n_active_cells(),
              ExcDimensionMismatch(out.size(), triangulation->n_active_cells()));
     }
-  else
-    {
-      (void)n_active_cells_pre;
-    }
 
   // Transfer data of persisting cells.
   for (const auto &persisting : persisting_cells_active_index)
index ba58e0a811632ea1c8568366965e34938a8a4616..9955d975a8e8e9f0ad626f4f7ddbc480a8ad6451 100644 (file)
@@ -756,8 +756,7 @@ namespace internal
     dealii::hp::FESubfaceValues<dim, spacedim> &fe_subface_values,
     const typename KellyErrorEstimator<dim, spacedim>::Strategy strategy)
   {
-    const auto neighbor = cell->neighbor(face_no);
-    (void)neighbor;
+    const auto         neighbor           = cell->neighbor(face_no);
     const unsigned int n_solution_vectors = solutions.size();
     const auto         face               = cell->face(face_no);
 
@@ -1171,7 +1170,6 @@ KellyErrorEstimator<dim, spacedim>::estimate(
     }
 
   const unsigned int n_components = dof_handler.get_fe(0).n_components();
-  (void)n_components;
 
   // sanity checks
   Assert(solutions.size() > 0, ExcNoSolutions());
index f7c3569ff82e45c587c6c8c8fc88a5c9296bd513..df5e3c97efeb0134b8d8dbdb9ad54a80554e3a33 100644 (file)
@@ -581,8 +581,6 @@ namespace MatrixCreator
         return;
 
       const unsigned int dofs_per_cell = data.dof_indices.size();
-      (void)dofs_per_cell;
-
       Assert(data.cell_matrix.m() == dofs_per_cell, ExcInternalError());
       Assert(data.cell_matrix.n() == dofs_per_cell, ExcInternalError());
       Assert((right_hand_side == nullptr) ||
@@ -1364,7 +1362,6 @@ namespace MatrixCreator
     Assert(fe_is_hermite ||
              matrix.n() == dof.n_boundary_dofs(boundary_functions),
            ExcInternalError());
-    (void)fe_is_hermite;
 
     Assert(matrix.n() == matrix.m(), ExcInternalError());
     Assert(matrix.n() == rhs_vector.size(), ExcInternalError());
index 2e240ce59432213176d09bdbb49ca64754a962a8..ad4249d54ac9cbeb2966a0893519750ec453f7e5 100644 (file)
@@ -692,7 +692,6 @@ namespace VectorTools
                     for (unsigned int d = 0; d < dim; ++d)
                       Assert(vector_dofs.dof_indices[d] < n_dofs,
                              ExcInternalError());
-                    (void)n_dofs;
 
                     // we need the normal vector on this face. we know that
                     // it is a vector of length 1 but at least with higher
@@ -1567,7 +1566,6 @@ namespace VectorTools
       }
     AssertDimension(n_total_constraints_found,
                     no_normal_flux_constraints.n_constraints());
-    (void)n_total_constraints_found;
   }
 
 
index 429ca582c2ca659702ab45c1316cacbbded2f3c8..60ed8430f2e99dff5e4db466eec3b12be4056386 100644 (file)
@@ -527,7 +527,6 @@ namespace VectorTools
       const Vector<Number>                                              &vector,
       const typename Triangulation<dim, spacedim>::active_cell_iterator &cell)
     {
-      (void)tria;
       AssertDimension(tria.n_active_cells(), vector.size());
       return vector[cell->active_cell_index()];
     }
@@ -616,9 +615,6 @@ namespace VectorTools
                                           spacedim,
                                           typename VectorType::value_type>>> &)
     {
-      (void)evaluation_flags;
-      (void)first_selected_component;
-
       Assert(n_components == 1 && first_selected_component == 0,
              ExcMessage(
                "A cell-data vector can only have a single component."));
index c7bffc2ac6d74a32d75266200a8683ba500aa226..c538b59c43594dca67b7f1a6443904c57cb319c1 100644 (file)
@@ -422,7 +422,6 @@ namespace VectorTools
                               /* starting_offset = */ 0,
                               fe_values,
                               function_values);
-            (void)offset;
             Assert(offset == n_components, ExcInternalError());
 
             FETools::convert_generalized_support_point_values_to_dof_values(
@@ -992,7 +991,6 @@ namespace VectorTools
       intergridmap.get_source_grid();
     const DoFHandler<dim, spacedim> &dof_handler_2 =
       intergridmap.get_destination_grid();
-    (void)dof_handler_2;
 
     Assert(
       dof_handler_1.get_fe_collection() == dof_handler_2.get_fe_collection(),
index 2005fd05c803d06ba6e2d3dc3c7f66d76c20b83a..dfa32048fce3389bcf166f7ab889db73a66705be 100644 (file)
@@ -90,7 +90,6 @@ namespace VectorTools
     std::enable_if_t<dealii::is_serial_vector<VectorType>::value == false>
     subtract_mean_value(VectorType &v, const std::vector<bool> &p_select)
     {
-      (void)p_select;
       Assert(p_select.empty(), ExcNotImplemented());
       // In case of an empty boolean mask operate on the whole vector:
       v.add(-v.mean_value());
index fe7e0a2352e5f021787e27eafb56cd13e85d2132..48b900bcf1a97dea0068ef2aa5ef797d163ceeed 100644 (file)
@@ -168,7 +168,6 @@ namespace parallel
     Assert(&triangulation == &(dof_handler.get_triangulation()),
            ExcMessage(
              "Triangulation associated with the DoFHandler has changed!"));
-    (void)triangulation;
 
     // Skip if the DoFHandler has not been initialized yet.
     if (dof_handler.get_fe_collection().empty())
index 3718320e2460eed8df991143b759791b72cb72c1..469316a42a308d5cd7c25ac6a3f000fe1d053dd4 100644 (file)
@@ -55,7 +55,6 @@ namespace parallel
         (partition_zoltan | partition_metis | partition_zorder |
          partition_custom_signal) &
         settings;
-      (void)partition_settings;
       Assert(partition_settings == partition_auto ||
                partition_settings == partition_metis ||
                partition_settings == partition_zoltan ||
index edb7a616a12285d68b32b31eb79e229566433556..86a381343f2b12c45fe72bdec4e8c9fa77e822d1 100644 (file)
@@ -207,7 +207,6 @@ FE_Nothing<dim, spacedim>::compare_for_domination(
   const unsigned int                  codim) const
 {
   Assert(codim <= dim, ExcImpossibleInDim(dim));
-  (void)codim;
 
   if (!dominate)
     // if FE_Nothing does not dominate, there are no requirements
@@ -279,8 +278,6 @@ FE_Nothing<dim, spacedim>::get_interpolation_matrix(
 {
   // Since this element has no dofs,
   // the interpolation matrix is necessarily empty.
-  (void)interpolation_matrix;
-
   Assert(interpolation_matrix.m() == 0,
          ExcDimensionMismatch(interpolation_matrix.m(), 0));
   Assert(interpolation_matrix.n() == 0,
@@ -298,8 +295,6 @@ FE_Nothing<dim, spacedim>::get_face_interpolation_matrix(
 {
   // since this element has no face dofs, the
   // interpolation matrix is necessarily empty
-  (void)interpolation_matrix;
-
   Assert(interpolation_matrix.m() == 0,
          ExcDimensionMismatch(interpolation_matrix.m(), 0));
   Assert(interpolation_matrix.n() == 0,
@@ -318,8 +313,6 @@ FE_Nothing<dim, spacedim>::get_subface_interpolation_matrix(
 {
   // since this element has no face dofs, the
   // interpolation matrix is necessarily empty
-
-  (void)interpolation_matrix;
   Assert(interpolation_matrix.m() == 0,
          ExcDimensionMismatch(interpolation_matrix.m(), 0));
   Assert(interpolation_matrix.n() == 0,
index ad9331444b8117813886515a10b36d41ddcdba75..93cef92bfc310944bae054b16a0e25440bc4c195 100644 (file)
@@ -69,8 +69,6 @@ FE_Q_DG0<dim, spacedim>::FE_Q_DG0(const Quadrature<1> &points)
       get_riaf_vector(points.size() - 1))
 {
   const int degree = points.size() - 1;
-  (void)degree;
-
   Assert(degree > 0,
          ExcMessage("This element can only be used for polynomial degrees "
                     "at least zero"));
index d12fa1afab07f921b72343ff8d1c5acf8c1729ae..3514905d2d1f008696edb5ab91c3dd3cc319cc47 100644 (file)
@@ -1432,7 +1432,6 @@ namespace GridGenerator
                 cell->face(5)->set_all_boundary_ids(1);
                 ++count;
               }
-          (void)count;
           Assert(count == 48, ExcInternalError());
         }
       else
@@ -2322,7 +2321,6 @@ namespace GridGenerator
         default:
           DEAL_II_ASSERT_UNREACHABLE();
       }
-    (void)twisted_data; // make the static analyzer happy
     Assert(
       !twisted_data,
       ExcInvalidInputOrientation(
@@ -7519,8 +7517,6 @@ namespace GridGenerator
                           const bool          colorize)
   {
     Assert(dim == 2 || dim == 3, ExcNotImplemented());
-    (void)colorize;
-    (void)n_cells;
     Assert(inner_radius < outer_radius,
            ExcMessage("outer_radius has to be bigger than inner_radius."));
     if (n_shells == 0)
@@ -7584,8 +7580,6 @@ namespace GridGenerator
         const double                                         radius) {
         (void)center;
         (void)radial_vertex_tolerance;
-        (void)face;
-        (void)radius;
         for (unsigned int vertex_n = 0;
              vertex_n < GeometryInfo<dim>::vertices_per_face;
              ++vertex_n)
index 3f7da7e914eb96831044688a1c4cea56318f7bd4..06fc9ebfd40156183702dd190e22b7aed618653f 100644 (file)
@@ -2130,7 +2130,6 @@ namespace GridTools
     const FullMatrix<double> &matrix)
   {
     static const int space_dim = CellIterator::AccessorType::space_dimension;
-    (void)space_dim;
     AssertIndexRange(direction, space_dim);
 
     if constexpr (running_in_debug_mode())
@@ -2227,10 +2226,7 @@ namespace GridTools
   {
     static const int dim       = MeshType::dimension;
     static const int space_dim = MeshType::space_dimension;
-    (void)dim;
-    (void)space_dim;
     AssertIndexRange(direction, space_dim);
-
     Assert(dim == space_dim, ExcNotImplemented());
 
     // Loop over all cells on the highest level and collect all boundary
@@ -2309,8 +2305,6 @@ namespace GridTools
   {
     static const int dim       = MeshType::dimension;
     static const int space_dim = MeshType::space_dimension;
-    (void)dim;
-    (void)space_dim;
     AssertIndexRange(direction, space_dim);
 
     // Loop over all cells on the highest level and collect all boundary
index 1e909e775147bb34093f829a69eba461f92e807f..d9b8595188ad53dcf8ebfd0535074dee54610c15 100644 (file)
@@ -1048,7 +1048,6 @@ namespace TriangulationDescription
           const unsigned int n_mpi_ranks =
             dealii::Utilities::MPI::n_mpi_processes(
               partition.get_mpi_communicator());
-          (void)n_mpi_ranks;
 
           for (unsigned int i = 0; i < partition.locally_owned_size(); ++i)
             {
index 52b7ba6af0ce1543cc41d5101149954d0678521c..1d4bd3b3573dfd9fa40fee9c03155c2ff4d12af5 100644 (file)
@@ -44,7 +44,6 @@ BlockSparsityPatternBase<SparsityPatternType>::BlockSparsityPatternBase(
   const BlockSparsityPatternBase &s)
   : BlockSparsityPatternBase()
 {
-  (void)s;
   Assert(s.n_block_rows() == 0 && s.n_block_cols() == 0,
          ExcMessage(
            "This constructor can only be called if the provided argument "
index 69a59cbd8040ae45312c4e2bec8481026783f1cf..cbdf2a2d1656d226e8e2df2cbbc33ea49ffb164b 100644 (file)
@@ -232,7 +232,6 @@ DynamicSparsityPattern::DynamicSparsityPattern(const DynamicSparsityPattern &s)
   , have_entries(false)
   , rowset(0)
 {
-  (void)s;
   Assert(s.rows == 0 && s.cols == 0,
          ExcMessage(
            "This constructor can only be called if the provided argument "
@@ -271,7 +270,6 @@ DynamicSparsityPattern::DynamicSparsityPattern(const size_type n)
 DynamicSparsityPattern &
 DynamicSparsityPattern::operator=(const DynamicSparsityPattern &s)
 {
-  (void)s;
   Assert(s.n_rows() == 0 && s.n_cols() == 0,
          ExcMessage(
            "This operator can only be called if the provided argument "
index 34f34eec46d8851b4a738f7b612a1ab53d26481c..a140f63326f5ccdb6c3a8bd2dade7b2dd65c34c9 100644 (file)
@@ -416,7 +416,6 @@ template <typename number>
 LAPACKFullMatrix<number> &
 LAPACKFullMatrix<number>::operator=(const number d)
 {
-  (void)d;
   Assert(d == number(0), ExcScalarAssignmentOnlyForZeroValue());
 
   if (this->n_elements() != 0)
@@ -1504,7 +1503,6 @@ LAPACKFullMatrix<number>::compute_cholesky_factorization()
 
   const types::blas_int mm = this->m();
   const types::blas_int nn = this->n();
-  (void)mm;
   Assert(mm == nn, ExcDimensionMismatch(mm, nn));
 
   number *const         values = this->values.data();
index 82bfdbbb9e538a0c315ae06a0e496247909a8f18..e3ebcf266b66772d0234c3ba5ea29386901d9e3c 100644 (file)
@@ -137,7 +137,6 @@ namespace PETScWrappers
   MatrixBase &
   MatrixBase::operator=(const value_type d)
   {
-    (void)d;
     Assert(d == value_type(), ExcScalarAssignmentOnlyForZeroValue());
 
     assert_is_compressed();
index bd16e1eea4796900eee83defdcfdc4c3c8347e56..4d581290758d41927514dfd66b185ee5d4fb86c6 100644 (file)
@@ -270,7 +270,6 @@ namespace PETScWrappers
                           const size_type n,
                           const size_type locally_owned_size)
     {
-      (void)n;
       AssertIndexRange(locally_owned_size, n + 1);
       ghosted = false;
 
@@ -291,7 +290,6 @@ namespace PETScWrappers
                           const size_type locally_owned_size,
                           const IndexSet &ghostnodes)
     {
-      (void)n;
       AssertIndexRange(locally_owned_size, n + 1);
       // If the size of the index set can be converted to a PetscInt then every
       // index can also be converted
index 472e8124cf3ddf4ad22cc47a43cc9108050dcfd7..3144c1b32e2976a6dcc515198090e09e66e63351 100644 (file)
@@ -551,7 +551,6 @@ namespace PETScWrappers
 #  ifdef DEAL_II_PETSC_WITH_HYPRE
     initialize();
 #  else // DEAL_II_PETSC_WITH_HYPRE
-    (void)pc;
     Assert(false,
            ExcMessage("Your PETSc installation does not include a copy of "
                       "the hypre package necessary for this preconditioner."));
index e81e040ecba94a79acdbb5baaec8c6fc63e3dad4..895a4fdc392b060b48df174c3fcb387b18ca4e48 100644 (file)
@@ -800,8 +800,6 @@ namespace PETScWrappers
         "the MUMPS package necessary for this solver. You will need to configure "
         "PETSc so that it includes MUMPS, recompile it, and then re-configure "
         "and recompile deal.II as well."));
-
-    // Cast to void to silence compiler warnings
     (void)A;
     (void)x;
     (void)b;
index 7bc5051a430515f0be5b88114544daf1243232e9..a75fc0ff8781332a1113538a1744d8ca614ca657 100644 (file)
@@ -444,7 +444,6 @@ ScaLAPACKMatrix<NumberType>::copy_from(const LAPACKFullMatrix<NumberType> &B,
                                    &n_proc_cols_B);
       Assert(n_local_rows_B == n_rows, ExcInternalError());
       Assert(n_local_cols_B == n_columns, ExcInternalError());
-      (void)n_local_cols_B;
 
       int lda  = std::max(1, n_local_rows_B);
       int info = 0;
@@ -618,7 +617,6 @@ ScaLAPACKMatrix<NumberType>::copy_to(LAPACKFullMatrix<NumberType> &B,
                                    &n_proc_cols_B);
       Assert(n_local_rows_B == n_rows, ExcInternalError());
       Assert(n_local_cols_B == n_columns, ExcInternalError());
-      (void)n_local_cols_B;
 
       int lda  = std::max(1, n_local_rows_B);
       int info = 0;
index 28b64cad809396c2c28325674111797a49df667e..4e888bce04bf5e4b0c5c1721112cc77209afc3cc 100644 (file)
@@ -50,7 +50,6 @@ SparsityPattern::SparsityPattern()
 SparsityPattern::SparsityPattern(const SparsityPattern &s)
   : SparsityPattern()
 {
-  (void)s;
   Assert(s.empty(),
          ExcMessage(
            "This constructor can only be called if the provided argument "
@@ -182,7 +181,6 @@ SparsityPattern::SparsityPattern(const SparsityPattern &original,
 SparsityPattern &
 SparsityPattern::operator=(const SparsityPattern &s)
 {
-  (void)s;
   Assert(s.empty(),
          ExcMessage(
            "This operator can only be called if the provided argument "
index d31815b093fe10014691bfddf64903b066c91699..115f630190ea4cfe3b0e04fea734e46538b7aba7 100644 (file)
@@ -307,7 +307,6 @@ namespace SparsityTools
         cell_weights.empty(),
         ExcMessage(
           "The cell weighting functionality for Zoltan has not yet been implemented."));
-      (void)cell_weights;
 
       // MPI environment must have been initialized by this point.
       std::unique_ptr<Zoltan> zz = std::make_unique<Zoltan>(MPI_COMM_SELF);
@@ -375,7 +374,6 @@ namespace SparsityTools
                                       export_local_ids,
                                       export_procs,
                                       export_to_part);
-      (void)rc;
 
       // check for error code in partitioner
       Assert(rc == ZOLTAN_OK, ExcInternalError());
@@ -501,8 +499,6 @@ namespace SparsityTools
                        num_objects,
                        global_ids.data(),
                        color_exp.data());
-
-    (void)rc;
     // Check for error code
     Assert(rc == ZOLTAN_OK, ExcInternalError());
 
index c4c65d5736985f7719a61a94b12d3924db7ad115..faba8f71efaaf03e87af3fb0d67d4ff4f7848793 100644 (file)
@@ -88,8 +88,6 @@ namespace TrilinosWrappers
                                 block_sparsity_pattern.n_block_cols()));
 
     const size_type n_block_rows = epetra_maps.size();
-    (void)n_block_rows;
-
     Assert(n_block_rows == block_sparsity_pattern.n_block_rows(),
            ExcDimensionMismatch(n_block_rows,
                                 block_sparsity_pattern.n_block_rows()));
@@ -97,7 +95,6 @@ namespace TrilinosWrappers
            ExcDimensionMismatch(n_block_rows,
                                 block_sparsity_pattern.n_block_cols()));
 
-
     // Call the other basic reinit function, ...
     reinit(block_sparsity_pattern.n_block_rows(),
            block_sparsity_pattern.n_block_cols());
index 1155fbdfe023ad94d19631ca33ce9e3ecb73e442..8971aa5ab144820f7cc595c50a85556e83906253 100644 (file)
@@ -114,7 +114,6 @@ namespace LinearAlgebra
         {
           const int ierr = vector->PutScalar(0.);
           Assert(ierr == 0, ExcTrilinosError(ierr));
-          (void)ierr;
         }
     }
 
@@ -169,7 +168,6 @@ namespace LinearAlgebra
               const int ierr =
                 vector->Import(V.trilinos_vector(), data_exchange, Insert);
               Assert(ierr == 0, ExcTrilinosError(ierr));
-              (void)ierr;
             }
           else
             vector = std::make_unique<Epetra_FEVector>(V.trilinos_vector());
@@ -187,7 +185,6 @@ namespace LinearAlgebra
 
       const int ierr = vector->PutScalar(s);
       Assert(ierr == 0, ExcTrilinosError(ierr));
-      (void)ierr;
 
       return *this;
     }
@@ -280,7 +277,6 @@ namespace LinearAlgebra
         {
           const int ierr = vector->Update(1., V.trilinos_vector(), 1.);
           Assert(ierr == 0, ExcTrilinosError(ierr));
-          (void)ierr;
         }
       else
         {
@@ -292,7 +288,6 @@ namespace LinearAlgebra
                                           data_exchange,
                                           Epetra_AddLocalAlso);
           Assert(ierr == 0, ExcTrilinosError(ierr));
-          (void)ierr;
         }
 
       return *this;
@@ -321,7 +316,6 @@ namespace LinearAlgebra
       double    result(0.);
       const int ierr = vector->Dot(V.trilinos_vector(), &result);
       Assert(ierr == 0, ExcTrilinosError(ierr));
-      (void)ierr;
 
       return result;
     }
@@ -348,7 +342,6 @@ namespace LinearAlgebra
 
       const int ierr = vector->Update(a, V.trilinos_vector(), 1.);
       Assert(ierr == 0, ExcTrilinosError(ierr));
-      (void)ierr;
     }
 
 
@@ -369,7 +362,6 @@ namespace LinearAlgebra
       const int ierr =
         vector->Update(a, V.trilinos_vector(), b, W.trilinos_vector(), 1.);
       Assert(ierr == 0, ExcTrilinosError(ierr));
-      (void)ierr;
     }
 
 
@@ -394,7 +386,6 @@ namespace LinearAlgebra
       const int ierr =
         vector->Multiply(1.0, scaling_factors.trilinos_vector(), *vector, 0.0);
       Assert(ierr == 0, ExcTrilinosError(ierr));
-      (void)ierr;
     }
 
 
@@ -410,7 +401,6 @@ namespace LinearAlgebra
           // Otherwise, just update
           int ierr = vector->Update(a, V.trilinos_vector(), 0.);
           Assert(ierr == 0, ExcTrilinosError(ierr));
-          (void)ierr;
         }
     }
 
@@ -452,7 +442,6 @@ namespace LinearAlgebra
 
       int ierr = vector->MeanValue(&mean_value);
       Assert(ierr == 0, ExcTrilinosError(ierr));
-      (void)ierr;
 
       return mean_value;
     }
@@ -465,7 +454,6 @@ namespace LinearAlgebra
       double norm(0.);
       int    ierr = vector->Norm1(&norm);
       Assert(ierr == 0, ExcTrilinosError(ierr));
-      (void)ierr;
 
       return norm;
     }
@@ -478,7 +466,6 @@ namespace LinearAlgebra
       double norm(0.);
       int    ierr = vector->Norm2(&norm);
       Assert(ierr == 0, ExcTrilinosError(ierr));
-      (void)ierr;
 
       return norm;
     }
@@ -491,7 +478,6 @@ namespace LinearAlgebra
       double norm(0.);
       int    ierr = vector->NormInf(&norm);
       Assert(ierr == 0, ExcTrilinosError(ierr));
-      (void)ierr;
 
       return norm;
     }
@@ -610,7 +596,6 @@ namespace LinearAlgebra
       int     ierr = vector->ExtractView(&val, &leading_dimension);
 
       Assert(ierr == 0, ExcTrilinosError(ierr));
-      (void)ierr;
       out.precision(precision);
       if (scientific)
         out.setf(std::ios::scientific, std::ios::floatfield);
index 4cd2efca9676d3b0f7ae340cc9bbed8c7503af5f..841b52bfafe523b98d2ddf272e51028ad370238e 100644 (file)
@@ -141,8 +141,6 @@ namespace TrilinosWrappers
       if (constant_modes_dimension > 0)
         {
           const size_type global_size = TrilinosWrappers::n_global_rows(matrix);
-          (void)global_length; // work around compiler warning about unused
-                               // function in release mode
           Assert(global_size ==
                    static_cast<size_type>(TrilinosWrappers::global_length(
                      distributed_constant_modes)),
@@ -172,7 +170,6 @@ namespace TrilinosWrappers
                     static_cast<double>(constant_modes[d][mode_index]);
                 }
             }
-          (void)expected_mode_size;
 
           parameter_list.set("null space: type", "pre-computed");
           parameter_list.set("null space: dimension",
index 0861882e0bef2ff56e7c02c20776cd2e4db1895e..d67b0543476e78d7135e8603a5b1eb1058731fcd 100644 (file)
@@ -148,9 +148,6 @@ namespace TrilinosWrappers
                                     TrilinosWrappers::global_length(
                                       distributed_constant_modes)));
 
-        (void)n_relevant_rows;
-        (void)global_length;
-
         // Reshape null space as a contiguous vector of doubles so that
         // Trilinos can read from it.
         for (size_type d = 0; d < constant_modes_dimension; ++d)
index f1eacec7b4993bbc0c75bfcbfce1e5d92fe889f8..123980fb9e17d90da1ddf0c74e109fad814f4f52 100644 (file)
@@ -399,7 +399,6 @@ namespace TrilinosWrappers
                                                     rhs_n_entries,
                                                     rhs_value_ptr,
                                                     rhs_index_ptr);
-            (void)ierr;
             Assert(ierr == 0, ExcTrilinosError(ierr));
 
             ierr = matrix->ExtractMyRowView(row_local,
@@ -565,7 +564,6 @@ namespace TrilinosWrappers
       // check whether we got the number of columns right.
       AssertDimension(sparsity_pattern.n_cols(),
                       TrilinosWrappers::n_global_cols(*graph));
-      (void)n_global_cols;
 
       // And now finally generate the matrix.
       matrix = std::make_unique<Epetra_FECrsMatrix>(Copy, *graph, false);
@@ -758,7 +756,6 @@ namespace TrilinosWrappers
             {
               Epetra_Export exporter(nonlocal_graph->RowMap(), row_space_map);
               int ierr = graph->Export(*nonlocal_graph, exporter, Add);
-              (void)ierr;
               Assert(ierr == 0, ExcTrilinosError(ierr));
             }
 
@@ -1131,7 +1128,6 @@ namespace TrilinosWrappers
         int             num_entries;
         const int       ierr =
           matrix->ExtractMyRowView(local_row, num_entries, values, col_indices);
-        (void)ierr;
 
         Assert(ierr == 0, ExcTrilinosError(ierr));
 
@@ -1205,7 +1201,6 @@ namespace TrilinosWrappers
                                             nnz_extracted,
                                             values,
                                             col_indices);
-        (void)ierr;
         Assert(ierr == 0, ExcTrilinosError(ierr));
 
         Assert(nnz_present == nnz_extracted,
@@ -1280,7 +1275,6 @@ namespace TrilinosWrappers
                                             nnz_extracted,
                                             values,
                                             col_indices);
-        (void)ierr;
         Assert(ierr == 0, ExcTrilinosError(ierr));
 
         Assert(nnz_present == nnz_extracted,
@@ -1772,7 +1766,6 @@ namespace TrilinosWrappers
   SparseMatrix &
   SparseMatrix::operator=(const double d)
   {
-    (void)d;
     Assert(d == 0, ExcScalarAssignmentOnlyForZeroValue());
     compress(VectorOperation::unknown); // TODO: why do we do this? Should we
                                         // not check for is_compressed?
@@ -1827,7 +1820,6 @@ namespace TrilinosWrappers
                                                 rhs_n_entries,
                                                 rhs_value_ptr,
                                                 rhs_index_ptr);
-        (void)ierr;
         Assert(ierr == 0, ExcTrilinosError(ierr));
 
         ierr =
@@ -1905,7 +1897,6 @@ namespace TrilinosWrappers
   {
     const int ierr = matrix->Scale(a);
     Assert(ierr == 0, ExcTrilinosError(ierr));
-    (void)ierr; // removes -Wunused-variable in optimized mode
 
     return *this;
   }
@@ -1921,7 +1912,6 @@ namespace TrilinosWrappers
 
     const int ierr = matrix->Scale(factor);
     Assert(ierr == 0, ExcTrilinosError(ierr));
-    (void)ierr; // removes -Wunused-variable in optimized mode
 
     return *this;
   }
@@ -1983,9 +1973,6 @@ namespace TrilinosWrappers
                           "Are you trying to put the product of the "
                           "matrix with a vector into a vector that has "
                           "ghost elements?"));
-        (void)m;
-        (void)in;
-        (void)out;
       }
     } // namespace SparseMatrixImplementation
   }   // namespace internal
@@ -1998,8 +1985,6 @@ namespace TrilinosWrappers
   {
     Assert(&src != &dst, ExcSourceEqualsDestination());
     Assert(matrix->Filled(), ExcMatrixNotCompressed());
-    (void)src;
-    (void)dst;
 
     internal::SparseMatrixImplementation::check_vector_map_equality(*matrix,
                                                                     src,
@@ -2020,7 +2005,6 @@ namespace TrilinosWrappers
 
     const int ierr = matrix->Multiply(false, tril_src, tril_dst);
     Assert(ierr == 0, ExcTrilinosError(ierr));
-    (void)ierr; // removes -Wunused-variable in optimized mode
   }
 
 
@@ -2061,7 +2045,6 @@ namespace TrilinosWrappers
 
     const int ierr = matrix->Multiply(true, tril_src, tril_dst);
     Assert(ierr == 0, ExcTrilinosError(ierr));
-    (void)ierr; // removes -Wunused-variable in optimized mode
   }
 
 
@@ -2282,7 +2265,6 @@ namespace TrilinosWrappers
           {
             const int ierr =
               matrix->ExtractMyRowView(i, num_entries, values, indices);
-            (void)ierr;
             Assert(ierr == 0, ExcTrilinosError(ierr));
 
             for (TrilinosWrappers::types::int_type j = 0; j < num_entries; ++j)
@@ -2700,7 +2682,6 @@ namespace TrilinosWrappers
           AssertDimension(i_local_size, first_op_init_map.NumMyPoints());
           const Epetra_Map &second_op_init_map = second_op.OperatorDomainMap();
           AssertDimension(i_local_size, second_op_init_map.NumMyPoints());
-          (void)second_op_init_map;
           Intermediate tril_int(View,
                                 first_op_init_map,
                                 const_cast<TrilinosScalar *>(i->begin()),
@@ -2740,7 +2721,6 @@ namespace TrilinosWrappers
           AssertDimension(i_local_size, first_op_init_map.NumMyPoints());
           const Epetra_Map &second_op_init_map = second_op.OperatorRangeMap();
           AssertDimension(i_local_size, second_op_init_map.NumMyPoints());
-          (void)second_op_init_map;
           Intermediate tril_int(View,
                                 first_op_init_map,
                                 const_cast<TrilinosScalar *>(i->begin()),
@@ -2777,7 +2757,6 @@ namespace TrilinosWrappers
           AssertDimension(i_local_size, first_op_init_map.NumMyPoints());
           const Epetra_Map &second_op_init_map = second_op.OperatorRangeMap();
           AssertDimension(i_local_size, second_op_init_map.NumMyPoints());
-          (void)second_op_init_map;
           Intermediate tril_int(View,
                                 first_op_init_map,
                                 const_cast<TrilinosScalar *>(i->begin()),
@@ -2817,7 +2796,6 @@ namespace TrilinosWrappers
           AssertDimension(i_local_size, first_op_init_map.NumMyPoints());
           const Epetra_Map &second_op_init_map = second_op.OperatorDomainMap();
           AssertDimension(i_local_size, second_op_init_map.NumMyPoints());
-          (void)second_op_init_map;
           Intermediate tril_int(View,
                                 first_op_init_map,
                                 const_cast<TrilinosScalar *>(i->begin()),
@@ -2876,7 +2854,6 @@ namespace TrilinosWrappers
           AssertDimension(i_local_size, first_op_init_map.NumMyPoints());
           const Epetra_Map &second_op_init_map = second_op.OperatorRangeMap();
           AssertDimension(i_local_size, second_op_init_map.NumMyPoints());
-          (void)second_op_init_map;
           Intermediate tril_int(View,
                                 first_op_init_map,
                                 const_cast<TrilinosScalar *>(i->begin()),
@@ -2914,7 +2891,6 @@ namespace TrilinosWrappers
           AssertDimension(i_local_size, first_op_init_map.NumMyPoints());
           const Epetra_Map &second_op_init_map = second_op.OperatorDomainMap();
           AssertDimension(i_local_size, second_op_init_map.NumMyPoints());
-          (void)second_op_init_map;
           Intermediate tril_int(View,
                                 first_op_init_map,
                                 const_cast<TrilinosScalar *>(i->begin()),
@@ -2948,7 +2924,6 @@ namespace TrilinosWrappers
           AssertDimension(i_local_size, first_op_init_map.NumMyPoints());
           const Epetra_Map &second_op_init_map = second_op.OperatorDomainMap();
           AssertDimension(i_local_size, second_op_init_map.NumMyPoints());
-          (void)second_op_init_map;
           Intermediate tril_int(View,
                                 first_op_init_map,
                                 const_cast<TrilinosScalar *>(i->begin()),
@@ -2986,7 +2961,6 @@ namespace TrilinosWrappers
           AssertDimension(i_local_size, first_op_init_map.NumMyPoints());
           const Epetra_Map &second_op_init_map = second_op.OperatorRangeMap();
           AssertDimension(i_local_size, second_op_init_map.NumMyPoints());
-          (void)second_op_init_map;
           Intermediate tril_int(View,
                                 first_op_init_map,
                                 const_cast<TrilinosScalar *>(i->begin()),
index 91cebeccd534d7dd0a4d1d2fca5a5665e3266411..7925c14e6f9abafc5f2fa227ce9bfd3cbbb83bdc 100644 (file)
@@ -135,7 +135,6 @@ namespace TrilinosWrappers
     , graph(
         new Epetra_FECrsGraph(View, *column_space_map, *column_space_map, 0))
   {
-    (void)input_sparsity;
     Assert(input_sparsity.n_rows() == 0,
            ExcMessage(
              "Copy constructor only works for empty sparsity patterns."));
@@ -828,7 +827,6 @@ namespace TrilinosWrappers
             int ierr = graph->ExtractGlobalRowView(trilinos_i,
                                                    nnz_extracted,
                                                    col_indices);
-            (void)ierr;
             Assert(ierr == 0, ExcTrilinosError(ierr));
             Assert(nnz_present == nnz_extracted,
                    ExcDimensionMismatch(nnz_present, nnz_extracted));
@@ -854,7 +852,6 @@ namespace TrilinosWrappers
             // an error.
             int ierr =
               graph->ExtractMyRowView(trilinos_i, nnz_extracted, col_indices);
-            (void)ierr;
             Assert(ierr == 0, ExcTrilinosError(ierr));
 
             Assert(nnz_present == nnz_extracted,
index f1f5a8c338f2a6551b30f28551d51a0c6f3d0d94..2624bd66d66acaaa58776ffd5a14b169786c909e 100644 (file)
@@ -236,9 +236,7 @@ namespace TrilinosWrappers
             {
               // old and new vectors have exactly the same map, i.e. size and
               // parallel distribution
-              int ierr;
-              ierr = vector->GlobalAssemble(last_action);
-              (void)ierr;
+              int ierr = vector->GlobalAssemble(last_action);
               Assert(ierr == 0, ExcTrilinosError(ierr));
 
               ierr = vector->PutScalar(0.0);
@@ -391,7 +389,6 @@ namespace TrilinosWrappers
           else
             {
               const int ierr = vector->PutScalar(0.);
-              (void)ierr;
               Assert(ierr == 0, ExcTrilinosError(ierr));
             }
 
index 23737c0123520690367cac7da35061c6907975f2..8adec2405f563184bdfa5d839fb5b087a78b5b54 100644 (file)
@@ -304,8 +304,6 @@ namespace internal
       const std::vector<unsigned int>  &constraint_pool_row_index,
       const std::vector<unsigned char> &irregular_cells)
     {
-      (void)constraint_pool_row_index;
-
       // first reorder the active FE index.
       const bool have_hp = dofs_per_cell.size() > 1;
       if (cell_active_fe_index.size() > 0)
index 647c8b78454dfb5bbedc5afdb722b8f82823d761..700c79b0802ab3e120c4e7521efe04cd74b2a2cf 100644 (file)
@@ -581,7 +581,6 @@ namespace MGTools
                         const bool                       keep_constrained_dofs)
   {
     const types::global_dof_index n_dofs = dof.n_dofs(level);
-    (void)n_dofs;
 
     Assert(sparsity.n_rows() == n_dofs,
            ExcDimensionMismatch(sparsity.n_rows(), n_dofs));
@@ -611,7 +610,6 @@ namespace MGTools
                              const bool keep_constrained_dofs)
   {
     const types::global_dof_index n_dofs = dof.n_dofs(level);
-    (void)n_dofs;
 
     Assert(sparsity.n_rows() == n_dofs,
            ExcDimensionMismatch(sparsity.n_rows(), n_dofs));
@@ -687,11 +685,8 @@ namespace MGTools
 
     const types::global_dof_index fine_dofs   = dof.n_dofs(level);
     const types::global_dof_index coarse_dofs = dof.n_dofs(level - 1);
-    (void)fine_dofs;
-    (void)coarse_dofs;
 
     // Matrix maps from fine level to coarse level
-
     Assert(sparsity.n_rows() == coarse_dofs,
            ExcDimensionMismatch(sparsity.n_rows(), coarse_dofs));
     Assert(sparsity.n_cols() == fine_dofs,
@@ -749,8 +744,6 @@ namespace MGTools
     const FiniteElement<dim>     &fe     = dof.get_fe();
     const types::global_dof_index n_dofs = dof.n_dofs(level);
     const unsigned int            n_comp = fe.n_components();
-    (void)n_dofs;
-    (void)n_comp;
 
     Assert(sparsity.n_rows() == n_dofs,
            ExcDimensionMismatch(sparsity.n_rows(), n_dofs));
@@ -932,11 +925,8 @@ namespace MGTools
 
     const types::global_dof_index fine_dofs   = dof.n_dofs(level);
     const types::global_dof_index coarse_dofs = dof.n_dofs(level - 1);
-    (void)fine_dofs;
-    (void)coarse_dofs;
 
     // Matrix maps from fine level to coarse level
-
     Assert(sparsity.n_rows() == coarse_dofs,
            ExcDimensionMismatch(sparsity.n_rows(), coarse_dofs));
     Assert(sparsity.n_cols() == fine_dofs,
@@ -1018,8 +1008,6 @@ namespace MGTools
                                   const unsigned int       level)
   {
     const types::global_dof_index n_dofs = dof.n_dofs(level);
-    (void)n_dofs;
-
     Assert(sparsity.n_rows() == n_dofs,
            ExcDimensionMismatch(sparsity.n_rows(), n_dofs));
     Assert(sparsity.n_cols() == n_dofs,
index 813f5812ddb8ad642d64d68ac7a6e50024273b54..457e96af5de60ed59ed46edf3fc6fe55b091e26f 100644 (file)
@@ -110,7 +110,6 @@ MGTransferPrebuilt<VectorType>::restrict_and_add(const unsigned int from_level,
 {
   Assert((from_level >= 1) && (from_level <= prolongation_matrices.size()),
          ExcIndexRange(from_level, 1, prolongation_matrices.size() + 1));
-  (void)from_level;
 
   prolongation_matrices[from_level - 1]->Tvmult_add(dst, src);
 }
index c9553d2bbe337d99e199841da27e56d60a8952b0..a8cb06a40dc4daf2c331c1941567da3dcf99b6a1 100644 (file)
@@ -184,7 +184,6 @@ DataOutStack<dim, spacedim>::add_data_vector(
            names.size(), dof_handler->get_fe(0).n_components()));
   for (const auto &name : names)
     {
-      (void)name;
       Assert(name.find_first_not_of("abcdefghijklmnopqrstuvwxyz"
                                     "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
                                     "0123456789_<>()") == std::string::npos,
index 64f6455f347f5f3f05b929c9e693af49e53871cf..f0d7779e536213bb7b08083241e8207093acda35 100644 (file)
@@ -311,7 +311,6 @@ namespace MatrixTools
     for (; dof != endd; ++dof)
       {
         Assert(dof->first < n_dofs, ExcInternalError());
-        (void)n_dofs;
 
         // get global index and index
         // in the block in which this
index fb2127082f69ccb9c3cf6b2f2789f2183afc589b..4e02a0150c1f5776e4d50ace4a246ec45fe7e9f3 100644 (file)
@@ -248,8 +248,6 @@ namespace MatrixTools
                             const bool                      eliminate_columns)
       {
         Assert(eliminate_columns == false, ExcNotImplemented());
-        (void)eliminate_columns;
-
         Assert(matrix.n() == right_hand_side.size(),
                ExcDimensionMismatch(matrix.n(), right_hand_side.size()));
         Assert(matrix.n() == solution.size(),
index ff1519ad6264c716a40082859a8f9273e73c4d10..51f7bafa4769c2723db6bcc921d77da35ed1746f 100644 (file)
@@ -524,7 +524,6 @@ PointValueHistory<dim>::add_component_names(
     component_mask.find(vector_name);
   Assert(mask != component_mask.end(), ExcMessage("vector_name not in class"));
   unsigned int n_stored = mask->second.n_selected_components();
-  (void)n_stored;
   Assert(component_names.size() == n_stored,
          ExcDimensionMismatch(component_names.size(), n_stored));
 

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.