dune-functions

dune-functions

dune-functions (dune-functions)

Abstractions for functions and discrete function space bases

Requires:
dune-localfunctions dune-grid dune-typetree dune-istl
Git repository:
https://gitlab.dune-project.org/staging/dune-functions

dune-functions

The dune-functions module provides an abstraction layer for global finite element functions. Its two main concepts are functions implemented as callable objects, and bases of finite element spaces.

Functions

dune-functions provides an interface to “functions” in the mathematical sense, in particular to finite element functions defined on a grid, but going far beyond that.

The interface revolves around the concept of a “callable”. It encompasses any type of C++ object that can be evaluated with operator(), like free functions, function objects, and even C++11 lambdas. Dynamic polymorphism is realized using type erasure and the std::function class, which does not sacrifice efficiency in purely static code.

dune-functions extends the “callable” concept into several directions. First, it allows for differentiable functions. Such functions can hand out their derivative as new function objects. Second, for functions defined piecewisely on a finite element grid, the concept of local function is introduced. Local functions can be bound to grid elements. All further evaluations of a function bound to an element are in local coordinates of that element. This approach allows to avoid overhead when there are many consecutive evaluations of a function on a single element.

Function Space Bases

The second part of dune-functions provides a well-defined interface to bases of finite element function spaces. For this interface, a finite element basis is a set of functions with a prescribed ordering, and a way to index them. The core functionality has three parts:

  1. For a given grid element, obtain the restrictions of all basis functions to this element, except for those functions where the restriction is zero. In other words: get the shape functions for the element.
  2. Get a local numbering for these shape functions. This is needed to index the element stiffness matrix.
  3. Get a global numbering for the shape functions. This is needed to index the global stiffness matrix.

While local numbers are always integers, global numbers can be multi-indices, if appropriate.

A central feature is that finite element bases for vector-valued and mixed spaced can be constructed by tensor multiplication of simpler bases. The resulting expressions can be interpreted as tree structures. For example, the tree for the three-dimensional Taylor-Hood basis is shown below. This tree structure is directly exposed in the dune-functions interface.

Taylor-Hood space in tree representation

Implementations of Function Space Bases

Some of the finite element bases currently available are:

  • LagrangeBasis: A k-th order Lagrangian bases, with k a run-time or compile-time parameter.
  • LagrangeDGBasis: A k-th order DG basis, using Lagrangian shape functions.
  • NedelecBasis: For H(curl)-conforming problems
  • RaviartThomasBasis: For H(div)-conforming problems
  • BrezziDouglasMariniBasis: The Brezzi-Douglas-Marini-Element
  • RannacherTurekBasis: Combines the Rannacher-Turek element on quadrilateral elements with the Crouzeix-Raviart element on simplices
  • BSplineBasis: A basis of B-Spline functions of given arbitrary order on a structured grid.

Download

You can download the current development version using anonymous git.

git clone https://gitlab.dune-project.org/staging/dune-functions.git

The latest release is dune-functions 2.9, available from the Dune download page. It is to be used with the 2.9 release of the Dune core modules.

dune-functions depends on the dune-typetree module, also available from the download page. Please install that before trying to install dune-functions.

Documentation

The class documentation generated with doxygen is available online:

The module contains a manual that can be build using make doc. Furthermore it contains example programs in the examples/ directory.

Communication channels

dune-functions development and discussions happen mainly on the dune-functions GitLab page. There is also a dune-functions mailing list, but it has very little traffic these days.

Maintainers

dune-functions has been originally written by

  1. Christian Engwer
  2. Carsten Gräser
  3. Steffen Müthing
  4. Oliver Sander

Additionally, there are significant contributions by Ansgar Burchardt, Simon Praetorius, and many others.

See the git history for a complete list.

We welcome interest and contributions by additional developers.

Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (Mar 28, 23:25, 2024)