]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix a bug in Simplex::GridGenerator 10697/head
authorPeter Munch <peterrmuench@gmail.com>
Sun, 12 Jul 2020 10:41:41 +0000 (12:41 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Sun, 12 Jul 2020 10:41:41 +0000 (12:41 +0200)
include/deal.II/simplex/grid_generator.h

index f35f98ebf77f6df598ca6980c44f89e1e1dd24aa..492a8ae9aae12bda0c0332e1af713dbab8a2ccca 100644 (file)
@@ -64,8 +64,8 @@ namespace Simplex
       if (dim == 2)
         {
           // determine cell sizes
-          Point<dim> dx((p2[0] - p1[0]) / repetitions[0],
-                        (p2[1] - p1[1]) / repetitions[1]);
+          const Point<dim> dx((p2[0] - p1[0]) / repetitions[0],
+                              (p2[1] - p1[1]) / repetitions[1]);
 
           // create vertices
           for (unsigned int j = 0; j <= repetitions[1]; ++j)
@@ -103,9 +103,9 @@ namespace Simplex
       else if (dim == 3)
         {
           // determine cell sizes
-          Point<dim> dx((p2[0] - p1[0]) / repetitions[0],
-                        (p2[1] - p1[1]) / repetitions[1],
-                        (p2[2] - p1[2]) / repetitions[1]);
+          const Point<dim> dx((p2[0] - p1[0]) / repetitions[0],
+                              (p2[1] - p1[1]) / repetitions[1],
+                              (p2[2] - p1[2]) / repetitions[2]);
 
           // create vertices
           for (unsigned int k = 0; k <= repetitions[2]; ++k)

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.