// point (1,0), and inner and outer
// radius shall be 0.5 and 1. The
// number of circumferentical cells
- // will be adjusted automatically
- // by this function (in this case,
- // there will be 10)
+ // could be adjusted automatically
+ // by this function, but we choose
+ // to set it explicitely as the
+ // last argument
const Point<2> center (1,0);
const double inner_radius = 0.5,
outer_radius = 1.0;
GridGenerator::hyper_shell (triangulation,
- center, inner_radius, outer_radius);
+ center, inner_radius, outer_radius,
+ 10);
// By default, the triangulation
// assumes that all boundaries are
// straight and given by the cells
const double inner_radius = 0.5,
outer_radius = 1.0;
GridGenerator::hyper_shell (triangulation,
- center, inner_radius, outer_radius);
+ center, inner_radius, outer_radius, 10);
// This is the single difference to
// the respetive function in the
// circle, which is why we
// have to provide a
// suitable boundary object
- // as well.
+ // as well. We place the
+ // center of the circle at
+ // the origin and have the
+ // radius be one.
//
// You will notice by
// looking at the coarse
// any space dimension,
// which was not the case
// before.
- GridGenerator::hyper_ball (triangulation);
+ GridGenerator::hyper_ball (triangulation, Point<dim>(), 1);
static const HyperBallBoundary<dim> boundary;
triangulation.set_boundary (0, boundary);