]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Disambiguate which operator* we want to take.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 11 Feb 2015 04:19:11 +0000 (22:19 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 12 Feb 2015 13:31:41 +0000 (07:31 -0600)
Use an explicitly cast from int to double in a few places.

source/grid/grid_generator.cc

index 5d9774865d4806fa7e9123f0c0539ff219fe2089..db8ee260b3b294ef43ed5b50243a2c92716edb18 100644 (file)
@@ -777,20 +777,20 @@ namespace GridGenerator
       {
       case 1:
         for (unsigned int x=0; x<=n_subdivisions[0]; ++x)
-          points.push_back (Point<dim> (x*delta[0]));
+          points.push_back (Point<dim> (double(x)*delta[0]));
         break;
 
       case 2:
         for (unsigned int y=0; y<=n_subdivisions[1]; ++y)
           for (unsigned int x=0; x<=n_subdivisions[0]; ++x)
-            points.push_back (Point<dim> (x*delta[0] + y*delta[1]));
+            points.push_back (Point<dim> (double(x)*delta[0] + double(y)*delta[1]));
         break;
 
       case 3:
         for (unsigned int z=0; z<=n_subdivisions[2]; ++z)
           for (unsigned int y=0; y<=n_subdivisions[1]; ++y)
             for (unsigned int x=0; x<=n_subdivisions[0]; ++x)
-              points.push_back (Point<dim> (x*delta[0] + y*delta[1] + z*delta[2]));
+              points.push_back (Point<dim> (double(x)*delta[0] + double(y)*delta[1] + double(z)*delta[2]));
         break;
 
       default:

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.