From: Wolfgang Bangerth Date: Fri, 11 Feb 2011 04:06:56 +0000 (+0000) Subject: Some more minor edits. X-Git-Tag: v8.0.0~4366 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=063e28f7410c05f3772a509265074f4ed052c71c;p=dealii.git Some more minor edits. git-svn-id: https://svn.dealii.org/trunk@23332 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/grid/grid_generator.cc b/deal.II/source/grid/grid_generator.cc index b41268bdf0..a3454f7831 100644 --- a/deal.II/source/grid/grid_generator.cc +++ b/deal.II/source/grid/grid_generator.cc @@ -2281,7 +2281,7 @@ GridGenerator::hyper_shell (Triangulation<3>& tria, // Start with the shell bounded by // two nested cubes - if (n <= 6) + if (n == 6) { for (unsigned int i=0;i<8;++i) vertices.push_back(p+hexahedron[i]*irad); @@ -2305,11 +2305,13 @@ GridGenerator::hyper_shell (Triangulation<3>& tria, cells[i].vertices[j] = cell_vertices[i][j]; cells[i].material_id = 0; } + + tria.create_triangulation (vertices, cells, SubCellData()); } // A more regular subdivision can // be obtained by two nested // rhombic dodecahedra - else if (n <= 12) + else if (n == 12) { for (unsigned int i=0;i<8;++i) vertices.push_back(p+hexahedron[i]*irad); @@ -2346,16 +2348,14 @@ GridGenerator::hyper_shell (Triangulation<3>& tria, } cells[i].material_id = 0; } + + tria.create_triangulation (vertices, cells, SubCellData()); } else { - Assert(false, ExcIndexRange(n, 1, 12)); + Assert(false, ExcMessage ("Invalid number of coarse mesh cells.")); } - tria.create_triangulation (vertices, cells, - SubCellData()); // no boundary - // information - if (colorize) colorize_hyper_shell(tria, p, inner_radius, outer_radius); }