-// ---------------------------------------------------------------------
-// $Id$
-//
-// Copyright (C) 1999 - 2013 by the deal.II authors
-//
-// This file is part of the deal.II library.
-//
-// The deal.II library is free software; you can use it, redistribute
-// it, and/or modify it under the terms of the GNU Lesser General
-// Public License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// The full text of the license can be found in the file LICENSE at
-// the top level of the deal.II distribution.
-//
-// ---------------------------------------------------------------------
+/* ---------------------------------------------------------------------
+ * $Id$
+ *
+ * Copyright (C) 1999 - 2013 by the deal.II authors
+ *
+ * This file is part of the deal.II library.
+ *
+ * The deal.II library is free software; you can use it, redistribute
+ * it, and/or modify it under the terms of the GNU Lesser General
+ * Public License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * The full text of the license can be found in the file LICENSE at
+ * the top level of the deal.II distribution.
+ *
+ * ---------------------------------------------------------------------
+
+ */
// @sect3{Include files}
// We then fill it with a ring domain. The center of the ring shall be the
// point (1,0), and inner and outer radius shall be 0.5 and 1. The number of
// circumferential cells could be adjusted automatically by this function,
- // but we choose to set it explicitely to 10 as the last argument:
+ // but we choose to set it explicitly to 10 as the last argument:
const Point<2> center (1,0);
const double inner_radius = 0.5,
outer_radius = 1.0;
// @ref GlossBoundaryIndicator "glossary entry on this topic".)
const HyperShellBoundary<2> boundary_description(center);
triangulation.set_boundary (0, boundary_description);
- triangulation.refine_global(1);
-
// In order to demonstrate how to write a loop over all cells, we will
// refine the grid in five steps towards the inner circle of the domain:
- for (unsigned int step=0; step<0; ++step)
+ for (unsigned int step=0; step<5; ++step)
{
// Next, we need an iterator which points to a cell and which we will
// move over all active cells one by one (active cells are those that
#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
#include <deal.II/grid/tria.h>
#include <deal.II/grid/grid_out.h>
#include <deal.II/dofs/dof_handler.h>
// radius equals one.
Triangulation<dim> triangulation;
GridGenerator::hyper_ball (triangulation);
- static const PolarManifold<dim> boundary;
- triangulation.set_manifold (0, boundary);
+ static const HyperBallBoundary<dim> boundary;
+ triangulation.set_boundary (0, boundary);
// Next generate output for this grid and for a once refined grid. Note
// that we have hidden the mesh refinement in the loop header, which might
Triangulation<dim> triangulation;
GridGenerator::hyper_ball (triangulation);
- static const PolarManifold<dim> boundary;
- triangulation.set_manifold (0, boundary);
+ static const HyperBallBoundary<dim> boundary;
+ triangulation.set_boundary (0, boundary);
const MappingQ<dim> mapping (degree);
Triangulation<dim> triangulation;
GridGenerator::hyper_ball (triangulation);
- static const PolarManifold<dim> boundary;
- triangulation.set_manifold (0, boundary);
+ static const HyperBallBoundary<dim> boundary;
+ triangulation.set_boundary (0, boundary);
const MappingQ<dim> mapping (degree);
const FE_Q<dim> fe (1);
#include <deal.II/lac/constraint_matrix.h>
#include <deal.II/grid/tria.h>
#include <deal.II/grid/grid_generator.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
#include <deal.II/dofs/dof_handler.h>
void LaplaceProblem<dim>::run ()
{
GridGenerator::hyper_ball (triangulation);
- static const PolarManifold<dim> boundary;
- triangulation.set_manifold (0, boundary);
+ static const HyperBallBoundary<dim> boundary;
+ triangulation.set_boundary (0, boundary);
for (unsigned int cycle=0; cycle<6; ++cycle, triangulation.refine_global(1))
{
#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
#include <deal.II/grid/grid_refinement.h>
#include <deal.II/dofs/dof_handler.h>
// the origin, created in the same way as shown in step-6. The mesh is
// globally refined twice followed later on by several adaptive cycles:
GridGenerator::hyper_ball (triangulation);
- static const PolarManifold<dim> boundary;
- triangulation.set_manifold (0, boundary);
+ static const HyperBallBoundary<dim> boundary;
+ triangulation.set_boundary (0, boundary);
triangulation.refine_global(2);
// The Newton iteration starts next. During the first step we do not have
#include <deal.II/grid/tria_iterator.h>
#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_refinement.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
#include <deal.II/dofs/dof_accessor.h>
#include <deal.II/dofs/dof_tools.h>
{
GridGenerator::hyper_ball (triangulation);
- static const PolarManifold<dim> boundary;
- triangulation.set_manifold (0, boundary);
+ static const HyperBallBoundary<dim> boundary;
+ triangulation.set_boundary (0, boundary);
triangulation.refine_global (1);
}
#include <deal.II/grid/grid_refinement.h>
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
#include <deal.II/dofs/dof_handler.h>
#include <deal.II/dofs/dof_accessor.h>
#include <deal.II/dofs/dof_tools.h>
// to the vertex we consider at present, as they may or may not be ordered
// in the same order.
//
+ // This inconvenience could be avoided if finite elements have support
+ // points on vertices (which the one here has; for the concept of support
+ // points, see @ref GlossSupport "support points"). For such a case, one
+ // could construct a custom quadrature rule using
+ // FiniteElement::get_unit_support_points(). The first
+ // <code>GeometryInfo@<dim@>::vertices_per_cell*fe.dofs_per_vertex</code>
+ // quadrature points will then correspond to the vertices of the cell and
+ // are ordered consistent with <code>cell-@>vertex(i)</code>, taking into
+ // account that support points for vector elements will be duplicated
+ // <code>fe.dofs_per_vertex</code> times.
+ //
// Another point worth explaining about this short function is the way in
// which the triangulation class exports information about its vertices:
// through the <code>Triangulation::n_vertices</code> function, it
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
#include <deal.II/grid/grid_generator.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
// However, the next file is new. We need this include file for the
// association of degrees of freedom ("DoF"s) to vertices, lines, and cells:
center, inner_radius, outer_radius,
10);
- static const PolarManifold<2> boundary_description(center);
- triangulation.set_manifold (0, boundary_description);
+ static const HyperShellBoundary<2> boundary_description(center);
+ triangulation.set_boundary (0, boundary_description);
for (unsigned int step=0; step<5; ++step)
{
#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
#include <deal.II/grid/grid_tools.h>
#include <deal.II/grid/grid_refinement.h>
#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
#include <deal.II/dofs/dof_handler.h>
#include <deal.II/dofs/dof_accessor.h>
{
const Point<dim> center;
GridGenerator::hyper_ball (triangulation, center, 1.);
- static const PolarManifold<dim> boundary_description (center);
- triangulation.set_manifold (0,boundary_description);
+ static const HyperBallBoundary<dim> boundary_description (center, 1.);
+ triangulation.set_boundary (0,boundary_description);
triangulation.refine_global (7);
time_step = GridTools::minimal_cell_diameter(triangulation) /
#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
#include <deal.II/dofs/dof_handler.h>
#include <deal.II/dofs/dof_accessor.h>
#include <deal.II/dofs/dof_tools.h>
#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
#include <deal.II/dofs/dof_handler.h>
#include <deal.II/dofs/dof_accessor.h>
// program and thereby longer than the triangulation object we will
// associated with it. We then assign this boundary-object to the part of
// the boundary with boundary indicator 1:
- static const PolarManifold<dim> boundary(focal_point);
- triangulation.set_manifold (1, boundary);
+ static const HyperBallBoundary<dim> boundary(focal_point, radius);
+ triangulation.set_boundary(1, boundary);
// Now global refinement is executed. Cells near the transducer location
// will be automatically refined according to the circle shaped boundary
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
#include <deal.II/grid/filtered_iterator.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
#include <deal.II/grid/grid_tools.h>
#include <deal.II/grid/grid_refinement.h>
EquationData::R1,
(dim==3) ? 96 : 12,
true);
- static PolarManifold<dim> boundary;
- triangulation.set_manifold (0, boundary);
- triangulation.set_manifold (1, boundary);
+ static HyperShellBoundary<dim> boundary;
+ triangulation.set_boundary (0, boundary);
+ triangulation.set_boundary (1, boundary);
global_Omega_diameter = GridTools::diameter (triangulation);
#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_in.h>
#include <deal.II/grid/grid_out.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
#include <deal.II/dofs/dof_handler.h>
#include <deal.II/dofs/dof_accessor.h>
//
// Experimenting a little with the computation of the angles gives very
// accurate results for simpler geometries. To verify this you can comment
- // out, in the read_domain() method, the tria.set_manifold (1, boundary)
+ // out, in the read_domain() method, the tria.set_boundary(1, boundary)
// line, and check the alpha that is generated by the program. By removing
// this call, whenever the mesh is refined new nodes will be placed along
// the straight lines that made up the coarse mesh, rather than be pulled
void BEMProblem<dim>::read_domain()
{
static const Point<dim> center = Point<dim>();
- static const PolarManifold<dim> boundary(center);
+ static const HyperBallBoundary<dim-1, dim> boundary(center,1.);
std::ifstream in;
switch (dim)
gi.attach_triangulation (tria);
gi.read_ucd (in);
- tria.set_manifold (1, boundary);
+ tria.set_boundary(1, boundary);
}
#include <deal.II/grid/grid_refinement.h>
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
#include <deal.II/grid/grid_in.h>
#include <deal.II/dofs/dof_handler.h>
#include <deal.II/grid/tria.h>
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
#include <deal.II/grid/grid_generator.h>
#include <deal.II/multigrid/multigrid.h>
#include <deal.II/grid/tria.h>
#include <deal.II/grid/tria_iterator.h>
#include <deal.II/grid/tria_accessor.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_tools.h>
#include <deal.II/lac/full_matrix.h>
template <int spacedim>
void LaplaceBeltramiProblem<spacedim>::make_grid_and_dofs ()
{
- static PolarManifold<spacedim> surface_description;
- triangulation.set_manifold (0, surface_description);
+ static HyperBallBoundary<dim,spacedim> surface_description;
+ triangulation.set_boundary (0, surface_description);
{
Triangulation<spacedim> volume_mesh;
#include <deal.II/grid/grid_tools.h>
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
#include <deal.II/distributed/tria.h>
#include <deal.II/distributed/grid_refinement.h>
GridTools::transform(&rotate_half_sphere, triangulation);
GridTools::shift(Point<dim>(0.5, 0.5, 0.5), triangulation);
- static PolarManifold<dim> boundary_description(Point<dim>(0.5, 0.5, 0.5));
- triangulation.set_manifold(0, boundary_description);
+ static HyperBallBoundary<dim> boundary_description(Point<dim>(0.5, 0.5, 0.5), radius);
+ triangulation.set_boundary(0, boundary_description);
}
// Alternatively, create a hypercube mesh. After creating it,
// assign boundary indicators as follows:
#include <deal.II/grid/grid_tools.h>
#include <deal.II/grid/grid_in.h>
#include <deal.II/grid/tria.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
#include <deal.II/fe/fe_dgp_monomial.h>
#include <deal.II/fe/fe_q.h>
#include <deal.II/grid/tria_iterator.h>
#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_tools.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
#include <deal.II/grid/grid_out.h>
#include <deal.II/grid/grid_in.h>
// an object that describes a circle (i.e., a hyper ball) with appropriate
// center and radius and assign it to the triangulation. We can then refine
// twice:
- const PolarManifold<2> boundary_description(Point<2>(0,0));
- triangulation.set_manifold (1, boundary_description);
+ const HyperBallBoundary<2> boundary_description(Point<2>(0,0), 0.25);
+ triangulation.set_boundary (1, boundary_description);
triangulation.refine_global(2);
// The mesh so generated is then passed to the function that generates
// object is destroyed first in this function since it was declared after
// the triangulation).
mesh_info (triangulation, "grid-3.eps");
- triangulation.set_manifold (1);
+ triangulation.set_boundary (1);
}
// There is one snag to doing things as shown above: If one moves the nodes on
// We will use a circular domain, and the object describing the boundary of it
// comes from this file:
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
// This is C++ ...
#include <fstream>
// the first example. Note that the HyperBallBoundary constructor takes two
// parameters, the center of the ball and the radius, but that their default
// (the origin and 1.0) are the ones which we would like to use here.
- static const PolarManifold<dim> boundary;
- triangulation.set_manifold (0, boundary);
+ static const HyperBallBoundary<dim> boundary;
+ triangulation.set_boundary (0, boundary);
for (unsigned int cycle=0; cycle<6; ++cycle)
{
#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_out.h>
#include <deal.II/grid/grid_refinement.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
#include <deal.II/dofs/dof_accessor.h>
#include <deal.II/dofs/dof_tools.h>
#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_refinement.h>
#include <deal.II/grid/tria_iterator.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
#include <deal.II/dofs/dof_handler.h>
#include <deal.II/dofs/dof_accessor.h>
#include <deal.II/dofs/dof_renumbering.h>
#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
#include <deal.II/dofs/dof_accessor.h>
#include <deal.II/dofs/dof_tools.h>
#include <deal.II/fe/fe_values.h>
{
GridGenerator::hyper_ball (triangulation);
- static const PolarManifold<dim> boundary;
- triangulation.set_manifold (0, boundary);
+ static const HyperBallBoundary<dim> boundary;
+ triangulation.set_boundary (0, boundary);
triangulation.refine_global (1);
}
#include <deal.II/grid/grid_refinement.h>
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
#include <deal.II/dofs/dof_handler.h>
#include <deal.II/dofs/dof_accessor.h>
#include <deal.II/dofs/dof_tools.h>
#include <deal.II/grid/grid_refinement.h>
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
#include <deal.II/dofs/dof_handler.h>
#include <deal.II/dofs/dof_accessor.h>
#include <deal.II/dofs/dof_tools.h>
#include <deal.II/grid/grid_refinement.h>
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
-#include <deal.II/grid/manifold_lib.h>
+#include <deal.II/grid/tria_boundary_lib.h>
#include <deal.II/dofs/dof_handler.h>
#include <deal.II/dofs/dof_accessor.h>
#include <deal.II/dofs/dof_tools.h>