From: David Wells Date: Mon, 25 Jun 2018 23:50:00 +0000 (-0400) Subject: Use brace initialization instead of writing Point<2> a lot. X-Git-Tag: v9.1.0-rc1~982^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e20ebcc639b1fe5c35cc3b89fc1bd10ebd59ee01;p=dealii.git Use brace initialization instead of writing Point<2> a lot. --- diff --git a/examples/step-49/doc/results.dox b/examples/step-49/doc/results.dox index 303b1ef1ff..1340bd6449 100644 --- a/examples/step-49/doc/results.dox +++ b/examples/step-49/doc/results.dox @@ -98,28 +98,28 @@ void create_2d_grid( void create_3d_grid(Triangulation<3> &triangulation) { // Generate first cross section - std::vector> vertices_1{Point<2>(-1.5, 0.), - Point<2>(-0.5, 0.), - Point<2>(0.5, 0.), - Point<2>(1.5, 0.), + const std::vector> vertices_1{{-1.5, 0.}, + {-0.5, 0.}, + {0.5, 0.}, + {1.5, 0.}, - Point<2>(-1.5, 1.5), - Point<2>(-0.5, 1.5), - Point<2>(0.5, 1.5), - Point<2>(1.5, 1.5), + {-1.5, 1.5}, + {-0.5, 1.5}, + {0.5, 1.5}, + {1.5, 1.5}, - Point<2>(-1.5, 3.), - Point<2>(-0.5, 3.), - Point<2>(0.5, 3.), - Point<2>(1.5, 3.), + {-1.5, 3.}, + {-0.5, 3.}, + {0.5, 3.}, + {1.5, 3.}, - Point<2>(-0.5, 3 + 0.5 * sqrt(3)), - Point<2>(0.5, 3 + 0.5 * sqrt(3)), + {-0.5, 3 + 0.5 * sqrt(3)}, + {0.5, 3 + 0.5 * sqrt(3)}, - Point<2>(-0.75, 3 + 0.75 * sqrt(3)), - Point<2>(0.75, 3 + 0.75 * sqrt(3))}; + {-0.75, 3 + 0.75 * sqrt(3)}, + {0.75, 3 + 0.75 * sqrt(3)}}; - std::vector::vertices_per_cell>> + const std::vector::vertices_per_cell>> cell_vertices_1 = {{{0, 1, 4, 5}}, {{1, 2, 5, 6}}, {{3, 7, 2, 6}}, @@ -143,39 +143,37 @@ void create_3d_grid(Triangulation<3> &triangulation) triangulation_3d_1); // Now do the same with the second volume - const std::vector> vertices_2 = { - Point<2>(-2.5, 0.), - Point<2>(-1.5, 0.), - Point<2>(-0.5, 0.), - Point<2>(0.5, 0.), - Point<2>(1.5, 0.), - Point<2>(2.5, 0.), - - Point<2>(-2.5, 1.5), - Point<2>(-1.5, 1.5), - Point<2>(-0.5, 1.5), - Point<2>(0.5, 1.5), - Point<2>(1.5, 1.5), - Point<2>(2.5, 1.5), - - Point<2>(-2.5, 3.), - Point<2>(-1.5, 3.), - Point<2>(-0.5, 3.), - Point<2>(0.5, 3.), - Point<2>(1.5, 3.), - Point<2>(2.5, 3.), - - Point<2>(-0.5, 3. + 0.5 * sqrt(3)), - Point<2>(0.5, 3. + 0.5 * sqrt(3)), - - Point<2>(-0.75, 3. + 0.75 * sqrt(3)), - Point<2>(0.75, 3. + 0.75 * sqrt(3)), - - Point<2>(-1.25, 3. + 1.25 * sqrt(3)), - Point<2>(1.25, 3. + 1.25 * sqrt(3))}; - - const std::vector< - std::array::vertices_per_cell>> + const std::vector> vertices_2{{-2.5, 0.}, + {-1.5, 0.}, + {-0.5, 0.}, + {0.5, 0.}, + {1.5, 0.}, + {2.5, 0.}, + + {-2.5, 1.5}, + {-1.5, 1.5}, + {-0.5, 1.5}, + {0.5, 1.5}, + {1.5, 1.5}, + {2.5, 1.5}, + + {-2.5, 3.}, + {-1.5, 3.}, + {-0.5, 3.}, + {0.5, 3.}, + {1.5, 3.}, + {2.5, 3.}, + + {-0.5, 3. + 0.5 * sqrt(3)}, + {0.5, 3. + 0.5 * sqrt(3)}, + + {-0.75, 3. + 0.75 * sqrt(3)}, + {0.75, 3. + 0.75 * sqrt(3)}, + + {-1.25, 3. + 1.25 * sqrt(3)}, + {1.25, 3. + 1.25 * sqrt(3)}}; + + const std::vector::vertices_per_cell>> cell_vertices_2 = {{{0, 1, 6, 7}}, {{1, 2, 7, 8}}, {{2, 3, 8, 9}},