From: David Wells Date: Fri, 23 May 2025 16:39:41 +0000 (-0400) Subject: Comment-out some unused function arguments. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e495559e934244b6597cdb2f26f98db40bacd85;p=dealii.git Comment-out some unused function arguments. --- diff --git a/include/deal.II/lac/la_parallel_vector.templates.h b/include/deal.II/lac/la_parallel_vector.templates.h index 5b7f6ff051..218c92987f 100644 --- a/include/deal.II/lac/la_parallel_vector.templates.h +++ b/include/deal.II/lac/la_parallel_vector.templates.h @@ -334,11 +334,9 @@ namespace LinearAlgebra types::global_dof_index &allocated_size, ::dealii::MemorySpace::MemorySpaceData - &data, - const MPI_Comm comm_sm) + &data, + const MPI_Comm /*comm_sm*/) { - (void)comm_sm; - static_assert( std::is_same_v || std::is_same_v, "Number should be float or double for Default memory space"); diff --git a/include/deal.II/lac/precondition.h b/include/deal.II/lac/precondition.h index 75a4fb153f..e15784211a 100644 --- a/include/deal.II/lac/precondition.h +++ b/include/deal.II/lac/precondition.h @@ -3699,10 +3699,9 @@ namespace internal template inline void initialize_preconditioner( - const MatrixType &matrix, + const MatrixType & /*matrix*/, std::shared_ptr &preconditioner) { - (void)matrix; (void)preconditioner; AssertThrow(preconditioner.get() != nullptr, ExcNotInitialized()); } diff --git a/include/deal.II/lac/read_write_vector.templates.h b/include/deal.II/lac/read_write_vector.templates.h index 0f0c52b22e..23b4259849 100644 --- a/include/deal.II/lac/read_write_vector.templates.h +++ b/include/deal.II/lac/read_write_vector.templates.h @@ -92,16 +92,11 @@ namespace LinearAlgebra static void import_elements( const std::shared_ptr - &communication_pattern, - const Number *values, - const VectorOperation::values operation, - ::dealii::LinearAlgebra::ReadWriteVector &rw_vector) + & /*communication_pattern*/, + const Number * /*values*/, + const VectorOperation::values /*operation*/, + ::dealii::LinearAlgebra::ReadWriteVector & /*rw_vector*/) { - (void)communication_pattern; - (void)values; - (void)operation; - (void)rw_vector; - static_assert( std::is_same_v || std::is_same_v, @@ -342,7 +337,6 @@ namespace LinearAlgebra { Assert(s == static_cast(0), ExcMessage("Only 0 can be assigned to a vector.")); - (void)s; const size_type this_size = locally_owned_size(); if (this_size > 0) @@ -396,10 +390,8 @@ namespace LinearAlgebra const dealii::Vector &vec, VectorOperation::values operation, const std::shared_ptr - &communication_pattern) + & /*communication_pattern*/) { - (void)communication_pattern; - internal::import_serial_vector(vec, operation, *this); } diff --git a/include/deal.II/lac/sparse_matrix_tools.h b/include/deal.II/lac/sparse_matrix_tools.h index bf0f0324a7..9194063ec9 100644 --- a/include/deal.II/lac/sparse_matrix_tools.h +++ b/include/deal.II/lac/sparse_matrix_tools.h @@ -170,9 +170,8 @@ namespace SparseMatrixTools std::enable_if_t, SparseMatrixType> * = nullptr> MPI_Comm - get_mpi_communicator(const SparseMatrixType &sparse_matrix) + get_mpi_communicator(const SparseMatrixType & /*sparse_matrix*/) { - (void)sparse_matrix; return MPI_COMM_SELF; } diff --git a/include/deal.II/lac/trilinos_solver.h b/include/deal.II/lac/trilinos_solver.h index a957fb4d47..84ce0e506a 100644 --- a/include/deal.II/lac/trilinos_solver.h +++ b/include/deal.II/lac/trilinos_solver.h @@ -1047,10 +1047,9 @@ namespace TrilinosWrappers * Scale each element of the i-th vector in *this with alpha[i]. */ virtual void - MvScale(const std::vector &alpha) + MvScale(const std::vector & /*alpha*/) { AssertThrow(false, ExcNotImplemented()); - (void)alpha; } /** @@ -1115,12 +1114,10 @@ namespace TrilinosWrappers * Copy the vectors in A to a set of vectors in *this. */ virtual void - SetBlock(const Belos::MultiVec &A, - const std::vector &index) + SetBlock(const Belos::MultiVec & /*A*/, + const std::vector & /*index*/) { AssertThrow(false, ExcNotImplemented()); - (void)A; - (void)index; } /** @@ -1136,20 +1133,18 @@ namespace TrilinosWrappers * Replace each element of the vectors in *this with alpha. */ virtual void - MvInit(const value_type alpha) + MvInit(const value_type /*alpha*/) { AssertThrow(false, ExcNotImplemented()); - (void)alpha; } /** * Print *this multivector to the os output stream. */ virtual void - MvPrint(std::ostream &os) const + MvPrint(std::ostream & /*os*/) const { AssertThrow(false, ExcNotImplemented()); - (void)os; } /** diff --git a/include/deal.II/matrix_free/hanging_nodes_internal.h b/include/deal.II/matrix_free/hanging_nodes_internal.h index 01652b5d5e..1411b956eb 100644 --- a/include/deal.II/matrix_free/hanging_nodes_internal.h +++ b/include/deal.II/matrix_free/hanging_nodes_internal.h @@ -382,10 +382,8 @@ namespace internal template inline void HangingNodes::setup_line_to_cell( - const Triangulation &triangulation) - { - (void)triangulation; - } + const Triangulation & /*triangulation*/) + {} diff --git a/include/deal.II/matrix_free/vector_access_internal.h b/include/deal.II/matrix_free/vector_access_internal.h index f32dc00521..2458f92e55 100644 --- a/include/deal.II/matrix_free/vector_access_internal.h +++ b/include/deal.II/matrix_free/vector_access_internal.h @@ -175,14 +175,10 @@ namespace internal VectorType> * = nullptr> inline void check_vector_compatibility( - const VectorType &vec, - const MatrixFree &matrix_free, - const internal::MatrixFreeFunctions::DoFInfo &dof_info) + const VectorType &vec, + const MatrixFree & /*matrix_free*/, + const internal::MatrixFreeFunctions::DoFInfo &dof_info) { - (void)vec; - (void)matrix_free; - (void)dof_info; - AssertDimension(vec.size(), dof_info.vector_partitioner->size()); } diff --git a/include/deal.II/numerics/data_out_dof_data.templates.h b/include/deal.II/numerics/data_out_dof_data.templates.h index 8bdf2d79be..cf36b7f2bc 100644 --- a/include/deal.II/numerics/data_out_dof_data.templates.h +++ b/include/deal.II/numerics/data_out_dof_data.templates.h @@ -93,10 +93,8 @@ namespace internal */ template inline std::vector> - generate_simplex_evaluation_points(const unsigned int n_subdivisions) + generate_simplex_evaluation_points(const unsigned int /*n_subdivisions*/) { - (void)n_subdivisions; - DEAL_II_NOT_IMPLEMENTED(); return {}; @@ -1636,13 +1634,11 @@ namespace internal template double MGDataEntry::get_cell_data_value( - const unsigned int cell_number, - const ComponentExtractor extract_component) const + const unsigned int /*cell_number*/, + const ComponentExtractor /*extract_component*/) const { DEAL_II_NOT_IMPLEMENTED(); - (void)cell_number; - (void)extract_component; return 0.0; } diff --git a/include/deal.II/numerics/vector_tools_project.templates.h b/include/deal.II/numerics/vector_tools_project.templates.h index d457c692b4..fbc2d09daa 100644 --- a/include/deal.II/numerics/vector_tools_project.templates.h +++ b/include/deal.II/numerics/vector_tools_project.templates.h @@ -170,14 +170,11 @@ namespace VectorTools &function, LinearAlgebra::distributed::Vector &work_result, const bool enforce_zero_boundary, - const Quadrature &q_boundary, - const bool project_to_boundary_first) + const Quadrature & /*q_boundary*/, + const bool project_to_boundary_first) { Assert(project_to_boundary_first == false, ExcNotImplemented()); Assert(enforce_zero_boundary == false, ExcNotImplemented()); - (void)enforce_zero_boundary; - (void)project_to_boundary_first; - (void)q_boundary; AssertDimension(dof.get_fe_collection().size(), 1); AssertDimension(dof.get_fe(0).n_components(), function.n_components);