dune-functions  2.7.1
Public Types | Public Member Functions | Protected Attributes | List of all members
Dune::Functions::DefaultGlobalBasis< PB > Class Template Reference

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 MultiIndex = typename PreBasis::MultiIndex
 Type used for global numbering of the basis vectors. 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 SizePrefix = typename PreBasis::SizePrefix
 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...
 
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_
 

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 PreBasis::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 = typename PreBasis::SizePrefix

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

Constructor & Destructor Documentation

◆ DefaultGlobalBasis()

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

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: