Go to the documentation of this file.
3 #ifndef DUNE_FUNCTIONS_FUNCTIONSPACEBASES_DEFAULTGLOBALBASIS_HH
4 #define DUNE_FUNCTIONS_FUNCTIONSPACEBASES_DEFAULTGLOBALBASIS_HH
10 #include <dune/common/reservedvector.hh>
11 #include <dune/common/typeutilities.hh>
12 #include <dune/common/concept.hh>
163 namespace BasisFactory {
165 template<
class Gr
idView,
class PreBasisFactory>
166 auto makeBasis(
const GridView& gridView, PreBasisFactory&& preBasisFactory)
168 using RawPreBasisFactory = std::decay_t<PreBasisFactory>;
169 using MultiIndex = std::conditional_t<
170 (RawPreBasisFactory::requiredMultiIndexSize == 1),
172 Dune::ReservedVector<std::size_t, RawPreBasisFactory::requiredMultiIndexSize>>;
173 auto preBasis = preBasisFactory.template makePreBasis<MultiIndex>(gridView);
174 using PreBasis = std::decay_t<decltype(preBasis)>;
179 template<
class MultiIndex,
class Gr
idView,
class PreBasisFactory>
180 auto makeBasis(
const GridView& gridView, PreBasisFactory&& preBasisFactory)
182 auto preBasis = preBasisFactory.template makePreBasis<MultiIndex>(gridView);
183 using PreBasis = std::decay_t<decltype(preBasis)>;
191 namespace BasisBuilder {
193 using namespace BasisFactory;
203 #endif // DUNE_FUNCTIONS_FUNCTIONSPACEBASES_DEFAULTGLOBALBASIS_HH
typename PreBasis::MultiIndex MultiIndex
Type used for global numbering of the basis vectors.
Definition: defaultglobalbasis.hh:60
const DefaultGlobalBasis & rootBasis() const
Return *this because we are not embedded in a larger basis.
Definition: defaultglobalbasis.hh:145
PreBasis preBasis_
Definition: defaultglobalbasis.hh:157
size_type size() const
Return number of possible values for next position in empty multi index.
Definition: defaultglobalbasis.hh:127
The restriction of a finite element basis to a single element.
Definition: defaultlocalview.hh:24
PreBasis & preBasis()
Obtain the pre-basis providing the implementation details.
Definition: defaultglobalbasis.hh:103
void update(const GridView &gv)
Update the stored grid view.
Definition: defaultglobalbasis.hh:114
TypeTree::HybridTreePath<> PrefixPath
The empty prefix path that identifies the root in the local ansatz tree.
Definition: defaultglobalbasis.hh:54
A multi-index class with only one level.
Definition: flatmultiindex.hh:31
size_type dimension() const
Get the total dimension of the space spanned by this basis.
Definition: defaultglobalbasis.hh:121
const GridView & gridView() const
Obtain the grid view that the basis is defined on.
Definition: defaultglobalbasis.hh:91
auto makeBasis(const GridView &gridView, PreBasisFactory &&preBasisFactory)
Definition: defaultglobalbasis.hh:180
Global basis for given pre-basis.
Definition: defaultglobalbasis.hh:46
std::size_t size_type
Type used for indices and size information.
Definition: defaultglobalbasis.hh:63
LocalView localView() const
Return local view for basis.
Definition: defaultglobalbasis.hh:139
typename std::enable_if< std::is_constructible< T, Args... >::value, int >::type enableIfConstructible
Helper to constrain forwarding constructors.
Definition: type_traits.hh:26
typename PreBasis::GridView GridView
The grid view that the FE space is defined on.
Definition: defaultglobalbasis.hh:57
typename PreBasis::SizePrefix SizePrefix
Type used for prefixes handed to the size() method.
Definition: defaultglobalbasis.hh:69
size_type size(const SizePrefix &prefix) const
Return number of possible values for next position in multi index.
Definition: defaultglobalbasis.hh:133
Definition: polynomial.hh:10
PB PreBasis
Pre-basis providing the implementation details.
Definition: defaultglobalbasis.hh:51
Definition: functionspacebases/concepts.hh:143
const PreBasis & preBasis() const
Obtain the pre-basis providing the implementation details.
Definition: defaultglobalbasis.hh:97
const PrefixPath & prefixPath() const
Return empty path, because this is the root in the local ansatz tree.
Definition: defaultglobalbasis.hh:151
PrefixPath prefixPath_
Definition: defaultglobalbasis.hh:158
DefaultGlobalBasis(T &&... t)
Constructor.
Definition: defaultglobalbasis.hh:82
DefaultLocalView< DefaultGlobalBasis< PreBasis > > LocalView
Type of the local view on the restriction of the basis to a single element.
Definition: defaultglobalbasis.hh:66