<h3>General</h3>
<ol>
-<li> Extended: Many operations on objects of type Point<0>, Quadrature<0>, etc
+<li> Extended: GridGenerator::half_hyper_shell() got the option
+<code>colorize</code>, which assigns different boundary indicators to the
+different parts of the boundary. Added GridGenerator::quarter_hyper_shell()
+with the same options.
+<br>
+(Timo Heister, 2011/08/15)
+
+<li> Extended: Many operations on objects of
+type Point<0>, Quadrature<0>, etc
(including creation) were previously forbidden since such objects do not make
much sense. However, this prevented a lot of code that could otherwise work
in a dimension independent way, from working in 1d, e.g. integration on
* computed adaptively such that
* the resulting elements have
* the least aspect ratio.
+ *
+ * If colorize is set to true, the
+ * inner, outer, left, and right
+ * boundary get indicator 0, 1, 2,
+ * and 3, respectively. Otherwise
+ * all indicators are set to 0.
*
* @note The triangulation needs to be
* void upon calling this
const Point<dim> ¢er,
const double inner_radius,
const double outer_radius,
- const unsigned int n_cells = 0);
+ const unsigned int n_cells = 0,
+ const bool colorize = false);
/**
* the resulting elements have
* the least aspect ratio.
*
- * @note The triangulation needs to be
+ * If colorize is set to true, the
+ * inner, outer, left, and right
+ * boundary get indicator 0, 1, 2,
+ * and 3, respectively. Otherwise
+ * all indicators are set to 0.
+ *
+ * @note The triangulation needs to be
* void upon calling this
* function. Only implemented in 2d so far.
*/
const Point<1>&,
const double,
const double,
- const unsigned int)
+ const unsigned int,
+ const bool)
{
Assert (false, ExcNotImplemented());
}
const Point<2> ¢er,
const double inner_radius,
const double outer_radius,
- const unsigned int n_cells)
+ const unsigned int n_cells,
+ const bool colorize)
{
Assert ((inner_radius > 0) && (inner_radius < outer_radius),
ExcInvalidRadii ());
};
tria.create_triangulation (vertices, cells, SubCellData());
+
+ if (colorize)
+ {
+ Triangulation<2>::cell_iterator cell = tria.begin();
+ for (;cell!=tria.end();++cell)
+ {
+ cell->face(2)->set_boundary_indicator(1);
+ }
+ tria.begin()->face(0)->set_boundary_indicator(3);
+
+ tria.last()->face(1)->set_boundary_indicator(2);
+ }
}
const Point<3>& center,
const double inner_radius,
const double outer_radius,
- const unsigned int n)
+ const unsigned int n,
+ const bool colorize)
{
Assert ((inner_radius > 0) && (inner_radius < outer_radius),
ExcInvalidRadii ());
+ Assert(colorize == false, ExcNotImplemented());
if (n <= 5)
{