7#ifndef DUNE_FUNCTIONS_FUNCTIONSPACEBASES_DEFAULTGLOBALBASIS_HH
8#define DUNE_FUNCTIONS_FUNCTIONSPACEBASES_DEFAULTGLOBALBASIS_HH
14#include <dune/common/reservedvector.hh>
15#include <dune/common/typeutilities.hh>
16#include <dune/common/concept.hh>
73 using SizePrefix = Dune::ReservedVector<std::size_t, PreBasis::multiIndexBufferSize>;
90 static_assert(models<Concept::PreBasis<GridView>,
PreBasis>(),
"Type passed to DefaultGlobalBasis does not model the PreBasis concept.");
100 template<
class PreBasisFactory,
101 std::enable_if_t<Dune::IsCallable<PreBasisFactory(
GridView),
PreBasis>::value,
int> = 0>
106 static_assert(models<Concept::PreBasis<GridView>,
PreBasis>(),
"Type passed to DefaultGlobalBasis does not model the PreBasis concept.");
183template<
class PreBasis>
186template<
class Gr
idView,
class PreBasisFactory>
191namespace BasisFactory {
193template<
class Gr
idView,
class PreBasisFactory>
194auto makeBasis(
const GridView& gridView, PreBasisFactory&& preBasisFactory)
202namespace [[deprecated(
"Will be removed after Dune 2.10")]] BasisBuilder {
204 using namespace BasisFactory;
std::enable_if_t< std::is_constructible_v< T, Args... >, int > enableIfConstructible
Helper to constrain forwarding constructors.
Definition type_traits.hh:31
Definition polynomial.hh:17
auto makeBasis(const GridView &gridView, PreBasisFactory &&preBasisFactory)
Definition defaultglobalbasis.hh:194
Global basis for given pre-basis.
Definition defaultglobalbasis.hh:50
Dune::ReservedVector< std::size_t, PreBasis::multiIndexBufferSize > SizePrefix
Type used for prefixes handed to the size() method.
Definition defaultglobalbasis.hh:73
std::size_t size_type
Type used for indices and size information.
Definition defaultglobalbasis.hh:64
typename PreBasis::GridView GridView
The grid view that the FE space is defined on.
Definition defaultglobalbasis.hh:61
const GridView & gridView() const
Obtain the grid view that the basis is defined on.
Definition defaultglobalbasis.hh:111
PB PreBasis
Pre-basis providing the implementation details.
Definition defaultglobalbasis.hh:55
PreBasis & preBasis()
Obtain the pre-basis providing the implementation details.
Definition defaultglobalbasis.hh:123
void update(const GridView &gv)
Update the stored grid view.
Definition defaultglobalbasis.hh:134
DefaultLocalView< DefaultGlobalBasis< PreBasis > > LocalView
Type of the local view on the restriction of the basis to a single element.
Definition defaultglobalbasis.hh:67
typename LocalView::MultiIndex MultiIndex
Type used for global numbering of the basis vectors.
Definition defaultglobalbasis.hh:70
size_type size(const SizePrefix &prefix) const
Return number of possible values for next position in multi index.
Definition defaultglobalbasis.hh:153
size_type dimension() const
Get the total dimension of the space spanned by this basis.
Definition defaultglobalbasis.hh:141
PreBasis preBasis_
Definition defaultglobalbasis.hh:177
LocalView localView() const
Return local view for basis.
Definition defaultglobalbasis.hh:159
TypeTree::HybridTreePath<> PrefixPath
The empty prefix path that identifies the root in the local ansatz tree.
Definition defaultglobalbasis.hh:58
DefaultGlobalBasis(T &&... t)
Constructor.
Definition defaultglobalbasis.hh:86
DefaultGlobalBasis(const GridView &gridView, PreBasisFactory &&factory)
Constructor from a PreBasis factory.
Definition defaultglobalbasis.hh:102
size_type size() const
Return number of possible values for next position in empty multi index.
Definition defaultglobalbasis.hh:147
const PreBasis & preBasis() const
Obtain the pre-basis providing the implementation details.
Definition defaultglobalbasis.hh:117
PrefixPath prefixPath_
Definition defaultglobalbasis.hh:178
const DefaultGlobalBasis & rootBasis() const
Return *this because we are not embedded in a larger basis.
Definition defaultglobalbasis.hh:165
const PrefixPath & prefixPath() const
Return empty path, because this is the root in the local ansatz tree.
Definition defaultglobalbasis.hh:171
The restriction of a finite element basis to a single element.
Definition defaultlocalview.hh:32
std::conditional_t<(PreBasis::minMultiIndexSize==PreBasis::maxMultiIndexSize), StaticMultiIndex< size_type, PreBasis::maxMultiIndexSize >, Dune::ReservedVector< size_type, PreBasis::multiIndexBufferSize > > MultiIndex
Type used for global numbering of the basis vectors.
Definition defaultlocalview.hh:68