for (; cell!=endc; ++cell)
for (unsigned int face=0; face<GeometryInfo<dim>::faces_per_cell; ++face)
if ( cell->face(face)->at_boundary() &&
- ((cell->face(face)->center() - transducer).norm_square() < 0.01) ) {
-
- cell->face(face)->set_boundary_indicator (1);
- cell->face(face)->set_manifold_id (1);
- }
+ ((cell->face(face)->center() - transducer).norm_square() < 0.01) )
+ {
+
+ cell->face(face)->set_boundary_indicator (1);
+ cell->face(face)->set_manifold_id (1);
+ }
// For the circle part of the transducer lens, a hyper-ball object is used
// (which, of course, in 2D just represents a circle), with radius and
// center as computed above. By marking this object as
GridIn<dim-1, dim> gi;
gi.attach_triangulation (tria);
gi.read_ucd (in);
-
+
tria.set_all_manifold_ids(1);
tria.set_manifold(1, manifold);
}
GridTools::shift(Point<dim>(0.5, 0.5, 0.5), triangulation);
static SphericalManifold<dim> manifold_description(Point<dim>(0.5, 0.5, 0.5));
- GridTools::copy_boundary_to_manifold_id(triangulation);
+ GridTools::copy_boundary_to_manifold_id(triangulation);
triangulation.set_manifold(0, manifold_description);
}
// Alternatively, create a hypercube mesh. After creating it,
//GridGenerator::hyper_cube (triangulation, -1, 1);
static const SphericalManifold<dim> boundary;
- triangulation.set_all_manifold_ids_on_boundary(0);
+ triangulation.set_all_manifold_ids_on_boundary(0);
triangulation.set_manifold (0, boundary);
triangulation.refine_global (2);