KASKADE 7 development version
Public Types | Public Member Functions | List of all members
LocalToGlobalMapperConcept Class Reference

Management of degrees of freedom. More...

#include <concepts.hh>

Detailed Description

Management of degrees of freedom.

LocalToGlobalMappers define how a global FE coefficient vector is to be interpreted as a FE function in terms of shape functions on each cell of the grid.

Finite element functions are given by piecewise linear combinations of shape functions on cells. On each cell \( T \), a finite element function \( u \) is given as

\[ u|_T(x) = \sum_{j=1}^n (K a_{I})_j \psi(x) \phi_{j}(x) = \psi(x) (\phi^T(x) K a). \]

Here, \( a \) denotes the global coefficient vector, \( I \in {\bf N}^m, \, m\le n, \) is the set of \( m \) global degrees of freedom that is associated to this cell, and \( K\in {\bf R}^{n\times m} \) is a matrix (called combiner) describing which linear combination of the \( n \) shape functions yields which global ansatz function (FE basis function) restricted to the cell:

\[ (\varphi|_T)_i = \sum_{j=1}^n K_{ji} (\psi\phi)_j \]

Here, the index \( i \) of \( (\varphi|_T)_i \) is local to the cell \( T \), and thus applies to the restriction \( \varphi|_T \) and not only to \( \varphi \).

Often, \( K \) is simply the identity, or at least diagonal (e.g. for edge elements, where the global orientation of edges has to be taken into account), but it may be non-square and arbitrarily dense (e.g. for hp-methods or hanging nodes). \( \psi(x) \) is a linear geometric transformation of shape function values (and gradients). Often this is the identity, but for vectorial shape functions it may depend on the Jacobian at the evaluation point inside the cell (e.g. for edge elements). Even in the most trivial case, \( \psi \) transforms at least the shape function gradients due to the chain rule. \(\phi\) are the shape functions themselves. They may be scalar or vectorial. Note that vectorial finite element functions can perfectly well be defined in terms of scalar shape functions: Each component is defined in terms of the scalar shape functions. Often the set of shape functions is the same on each cell, but this need not be the case (e.g. for hp-methods).

Working with sets of evaluation points \( x_i \), the representation formula may conveniently be written as

\[ u|_T = \Psi \Phi K a_I, \]

with \( u \) being the column vector of values \( u(x_i)\), \(\Psi = \mathrm{diag}(\psi(x_i))\), and \( \Phi_{ij} = \phi_j(x_i) \).

LocalToGlobalMappers define the ingredients for the above representation. Their interface is described here.

Definition at line 70 of file concepts.hh.

Public Types

typedef unspecified Scalar
 The type of scalars used for shape function values. More...
 
using GridView = unspecified
 The grid view on which the finite element functions are defined. More...
 
typedef unspecified Grid
 The grid type of the grid view. More...
 
typedef unspecified IndexSet
 The entity indexing of the grid view. More...
 
typedef unspecified ShapeFunctionSet
 The type of shape function sets living on the cells. More...
 
typedef unspecified GlobalIndexRange
 A standard sequence with value type IndexSet::IndexType. More...
 
typedef unspecified SortedIndexRange
 A standard sequence with value type std::pair<IndexSet::IndexType,int>. More...
 
typedef ConverterConcept Converter
 The type of the geometrical transformation \( \psi \). More...
 
typedef CombinerConcept Combiner
 The type of the algebraic combiner \( K \) associated with this cell. More...
 
using Cell = Kaskade::Cell< Grid >
 The type of codimension 0 entities in the grid. More...
 

Public Member Functions

GridView const & gridView () const
 Returns the grid view used. More...
 
ShapeFunctionSet const & shapefunctions (Cell const &cell) const
 Returns the shape function set living on the given cell. More...
 
ShapeFunctionSet const & shapefunctions (size_t index) const
 Returns the shape function set living on the cell with given index. More...
 
size_t size () const
 Returns the number of global degrees of freedom managed. More...
 
int maxOrder () const
 Returns the maximal polynomial order of shape functions encountered in any cell. More...
 
SortedIndexRange sortedIndices (Cell const &cell) const
 Returns an immutable sequence of (global index, local index) pairs sorted in ascending global index order. More...
 
SortedIndexRange sortedIndices (size_t n) const
 Returns an immutable sequence of (global index, local index) pairs sorted in ascending global index order. More...
 
GlobalIndexRange globalIndices (Cell const &cell) const
 The global indices \( I \) associated with this cell. Returns a const sequence containing the global indices of the ansatz functions with nonvanishing support on this cell. More...
 
GlobalIndexRange globalIndices (size_t index) const
 The global indices \( I \) associated with the cell with given index. Returns a const sequence containing the global indices of the ansatz functions with nonvanishing support on this cell. More...
 
Combiner combiner (Cell const &cell, size_t index) const
 Returns the algebraic combinator. More...
 
void update ()
 Recomputes the node management, e.g. after grid modifications. More...
 

Member Typedef Documentation

◆ Cell

The type of codimension 0 entities in the grid.

Definition at line 109 of file concepts.hh.

◆ Combiner

The type of the algebraic combiner \( K \) associated with this cell.

This type represents a matrix of small to moderate size. For performance reasons, it is a class of its own with special interface.

Definition at line 106 of file concepts.hh.

◆ Converter

The type of the geometrical transformation \( \psi \).

Definition at line 99 of file concepts.hh.

◆ GlobalIndexRange

A standard sequence with value type IndexSet::IndexType.

Definition at line 91 of file concepts.hh.

◆ Grid

typedef unspecified LocalToGlobalMapperConcept::Grid

The grid type of the grid view.

Definition at line 80 of file concepts.hh.

◆ GridView

The grid view on which the finite element functions are defined.

Definition at line 77 of file concepts.hh.

◆ IndexSet

The entity indexing of the grid view.

Definition at line 83 of file concepts.hh.

◆ Scalar

The type of scalars used for shape function values.

Definition at line 74 of file concepts.hh.

◆ ShapeFunctionSet

The type of shape function sets living on the cells.

Definition at line 86 of file concepts.hh.

◆ SortedIndexRange

A standard sequence with value type std::pair<IndexSet::IndexType,int>.

Definition at line 96 of file concepts.hh.

Member Function Documentation

◆ combiner()

Combiner LocalToGlobalMapperConcept::combiner ( Cell const &  cell,
size_t  index 
) const

Returns the algebraic combinator.

Parameters
cellthe grid cell for which the combiner is requested
indexthe index of the cell

◆ globalIndices() [1/2]

GlobalIndexRange LocalToGlobalMapperConcept::globalIndices ( Cell const &  cell) const

The global indices \( I \) associated with this cell. Returns a const sequence containing the global indices of the ansatz functions with nonvanishing support on this cell.

◆ globalIndices() [2/2]

GlobalIndexRange LocalToGlobalMapperConcept::globalIndices ( size_t  index) const

The global indices \( I \) associated with the cell with given index. Returns a const sequence containing the global indices of the ansatz functions with nonvanishing support on this cell.

◆ gridView()

GridView const & LocalToGlobalMapperConcept::gridView ( ) const

Returns the grid view used.

◆ maxOrder()

int LocalToGlobalMapperConcept::maxOrder ( ) const

Returns the maximal polynomial order of shape functions encountered in any cell.

◆ shapefunctions() [1/2]

ShapeFunctionSet const & LocalToGlobalMapperConcept::shapefunctions ( Cell const &  cell) const

Returns the shape function set living on the given cell.

The shape function set is persistent, i.e. it exists and is valid even after mesh refinement.

◆ shapefunctions() [2/2]

ShapeFunctionSet const & LocalToGlobalMapperConcept::shapefunctions ( size_t  index) const

Returns the shape function set living on the cell with given index.

◆ size()

size_t LocalToGlobalMapperConcept::size ( ) const

Returns the number of global degrees of freedom managed.

◆ sortedIndices() [1/2]

SortedIndexRange LocalToGlobalMapperConcept::sortedIndices ( Cell const &  cell) const

Returns an immutable sequence of (global index, local index) pairs sorted in ascending global index order.

◆ sortedIndices() [2/2]

SortedIndexRange LocalToGlobalMapperConcept::sortedIndices ( size_t  n) const

Returns an immutable sequence of (global index, local index) pairs sorted in ascending global index order.

◆ update()

void LocalToGlobalMapperConcept::update ( )

Recomputes the node management, e.g. after grid modifications.


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