]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix warnings for clang-5.0.0 5071/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 13 Sep 2017 16:00:16 +0000 (18:00 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 13 Sep 2017 20:17:46 +0000 (22:17 +0200)
source/base/data_out_base.cc
source/dofs/dof_handler_policy.cc

index 3ec7dbf731cf275f16864a80ddd18a2cc4d6361e..75f5f0136345cebcaae9a4bb82d755a43bbdfd17 100644 (file)
@@ -645,7 +645,8 @@ namespace
           case 1:
             Assert (xstep<n_subdivisions+1, ExcIndexRange(xstep,0,n_subdivisions+1));
             point_no+=xstep;
-
+            DEAL_II_FALLTHROUGH;
+          case 0:
             // break here for dim<=3
             break;
 
@@ -657,24 +658,29 @@ namespace
       }
     else
       {
-        // perform a dim-linear interpolation
-        const double stepsize=1./n_subdivisions,
-                     xfrac=xstep*stepsize;
-
-        node = (patch->vertices[1] * xfrac) + (patch->vertices[0] * (1-xfrac));
-        if (dim>1)
+        if (dim==0)
+          node = patch->vertices[0];
+        else
           {
-            const double yfrac=ystep*stepsize;
-            node*= 1-yfrac;
-            node += ((patch->vertices[3] * xfrac) + (patch->vertices[2] * (1-xfrac))) * yfrac;
-            if (dim>2)
+            // perform a dim-linear interpolation
+            const double stepsize=1./n_subdivisions,
+                         xfrac=xstep*stepsize;
+
+            node = (patch->vertices[1] * xfrac) + (patch->vertices[0] * (1-xfrac));
+            if (dim>1)
               {
-                const double zfrac=zstep*stepsize;
-                node *= (1-zfrac);
-                node += (((patch->vertices[5] * xfrac) + (patch->vertices[4] * (1-xfrac)))
-                         * (1-yfrac) +
-                         ((patch->vertices[7] * xfrac) + (patch->vertices[6] * (1-xfrac)))
-                         * yfrac) * zfrac;
+                const double yfrac=ystep*stepsize;
+                node*= 1-yfrac;
+                node += ((patch->vertices[3] * xfrac) + (patch->vertices[2] * (1-xfrac))) * yfrac;
+                if (dim>2)
+                  {
+                    const double zfrac=zstep*stepsize;
+                    node *= (1-zfrac);
+                    node += (((patch->vertices[5] * xfrac) + (patch->vertices[4] * (1-xfrac)))
+                             * (1-yfrac) +
+                             ((patch->vertices[7] * xfrac) + (patch->vertices[6] * (1-xfrac)))
+                             * yfrac) * zfrac;
+                  }
               }
           }
       }
index 90ac2e3db6c70fb426a2b4f15452ff0ef12b1d31..a5f72babf3b808ed9226e5555dc006e3b47f9e4d 100644 (file)
@@ -1040,22 +1040,29 @@ namespace internal
           {
             Threads::TaskGroup<> tasks;
 
-            tasks += Threads::new_task ([&]()
+            unsigned int i=0;
+            tasks += Threads::new_task ([ &,i] ()
             {
-              all_constrained_indices[0] = compute_vertex_dof_identities (dof_handler);
+              all_constrained_indices[i] = compute_vertex_dof_identities (dof_handler);
             });
 
             if (dim > 1)
-              tasks += Threads::new_task ([&]()
               {
-                all_constrained_indices[1] = compute_line_dof_identities (dof_handler);
-              });
+                ++i;
+                tasks += Threads::new_task ([ &,i] ()
+                {
+                  all_constrained_indices[i] = compute_line_dof_identities (dof_handler);
+                });
+              }
 
             if (dim > 2)
-              tasks += Threads::new_task ([&]()
               {
-                all_constrained_indices[2] = compute_quad_dof_identities (dof_handler);
-              });
+                ++i;
+                tasks += Threads::new_task ([ &,i] ()
+                {
+                  all_constrained_indices[i] = compute_quad_dof_identities (dof_handler);
+                });
+              }
 
             tasks.join_all ();
           }

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.