* both the faces and the edges of these boundaries. If the flag is @p
* false, both have indicator zero.
*
+ * Attach a SphericalManifold for correct placement of vertices upon refinement
+ * and higher order mappings. Alternatively, attach a HyperShellBoundary to the
+ * inner and outer boundary.
+ *
* In 2d, the number <tt>n_cells</tt> of elements for this initial
* triangulation can be chosen arbitrarily. If the number of initial cells
* is zero (as is the default), then it is computed adaptively such that the
* resulting elements have the least aspect ratio.
*
- * In 3d, only certain numbers are allowed, 6 for a surface based on a
+ * In 3d, only certain numbers are allowed, 6 (or the default 0) for a surface based on a
* hexahedron (i.e. 6 panels on the inner sphere extruded in radial
* direction to form 6 cells), 12 for the rhombic dodecahedron, and 96 (see
- * below). These give rise to the following meshes upon one refinement:
+ * below).
+ *
+ * While the SphericalManifold, that is demonstrated in the documentation of the
+ * @ref manifold "documentation module on manifolds", creates reasonable meshes
+ * for any number of @p n_cells, the situation is less than ideal when only attaching
+ * a HyperShellBoundary. Then, the 3d meshes give rise to the following meshes
+ * upon one refinement:
*
* @image html hypershell3d-6.png
* @image html hypershell3d-12.png
* @image html hyper_shell_12_cut.png
* @image html hyper_shell_96_cut.png
*
- * A different way to approach the problem with distorted cells is to attach
- * appropriate manifold descriptions to the geometry created by this
- * function. In the current context, this would involve the
- * SphericalManifold class. An example of how this works and what it leads
- * to is shown in the documentation of the
- * @ref manifold "documentation module on manifolds".
- *
* @note This function is declared to exist for triangulations of all space
* dimensions, but throws an error if called in 1d.
*
const Point<3> &p,
const double inner_radius,
const double outer_radius,
- const unsigned int n,
+ const unsigned int n_cells,
const bool colorize)
{
Assert ((inner_radius > 0) && (inner_radius < outer_radius),
ExcInvalidRadii ());
+ const unsigned int n = (n_cells==0) ? 6 : n_cells;
+
const double irad = inner_radius/std::sqrt(3.0);
const double orad = outer_radius/std::sqrt(3.0);
std::vector<Point<3> > vertices;