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>
18#include <dune/common/typetree/treepath.hh>
76 using SizePrefix = Dune::ReservedVector<std::size_t, PreBasis::multiIndexBufferSize>;
93 static_assert(models<Concept::PreBasis<GridView>,
PreBasis>(),
"Type passed to DefaultGlobalBasis does not model the PreBasis concept.");
103 template<
class PreBasisFactory,
104 std::enable_if_t<Dune::IsCallable<PreBasisFactory(
GridView),
PreBasis>::value,
int> = 0>
109 static_assert(models<Concept::PreBasis<GridView>,
PreBasis>(),
"Type passed to DefaultGlobalBasis does not model the PreBasis concept.");
182 if constexpr (
requires(
PreBasis pb){ pb.containerDescriptor(); })
195template<
class PreBasis>
198template<
class Gr
idView,
class PreBasisFactory>
205template<
class Gr
idView,
class PreBasisFactory>
206auto makeBasis(
const GridView& gridView, PreBasisFactory&& preBasisFactory)
Lightweight representation of (hierarchical) size and block structure extracted from a basis to descr...
std::enable_if_t< std::is_constructible_v< T, Args... >, int > enableIfConstructible
Helper to constrain forwarding constructors.
Definition type_traits.hh:30
Definition monomialset.hh:19
Definition monomialset.hh:19
DefaultGlobalBasis(PreBasis &&) -> DefaultGlobalBasis< std::decay_t< PreBasis > >
Definition argyrisbasis.hh:926
auto makeBasis(const GridView &gridView, PreBasisFactory &&preBasisFactory)
Definition defaultglobalbasis.hh:206
GV GridView
The grid view that the FE basis is defined on.
Definition argyrisbasis.hh:880
Fallback container descriptor if nothing else fits.
Definition containerdescriptors.hh:52
Global basis for given pre-basis.
Definition defaultglobalbasis.hh:53
Dune::ReservedVector< std::size_t, PreBasis::multiIndexBufferSize > SizePrefix
Definition defaultglobalbasis.hh:76
std::size_t size_type
Definition defaultglobalbasis.hh:67
typename PreBasis::GridView GridView
Definition defaultglobalbasis.hh:64
TypeTree::TreePath<> PrefixPath
Definition defaultglobalbasis.hh:61
const GridView & gridView() const
Definition defaultglobalbasis.hh:114
ArgyrisPreBasis< GV, R > PreBasis
Definition defaultglobalbasis.hh:58
DefaultLocalView< DefaultGlobalBasis< PreBasis > > LocalView
Definition defaultglobalbasis.hh:70
PreBasis & preBasis()
Obtain the pre-basis providing the implementation details.
Definition defaultglobalbasis.hh:126
void update(const GridView &gv)
Update the stored grid view.
Definition defaultglobalbasis.hh:137
typename LocalView::MultiIndex MultiIndex
Definition defaultglobalbasis.hh:73
size_type size(const SizePrefix &prefix) const
Return number of possible values for next position in multi index.
Definition defaultglobalbasis.hh:156
size_type dimension() const
Get the total dimension of the space spanned by this basis.
Definition defaultglobalbasis.hh:144
PreBasis preBasis_
Definition defaultglobalbasis.hh:189
LocalView localView() const
Return local view for basis.
Definition defaultglobalbasis.hh:162
DefaultGlobalBasis(T &&... t)
Constructor.
Definition defaultglobalbasis.hh:89
DefaultGlobalBasis(const GridView &gridView, PreBasisFactory &&factory)
Constructor from a PreBasis factory.
Definition defaultglobalbasis.hh:105
size_type size() const
Return number of possible values for next position in empty multi index.
Definition defaultglobalbasis.hh:150
const PreBasis & preBasis() const
Obtain the pre-basis providing the implementation details.
Definition defaultglobalbasis.hh:120
PrefixPath prefixPath_
Definition defaultglobalbasis.hh:190
auto containerDescriptor() const
Return the associated container descriptor.
Definition defaultglobalbasis.hh:180
const DefaultGlobalBasis & rootBasis() const
Return *this because we are not embedded in a larger basis.
Definition defaultglobalbasis.hh:168
const PrefixPath & prefixPath() const
Return empty path, because this is the root in the local ansatz tree.
Definition defaultglobalbasis.hh:174
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
Definition defaultlocalview.hh:65