From: David Wells Date: Sat, 11 Apr 2015 12:43:34 +0000 (-0400) Subject: Add a (void) cast to unused values in .cc files. X-Git-Tag: v8.3.0-rc1~278^2~7 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4809974816bdcb4549d0768a916fb56b6a6ee76;p=dealii.git Add a (void) cast to unused values in .cc files. This should *crosses fingers* get rid of all unused parameter warnings when compiling the library. --- diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index 80db87a97b..ee4bc10120 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -245,6 +245,7 @@ namespace (const Bytef *) &data[0], data.size() * sizeof(T), Z_BEST_COMPRESSION); + (void)err; Assert (err == Z_OK, ExcInternalError()); // now encode the compression header @@ -398,6 +399,7 @@ namespace DataOutBase patch != patches.end(); ++patch) { const unsigned int n_subdivisions = patch->n_subdivisions; + (void)n_subdivisions; Assert ((patch->data.n_rows() == n_data_sets && !patch->points_are_available) || (patch->data.n_rows() == n_data_sets+spacedim && patch->points_are_available), @@ -3610,6 +3612,7 @@ namespace DataOutBase Assert (spacedim==2, ExcNotImplemented()); const unsigned int n_data_sets = data_names.size(); + (void)n_data_sets; // write preamble if (true) diff --git a/source/base/flow_function.cc b/source/base/flow_function.cc index f31bafe51a..5f0fe5d0a3 100644 --- a/source/base/flow_function.cc +++ b/source/base/flow_function.cc @@ -269,6 +269,7 @@ namespace Functions std::vector > &values) const { unsigned int n = points.size(); + (void)n; Assert(values.size() == dim+1, ExcDimensionMismatch(values.size(), dim+1)); for (unsigned int d=0; d > &values) const { unsigned int n = points.size(); + (void)n; Assert(values.size() == 2+1, ExcDimensionMismatch(values.size(), 2+1)); for (unsigned int d=0; d<2+1; ++d) Assert(values[d].size() == n, ExcDimensionMismatch(values[d].size(), n)); diff --git a/source/base/function_lib.cc b/source/base/function_lib.cc index f9ff174ab8..1ff631533a 100644 --- a/source/base/function_lib.cc +++ b/source/base/function_lib.cc @@ -1852,6 +1852,7 @@ namespace Functions FourierCosineFunction::value (const Point &p, const unsigned int component) const { + (void)component; Assert (component==0, ExcIndexRange(component,0,1)); return std::cos(fourier_coefficients * p); } @@ -1863,6 +1864,7 @@ namespace Functions FourierCosineFunction::gradient (const Point &p, const unsigned int component) const { + (void)component; Assert (component==0, ExcIndexRange(component,0,1)); return -fourier_coefficients * std::sin(fourier_coefficients * p); } @@ -1874,6 +1876,7 @@ namespace Functions FourierCosineFunction::laplacian (const Point &p, const unsigned int component) const { + (void)component; Assert (component==0, ExcIndexRange(component,0,1)); return (fourier_coefficients * fourier_coefficients) * (-std::cos(fourier_coefficients * p)); } @@ -1900,6 +1903,7 @@ namespace Functions FourierSineFunction::value (const Point &p, const unsigned int component) const { + (void)component; Assert (component==0, ExcIndexRange(component,0,1)); return std::sin(fourier_coefficients * p); } @@ -1911,6 +1915,7 @@ namespace Functions FourierSineFunction::gradient (const Point &p, const unsigned int component) const { + (void)component; Assert (component==0, ExcIndexRange(component,0,1)); return fourier_coefficients * std::cos(fourier_coefficients * p); } @@ -1922,6 +1927,7 @@ namespace Functions FourierSineFunction::laplacian (const Point &p, const unsigned int component) const { + (void)component; Assert (component==0, ExcIndexRange(component,0,1)); return (fourier_coefficients * fourier_coefficients) * (-std::sin(fourier_coefficients * p)); } @@ -1955,6 +1961,7 @@ namespace Functions FourierSineSum::value (const Point &p, const unsigned int component) const { + (void)component; Assert (component==0, ExcIndexRange(component,0,1)); const unsigned int n = weights.size(); @@ -1972,6 +1979,7 @@ namespace Functions FourierSineSum::gradient (const Point &p, const unsigned int component) const { + (void)component; Assert (component==0, ExcIndexRange(component,0,1)); const unsigned int n = weights.size(); @@ -1989,6 +1997,7 @@ namespace Functions FourierSineSum::laplacian (const Point &p, const unsigned int component) const { + (void)component; Assert (component==0, ExcIndexRange(component,0,1)); const unsigned int n = weights.size(); @@ -2027,6 +2036,7 @@ namespace Functions FourierCosineSum::value (const Point &p, const unsigned int component) const { + (void)component; Assert (component==0, ExcIndexRange(component,0,1)); const unsigned int n = weights.size(); @@ -2044,6 +2054,7 @@ namespace Functions FourierCosineSum::gradient (const Point &p, const unsigned int component) const { + (void)component; Assert (component==0, ExcIndexRange(component,0,1)); const unsigned int n = weights.size(); @@ -2061,6 +2072,7 @@ namespace Functions FourierCosineSum::laplacian (const Point &p, const unsigned int component) const { + (void)component; Assert (component==0, ExcIndexRange(component,0,1)); const unsigned int n = weights.size(); @@ -2094,6 +2106,7 @@ namespace Functions Monomial::value (const Point &p, const unsigned int component) const { + (void)component; Assert (componentn_components, ExcIndexRange(component, 0, this->n_components)) ; @@ -2125,6 +2138,7 @@ namespace Functions Monomial::gradient (const Point &p, const unsigned int component) const { + (void)component; Assert (component==0, ExcIndexRange(component,0,1)) ; Tensor<1,dim> r; @@ -2343,6 +2357,7 @@ namespace Functions InterpolatedTensorProductGridData::value(const Point &p, const unsigned int component) const { + (void)component; Assert (component == 0, ExcMessage ("This is a scalar function object, the component can only be zero.")); @@ -2415,6 +2430,7 @@ namespace Functions InterpolatedUniformGridData::value(const Point &p, const unsigned int component) const { + (void)component; Assert (component == 0, ExcMessage ("This is a scalar function object, the component can only be zero.")); diff --git a/source/base/geometry_info.cc b/source/base/geometry_info.cc index 1b57e05b31..9c22482b44 100644 --- a/source/base/geometry_info.cc +++ b/source/base/geometry_info.cc @@ -547,7 +547,9 @@ RefinementCase<1> GeometryInfo<1>::line_refinement_case(const RefinementCase<1> &cell_refinement_case, const unsigned int line_no) { + (void)line_no; const unsigned int dim = 1; + (void)dim; Assert(cell_refinement_case::isotropic_refinement+1, ExcIndexRange(cell_refinement_case, 0, RefinementCase::isotropic_refinement+1)); Assert(line_no::lines_per_cell, @@ -709,6 +711,7 @@ template<> RefinementCase<1> GeometryInfo<1>::min_cell_refinement_case_for_line_refinement(const unsigned int line_no) { + (void)line_no; Assert(line_no==0, ExcIndexRange(line_no,0,1)); return RefinementCase<1>::cut_x; @@ -720,6 +723,7 @@ RefinementCase<2> GeometryInfo<2>::min_cell_refinement_case_for_line_refinement(const unsigned int line_no) { const unsigned int dim = 2; + (void)dim; Assert(line_no::lines_per_cell, ExcIndexRange(line_no, 0, GeometryInfo::lines_per_cell)); @@ -1086,6 +1090,7 @@ GeometryInfo<1>::child_cell_on_face (const RefinementCase<1> &, const bool, const bool, const bool, const RefinementCase<0> &) { + (void)subface; Assert (face::line_to_cell_vertices (const unsigned int line, const unsigned int vertex) { + (void)line; Assert (line::face_to_cell_lines (const unsigned int face, const unsigned int line, const bool, const bool, const bool) { + (void)face; + (void)line; Assert (face+1::face_to_cell_lines (const unsigned int face, const unsigned int line, const bool, const bool, const bool) { + (void)line; Assert (face(in_lhs_); MinMaxAvg *inout_rhs = static_cast(inout_rhs_); @@ -334,6 +335,7 @@ namespace Utilities const unsigned int max_num_threads) { static bool constructor_has_already_run = false; + (void)constructor_has_already_run; Assert (constructor_has_already_run == false, ExcMessage ("You can only create a single object of this class " "in a program since it initializes the MPI system.")); diff --git a/source/base/subscriptor.cc b/source/base/subscriptor.cc index 0719f90218..2a44b79632 100644 --- a/source/base/subscriptor.cc +++ b/source/base/subscriptor.cc @@ -46,7 +46,11 @@ Subscriptor::Subscriptor () : counter (0), object_info (0) -{} +{ + // this has to go somewhere to avoid an extra warning. + (void)unknown_subscriber; +} + Subscriptor::Subscriptor (const Subscriptor &) @@ -161,6 +165,8 @@ Subscriptor::subscribe(const char *id) const else it->second++; +# else + (void)id; # endif #else (void)id; diff --git a/source/base/symmetric_tensor.cc b/source/base/symmetric_tensor.cc index 658a87a303..df85d5d2da 100644 --- a/source/base/symmetric_tensor.cc +++ b/source/base/symmetric_tensor.cc @@ -46,6 +46,7 @@ invert<3,double> (const SymmetricTensor<4,3,double> &t) for (unsigned int i=0; i::value_list (const std::vector > &points, std::vector::value_type> &values) const { + (void)points; Assert (values.size() == points.size(), ExcDimensionMismatch(values.size(), points.size())); @@ -140,6 +141,7 @@ void ConstantTensorFunction::gradient_list (const std::vector > &points, std::vector::gradient_type> &gradients) const { + (void)points; Assert (gradients.size() == points.size(), ExcDimensionMismatch(gradients.size(), points.size())); diff --git a/source/distributed/tria.cc b/source/distributed/tria.cc index d91c8f8dd5..c9f25b85d0 100644 --- a/source/distributed/tria.cc +++ b/source/distributed/tria.cc @@ -1130,6 +1130,7 @@ namespace num_vtt = std::accumulate (vertex_touch_count.begin(), vertex_touch_count.end(), 0); + (void)num_vtt; Assert (connectivity->ctt_offset[triangulation.n_vertices()] == num_vtt, ExcInternalError()); @@ -3295,6 +3296,7 @@ namespace parallel // many non-artificial cells as parallel_forest->local_num_quadrants) { const unsigned int total_local_cells = this->n_active_cells(); + (void)total_local_cells; if (Utilities::MPI::n_mpi_processes (mpi_communicator) == 1) Assert (static_cast(parallel_forest->local_num_quadrants) == @@ -3630,6 +3632,7 @@ namespace parallel ++it, ++buffer, ++idx) { const unsigned int num_cells = it->second.tree_index.size(); + (void)num_cells; destinations.push_back(it->first); Assert(num_cells==it->second.quadrants.size(), ExcInternalError()); diff --git a/source/dofs/dof_handler.cc b/source/dofs/dof_handler.cc index 42753e08db..1e3e8857db 100644 --- a/source/dofs/dof_handler.cc +++ b/source/dofs/dof_handler.cc @@ -1239,9 +1239,11 @@ void DoFHandler::distribute_dofs (const FiniteElement void DoFHandler::distribute_mg_dofs (const FiniteElement &fe) { + (void)fe; Assert(levels.size()>0, ExcMessage("Distribute active DoFs using distribute_dofs() before calling distribute_mg_dofs().")); const FiniteElement *old_fe = selected_fe; + (void)old_fe; Assert(old_fe == &fe, ExcMessage("You are required to use the same FE for level and active DoFs!") ); clear_mg_space(); diff --git a/source/dofs/dof_handler_policy.cc b/source/dofs/dof_handler_policy.cc index 95bc3ae2ea..99bbb4bd8d 100644 --- a/source/dofs/dof_handler_policy.cc +++ b/source/dofs/dof_handler_policy.cc @@ -1529,6 +1529,7 @@ namespace internal ++it, ++buffer, ++idx) { const unsigned int num_cells = it->second.tree_index.size(); + (void)num_cells; Assert(num_cells==it->second.quadrants.size(), ExcInternalError()); Assert(num_cells>0, ExcInternalError()); @@ -1762,6 +1763,7 @@ namespace internal ++it, ++buffer, ++idx) { const unsigned int num_cells = it->second.tree_index.size(); + (void)num_cells; Assert(num_cells==it->second.quadrants.size(), ExcInternalError()); Assert(num_cells>0, ExcInternalError()); diff --git a/source/dofs/dof_objects.cc b/source/dofs/dof_objects.cc index 0275f3b5e5..1bcabde8b0 100644 --- a/source/dofs/dof_objects.cc +++ b/source/dofs/dof_objects.cc @@ -44,6 +44,7 @@ namespace internal const unsigned int local_index, const types::global_dof_index global_index) { + (void)fe_index; Assert ((fe_index == dealii::DoFHandler::default_fe_index), ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects")); Assert (local_index(), diff --git a/source/dofs/dof_renumbering.cc b/source/dofs/dof_renumbering.cc index e209c33cff..9e440a0eb2 100644 --- a/source/dofs/dof_renumbering.cc +++ b/source/dofs/dof_renumbering.cc @@ -255,6 +255,7 @@ namespace DoFRenumbering const bool reversed_numbering, const bool use_constraints) { + (void)use_constraints; Assert (use_constraints == false, ExcNotImplemented()); // the following code is pretty diff --git a/source/dofs/dof_tools.cc b/source/dofs/dof_tools.cc index d94a23cd72..0f845024e9 100644 --- a/source/dofs/dof_tools.cc +++ b/source/dofs/dof_tools.cc @@ -258,6 +258,7 @@ namespace DoFTools const unsigned int dim = DH::dimension; const unsigned int spacedim = DH::space_dimension; const Triangulation &tria = dof_handler.get_tria(); + (void)tria; AssertDimension (cell_data.size(), tria.n_active_cells()); AssertDimension (dof_data.size(), dof_handler.n_dofs()); @@ -336,6 +337,7 @@ namespace DoFTools std::vector &selected_dofs) { const FiniteElement &fe = dof.get_fe(); + (void)fe; Assert(component_mask.represents_n_components(fe.n_components()), ExcMessage ("The given component mask is not sized correctly to represent the " @@ -381,6 +383,7 @@ namespace DoFTools std::vector &selected_dofs) { const FiniteElement &fe = dof.begin_active()->get_fe(); + (void)fe; Assert(component_mask.represents_n_components(fe.n_components()), ExcMessage ("The given component mask is not sized correctly to represent the " diff --git a/source/dofs/dof_tools_constraints.cc b/source/dofs/dof_tools_constraints.cc index b329b0c31a..f3f2e78164 100644 --- a/source/dofs/dof_tools_constraints.cc +++ b/source/dofs/dof_tools_constraints.cc @@ -2226,6 +2226,7 @@ namespace DoFTools const ComponentMask &component_mask) { static const int space_dim = DH::space_dimension; + (void)space_dim; Assert (0<=direction && direction const FullMatrix & FiniteElement::constraints (const internal::SubfaceCase &subface_case) const { + (void)subface_case; Assert (subface_case==internal::SubfaceCase::case_isotropic, ExcMessage("Constraints for this element are only implemented " "for the case that faces are refined isotropically " @@ -1447,6 +1448,7 @@ template const FiniteElement & FiniteElement::base_element(const unsigned int index) const { + (void)index; Assert (index==0, ExcIndexRange(index,0,1)); // This function should not be // called for a system element diff --git a/source/fe/fe_dgp.cc b/source/fe/fe_dgp.cc index 06ce4847f0..a93a0e1b69 100644 --- a/source/fe/fe_dgp.cc +++ b/source/fe/fe_dgp.cc @@ -102,6 +102,7 @@ get_face_interpolation_matrix (const FiniteElement &x_source_fe, // case, both elements have no dofs on their faces and the face // interpolation matrix is necessarily empty -- i.e. there isn't much we // need to do here. + (void)interpolation_matrix; typedef FiniteElement FE; typedef FE_DGP FEDGP; AssertThrow ((x_source_fe.get_name().find ("FE_DGP<") == 0) @@ -131,6 +132,7 @@ get_subface_interpolation_matrix (const FiniteElement &x_source_fe // case, both elements have no dofs on their faces and the face // interpolation matrix is necessarily empty -- i.e. there isn't much we // need to do here. + (void)interpolation_matrix; typedef FiniteElement FE; typedef FE_DGP FEDGP; AssertThrow ((x_source_fe.get_name().find ("FE_DGP<") == 0) diff --git a/source/fe/fe_dgp_monomial.cc b/source/fe/fe_dgp_monomial.cc index ce1eb804db..7c0a9cfb16 100644 --- a/source/fe/fe_dgp_monomial.cc +++ b/source/fe/fe_dgp_monomial.cc @@ -181,6 +181,8 @@ get_interpolation_matrix (const FiniteElement &source_fe, // matrix is simple const unsigned int m=interpolation_matrix.m(); const unsigned int n=interpolation_matrix.n(); + (void)m; + (void)n; Assert (m == this->dofs_per_cell, ExcDimensionMismatch (m, this->dofs_per_cell)); Assert (n == source_dgp_monomial->dofs_per_cell, ExcDimensionMismatch (n, source_dgp_monomial->dofs_per_cell)); @@ -255,6 +257,7 @@ get_face_interpolation_matrix (const FiniteElement &x_source_fe, // faces and the face interpolation matrix // is necessarily empty -- i.e. there isn't // much we need to do here. + (void)interpolation_matrix; AssertThrow ((x_source_fe.get_name().find ("FE_DGPMonomial<") == 0) || (dynamic_cast*>(&x_source_fe) != 0), @@ -284,6 +287,7 @@ get_subface_interpolation_matrix (const FiniteElement &x_source_fe, // faces and the face interpolation matrix // is necessarily empty -- i.e. there isn't // much we need to do here. + (void)interpolation_matrix; AssertThrow ((x_source_fe.get_name().find ("FE_DGPMonomial<") == 0) || (dynamic_cast*>(&x_source_fe) != 0), diff --git a/source/fe/fe_dgp_nonparametric.cc b/source/fe/fe_dgp_nonparametric.cc index c81d8bb0aa..b431c1f482 100644 --- a/source/fe/fe_dgp_nonparametric.cc +++ b/source/fe/fe_dgp_nonparametric.cc @@ -140,6 +140,7 @@ FE_DGPNonparametric::shape_value_component (const unsigned int i, const Point &p, const unsigned int component) const { + (void)component; Assert (idofs_per_cell, ExcIndexRange(i, 0, this->dofs_per_cell)); Assert (component == 0, ExcIndexRange (component, 0, 1)); return polynomial_space.compute_value(i, p); @@ -163,6 +164,7 @@ FE_DGPNonparametric::shape_grad_component (const unsigned int i, const Point &p, const unsigned int component) const { + (void)component; Assert (idofs_per_cell, ExcIndexRange(i, 0, this->dofs_per_cell)); Assert (component == 0, ExcIndexRange (component, 0, 1)); return polynomial_space.compute_grad(i, p); @@ -187,6 +189,7 @@ FE_DGPNonparametric::shape_grad_grad_component (const unsigned int const Point &p, const unsigned int component) const { + (void)component; Assert (idofs_per_cell, ExcIndexRange(i, 0, this->dofs_per_cell)); Assert (component == 0, ExcIndexRange (component, 0, 1)); return polynomial_space.compute_grad_grad(i, p); @@ -430,6 +433,7 @@ get_face_interpolation_matrix (const FiniteElement &x_source_fe, // faces and the face interpolation matrix // is necessarily empty -- i.e. there isn't // much we need to do here. + (void)interpolation_matrix; typedef FiniteElement FEE; AssertThrow ((x_source_fe.get_name().find ("FE_DGPNonparametric<") == 0) || @@ -460,6 +464,7 @@ get_subface_interpolation_matrix (const FiniteElement &x_source_fe // faces and the face interpolation matrix // is necessarily empty -- i.e. there isn't // much we need to do here. + (void)interpolation_matrix; typedef FiniteElement FEE; AssertThrow ((x_source_fe.get_name().find ("FE_DGPNonparametric<") == 0) || diff --git a/source/fe/fe_dgq.cc b/source/fe/fe_dgq.cc index ce7b605920..19d0e1d28b 100644 --- a/source/fe/fe_dgq.cc +++ b/source/fe/fe_dgq.cc @@ -430,6 +430,7 @@ get_face_interpolation_matrix (const FiniteElement &x_source_fe, // faces and the face interpolation matrix // is necessarily empty -- i.e. there isn't // much we need to do here. + (void)interpolation_matrix; typedef FiniteElement FE; AssertThrow ((dynamic_cast*>(&x_source_fe) != 0), typename FE::ExcInterpolationNotImplemented()); @@ -457,6 +458,7 @@ get_subface_interpolation_matrix (const FiniteElement &x_source_f // faces and the face interpolation matrix // is necessarily empty -- i.e. there isn't // much we need to do here. + (void)interpolation_matrix; typedef FiniteElement FE; AssertThrow ((dynamic_cast*>(&x_source_fe) != 0), typename FE::ExcInterpolationNotImplemented()); diff --git a/source/fe/fe_face.cc b/source/fe/fe_face.cc index 2b8d7df436..26c200b990 100644 --- a/source/fe/fe_face.cc +++ b/source/fe/fe_face.cc @@ -366,6 +366,7 @@ get_subface_interpolation_matrix (const FiniteElement<1,spacedim> &x_source_fe, const unsigned int /*subface*/, FullMatrix &interpolation_matrix) const { + (void)x_source_fe; Assert (interpolation_matrix.n() == this->dofs_per_face, ExcDimensionMismatch (interpolation_matrix.n(), this->dofs_per_face)); @@ -489,6 +490,7 @@ FE_FaceQ<1,spacedim>::get_face_data ( const UpdateFlags flags(data->update_flags); const unsigned int n_q_points = quadrature.size(); AssertDimension(n_q_points, 1); + (void)n_q_points; // No derivatives of this element are implemented. if (flags & update_gradients || flags & update_hessians) @@ -757,6 +759,7 @@ get_subface_interpolation_matrix (const FiniteElement &x_source_fe v_in(k) = this->poly_space.compute_value(i, p); } const double result = H.least_squares(v_out, v_in); + (void)result; Assert(result < 1e-12, FETools::ExcLeastSquaresError (result)); for (unsigned int j = 0; j < source_fe->dofs_per_face; ++j) diff --git a/source/fe/fe_nothing.cc b/source/fe/fe_nothing.cc index ab24f7179a..18b4838ad0 100644 --- a/source/fe/fe_nothing.cc +++ b/source/fe/fe_nothing.cc @@ -91,6 +91,7 @@ double FE_Nothing::shape_value (const unsigned int /*i*/, const Point & /*p*/) const { + (void)zero_dof_message; Assert(false,ExcMessage(zero_dof_message)); return 0; } @@ -224,6 +225,7 @@ get_face_interpolation_matrix (const FiniteElement &/*source_fe*/, { // 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(), @@ -244,6 +246,7 @@ get_subface_interpolation_matrix (const FiniteElement & /*source_f // 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)); diff --git a/source/fe/fe_q.cc b/source/fe/fe_q.cc index fe8fd248ed..0b5ee5062a 100644 --- a/source/fe/fe_q.cc +++ b/source/fe/fe_q.cc @@ -59,6 +59,7 @@ FE_Q::FE_Q (const Quadrature<1> &points) std::vector (1, false)) { const unsigned int degree = points.size()-1; + (void)degree; Assert (degree > 0, ExcMessage ("This element can only be used for polynomial degrees " "at least zero")); diff --git a/source/fe/fe_q_dg0.cc b/source/fe/fe_q_dg0.cc index dff6341bce..4312e6a377 100644 --- a/source/fe/fe_q_dg0.cc +++ b/source/fe/fe_q_dg0.cc @@ -70,6 +70,7 @@ FE_Q_DG0::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 " diff --git a/source/fe/fe_q_hierarchical.cc b/source/fe/fe_q_hierarchical.cc index 90e6d1ed71..eb3350d14c 100644 --- a/source/fe/fe_q_hierarchical.cc +++ b/source/fe/fe_q_hierarchical.cc @@ -851,6 +851,7 @@ get_face_interpolation_matrix (const FiniteElement &x_source_fe, // we will be able to do the work const FE_Q_Hierarchical &source_fe = dynamic_cast&>(x_source_fe); + (void)source_fe; // Make sure, that the element, // for which the DoFs should be diff --git a/source/fe/fe_tools.cc b/source/fe/fe_tools.cc index 443943b903..75b263d3a0 100644 --- a/source/fe/fe_tools.cc +++ b/source/fe/fe_tools.cc @@ -736,6 +736,7 @@ namespace FETools // solve the least squares // problem. const double result = H.least_squares (v_fine, v_coarse); + (void)result; Assert (result < 1.e-12, ExcLeastSquaresError (result)); // Copy into the result @@ -1071,6 +1072,7 @@ namespace FETools // solve the least squares // problem. const double result = H.least_squares(v_fine, v_coarse); + (void)result; Assert (result < 1.e-12, ExcLeastSquaresError(result)); // Copy into the result @@ -1578,6 +1580,7 @@ namespace FETools if (pos2-pos1 == 2) { const char dimchar = '0' + dim; + (void)dimchar; if (name.at(pos1+1) != 'd') Assert (name.at(pos1+1) == dimchar, ExcInvalidFEDimension(name.at(pos1+1), dim)); diff --git a/source/fe/fe_tools_interpolate.cc b/source/fe/fe_tools_interpolate.cc index 14e349fa69..5f4c02f069 100644 --- a/source/fe/fe_tools_interpolate.cc +++ b/source/fe/fe_tools_interpolate.cc @@ -123,6 +123,7 @@ namespace FETools endc1 = dof1.end(); typename DH2::active_cell_iterator cell2 = dof2.begin_active(), endc2 = dof2.end(); + (void)endc2; std::vector dofs; dofs.reserve (DoFTools::max_dofs_per_cell (dof2)); diff --git a/source/fe/fe_values.cc b/source/fe/fe_values.cc index d9bee6e3ab..858f50a69e 100644 --- a/source/fe/fe_values.cc +++ b/source/fe/fe_values.cc @@ -2263,6 +2263,7 @@ namespace internal // Assert that we can write all components into the result vectors const unsigned result_components = n_components * component_multiple; + (void)result_components; if (quadrature_points_fastest) { AssertDimension(values.size(), result_components); @@ -2395,6 +2396,7 @@ namespace internal // Assert that we can write all components into the result vectors const unsigned result_components = n_components * component_multiple; + (void)result_components; if (quadrature_points_fastest) { AssertDimension(derivatives.size(), result_components); @@ -2516,6 +2518,7 @@ namespace internal // Assert that we can write all components into the result vectors const unsigned result_components = n_components * component_multiple; + (void)result_components; if (quadrature_points_fastest) { AssertDimension(laplacians.size(), result_components); diff --git a/source/fe/mapping_c1.cc b/source/fe/mapping_c1.cc index 2a03de0376..019d5274d9 100644 --- a/source/fe/mapping_c1.cc +++ b/source/fe/mapping_c1.cc @@ -39,6 +39,7 @@ MappingC1<1>::add_line_support_points (const Triangulation<1>::cell_iterator &, std::vector > &) const { const unsigned int dim = 1; + (void)dim; Assert (dim > 1, ExcImpossibleInDim(dim)); } @@ -160,6 +161,7 @@ MappingC1<1>::add_quad_support_points (const Triangulation<1>::cell_iterator &, std::vector > &) const { const unsigned int dim = 1; + (void)dim; Assert (dim > 2, ExcImpossibleInDim(dim)); } @@ -171,6 +173,7 @@ MappingC1<2>::add_quad_support_points (const Triangulation<2>::cell_iterator &, std::vector > &) const { const unsigned int dim = 2; + (void)dim; Assert (dim > 2, ExcImpossibleInDim(dim)); } diff --git a/source/fe/mapping_q1.cc b/source/fe/mapping_q1.cc index 60738e1000..77bbb34aa9 100644 --- a/source/fe/mapping_q1.cc +++ b/source/fe/mapping_q1.cc @@ -98,6 +98,7 @@ namespace internal const std::vector > &unit_points, typename dealii::MappingQ1<1,spacedim>::InternalData &data) { + (void)n_shape_functions; const unsigned int n_points=unit_points.size(); for (unsigned int k = 0 ; k < n_points ; ++k) { @@ -138,6 +139,7 @@ namespace internal const std::vector > &unit_points, typename dealii::MappingQ1<2,spacedim>::InternalData &data) { + (void)n_shape_functions; const unsigned int n_points=unit_points.size(); for (unsigned int k = 0 ; k < n_points ; ++k) { @@ -198,6 +200,7 @@ namespace internal const std::vector > &unit_points, typename dealii::MappingQ1<3,spacedim>::InternalData &data) { + (void)n_shape_functions; const unsigned int n_points=unit_points.size(); for (unsigned int k = 0 ; k < n_points ; ++k) { @@ -815,6 +818,7 @@ MappingQ1::fill_fe_values ( else { const unsigned int codim = spacedim-dim; + (void)codim; if (update_flags & update_normal_vectors) { @@ -1457,6 +1461,7 @@ MappingQ1:: transform_unit_to_real_cell_internal (const InternalData &data) const { const unsigned int n_mapping_points=data.mapping_support_points.size(); + (void)n_mapping_points; AssertDimension (data.shape_values.size(), n_mapping_points); // use now the InternalData to @@ -1699,6 +1704,7 @@ transform_real_to_unit_cell_internal InternalData &mdata) const { const unsigned int n_shapes=mdata.shape_values.size(); + (void)n_shapes; Assert(n_shapes!=0, ExcInternalError()); AssertDimension (mdata.shape_derivatives.size(), n_shapes); @@ -1929,6 +1935,7 @@ transform_real_to_unit_cell_internal_codim1 const unsigned int n_shapes=mdata.shape_values.size(); + (void)n_shapes; Assert(n_shapes!=0, ExcInternalError()); Assert(mdata.shape_derivatives.size()==n_shapes, ExcInternalError()); Assert(mdata.shape_second_derivatives.size()==n_shapes, ExcInternalError()); diff --git a/source/fe/mapping_q_eulerian.cc b/source/fe/mapping_q_eulerian.cc index 4a2ad9b68f..9e0afc39e3 100644 --- a/source/fe/mapping_q_eulerian.cc +++ b/source/fe/mapping_q_eulerian.cc @@ -108,6 +108,8 @@ compute_mapping_support_points const types::global_dof_index n_dofs = euler_dof_handler->n_dofs(); const types::global_dof_index vector_size = euler_vector->size(); + (void)n_dofs; + (void)vector_size; AssertDimension(vector_size,n_dofs); diff --git a/source/grid/grid_generator.cc b/source/grid/grid_generator.cc index fa5f966efb..efb52df10e 100644 --- a/source/grid/grid_generator.cc +++ b/source/grid/grid_generator.cc @@ -3027,6 +3027,7 @@ namespace GridGenerator const unsigned int n, const bool colorize) { + (void)colorize; Assert ((inner_radius > 0) && (inner_radius < outer_radius), ExcInvalidRadii ()); Assert(colorize == false, ExcNotImplemented()); @@ -3726,6 +3727,7 @@ namespace GridGenerator const parallel::distributed::Triangulation *pt = dynamic_cast *>(&in_tria); + (void)pt; Assert (pt == NULL, ExcMessage("Cannot use this function on parallel::distributed::Triangulation.")); diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index 81b3be4ba0..3e68b4d91b 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -2729,6 +2729,7 @@ next_cell: const std::vector &first_vector_components) { static const int space_dim = CellIterator::AccessorType::space_dimension; + (void)space_dim; Assert (0<=direction && directionused() && !(++next_unused_line)->used()) diff --git a/source/grid/tria_accessor.cc b/source/grid/tria_accessor.cc index 9d00889701..8ddc1794d4 100644 --- a/source/grid/tria_accessor.cc +++ b/source/grid/tria_accessor.cc @@ -1111,6 +1111,7 @@ measure () const template <> double TriaAccessor<1,1,1>::extent_in_direction(const unsigned int axis) const { + (void)axis; Assert (axis == 0, ExcIndexRange (axis, 0, 1)); return this->diameter(); @@ -1120,6 +1121,7 @@ double TriaAccessor<1,1,1>::extent_in_direction(const unsigned int axis) const template <> double TriaAccessor<1,1,2>::extent_in_direction(const unsigned int axis) const { + (void)axis; Assert (axis == 0, ExcIndexRange (axis, 0, 1)); return this->diameter(); diff --git a/source/grid/tria_boundary_lib.cc b/source/grid/tria_boundary_lib.cc index 4f5c7dd391..4ad712eccc 100644 --- a/source/grid/tria_boundary_lib.cc +++ b/source/grid/tria_boundary_lib.cc @@ -594,6 +594,7 @@ HyperBallBoundary::get_intermediate_points_between_points ( const double length=(v1-v0).norm(); double eps=1e-12; + (void)eps; double r=0; if (compute_radius_automatically) r = (p0 - center).norm(); diff --git a/source/grid/tria_levels.cc b/source/grid/tria_levels.cc index 944021dcd2..2fc0ec8a71 100644 --- a/source/grid/tria_levels.cc +++ b/source/grid/tria_levels.cc @@ -84,6 +84,7 @@ namespace internal void TriaLevel::monitor_memory (const unsigned int true_dimension) const { + (void)true_dimension; Assert (2*true_dimension*refine_flags.size() == neighbors.size(), ExcMemoryInexact (refine_flags.size(), neighbors.size())); Assert (2*true_dimension*coarsen_flags.size() == neighbors.size(), @@ -168,6 +169,7 @@ namespace internal void TriaLevel<3>::monitor_memory (const unsigned int true_dimension) const { + (void)true_dimension; Assert (2*true_dimension*refine_flags.size() == neighbors.size(), ExcMemoryInexact (refine_flags.size(), neighbors.size())); Assert (2*true_dimension*coarsen_flags.size() == neighbors.size(), diff --git a/source/hp/dof_level.cc b/source/hp/dof_level.cc index c813e955d9..1562b118b3 100644 --- a/source/hp/dof_level.cc +++ b/source/hp/dof_level.cc @@ -28,6 +28,7 @@ namespace internal void DoFLevel::compress_data (const dealii::hp::FECollection &fe_collection) { + (void)fe_collection; return; if (dof_offsets.size() == 0 || dof_indices.size()==0) diff --git a/source/lac/block_sparsity_pattern.cc b/source/lac/block_sparsity_pattern.cc index 05f3e9a55f..8dc962e960 100644 --- a/source/lac/block_sparsity_pattern.cc +++ b/source/lac/block_sparsity_pattern.cc @@ -49,6 +49,7 @@ BlockSparsityPatternBase (const BlockSparsityPatternBase &s) : Subscriptor () { + (void)s; Assert(s.rows==0, ExcInvalidConstructorCall()); Assert(s.columns==0, ExcInvalidConstructorCall()); diff --git a/source/lac/dynamic_sparsity_pattern.cc b/source/lac/dynamic_sparsity_pattern.cc index e43f56c585..94c3be446f 100644 --- a/source/lac/dynamic_sparsity_pattern.cc +++ b/source/lac/dynamic_sparsity_pattern.cc @@ -231,6 +231,7 @@ DynamicSparsityPattern (const DynamicSparsityPattern &s) cols(0), rowset(0) { + (void)s; Assert (s.rows == 0, ExcInvalidConstructorCall()); Assert (s.cols == 0, ExcInvalidConstructorCall()); } @@ -274,6 +275,7 @@ DynamicSparsityPattern::DynamicSparsityPattern (const size_type n) DynamicSparsityPattern & DynamicSparsityPattern::operator = (const DynamicSparsityPattern &s) { + (void)s; Assert (s.rows == 0, ExcInvalidConstructorCall()); Assert (s.cols == 0, ExcInvalidConstructorCall()); diff --git a/source/lac/lapack_full_matrix.cc b/source/lac/lapack_full_matrix.cc index 74cde57dc8..faa648809f 100644 --- a/source/lac/lapack_full_matrix.cc +++ b/source/lac/lapack_full_matrix.cc @@ -119,6 +119,7 @@ template LAPACKFullMatrix & LAPACKFullMatrix::operator = (const double d) { + (void)d; Assert (d==0, ExcScalarAssignmentOnlyForZeroValue()); if (this->n_elements() != 0) diff --git a/source/lac/petsc_matrix_base.cc b/source/lac/petsc_matrix_base.cc index 27e83fa3bc..b496dbee86 100644 --- a/source/lac/petsc_matrix_base.cc +++ b/source/lac/petsc_matrix_base.cc @@ -50,6 +50,7 @@ namespace PETScWrappers const PetscScalar *values; int ierr; + (void)ierr; ierr = MatGetRow(*matrix, this->a_row, &ncols, &colnums, &values); AssertThrow (ierr == 0, MatrixBase::ExcPETScError(ierr)); @@ -113,6 +114,7 @@ namespace PETScWrappers MatrixBase & MatrixBase::operator = (const value_type d) { + (void)d; Assert (d==value_type(), ExcScalarAssignmentOnlyForZeroValue()); assert_is_compressed (); @@ -473,6 +475,7 @@ namespace PETScWrappers { const int ierr = MatAXPY (matrix, factor, other, DIFFERENT_NONZERO_PATTERN); + (void)ierr; Assert (ierr == 0, ExcPETScError(ierr)); @@ -487,6 +490,7 @@ namespace PETScWrappers Assert (&src != &dst, ExcSourceEqualsDestination()); const int ierr = MatMult (matrix, src, dst); + (void)ierr; AssertThrow (ierr == 0, ExcPETScError(ierr)); } @@ -499,6 +503,7 @@ namespace PETScWrappers Assert (&src != &dst, ExcSourceEqualsDestination()); const int ierr = MatMultTranspose (matrix, src, dst); + (void)ierr; AssertThrow (ierr == 0, ExcPETScError(ierr)); } @@ -511,6 +516,7 @@ namespace PETScWrappers Assert (&src != &dst, ExcSourceEqualsDestination()); const int ierr = MatMultAdd (matrix, src, dst, dst); + (void)ierr; AssertThrow (ierr == 0, ExcPETScError(ierr)); } @@ -523,6 +529,7 @@ namespace PETScWrappers Assert (&src != &dst, ExcSourceEqualsDestination()); const int ierr = MatMultTransposeAdd (matrix, src, dst, dst); + (void)ierr; AssertThrow (ierr == 0, ExcPETScError(ierr)); } @@ -553,6 +560,7 @@ namespace PETScWrappers MatrixBase::transpose () { int ierr = MatTranspose(matrix, MAT_REUSE_MATRIX, &matrix); + (void)ierr; AssertThrow (ierr == 0, ExcPETScError(ierr)); } diff --git a/source/lac/petsc_parallel_vector.cc b/source/lac/petsc_parallel_vector.cc index cd9155941a..1bae4a9045 100644 --- a/source/lac/petsc_parallel_vector.cc +++ b/source/lac/petsc_parallel_vector.cc @@ -251,6 +251,7 @@ namespace PETScWrappers Vector::create_vector (const size_type n, const size_type local_size) { + (void)n; Assert (local_size <= n, ExcIndexRange (local_size, 0, n)); ghosted = false; @@ -270,6 +271,7 @@ namespace PETScWrappers const size_type local_size, const IndexSet &ghostnodes) { + (void)n; Assert (local_size <= n, ExcIndexRange (local_size, 0, n)); ghosted = true; ghost_indices = ghostnodes; diff --git a/source/lac/slepc_spectral_transformation.cc b/source/lac/slepc_spectral_transformation.cc index f5a132ddd3..c8adc71141 100644 --- a/source/lac/slepc_spectral_transformation.cc +++ b/source/lac/slepc_spectral_transformation.cc @@ -137,12 +137,15 @@ namespace SLEPcWrappers #if DEAL_II_PETSC_VERSION_LT(3,5,0) int ierr; ierr = STSetType (st, const_cast(STFOLD)); + (void)ierr; AssertThrow (ierr == 0, SolverBase::ExcSLEPcError(ierr)); ierr = STSetShift (st, additional_data.shift_parameter); + (void)ierr; AssertThrow (ierr == 0, SolverBase::ExcSLEPcError(ierr)); #else // PETSc/SLEPc version must be < 3.5.0. + (void)st; Assert ((false), ExcMessage ("Folding transformation has been removed in SLEPc 3.5.0 and newer." "You cannot use this transformation anymore.")); @@ -184,4 +187,3 @@ namespace SLEPcWrappers DEAL_II_NAMESPACE_CLOSE #endif // DEAL_II_WITH_SLEPC - diff --git a/source/lac/sparsity_pattern.cc b/source/lac/sparsity_pattern.cc index 13a2741417..dcfed47bda 100644 --- a/source/lac/sparsity_pattern.cc +++ b/source/lac/sparsity_pattern.cc @@ -61,6 +61,7 @@ SparsityPattern::SparsityPattern (const SparsityPattern &s) compressed(false), store_diagonal_first_in_row(false) { + (void)s; Assert (s.rowstart == 0, ExcInvalidConstructorCall()); Assert (s.colnums == 0, ExcInvalidConstructorCall()); Assert (s.rows == 0, ExcInvalidConstructorCall()); @@ -224,6 +225,7 @@ SparsityPattern::~SparsityPattern () SparsityPattern & SparsityPattern::operator = (const SparsityPattern &s) { + (void)s; Assert (s.rowstart == 0, ExcInvalidConstructorCall()); Assert (s.colnums == 0, ExcInvalidConstructorCall()); Assert (s.rows == 0, ExcInvalidConstructorCall()); diff --git a/source/lac/sparsity_tools.cc b/source/lac/sparsity_tools.cc index 01977a0ab1..547f7c4e99 100644 --- a/source/lac/sparsity_tools.cc +++ b/source/lac/sparsity_tools.cc @@ -66,6 +66,7 @@ namespace SparsityTools // Make sure that METIS is actually // installed and detected #ifndef DEAL_II_WITH_METIS + (void)sparsity_pattern; AssertThrow (false, ExcMETISNotInstalled()); #else diff --git a/source/lac/trilinos_block_sparse_matrix.cc b/source/lac/trilinos_block_sparse_matrix.cc index f5743f70ab..9b32ff79bf 100644 --- a/source/lac/trilinos_block_sparse_matrix.cc +++ b/source/lac/trilinos_block_sparse_matrix.cc @@ -94,6 +94,7 @@ namespace TrilinosWrappers block_sparsity_pattern.n_block_cols())); const size_type n_block_rows = parallel_partitioning.size(); + (void)n_block_rows; Assert (n_block_rows == block_sparsity_pattern.n_block_rows(), ExcDimensionMismatch (n_block_rows, diff --git a/source/lac/trilinos_precondition.cc b/source/lac/trilinos_precondition.cc index 8012fda8ff..ce47fdda0e 100644 --- a/source/lac/trilinos_precondition.cc +++ b/source/lac/trilinos_precondition.cc @@ -820,6 +820,7 @@ namespace TrilinosWrappers additional_data.constant_modes[0].size() == n_rows; const size_type n_relevant_rows = constant_modes_are_global ? n_rows : additional_data.constant_modes[0].size(); + (void)n_relevant_rows; const size_type my_size = domain_map.NumMyElements(); if (constant_modes_are_global == false) Assert (n_relevant_rows == my_size, @@ -828,6 +829,7 @@ namespace TrilinosWrappers static_cast(global_length(distributed_constant_modes)), ExcDimensionMismatch(n_rows, global_length(distributed_constant_modes))); + (void)global_length; // Reshape null space as a contiguous vector of doubles so that // Trilinos can read from it. diff --git a/source/lac/trilinos_sparse_matrix.cc b/source/lac/trilinos_sparse_matrix.cc index 256ddbcadb..6b5c05cf75 100644 --- a/source/lac/trilinos_sparse_matrix.cc +++ b/source/lac/trilinos_sparse_matrix.cc @@ -409,6 +409,7 @@ namespace TrilinosWrappers int *index_ptr, *rhs_index_ptr; ierr = rhs.matrix->ExtractMyRowView (row_local, rhs_n_entries, rhs_value_ptr, rhs_index_ptr); + (void)ierr; Assert (ierr == 0, ExcTrilinosError(ierr)); ierr = matrix->ExtractMyRowView (row_local, n_entries, value_ptr, @@ -596,6 +597,7 @@ namespace TrilinosWrappers // check whether we got the number of columns right. AssertDimension (sparsity_pattern.n_cols(),static_cast( n_global_cols(*graph))); + (void)n_global_cols; // And now finally generate the matrix. matrix.reset (new Epetra_FECrsMatrix(Copy, *graph, false)); @@ -746,6 +748,7 @@ namespace TrilinosWrappers { Epetra_Export exporter(nonlocal_graph->RowMap(), input_row_map); int ierr = graph->Export(*nonlocal_graph, exporter, Add); + (void)ierr; Assert (ierr==0, ExcTrilinosError(ierr)); } @@ -1079,6 +1082,7 @@ namespace TrilinosWrappers int num_entries; const int ierr = matrix->ExtractMyRowView(local_row, num_entries, values, col_indices); + (void)ierr; Assert (ierr == 0, ExcTrilinosError(ierr)); @@ -1149,6 +1153,7 @@ namespace TrilinosWrappers // TODO Check that col_indices are int and not long long int ierr = matrix->ExtractMyRowView(trilinos_i, nnz_extracted, values, col_indices); + (void)ierr; Assert (ierr==0, ExcTrilinosError(ierr)); Assert (nnz_present == nnz_extracted, @@ -1221,6 +1226,7 @@ namespace TrilinosWrappers // an error. int ierr = matrix->ExtractMyRowView(trilinos_i, nnz_extracted, values, col_indices); + (void)ierr; Assert (ierr==0, ExcTrilinosError(ierr)); Assert (nnz_present == nnz_extracted, @@ -1578,6 +1584,7 @@ namespace TrilinosWrappers int *index_ptr, *rhs_index_ptr; ierr = rhs.matrix->ExtractMyRowView (row_local, rhs_n_entries, rhs_value_ptr, rhs_index_ptr); + (void)ierr; Assert (ierr == 0, ExcTrilinosError(ierr)); ierr = matrix->ExtractMyRowView (row_local, n_entries, value_ptr, diff --git a/source/lac/trilinos_sparsity_pattern.cc b/source/lac/trilinos_sparsity_pattern.cc index 4e773176f2..45b1600072 100644 --- a/source/lac/trilinos_sparsity_pattern.cc +++ b/source/lac/trilinos_sparsity_pattern.cc @@ -240,6 +240,7 @@ namespace TrilinosWrappers *column_space_map, 0)) { + (void)input_sparsity; Assert (input_sparsity.n_rows() == 0, ExcMessage ("Copy constructor only works for empty sparsity patterns.")); } @@ -781,6 +782,7 @@ namespace TrilinosWrappers int ierr = graph->ExtractGlobalRowView( static_cast(trilinos_i), nnz_extracted, col_indices); + (void)ierr; Assert (ierr==0, ExcTrilinosError(ierr)); Assert (nnz_present == nnz_extracted, ExcDimensionMismatch(nnz_present, nnz_extracted)); @@ -809,6 +811,7 @@ 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, diff --git a/source/lac/trilinos_vector.cc b/source/lac/trilinos_vector.cc index 4009a1773f..f09397c543 100644 --- a/source/lac/trilinos_vector.cc +++ b/source/lac/trilinos_vector.cc @@ -192,6 +192,7 @@ namespace TrilinosWrappers else if (fast == false) { const int ierr = vector->PutScalar(0.); + (void)ierr; Assert (ierr == 0, ExcTrilinosError(ierr)); } @@ -242,6 +243,7 @@ namespace TrilinosWrappers // distribution int ierr; ierr = vector->GlobalAssemble (last_action); + (void)ierr; Assert (ierr == 0, ExcTrilinosError(ierr)); ierr = vector->PutScalar(0.0); @@ -545,6 +547,7 @@ namespace TrilinosWrappers { int ierr; ierr = vector->GlobalAssemble(last_action); + (void)ierr; Assert (ierr == 0, ExcTrilinosError(ierr)); ierr = vector->PutScalar(0.0); @@ -571,6 +574,7 @@ namespace TrilinosWrappers { int ierr; ierr = vector->GlobalAssemble(last_action); + (void)ierr; Assert (ierr == 0, ExcTrilinosError(ierr)); ierr = vector->PutScalar(0.0); @@ -604,6 +608,7 @@ namespace TrilinosWrappers { int ierr; ierr = vector->GlobalAssemble(last_action); + (void)ierr; Assert (ierr == 0, ExcTrilinosError(ierr)); ierr = vector->PutScalar(0.0); @@ -627,6 +632,7 @@ namespace TrilinosWrappers // the vector, initialize our // map with the map in v, and // generate the vector. + (void)fast; if (allow_different_maps == false) { if (local_range() != v.local_range()) @@ -645,6 +651,7 @@ namespace TrilinosWrappers " seems to be the same. Check vector setup!")); ierr = vector->GlobalAssemble(last_action); + (void)ierr; Assert (ierr == 0, ExcTrilinosError(ierr)); ierr = vector->PutScalar(0.0); @@ -711,6 +718,7 @@ namespace TrilinosWrappers const int ierr = vector->Update(1.0, *v.vector, 0.0); Assert (ierr == 0, ExcTrilinosError(ierr)); + (void)ierr; return *this; } diff --git a/source/lac/trilinos_vector_base.cc b/source/lac/trilinos_vector_base.cc index 2ee2e31a07..ad8356a833 100644 --- a/source/lac/trilinos_vector_base.cc +++ b/source/lac/trilinos_vector_base.cc @@ -419,6 +419,7 @@ namespace TrilinosWrappers VectorBase::print (const char *format) const { Assert (global_length(*vector)!=0, ExcEmptyObject()); + (void)global_length; for (size_type j=0; j &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)); @@ -885,12 +891,15 @@ namespace MGTools { const FiniteElement &fe = dof.get_fe(); const unsigned int n_comp = fe.n_components(); + (void)n_comp; Assert ((level>=1) && (level::restrict_and_add ( { 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); } diff --git a/source/numerics/error_estimator.cc b/source/numerics/error_estimator.cc index 39b4a7b820..61d129d7e5 100644 --- a/source/numerics/error_estimator.cc +++ b/source/numerics/error_estimator.cc @@ -483,6 +483,7 @@ namespace internal dealii::hp::FEFaceValues &fe_face_values_neighbor) { const unsigned int dim = DH::dimension; + (void)dim; const typename DH::face_iterator face = cell->face(face_no); const unsigned int n_solution_vectors = solutions.size(); @@ -559,8 +560,10 @@ namespace internal dealii::hp::FESubfaceValues &fe_subface_values) { const unsigned int dim = DH::dimension; + (void)dim; const typename DH::cell_iterator neighbor = cell->neighbor(face_no); + (void)neighbor; const unsigned int n_solution_vectors = solutions.size(); const typename DH::face_iterator face=cell->face(face_no); @@ -924,6 +927,7 @@ estimate (const Mapping &mapping, #endif const unsigned int n_components = dof_handler.get_fe().n_components(); + (void)n_components; // sanity checks Assert (solutions.size() > 0, diff --git a/source/numerics/matrix_tools.cc b/source/numerics/matrix_tools.cc index ba96eb5799..f31179555d 100644 --- a/source/numerics/matrix_tools.cc +++ b/source/numerics/matrix_tools.cc @@ -580,6 +580,7 @@ namespace MatrixCreator VectorType *right_hand_side) { const unsigned int dofs_per_cell = data.dof_indices.size(); + (void)dofs_per_cell; Assert (data.cell_matrix.m() == dofs_per_cell, ExcInternalError()); @@ -2130,6 +2131,7 @@ 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 @@ -2323,6 +2325,7 @@ namespace MatrixTools PETScVector &right_hand_side, const bool eliminate_columns) { + (void)eliminate_columns; Assert (eliminate_columns == false, ExcNotImplemented()); Assert (matrix.n() == right_hand_side.size(), @@ -2537,6 +2540,7 @@ 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())); diff --git a/source/numerics/point_value_history.cc b/source/numerics/point_value_history.cc index 0253fa6122..3ed95f6715 100644 --- a/source/numerics/point_value_history.cc +++ b/source/numerics/point_value_history.cc @@ -514,6 +514,7 @@ void PointValueHistory typename std::map ::iterator mask = 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)); names->second = component_names; diff --git a/source/numerics/solution_transfer.cc b/source/numerics/solution_transfer.cc index f0b1cdfc4e..91d1bfaeb9 100644 --- a/source/numerics/solution_transfer.cc +++ b/source/numerics/solution_transfer.cc @@ -243,6 +243,7 @@ prepare_for_coarsening_and_refinement(const std::vector &all_in) clear(); const unsigned int n_active_cells = dof_handler->get_tria().n_active_cells(); + (void)n_active_cells; n_dofs_old = dof_handler->n_dofs(); for (unsigned int i=0; i > &surrounding_points, const Point &candidate) const { + (void)surrounding_points; #ifdef DEBUG for (unsigned int i=0; i > &surrounding_points, const Point &candidate) const { + (void)surrounding_points; #ifdef DEBUG for (unsigned int i=0; i numbers = count_elements(out_shape); + (void)numbers; Assert(std_cxx11::get<0>(numbers) > 0, ExcMessage("Could not find normal: the shape containing the closest point has 0 faces."));