DUNE PDELab (git)
Utilities for implementing and using global bases. More...
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. More... | |
Functions | |
template<class Vector > | |
auto | Dune::Functions::istlVectorBackend (Vector &v) |
Return a vector backend wrapping non-const ISTL like containers. More... | |
template<class Vector > | |
auto | Dune::Functions::istlVectorBackend (const Vector &v) |
Return a vector backend wrapping const ISTL like containers. More... | |
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. More... | |
template<class T > | |
auto | Dune::Functions::subEntityDOFs (const T &) |
Create SubEntityDOFs object. More... | |
template<class LocalView > | |
auto | Dune::Functions::subEntityDOFs (const LocalView &localView, std::size_t subEntityIndex, std::size_t subEntityCodim) |
Create bound SubEntityDOFs object. More... | |
template<class LocalView , class Intersection > | |
auto | Dune::Functions::subEntityDOFs (const LocalView &localView, const Intersection &intersection) |
Create bound SubEntityDOFs object. More... | |
Detailed Description
Utilities for implementing and using global bases.
Typedef Documentation
◆ FlatMultiIndex
using Dune::Functions::FlatMultiIndex = typedef 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
◆ forEachBoundaryDOF()
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
-
basis A function space basis f A callback that will be called with a local index, a bound local view, and an intersection of the visited boundary DOF
This loops over all DOFs of a basis associated to sub-entities on the boundary. This overload will pass two arguments to the given loop callback: The local index of the boundary DOF and a bound local view this local index belongs to. 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
-
basis A function space basis f A callback that will be called with a local index and a bound local view of the visited boundary DOF
This loops over all DOFs of a basis associated to sub-entities on the boundary. This overload will pass a single arguments to the given loop callback: The global (multi-)index of the boundary DOF. 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
-
basis A function space basis f A callback that will be called with the global index of the visited boundary DOF
References Dune::Functions::subEntityDOFs().
◆ istlVectorBackend() [1/2]
auto Dune::Functions::istlVectorBackend | ( | const Vector & | v | ) |
Return a vector backend wrapping const ISTL like containers.
The returned object implements the VectorBackend concept and can be used for all dune-functions utilities requiring a coefficient vector (e.g. interpolate() and DiscreteGlobalBasisFunction. It essentially provides operator[] access using multi-indices and a recursive resize(GlobalBasis) method for adjusting the size to a given GlobalBasis.
Additionally to the VectorBackend interface, provides access to the wrapped vector using the method vector().
The wrapped vector type should be a nested ISTL like random access container providing operator[] and size() methods. For classical containers this should support indices of type std::size_t. For multi-type containers indices of the form Dune::index_constant<i> should be supported while size() should be a static constexpr method.
When accessing the vector with a multi-index the backend appends multi-index digits using operator[] as long as the result is not a scalar. If this exhausts all digits of the multi-index, additional zero`s are appended.
- Template Parameters
-
V Type of the raw wrapper vector
◆ istlVectorBackend() [2/2]
auto Dune::Functions::istlVectorBackend | ( | Vector & | v | ) |
Return a vector backend wrapping non-const ISTL like containers.
The returned object implements the VectorBackend concept and can be used for all dune-functions utilities requiring a coefficient vector (e.g. interpolate() and DiscreteGlobalBasisFunction). It essentially provides operator[] access using multi-indices and a recursive resize(GlobalBasis) method for adjusting the size to a given GlobalBasis.
Additionally to the VectorBackend interface, provides access to the wrapped vector using the method vector() and forwards all assignments to the underlying wrapped vector.
The wrapped vector type should be a nested ISTL like random access container providing operator[] and size() methods. For classical containers this should support indices of type std::size_t. For multi-type containers indices of the form Dune::index_constant<i> should be supported while size() should be a static constexpr method.
When accessing the vector with a multi-index the backend appends multi-index digits using operator[] as long as the result is not a scalar. If this exhausts all digits of the multi-index, additional zero`s are appended.
- Template Parameters
-
V Type of the raw wrapper vector
Referenced by Dune::Functions::DiscreteGlobalBasisFunction< B, V, NTRE, R >::makeDiscreteGlobalBasisFunction(), and Dune::Functions::DiscreteGlobalBasisFunctionDerivative< DGBF >::LocalFunction::operator()().
◆ subEntityDOFs() [1/3]
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
-
localView A bound LocalView to bind to intersection An Intersection encoding the sub-entity to bind to
References Dune::Functions::subEntityDOFs().
Referenced by Dune::Functions::subEntityDOFs().
◆ subEntityDOFs() [2/3]
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
-
localView A bound LocalView to bind to subEntityIndex Index of sub-entity in localView.element() subEntityCodim Codimension of sub-entity in localView.element()
References Dune::Functions::subEntityDOFs().
◆ subEntityDOFs() [3/3]
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
-
t A GlobalBasis or a LocalView
Referenced by Dune::Functions::forEachBoundaryDOF().