Finite element spaces in Kaskade 7 are implemented by the class template FEFunctionSpace<LocalToGlobalMapper>
providing the interface and its parameter LocalToGlobalMapper
defining the internal working, in particular the shape functions and their combination to the actual ansatz functions . This includes also the mapping of indices between ansatz functions and shape function set that is essential for accessing the relevant FE coefficients.
Kaskade 7 provides several such LocalToGlobalMappers for different FE discretizations.
The by far simplest FE spaces are globally continuous, piecewise polynomial spaces with a basis defined on nodes satisfying the Lagrange property . This implies that the coefficients of a finite element function are just the values of the function at the corresponding node. The nodes are usually regularly distributed over grid cells, faces, edges, and vertices. The minimal setup are P1 elements, piecewise linear functions over a simplicial triangulation, with nodes at the vertices and the ubiquitous hat functions forming the basis.
Lagrange spaces of arbitrary order can be constructed on simplicial grids by
FEFunctionSpace<ContinuousLagrangeMapper<double,GridView>> space(gridManager,gridView,order);
For quadrilateral grids, orders up to 2 are supported.
For some applications, discontinuous discretizations are appropriate, where no nodes are shared between cells. These can be constructed for arbitrary order on simplicial grids by
FEFunctionSpace<DiscontinuousLagrangeMapper<double,GridView>> space(gridManager,gridView,order);
Note that for discontinuous functions, order 0 is a valid choice, and yields piecewise constant functions. This is a perfect choice for storing spatially varying coefficients in a PDE system.
Often, PDE systems contain scalar parameters as variables to be solved for. These are, both mathematically and code-wise, represented by constant functions. Consequently, constant finite element functions can be constructed by
FEFunctionSpace<ConstantMapper<double,GridView>> space(gridManager,gridView,order);
By combining these Lagrange spaces in a PDE system, further well-known finite elements can be realized, such as Taylor-Hood elements using a continuous Lagrange space of order 2 for velocities and one of order 1 for the pressure in a Stokes or Navier-Stokes system.
In addition to the basic but extremely wide-spread Lagrange spaces, Kaskade 7 provides some more specialized finite element spaces: Morley elements for biharmonic problems, vectorial edge elements for time-harmonic Maxwell equations, hierarchical scalar spaces for hierarchical error estimation, and Lagrange spaces with support on a subdomain of .