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

Global basis for given node factory. More...

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

Public Types

using NodeFactory = NF
 Node factory 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 NodeFactory::GridView
 The grid view that the FE space is defined on. More...
 
using MultiIndex = typename NodeFactory::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< NodeFactory >>
 Type of the local view on the restriction of the basis to a single element. More...
 
using NodeIndexSet = typename NodeFactory::template IndexSet< PrefixPath >
 Node index set provided by NodeFactory. More...
 
using SizePrefix = typename NodeFactory::SizePrefix
 Type used for prefixes handed to the size() method. More...
 
using LocalIndexSet = DefaultLocalIndexSet< LocalView, NodeIndexSet >
 Type of local indixes set exported by localIndexSet() More...
 

Public Member Functions

template<class... T, disableCopyMove< DefaultGlobalBasis, T... > = 0, enableIfConstructible< NodeFactory, T... > = 0>
 DefaultGlobalBasis (T &&... t)
 Constructor. More...
 
const GridViewgridView () const
 Obtain the grid view that the basis is defined on. More...
 
const NodeFactorynodeFactory () const
 Obtain the node factory 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...
 
LocalIndexSet localIndexSet () const
 Return local index set for basis. More...
 
const DefaultGlobalBasisrootBasis () const
 Return *this because we are not embedded in a larger basis. More...
 
const PrefixPathprefixPath () const
 Return empty path, because this is the root in the local ansatz tree. More...
 

Protected Attributes

NodeFactory nodeFactory_
 
PrefixPath prefixPath_
 

Detailed Description

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

Global basis for given node factory.

This class implements the interface of a global basis using the details from a given node factory. 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 node factory 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 factory as one part in a larger product space by plugging it e.g. into a CompositeNodeFactory of PowerNodeFactory. The actual global basis for your FooNodeFactory is then obtained by using DefaultGlobalBasis<FooNodeFactory>.

Template Parameters
NFNode factory providing the implementation details

Member Typedef Documentation

§ GridView

template<class NF >
using Dune::Functions::DefaultGlobalBasis< NF >::GridView = typename NodeFactory::GridView

The grid view that the FE space is defined on.

§ LocalIndexSet

Type of local indixes set exported by localIndexSet()

§ LocalView

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

§ MultiIndex

template<class NF >
using Dune::Functions::DefaultGlobalBasis< NF >::MultiIndex = typename NodeFactory::MultiIndex

Type used for global numbering of the basis vectors.

§ NodeFactory

template<class NF >
using Dune::Functions::DefaultGlobalBasis< NF >::NodeFactory = NF

Node factory providing the implementation details.

§ NodeIndexSet

template<class NF >
using Dune::Functions::DefaultGlobalBasis< NF >::NodeIndexSet = typename NodeFactory::template IndexSet<PrefixPath>

Node index set provided by NodeFactory.

§ PrefixPath

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

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

§ size_type

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

Type used for indices and size information.

§ SizePrefix

template<class NF >
using Dune::Functions::DefaultGlobalBasis< NF >::SizePrefix = typename NodeFactory::SizePrefix

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

Constructor & Destructor Documentation

§ DefaultGlobalBasis()

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

Constructor.

Template Parameters
TArgument list for NodeFactory
Parameters
tArgument list for NodeFactory

This will forward all arguments to the constructor of NodeFactory

Member Function Documentation

§ dimension()

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

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

§ gridView()

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

Obtain the grid view that the basis is defined on.

§ localIndexSet()

template<class NF >
LocalIndexSet Dune::Functions::DefaultGlobalBasis< NF >::localIndexSet ( ) const
inline

Return local index set for basis.

§ localView()

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

Return local view for basis.

§ nodeFactory()

template<class NF >
const NodeFactory& Dune::Functions::DefaultGlobalBasis< NF >::nodeFactory ( ) const
inline

Obtain the node factory providing the implementation details.

§ prefixPath()

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

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

§ rootBasis()

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

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

§ size() [1/2]

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

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

§ size() [2/2]

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

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

§ update()

template<class NF >
void Dune::Functions::DefaultGlobalBasis< NF >::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

§ nodeFactory_

template<class NF >
NodeFactory Dune::Functions::DefaultGlobalBasis< NF >::nodeFactory_
protected

§ prefixPath_

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

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