dune-functions 2.10
Loading...
Searching...
No Matches
Function space basis utilities

Utilities for implementing and using global bases. More...

Collaboration diagram for Function space basis utilities:

Classes

struct  Dune::Functions::BasisFactory::IndexMergingStrategy
 Base class for index merging strategies to simplify detection. More...
struct  Dune::Functions::BasisFactory::FlatLexicographic
 Lexicographic merging of direct children without blocking. More...
struct  Dune::Functions::BasisFactory::FlatInterleaved
 Interleaved merging of direct children without blocking. More...
struct  Dune::Functions::BasisFactory::BlockedLexicographic
 Lexicographic merging of direct children with blocking (i.e. creating one block per direct child). More...
struct  Dune::Functions::BasisFactory::BlockedInterleaved
 Interleaved merging of direct children with blocking (i.e. creating blocks at the leaves containing one leaf per child each). More...
class  Dune::Functions::SubEntityDOFs< GridView >
 Range of DOFs associated to sub-entity. More...

Typedefs

template<class size_type>
using Dune::Functions::FlatMultiIndex = StaticMultiIndex<size_type, 1>
 A multi-index class with only one level.

Functions

constexpr FlatLexicographic Dune::Functions::BasisFactory::flatLexicographic ()
 Creates a lexicographic merging of direct children without blocking.
constexpr FlatInterleaved Dune::Functions::BasisFactory::flatInterleaved ()
 Creates an interleaved merging of direct children without blocking.
constexpr BlockedLexicographic Dune::Functions::BasisFactory::blockedLexicographic ()
 Creates a lexicographic merging of direct children with blocking (i.e. creating one block per direct child).
constexpr BlockedInterleaved Dune::Functions::BasisFactory::blockedInterleaved ()
 Creates an interleaved merging of direct children with blocking (i.e. creating blocks at the leaves containing one leaf per child each).
template<class Basis, class F, decltype(std::declval< std::decay_t< F > >()(0, std::declval< typename Basis::LocalView >(), std::declval< typename Basis::GridView::Intersection >()), 0) = 0>
void Dune::Functions::forEachBoundaryDOF (const Basis &basis, F &&f)
 Loop over all DOFs on the boundary.
template<class T>
auto Dune::Functions::subEntityDOFs (const T &)
 Create SubEntityDOFs object.
template<class LocalView>
auto Dune::Functions::subEntityDOFs (const LocalView &localView, std::size_t subEntityIndex, std::size_t subEntityCodim)
 Create bound SubEntityDOFs object.
template<class LocalView, class Intersection>
auto Dune::Functions::subEntityDOFs (const LocalView &localView, const Intersection &intersection)
 Create bound SubEntityDOFs object.

Detailed Description

Utilities for implementing and using global bases.

Typedef Documentation

◆ FlatMultiIndex

template<class size_type>
using Dune::Functions::FlatMultiIndex = StaticMultiIndex<size_type, 1>

A multi-index class with only one level.

This class provides a multi-index interface in the sense that it has operator[] access to individual interfaces. However, since it only supports flat indices of exactly one level, it also has a cast of the multi-index to this index. This is obtianed by deriving from std::array<size_type,1> and adding this cast. Hence multi-indices of type FlatMultiIndex can be used like classic indices.

Function Documentation

◆ blockedInterleaved()

BlockedInterleaved Dune::Functions::BasisFactory::blockedInterleaved ( )
constexpr

Creates an interleaved merging of direct children with blocking (i.e. creating blocks at the leaves containing one leaf per child each).

◆ blockedLexicographic()

BlockedLexicographic Dune::Functions::BasisFactory::blockedLexicographic ( )
constexpr

Creates a lexicographic merging of direct children with blocking (i.e. creating one block per direct child).

◆ flatInterleaved()

FlatInterleaved Dune::Functions::BasisFactory::flatInterleaved ( )
constexpr

Creates an interleaved merging of direct children without blocking.

◆ flatLexicographic()

FlatLexicographic Dune::Functions::BasisFactory::flatLexicographic ( )
constexpr

Creates a lexicographic merging of direct children without blocking.

◆ forEachBoundaryDOF()

template<class Basis, class F, decltype(std::declval< std::decay_t< F > >()(0, std::declval< typename Basis::LocalView >(), std::declval< typename Basis::GridView::Intersection >()), 0) = 0>
void Dune::Functions::forEachBoundaryDOF ( const Basis & basis,
F && f )

Loop over all DOFs on the boundary.

This loops over all DOFs of a basis associated to sub-entities on the boundary. This overload will pass three arguments to the given loop callback: The local index of the boundary DOF, a bound local view this local index belongs to, and a boundary intersection associated to a sub-entity such that the DOF is associated to a sub-sub-entity of this sub-entity. Notice that this may visit the same DOF multiple times.

If this callback signature is not suitable you can use one of the another variants of forEachBoundaryDOF.

Parameters
basisA function space basis
fA callback that will be called with a local index, a bound local view, and an intersection of the visited boundary DOF

◆ subEntityDOFs() [1/3]

template<class LocalView, class Intersection>
auto Dune::Functions::subEntityDOFs ( const LocalView & localView,
const Intersection & intersection )

Create bound SubEntityDOFs object.

This creates a SubEntityDOFs object and binds it to the given LocalView and intersection.

Notice that the SubEntityDOFs object will allocate some internal buffers. For efficiency reasons you should thus prefer to first create a SubEntityDOFs object and then bind it to each element you want to process instead of creating a new bound SubEntityDOFs object for each element.

Parameters
localViewA bound LocalView to bind to
intersectionAn Intersection encoding the sub-entity to bind to

◆ subEntityDOFs() [2/3]

template<class LocalView>
auto Dune::Functions::subEntityDOFs ( const LocalView & localView,
std::size_t subEntityIndex,
std::size_t subEntityCodim )

Create bound SubEntityDOFs object.

This creates a SubEntityDOFs object and binds it to the given LocalView and sub-entity.

Notice that the SubEntityDOFs object will allocate some internal buffers. For efficiency reasons you should thus prefer to first create a SubEntityDOFs object and then bind it to each element you want to process instead of creating a new bound SubEntityDOFs object for each element.

Parameters
localViewA bound LocalView to bind to
subEntityIndexIndex of sub-entity in localView.element()
subEntityCodimCodimension of sub-entity in localView.element()

◆ subEntityDOFs() [3/3]

template<class T>
auto Dune::Functions::subEntityDOFs ( const T & )

Create SubEntityDOFs object.

The only requirement on the passed argument t is, that its type T has to provide a typedef T::GridView. Hence t it can be a GlobalBasis or a LocalView.

Parameters
tA GlobalBasis or a LocalView