From 2950c564ffabafd0a7d3dc2e6cbbf79be7aa91d4 Mon Sep 17 00:00:00 2001 From: Bruno Turcksin Date: Tue, 16 Jun 2015 05:05:00 -0500 Subject: [PATCH] Silence a few warnings in the tutorials. --- examples/step-14/step-14.cc | 5 +++ examples/step-29/step-29.cc | 36 +++++++++------------ examples/step-51/step-51.cc | 2 +- include/deal.II/matrix_free/fe_evaluation.h | 1 - 4 files changed, 21 insertions(+), 23 deletions(-) diff --git a/examples/step-14/step-14.cc b/examples/step-14/step-14.cc index 1947f9dd80..48c324bb64 100644 --- a/examples/step-14/step-14.cc +++ b/examples/step-14/step-14.cc @@ -2576,6 +2576,11 @@ namespace Step14 WeightedResidualCopyData ©_data, FaceIntegrals &face_integrals) const { + // Because of WorkStream, estimate_on_one_cell requires a CopyData object + // even if it is no used. The next line silence a warning about this unused + // variable. + (void) copy_data; + // First task on each cell is to compute the cell residual // contributions of this cell, and put them into the // error_indicators variable: diff --git a/examples/step-29/step-29.cc b/examples/step-29/step-29.cc index aaa0049c34..f5647991f4 100644 --- a/examples/step-29/step-29.cc +++ b/examples/step-29/step-29.cc @@ -454,22 +454,17 @@ namespace Step29 // Next, two points are defined for position and focal point of the // transducer lens, which is the center of the circle whose segment will - // form the transducer part of the boundary. We compute the radius of this - // circle in such a way that the segment fits in the interval [0.4,0.6] on - // the x-axis. Notice that this is the only point in the program where - // things are slightly different in 2D and 3D. Even though this tutorial - // only deals with the 2D case, the necessary additions to make this - // program functional in 3D are so minimal that we opt for including them: + // form the transducer part of the boundary. Notice that this is the only + // point in the program where things are slightly different in 2D and 3D. + // Even though this tutorial only deals with the 2D case, the necessary + // additions to make this program functional in 3D are so minimal that we + // opt for including them: const Point transducer = (dim == 2) ? Point (0.5, 0.0) : - Point (0.5, 0.5, 0.0), - focal_point = (dim == 2) ? - Point (0.5, focal_distance) : - Point (0.5, 0.5, focal_distance); - - const double radius = std::sqrt( (focal_point.distance(transducer) * - focal_point.distance(transducer)) + - ((dim==2) ? 0.01 : 0.02)); + Point (0.5, 0.5, 0.0); + const Point focal_point = (dim == 2) ? + Point (0.5, focal_distance) : + Point (0.5, 0.5, focal_distance); // As initial coarse grid we take a simple unit square with 5 subdivisions @@ -497,13 +492,12 @@ namespace Step29 cell->face(face)->set_boundary_id (1); cell->face(face)->set_manifold_id (1); } - // For the circle part of the transducer lens, a hyper-ball object is used - // (which, of course, in 2D just represents a circle), with radius and - // center as computed above. By marking this object as - // static, we ensure that it lives until the end of the - // program and thereby longer than the triangulation object we will - // associated with it. We then assign this boundary-object to the part of - // the boundary with boundary indicator 1: + // For the circle part of the transducer lens, a SphericalManifold object + // is used (which, of course, in 2D just represents a circle), with center + // computed as above. By marking this object as static, we + // ensure that it lives until the end of the program and thereby longer + // than the triangulation object we will associated with it. We then assign + // this boundary-object to the part of the boundary with boundary indicator 1: static const SphericalManifold boundary(focal_point); triangulation.set_manifold(1, boundary); diff --git a/examples/step-51/step-51.cc b/examples/step-51/step-51.cc index 8581cfcf6d..c814c97314 100644 --- a/examples/step-51/step-51.cc +++ b/examples/step-51/step-51.cc @@ -1377,7 +1377,7 @@ namespace Step51 -int main (int argc, char **argv) +int main () { const unsigned int dim = 2; diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index 6460d8ad0b..31bed96c91 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -5797,7 +5797,6 @@ namespace internal for (unsigned int c=0; c temp1[temp_size]; - VectorizedArray temp2[temp_size]; // grad x if (evaluate_grad == true) -- 2.39.5