Reference documentation for deal.II version Git aa2075a 2017-04-21 00:33:12 +0200
Numerical algorithms

## Namespaces

DerivativeApproximation

MatrixCreator

MatrixTools

VectorTools

## Classes

class  KellyErrorEstimator< dim, spacedim >

class  SolutionTransfer< dim, VectorType, DoFHandlerType >

struct  SolutionTransfer< dim, VectorType, DoFHandlerType >::Pointerstruct

## Detailed Description

This module groups a diverse set of classes that generally implement some sort of numerical algorithm on top all the basic triangulation, DoFHandler, and finite element classes in the library. They are generally unconnected to each other.

Some of the classes, like DerivativeApproximation, KellyErrorEstimator and SolutionTransfer, act on solutions already obtained, and compute derived quantities in the first two cases, or help transferring a set of vectors from one mesh to another.

The namespaces MatrixCreator, MatrixTools, and VectorTools provide an assortment of services, such as creating a Laplace matrix, projecting or interpolating a function onto the present finite element space, etc. The difference to the functions in the DoFTools and FETools functions is that they work on vectors (i.e. members of a finite element function space on a given triangulation) or help in the creation of it. On the other hand, the DoFTools functions only act on a given DoFHandler object without reference to a data vector, and the FETools objects generally work with finite element classes but again without any associated data vectors.

## Enumeration Type Documentation

template<int dim, int spacedim = dim>

The enum type given to the class functions to decide on the scaling factors of the facial integrals.

Enumerator
cell_diameter_over_24

Kelly error estimator with the factor $$\frac {h_K}{24}$$.

face_diameter_over_twice_max_degree

the boundary residual estimator with the factor $$\frac {h_F}{2 max(p^+,p^-)}$$.

cell_diameter

Kelly error estimator with the factor $$h_K$$.

Definition at line 258 of file error_estimator.h.

template<int dim, typename VectorType = Vector<double>, typename DoFHandlerType = DoFHandler<dim>>
 private

Declaration of PreparationState that denotes the three possible states of the SolutionTransfer: being prepared for 'pure refinement', prepared for 'coarsening and refinement' or not prepared.

Enumerator
none

The SolutionTransfer is not yet prepared.

pure_refinement

The SolutionTransfer is prepared for purely refinement.

coarsening_and_refinement

The SolutionTransfer is prepared for coarsening and refinement.

Definition at line 434 of file solution_transfer.h.

Denote which norm/integral is to be computed by the integrate_difference() function on each cell and compute_global_error() for the whole domain. Let $$f:\Omega \rightarrow \mathbb{R}^c$$ be a finite element function with $$c$$ components where component $$c$$ is denoted by $$f_c$$ and $$\hat{f}$$ be the reference function (the fe_function and exact_solution arguments to integrate_difference()). Let $$e_c = \hat{f}_c - f_c$$ be the difference or error between the two. Further, let $$w:\Omega \rightarrow \mathbb{R}^c$$ be the weight function of integrate_difference(), which is assumed to be equal to one if not supplied. Finally, let $$p$$ be the exponent argument (for $$L_p$$-norms).

In the following,we denote by $$E_K$$ the local error computed by integrate_difference() on cell $$K$$, whereas $$E$$ is the global error computed by compute_global_error(). Note that integrals are approximated by quadrature in the usual way:

$\int_A f(x) dx \approx \sum_q f(x_q) \omega_q.$

Similarly for suprema over a cell $$T$$:

$\sup_{x\in T} |f(x)| dx \approx \max_q |f(x_q)|.$

Enumerator
mean

The function or difference of functions is integrated on each cell $$K$$:

$E_K = \int_K \sum_c (\hat{f}_c - f_c) \, w_c = \int_K \sum_c e_c \, w_c$

and summed up to get

$E = \sum_K E_K = \int_\Omega \sum_c (\hat{f}_c - f_c) \, w_c$

or, for $$w \equiv 1$$:

$E = \int_\Omega (\hat{f} - f) = \int_\Omega e.$

Note: This differs from what is typically known as the mean of a function by a factor of $$\frac{1}{|\Omega|}$$. To compute the mean you can also use compute_mean_value(). Finally, pay attention to the sign: if $$\hat{f}=0$$, this will compute the negative of the mean of $$f$$.

L1_norm

The absolute value of the function is integrated:

$E_K = \int_K \sum_c |e_c| \, w_c$

and

$E = \sum_K E_K = \int_\Omega \sum_c |e_c| w_c,$

or, for $$w \equiv 1$$:

$E = \| e \|_{L^1}.$

L2_norm

The square of the function is integrated and the the square root of the result is computed on each cell:

$E_K = \sqrt{ \int_K \sum_c e_c^2 \, w_c }$

and

$E = \sqrt{\sum_K E_K^2} = \sqrt{ \int_\Omega \sum_c e_c^2 \, w_c }$

or, for $$w \equiv 1$$:

$E = \sqrt{ \int_\Omega e^2 } = \| e \|_{L^2}$

Lp_norm

The absolute value to the $$p$$-th power is integrated and the $$p$$-th root is computed on each cell. The exponent $$p$$ is the exponent argument of integrate_difference() and compute_mean_value():

$E_K = \left( \int_K \sum_c |e_c|^p \, w_c \right)^{1/p}$

and

$E = \left( \sum_K E_K^p \right)^{1/p}$

or, for $$w \equiv 1$$:

$E = \| e \|_{L^p}.$

Linfty_norm

The maximum absolute value of the function:

$E_K = \sup_K \max_c |e_c| \, w_c$

and

$E = \max_K E_K = \sup_\Omega \max_c |e_c| \, w_c$

or, for $$w \equiv 1$$:

$E = \sup_\Omega \|e\|_\infty = \| e \|_{L^\infty}.$

H1_seminorm

$E_K = \sqrt{ \int_K \sum_c (\nabla e_c)^2 \, w_c }$

and

$E = \sqrt{\sum_K E_K^2} = \sqrt{ \int_\Omega \sum_c (\nabla e_c)^2 \, w_c }$

or, for $$w \equiv 1$$:

$E = \| \nabla e \|_{L^2}.$

Hdiv_seminorm

L2_norm of the divergence of a vector field. The function $$f$$ is expected to have $$c \geq \text{dim}$$ components and the first dim will be used to compute the divergence:

$E_K = \sqrt{ \int_K \left( \sum_c \frac{\partial e_c}{\partial x_c} \, \sqrt{w_c} \right)^2 }$

and

$E = \sqrt{\sum_K E_K^2} = \sqrt{ \int_\Omega \left( \sum_c \frac{\partial e_c}{\partial x_c} \, \sqrt{w_c} \right)^2 }$

or, for $$w \equiv 1$$:

$E = \| \nabla \cdot e \|_{L^2}.$

H1_norm

The square of this norm is the square of the L2_norm plus the square of the H1_seminorm:

$E_K = \sqrt{ \int_K \sum_c (e_c^2 + (\nabla e_c)^2) \, w_c }$

and

$E = \sqrt{\sum_K E_K^2} = \sqrt{ \int_\Omega \sum_c (e_c^2 + (\nabla e_c)^2) \, w_c }$

or, for $$w \equiv 1$$:

$E = \left( \| e \|_{L^2}^2 + \| \nabla e \|_{L^2}^2 \right)^{1/2}.$

W1p_seminorm

$E_K = \left( \int_K \sum_c |\nabla e_c|^p \, w_c \right)^{1/p}$

and

$E = \left( \sum_K E_K^p \right)^{1/p} = \left( \int_\Omega \sum_c |\nabla e_c|^p \, w_c \right)^{1/p}$

or, for $$w \equiv 1$$:

$E = \| \nabla e \|_{L^p}.$

W1p_norm

The same as the H1_norm but using Lp:

$E_K = \left( \int_K \sum_c (|e_c|^p + |\nabla e_c|^p) \, w_c \right)^{1/p}$

and

$E = \left( \sum_K E_K^p \right)^{1/p} = \left( \int_\Omega \sum_c (|e_c|^p + |\nabla e_c|^p) \, w_c \right)^{1/p}$

or, for $$w \equiv 1$$:

$E = \left( \| e \|_{L^p}^p + \| \nabla e \|_{L^p}^p \right)^{1/p}.$

W1infty_seminorm

$E_K = \sup_K \max_c |\nabla e_c| \, w_c$

and

$E = \max_K E_K = \sup_\Omega \max_c |\nabla e_c| \, w_c$

or, for $$w \equiv 1$$:

$E = \| \nabla e \|_{L^\infty}.$

W1infty_norm

The sum of Linfty_norm and W1infty_seminorm:

$E_K = \sup_K \max_c |e_c| \, w_c + \sup_K \max_c |\nabla e_c| \, w_c.$

The global norm is not implemented in compute_global_error(), because it is impossible to compute the sum of the global norms from the values $$E_K$$. As a work-around, you can compute the global Linfty_norm and W1infty_seminorm separately and then add them to get (with $$w \equiv 1$$):

$E = \| e \|_{L^\infty} + \| \nabla e \|_{L^\infty}.$

Definition at line 347 of file vector_tools.h.