Reference documentation for deal.II version 9.1.0-pre
Public Types | List of all members
FunctionMap< dim, Number > Struct Template Reference

#include <deal.II/dofs/deprecated_function_map.h>

Public Types

using type = std::map< types::boundary_id, const Function< dim, Number > * >
 

Detailed Description

template<int dim, typename Number = double>
struct FunctionMap< dim, Number >

This class declares a local alias that denotes a mapping between a boundary indicator (see GlossBoundaryIndicator) that is used to describe what kind of boundary condition holds on a particular piece of the boundary, and the function describing the actual function that provides the boundary values on this part of the boundary. This type is required in many functions in the library where, for example, we need to know about the functions \(h_i(\mathbf x)\) used in boundary conditions

\begin{align*} \mathbf n \cdot \nabla u = h_i \qquad \qquad \text{on}\ \Gamma_i\subset\partial\Omega. \end{align*}

An example is the function KellyErrorEstimator::estimate() that allows us to provide a set of functions \(h_i\) for all those boundary indicators \(i\) for which the boundary condition is supposed to be of Neumann type. Of course, the same kind of principle can be applied to cases where we care about Dirichlet values, where one needs to provide a map from boundary indicator \(i\) to Dirichlet function \(h_i\) if the boundary conditions are given as

\begin{align*} u = h_i \qquad \qquad \text{on}\ \Gamma_i\subset\partial\Omega. \end{align*}

This is, for example, the case for the VectorTools::interpolate() functions.

Tutorial programs step-6, step-7 and step-8 show examples of how to use function arguments of this type in situations where we actually have an empty map (i.e., we want to describe that no part of the boundary is a Neumann boundary). step-16 actually uses it in a case where one of the parts of the boundary uses a boundary indicator for which we want to use a function object.

It seems odd at first to declare this alias inside a class, rather than declaring an alias at global scope. The reason is that C++ does not allow to define templated alias, where here in fact we want an alias that depends on the space dimension. (Defining templated alias is something that is possible starting with the C++11 standard, but that wasn't possible within the C++98 standard in place when this programming pattern was conceived.)

Author
Wolfgang Bangerth, Ralf Hartmann, 2001

Definition at line 71 of file deprecated_function_map.h.

Member Typedef Documentation

template<int dim, typename Number = double>
using FunctionMap< dim, Number >::type = std::map<types::boundary_id, const Function<dim, Number> *>

Declare the type as discussed above. Since we can't name it FunctionMap (as that would ambiguate a possible constructor of this class), name it in the fashion of the standard container local alias.

Deprecated:
Use the alias type directly.

Definition at line 81 of file deprecated_function_map.h.


The documentation for this struct was generated from the following file: