]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Silence a few warnings in the tutorials.
authorBruno Turcksin <bruno.turcksin@gmail.com>
Tue, 16 Jun 2015 10:05:00 +0000 (05:05 -0500)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Tue, 16 Jun 2015 10:05:00 +0000 (05:05 -0500)
examples/step-14/step-14.cc
examples/step-29/step-29.cc
examples/step-51/step-51.cc
include/deal.II/matrix_free/fe_evaluation.h

index 1947f9dd802d181d483efb18d08c6340081df42f..48c324bb6437c54d66e0861512b4276a11809ea4 100644 (file)
@@ -2576,6 +2576,11 @@ namespace Step14
                           WeightedResidualCopyData                          &copy_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
       // <code>error_indicators</code> variable:
index aaa0049c34e03f83b5dc512e3ed356fe106818e1..f5647991f4eebb9cbfbc2512416d40ec7c0a1223 100644 (file)
@@ -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<dim>    transducer = (dim == 2) ?
                                      Point<dim> (0.5, 0.0) :
-                                     Point<dim> (0.5, 0.5, 0.0),
-                                     focal_point = (dim == 2) ?
-                                                   Point<dim> (0.5, focal_distance) :
-                                                   Point<dim> (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<dim> (0.5, 0.5, 0.0);
+    const Point<dim>   focal_point = (dim == 2) ?
+                                     Point<dim> (0.5, focal_distance) :
+                                     Point<dim> (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
-    // <code>static</code>, 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 <code>static</code>, 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<dim> boundary(focal_point);
     triangulation.set_manifold(1, boundary);
 
index 8581cfcf6d7078b702ffde4bfc6f12294ecbe13b..c814c97314bb1fdc9fafa4c806e5d50bd86748a7 100644 (file)
@@ -1377,7 +1377,7 @@ namespace Step51
 
 
 
-int main (int argc, char **argv)
+int main ()
 {
   const unsigned int dim = 2;
 
index 6460d8ad0b895b28be9f98986dbbf5bd3a92b473..31bed96c91800f335ed5c87ed0e5966d8cfd8cdc 100644 (file)
@@ -5797,7 +5797,6 @@ namespace internal
         for (unsigned int c=0; c<n_components; c++)
           {
             VectorizedArray<Number> temp1[temp_size];
-            VectorizedArray<Number> temp2[temp_size];
 
             // grad x
             if (evaluate_grad == true)

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.