Dune Core Modules (2.10.0)

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

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

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

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


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 26, 23:30, 2024)