From: Peter Munch Date: Sun, 12 Jul 2020 10:41:41 +0000 (+0200) Subject: Fix a bug in Simplex::GridGenerator X-Git-Tag: v9.3.0-rc1~1299^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F10697%2Fhead;p=dealii.git Fix a bug in Simplex::GridGenerator --- diff --git a/include/deal.II/simplex/grid_generator.h b/include/deal.II/simplex/grid_generator.h index f35f98ebf7..492a8ae9aa 100644 --- a/include/deal.II/simplex/grid_generator.h +++ b/include/deal.II/simplex/grid_generator.h @@ -64,8 +64,8 @@ namespace Simplex if (dim == 2) { // determine cell sizes - Point dx((p2[0] - p1[0]) / repetitions[0], - (p2[1] - p1[1]) / repetitions[1]); + const Point 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 dx((p2[0] - p1[0]) / repetitions[0], - (p2[1] - p1[1]) / repetitions[1], - (p2[2] - p1[2]) / repetitions[1]); + const Point 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)