dune-functions 2.9.0
|
Global basis for given pre-basis. More...
#include <dune/functions/functionspacebases/defaultglobalbasis.hh>
Public Types | |
using | PreBasis = PB |
Pre-basis providing the implementation details. More... | |
using | PrefixPath = TypeTree::HybridTreePath<> |
The empty prefix path that identifies the root in the local ansatz tree. More... | |
using | GridView = typename PreBasis::GridView |
The grid view that the FE space is defined on. More... | |
using | size_type = std::size_t |
Type used for indices and size information. More... | |
using | LocalView = DefaultLocalView< DefaultGlobalBasis< PreBasis > > |
Type of the local view on the restriction of the basis to a single element. More... | |
using | MultiIndex = typename LocalView::MultiIndex |
Type used for global numbering of the basis vectors. More... | |
using | SizePrefix = Dune::ReservedVector< std::size_t, PreBasis::multiIndexBufferSize > |
Type used for prefixes handed to the size() method. More... | |
Public Member Functions | |
template<class... T, disableCopyMove< DefaultGlobalBasis, T... > = 0, enableIfConstructible< PreBasis, T... > = 0> | |
DefaultGlobalBasis (T &&... t) | |
Constructor. More... | |
template<class PreBasisFactory , std::enable_if_t< Dune::IsCallable< PreBasisFactory(GridView), PreBasis >::value, int > = 0> | |
DefaultGlobalBasis (const GridView &gridView, PreBasisFactory &&factory) | |
Constructor from a PreBasis factory. More... | |
const GridView & | gridView () const |
Obtain the grid view that the basis is defined on. More... | |
const PreBasis & | preBasis () const |
Obtain the pre-basis providing the implementation details. More... | |
PreBasis & | preBasis () |
Obtain the pre-basis providing the implementation details. More... | |
void | update (const GridView &gv) |
Update the stored grid view. More... | |
size_type | dimension () const |
Get the total dimension of the space spanned by this basis. More... | |
size_type | size () const |
Return number of possible values for next position in empty multi index. More... | |
size_type | size (const SizePrefix &prefix) const |
Return number of possible values for next position in multi index. More... | |
LocalView | localView () const |
Return local view for basis. More... | |
const DefaultGlobalBasis & | rootBasis () const |
Return *this because we are not embedded in a larger basis. More... | |
const PrefixPath & | prefixPath () const |
Return empty path, because this is the root in the local ansatz tree. More... | |
Protected Attributes | |
PreBasis | preBasis_ |
PrefixPath | prefixPath_ |
Global basis for given pre-basis.
This class implements the interface of a global basis using the details from a given pre-basis. Hence it serves as an example for this interface.
If you want to implement your own global basis, it may be better to implement a pre-basis instead. On the one hand this needs less boiler-plate code. On the other hand it makes your implementation composable and thus much more flexible. That is, you can reuse your pre-basis as one part in a larger product space by plugging it e.g. into a CompositePreBasis of PowerPreBasis. The actual global basis for your FooPreBasis is then obtained by using DefaultGlobalBasis<FooPreBasis>.
PB | Pre-basis providing the implementation details |
using Dune::Functions::DefaultGlobalBasis< PB >::GridView = typename PreBasis::GridView |
The grid view that the FE space is defined on.
using Dune::Functions::DefaultGlobalBasis< PB >::LocalView = DefaultLocalView<DefaultGlobalBasis<PreBasis> > |
Type of the local view on the restriction of the basis to a single element.
using Dune::Functions::DefaultGlobalBasis< PB >::MultiIndex = typename LocalView::MultiIndex |
Type used for global numbering of the basis vectors.
using Dune::Functions::DefaultGlobalBasis< PB >::PreBasis = PB |
Pre-basis providing the implementation details.
using Dune::Functions::DefaultGlobalBasis< PB >::PrefixPath = TypeTree::HybridTreePath<> |
The empty prefix path that identifies the root in the local ansatz tree.
using Dune::Functions::DefaultGlobalBasis< PB >::size_type = std::size_t |
Type used for indices and size information.
using Dune::Functions::DefaultGlobalBasis< PB >::SizePrefix = Dune::ReservedVector<std::size_t, PreBasis::multiIndexBufferSize> |
Type used for prefixes handed to the size() method.
|
inline |
Constructor.
T | Argument list for PreBasis |
t | Argument list for PreBasis |
This will forward all arguments to the constructor of PreBasis
|
inline |
Constructor from a PreBasis factory.
gridView | The GridView this basis is based on |
factory | A factory functor that gets the gridView and returns a PreBasis |
|
inline |
Get the total dimension of the space spanned by this basis.
|
inline |
Obtain the grid view that the basis is defined on.
|
inline |
Return local view for basis.
|
inline |
Obtain the pre-basis providing the implementation details.
|
inline |
Obtain the pre-basis providing the implementation details.
|
inline |
Return empty path, because this is the root in the local ansatz tree.
|
inline |
Return *this because we are not embedded in a larger basis.
|
inline |
Return number of possible values for next position in empty multi index.
|
inline |
Return number of possible values for next position in multi index.
|
inline |
Update the stored grid view.
This will update the indexing information of the global basis. It must be called if the grid has changed.
|
protected |
|
protected |