![]() |
Reference documentation for deal.II version 8.1.0
|
Classes | |
class | CylinderBoundary< dim, spacedim > |
class | HyperBallBoundary< dim, spacedim > |
class | HalfHyperBallBoundary< dim > |
class | HyperShellBoundary< dim > |
class | HalfHyperShellBoundary< dim > |
class | Boundary< dim, spacedim > |
class | StraightBoundary< dim, spacedim > |
Functions | |
void | Triangulation< dim, spacedim >::set_boundary (const types::boundary_id number, const Boundary< dim, spacedim > &boundary_object) |
void | Triangulation< dim, spacedim >::set_boundary (const types::boundary_id number) |
const Boundary< dim, spacedim > & | Triangulation< dim, spacedim >::get_boundary (const types::boundary_id number) const |
std::vector< types::boundary_id > | Triangulation< dim, spacedim >::get_boundary_indicators () const |
Dealing with boundary indicators | |
void | TriaAccessor< structdim, dim, spacedim >::set_boundary_indicator (const types::boundary_id) const |
void | TriaAccessor< structdim, dim, spacedim >::set_all_boundary_indicators (const types::boundary_id) const |
Dealing with boundary indicators | |
void | TriaAccessor< 0, 1, spacedim >::set_boundary_indicator (const types::boundary_id) |
void | TriaAccessor< 0, 1, spacedim >::set_all_boundary_indicators (const types::boundary_id) |
The classes in this module are concerned with the description of the boundary of a domain in which a Triangulation lives. This boundary description is necessary in three contexts:
Mesh refinement: Whenever a cell at the boundary is refined, it is necessary to introduce at least one new vertex on the boundary. In the simplest case, one assumes that the boundary consists of straight line segments (in 2d) or a bilinear surface (in 3d) 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 class.
On the other hand, if one deals with curved boundaries, this is not the appropriate thing to do. The classes derived from the Boundary base class therefore describe the geometry of a domain. One can then attach an object of a class derived from this base class to the Triangulation object using the Triangulation::set_boundary() function, and the Triangulation will ask the boundary object where a new vertex should be located upon mesh refinement. Several classes already exist to support 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 boundary, 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 boundary of the domain from the classes described here. The same is, of course, true when integrating boundary terms (e.g., inhomogenous Neumann boundary conditions).
In the context of triangulations, 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. On the other hand, the boundary id of faces 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 boundary to certain boundary_id values used in a triangulation. Note that this is not necessary: in some cases one may want to use the default straight boundary approximation, and use non-zero boundary indicators for completely different purposes, for example to indicate that a part of the boundary has a different kind of boundary condition in the partial differential equation.
void TriaAccessor< structdim, dim, spacedim >::set_boundary_indicator | ( | const types::boundary_id | boundary_ind | ) | const |
Set the boundary indicator. The same applies as for the boundary_indicator()
function.
Note that it 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_indicators() function. You can see the result of not using the correct function in the results section of step-49.
Definition at line 1889 of file tria_accessor.templates.h.
void TriaAccessor< structdim, dim, spacedim >::set_all_boundary_indicators | ( | const types::boundary_id | boundary_ind | ) | const |
Do as set_boundary_indicator() but also set the boundary indicators of the objects that bound the current object. For example, in 3d, if set_boundary_indicator() 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_indicator()) 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 step-49.
Definition at line 1902 of file tria_accessor.templates.h.
|
inline |
Set the boundary indicator. The same applies as for the boundary_indicator()
function.
Definition at line 2436 of file tria_accessor.templates.h.
|
inline |
Since this object only represents a single vertex, call set_boundary_indicator with the same argument.
Definition at line 2449 of file tria_accessor.templates.h.
void Triangulation< dim, spacedim >::set_boundary | ( | const types::boundary_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 step-49 for a more in-depth discussion of this, with examples). It is also used for non-linear (i.e.: non-Q1) 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_id-1). 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 non-empty 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::boundary_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::boundary_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_indicators | ( | ) | const |
Returns 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).