]> https://gitweb.dealii.org/ - dealii.git/commitdiff
remove warning 1080/head
authorTimo Heister <timo.heister@gmail.com>
Sun, 5 Jul 2015 10:00:05 +0000 (06:00 -0400)
committerTimo Heister <timo.heister@gmail.com>
Sun, 5 Jul 2015 10:00:05 +0000 (06:00 -0400)
gcc gives the nonsensical warning "comparison of unsigned expression < 0
is always false". Work around this.

source/grid/grid_generator.cc

index 65ee3b54be643af2d5fcc2522ef0be48ec65f32b..25989ddb9417154657021ef96586a8ec808f1464 100644 (file)
@@ -449,8 +449,8 @@ namespace GridGenerator
     if (dim>2)
       {
         // In 3D, we have some more edges to deal with
-        for (unsigned int i=0; i<dim-1; ++i)
-          points.push_back(0.5*(points[i]+points[i+2]));
+        for (unsigned int i=1; i<dim; ++i)
+          points.push_back(0.5*(points[i-1]+points[i+1]));
         // And we need face midpoints
         for (unsigned int i=0; i<=dim; ++i)
           points.push_back(1./3.*

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.