Reference documentation for deal.II version Git 7f58f27 20170920 15:35:49 0600

Classes  
class  Boundary< dim, spacedim > 
class  StraightBoundary< dim, spacedim > 
class  CylinderBoundary< dim, spacedim > 
class  HyperBallBoundary< dim, spacedim > 
class  HalfHyperBallBoundary< dim > 
class  HyperShellBoundary< dim > 
class  HalfHyperShellBoundary< dim > 
Functions  
void  Triangulation< dim, spacedim >::set_boundary (const types::manifold_id number, const Boundary< dim, spacedim > &boundary_object) 
void  Triangulation< dim, spacedim >::set_boundary (const types::manifold_id number) 
const Boundary< dim, spacedim > &  Triangulation< dim, spacedim >::get_boundary (const types::manifold_id number) const 
std::vector< types::boundary_id >  Triangulation< dim, spacedim >::get_boundary_ids () const 
Dealing with boundary indicators  
void  TriaAccessor< structdim, dim, spacedim >::set_boundary_id (const types::boundary_id) const 
void  TriaAccessor< structdim, dim, spacedim >::set_all_boundary_ids (const types::boundary_id) const 
Dealing with boundary indicators  
void  TriaAccessor< 0, 1, spacedim >::set_boundary_id (const types::boundary_id) 
void  TriaAccessor< 0, 1, spacedim >::set_all_boundary_ids (const types::boundary_id) 
void  TriaAccessor< 0, 1, spacedim >::set_manifold_id (const types::manifold_id) 
void  TriaAccessor< 0, 1, spacedim >::set_all_manifold_ids (const types::manifold_id) 
The classes in this module are concerned with the description of the geometry of a domain in which a Triangulation lives. This geometry description is necessary in three contexts:
Mesh refinement: Whenever a cell is refined, it is necessary to introduce at least one new vertex. In the simplest case, one assumes that the cells and their faces consists of straight line segments, bilinear surface or trilinear volumes between the vertices of the original, coarsest mesh, and the next vertex is simply put into the middle of the old ones. This is the default behavior of the Triangulation class, and is described by the StraightBoundary and FlatManifold classes.
On the other hand, if one deals with curved geometries and boundaries, this is not the appropriate thing to do. The classes derived from the Manifold and Boundary base classes describe the geometry of a domain. One can then attach an object of a class derived from this base classes to the Triangulation object using the Triangulation::set_boundary() or Triangulation::set_manifold() functions, and the Triangulation will ask the manifold object where a new vertex should be located upon mesh refinement. Several classes already exist to support the boundary of the most common geometries, e.g., CylinderBoundary, HyperBallBoundary, or HyperShellBoundary.
Integration: When using higher order finite element methods, it is often necessary to compute cell terms (like cell contributions to the matrix and right hand side of the linear system) using curved approximations of the geometry, rather than the straight line approximation. The actual implementation of such curved elements happens in the Mapping class (see the Mappings between reference and real cell module), which however obtains its information about the manifold description from the classes described here. The same is, of course, true when integrating boundary terms (e.g., inhomogenous Neumann boundary conditions).
In cases where a Triangulation is embedded into a higher dimensional space, i.e., whenever the second template argument of the Triangulation class is explicitly specified and larger than the first (for an example, see step34), the manifold description objects serve as a tool to describe the geometry not only of the boundary of the domain but of the domain itself, in case the domain is a manifold that is in fact curved. In these cases, one can use the Triangulation::set_manifold() function to indicate what manifold description to use when refining the curve, or when computing integrals using high order mappings.
In the context of triangulations, each object stores a number called manifold_id
, and each face of a cell that is located at the boundary of the domain stores a number called boundary_id
that uniquely identifies which part of the boundary this face is on. If nothing is specified at creation time, each boundary face has a zero boundary id and each triangulation object has an invalid manifold id. On the other hand, the boundary id of faces and the manifold id of objects can be set either at creation time or later by looping over all cells and querying their faces.
It is then possible to associate objects describing the geometry to certain boundary_id values used in a triangulation and to certain manifold_id values.
Before version 8.2, the library allowed only boundary faces to follow a curved geometric description. Since version 8.2 this has been introduced also for interior faces and cells, and the boundary_id has been separated from the manifold_id.
Although the old behavior is still supported, one should use the boundary indicator only for the physical meaning associated, for example, to boundary conditions, and revert to manifold_ids to describe the geometry of the triangulation.
The behavior of the Triangulation class w.r.t. geometry descriptions is the following: Triangulation::set_boundary() and Triangulation::set_manifold() do the exact same thing: they attach a manifold descriptor to the specified id. The first function expects a Boundary descriptor (which is a specialization of a Manifold description) and is provided mainly for backward compatibility, while the second class expects a Manifold descriptor. Notice that the Triangulation class only uses the Manifold interface, and you could describe both the interior and the boundary of the domain using the same object. The additional information contained in the Boundary interface is related to the computation of the exact normals.
Whenever a new vertex is needed in an object, the Triangulation queries the manifold_id of the object which needs refinement. If the manifold_id is set to numbers::invalid_manifold_id, then the Triangulation queries the boundary_id (if the face is on the boundary) or the material_id (if the Triangulation is of codimension one and the object is a cell). If the previous queries resulted in a number different from numbers::invalid_manifold_id, then the Triangulation looks whether a previous call to Triangulation::set_manifold() (or set_boundary()) was performed with the given id, and if yes, it uses the stored object to obtain new vertices, otherwise it uses a FlatManifold or StraightBoundary object.
void Triangulation< dim, spacedim >::set_boundary  (  const types::manifold_id  number, 
const Boundary< dim, spacedim > &  boundary_object  
) 
If dim==spacedim
, assign a boundary object to a certain part of the boundary of a the triangulation. If a face with boundary number number
is refined, this object is used to find the location of new vertices on the boundary (see the results section of step49 for a more indepth discussion of this, with examples). It is also used for nonlinear (i.e.: nonQ1) transformations of cells to the unit cell in shape function calculations.
If dim!=spacedim
the boundary object is in fact the exact manifold that the triangulation is approximating (for example a circle approximated by a polygon triangulation). As above, the refinement is made in such a way that the new points are located on the exact manifold.
Numbers of boundary objects correspond to material numbers of faces at the boundary, for instance the material id in a UCD input file. They are not necessarily consecutive but must be in the range 0(types::boundary_id1). Material IDs on boundaries are also called boundary indicators and are accessed with accessor functions of that name.
The boundary_object
is not copied and MUST persist until the triangulation is destroyed. This is also true for triangulations generated from this one by copy_triangulation
.
It is possible to remove or replace the boundary object during the lifetime of a nonempty triangulation. Usually, this is done before the first refinement and is dangerous afterwards. Removal of a boundary object is done by set_boundary(number)
, i.e. the function of same name but only one argument. This operation then replaces the boundary object given before by a straight boundary approximation.
void Triangulation< dim, spacedim >::set_boundary  (  const types::manifold_id  number  ) 
Reset those parts of the boundary with the given number to use a straight boundary approximation. This is the default state of a triangulation, and undoes assignment of a different boundary object by the function of same name and two arguments.
const Boundary< dim, spacedim > & Triangulation< dim, spacedim >::get_boundary  (  const types::manifold_id  number  )  const 
Return a constant reference to a boundary object used for this triangulation. Number is the same as in set_boundary
std::vector< types::boundary_id > Triangulation< dim, spacedim >::get_boundary_ids  (  )  const 
Return a vector containing all boundary indicators assigned to boundary faces of this Triangulation object. Note, that each boundary indicator is reported only once. The size of the return vector will represent the number of different indicators (which is greater or equal one).
void TriaAccessor< structdim, dim, spacedim >::set_boundary_id  (  const types::boundary_id  )  const 
Set the boundary indicator of the current object. The same applies as for the boundary_id() function.
This function only sets the boundary object of the current object itself, not the indicators of the ones that bound it. For example, in 3d, if this function is called on a face, then the boundary indicator of the 4 edges that bound the face remain unchanged. If you want to set the boundary indicators of face and edges at the same time, use the set_all_boundary_ids() function. You can see the result of not using the correct function in the results section of step49.
void TriaAccessor< structdim, dim, spacedim >::set_all_boundary_ids  (  const types::boundary_id  )  const 
Do as set_boundary_id() but also set the boundary indicators of the objects that bound the current object. For example, in 3d, if set_boundary_id() is called on a face, then the boundary indicator of the 4 edges that bound the face remain unchanged. In contrast, if you call the current function, the boundary indicators of face and edges are all set to the given value.
This function is useful if you set boundary indicators of faces in 3d (in 2d, the function does the same as set_boundary_id()) and you do so because you want a curved boundary object to represent the part of the boundary that corresponds to the current face. In that case, the Triangulation class needs to figure out where to put new vertices upon mesh refinement, and higher order Mapping objects also need to figure out where new interpolation points for a curved boundary approximation should be. In either case, the two classes first determine where interpolation points on the edges of a boundary face should be, asking the boundary object, before asking the boundary object for the interpolation points corresponding to the interior of the boundary face. For this to work properly, it is not sufficient to have set the boundary indicator for the face alone, but you also need to set the boundary indicators of the edges that bound the face. This function does all of this at once. You can see the result of not using the correct function in the results section of step49.
void TriaAccessor< 0, 1, spacedim >::set_boundary_id  (  const types::boundary_id  ) 
Set the boundary indicator. The same applies as for the boundary_id()
function.
void TriaAccessor< 0, 1, spacedim >::set_all_boundary_ids  (  const types::boundary_id  ) 
Set the boundary indicator of this object and all of its lower dimensional subobjects. Since this object only represents a single vertex, there are no lowerdimensional object and this function is equivalent to calling set_boundary_id() with the same argument.
void TriaAccessor< 0, 1, spacedim >::set_manifold_id  (  const types::manifold_id  ) 
Set the manifold indicator of this vertex. This does nothing so far since manifolds are only used to refine and map objects, but vertices are not refined and the mapping is trivial. This function is here only to allow dimension independent programming.
void TriaAccessor< 0, 1, spacedim >::set_all_manifold_ids  (  const types::manifold_id  ) 
Set the manifold indicator of this object and all of its lower dimensional subobjects. Since this object only represents a single vertex, there are no lowerdimensional object and this function is equivalent to calling set_manifold_id() with the same argument.