dune-functions 2.10
Loading...
Searching...
No Matches
Dune::Functions::DefaultGlobalBasis< PB > Class Template Reference

Global basis for given pre-basis. More...

#include <dune/functions/functionspacebases/defaultglobalbasis.hh>

Inheritance diagram for Dune::Functions::DefaultGlobalBasis< PB >:
Inheritance graph

Public Types

using PreBasis = PB
 Pre-basis providing the implementation details.
using PrefixPath = TypeTree::HybridTreePath<>
 The empty prefix path that identifies the root in the local ansatz tree.
using GridView = typename PreBasis::GridView
 The grid view that the FE space is defined on.
using size_type = std::size_t
 Type used for indices and size information.
using LocalView = DefaultLocalView<DefaultGlobalBasis<PreBasis>>
 Type of the local view on the restriction of the basis to a single element.
using MultiIndex = typename LocalView::MultiIndex
 Type used for global numbering of the basis vectors.
using SizePrefix = Dune::ReservedVector<std::size_t, PreBasis::multiIndexBufferSize>
 Type used for prefixes handed to the size() method.

Public Member Functions

template<class... T, disableCopyMove< DefaultGlobalBasis, T... > = 0, enableIfConstructible< PreBasis, T... > = 0>
 DefaultGlobalBasis (T &&... t)
 Constructor.
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.
const GridViewgridView () const
 Obtain the grid view that the basis is defined on.
const PreBasispreBasis () const
 Obtain the pre-basis providing the implementation details.
PreBasispreBasis ()
 Obtain the pre-basis providing the implementation details.
void update (const GridView &gv)
 Update the stored grid view.
size_type dimension () const
 Get the total dimension of the space spanned by this basis.
size_type size () const
 Return number of possible values for next position in empty multi index.
size_type size (const SizePrefix &prefix) const
 Return number of possible values for next position in multi index.
LocalView localView () const
 Return local view for basis.
const DefaultGlobalBasisrootBasis () const
 Return *this because we are not embedded in a larger basis.
const PrefixPathprefixPath () const
 Return empty path, because this is the root in the local ansatz tree.

Protected Attributes

PreBasis preBasis_
PrefixPath prefixPath_

Detailed Description

template<class PB>
class Dune::Functions::DefaultGlobalBasis< PB >

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>.

Template Parameters
PBPre-basis providing the implementation details

Member Typedef Documentation

◆ GridView

template<class PB>
using Dune::Functions::DefaultGlobalBasis< PB >::GridView = typename PreBasis::GridView

The grid view that the FE space is defined on.

◆ LocalView

Type of the local view on the restriction of the basis to a single element.

◆ MultiIndex

template<class PB>
using Dune::Functions::DefaultGlobalBasis< PB >::MultiIndex = typename LocalView::MultiIndex

Type used for global numbering of the basis vectors.

◆ PreBasis

template<class PB>
using Dune::Functions::DefaultGlobalBasis< PB >::PreBasis = PB

Pre-basis providing the implementation details.

◆ PrefixPath

template<class PB>
using Dune::Functions::DefaultGlobalBasis< PB >::PrefixPath = TypeTree::HybridTreePath<>

The empty prefix path that identifies the root in the local ansatz tree.

◆ size_type

template<class PB>
using Dune::Functions::DefaultGlobalBasis< PB >::size_type = std::size_t

Type used for indices and size information.

◆ SizePrefix

template<class PB>
using Dune::Functions::DefaultGlobalBasis< PB >::SizePrefix = Dune::ReservedVector<std::size_t, PreBasis::multiIndexBufferSize>

Type used for prefixes handed to the size() method.

Constructor & Destructor Documentation

◆ DefaultGlobalBasis() [1/2]

template<class PB>
template<class... T, disableCopyMove< DefaultGlobalBasis, T... > = 0, enableIfConstructible< PreBasis, T... > = 0>
Dune::Functions::DefaultGlobalBasis< PB >::DefaultGlobalBasis ( T &&... t)
inline

Constructor.

Template Parameters
TArgument list for PreBasis
Parameters
tArgument list for PreBasis

This will forward all arguments to the constructor of PreBasis

◆ DefaultGlobalBasis() [2/2]

template<class PB>
template<class PreBasisFactory, std::enable_if_t< Dune::IsCallable< PreBasisFactory(GridView), PreBasis >::value, int > = 0>
Dune::Functions::DefaultGlobalBasis< PB >::DefaultGlobalBasis ( const GridView & gridView,
PreBasisFactory && factory )
inline

Constructor from a PreBasis factory.

Parameters
gridViewThe GridView this basis is based on
factoryA factory functor that gets the gridView and returns a PreBasis

Member Function Documentation

◆ dimension()

template<class PB>
size_type Dune::Functions::DefaultGlobalBasis< PB >::dimension ( ) const
inline

Get the total dimension of the space spanned by this basis.

◆ gridView()

template<class PB>
const GridView & Dune::Functions::DefaultGlobalBasis< PB >::gridView ( ) const
inline

Obtain the grid view that the basis is defined on.

◆ localView()

template<class PB>
LocalView Dune::Functions::DefaultGlobalBasis< PB >::localView ( ) const
inline

Return local view for basis.

◆ preBasis() [1/2]

template<class PB>
PreBasis & Dune::Functions::DefaultGlobalBasis< PB >::preBasis ( )
inline

Obtain the pre-basis providing the implementation details.

◆ preBasis() [2/2]

template<class PB>
const PreBasis & Dune::Functions::DefaultGlobalBasis< PB >::preBasis ( ) const
inline

Obtain the pre-basis providing the implementation details.

◆ prefixPath()

template<class PB>
const PrefixPath & Dune::Functions::DefaultGlobalBasis< PB >::prefixPath ( ) const
inline

Return empty path, because this is the root in the local ansatz tree.

◆ rootBasis()

template<class PB>
const DefaultGlobalBasis & Dune::Functions::DefaultGlobalBasis< PB >::rootBasis ( ) const
inline

Return *this because we are not embedded in a larger basis.

◆ size() [1/2]

template<class PB>
size_type Dune::Functions::DefaultGlobalBasis< PB >::size ( ) const
inline

Return number of possible values for next position in empty multi index.

◆ size() [2/2]

template<class PB>
size_type Dune::Functions::DefaultGlobalBasis< PB >::size ( const SizePrefix & prefix) const
inline

Return number of possible values for next position in multi index.

◆ update()

template<class PB>
void Dune::Functions::DefaultGlobalBasis< PB >::update ( const GridView & gv)
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.

Member Data Documentation

◆ preBasis_

template<class PB>
PreBasis Dune::Functions::DefaultGlobalBasis< PB >::preBasis_
protected

◆ prefixPath_

template<class PB>
PrefixPath Dune::Functions::DefaultGlobalBasis< PB >::prefixPath_
protected

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