18#include <dune/common/indices.hh>
19#include <dune/functions/functionspacebases/basistags.hh>
20#include <dune/functions/functionspacebases/compositebasis.hh>
21#include <dune/functions/functionspacebases/powerbasis.hh>
36template <
class PreBasis>
44 return type(preBasis.gridView());
48 static const PreBasis&
create(
const PreBasis& preBasis) {
return preBasis; }
52template <
class PreBasis>
66 using type = Dune::Functions::BasisFactory::FlatInterleaved;
73 using type = Dune::Functions::BasisFactory::FlatLexicographic;
77template <
class IMS,
class... SPB>
81 using type = Dune::Functions::CompositePreBasis<FIMS, FlatPreBasis_t<SPB>...>;
83 template <
class PreBasis>
85 return create(preBasis, std::index_sequence_for<SPB...>{});
88 template <
class PreBasis, std::size_t... I>
89 static type create(
const PreBasis& preBasis, std::index_sequence<I...>) {
95template <
class IMS,
class SPB, std::
size_t C>
99 using type = Dune::Functions::PowerPreBasis<FIMS, FlatPreBasis_t<SPB>, C>;
101 template <
class PreBasis>
109template <
class PreBasis>
decltype(auto) flatPreBasis(const PreBasis &preBasis)
Generator function for a flatted PreBasis.
Definition: flatprebasis.hh:110
Definition: assemblermanipulatorbuildingblocks.hh:22
typename FlatPreBasis< PreBasis >::type FlatPreBasis_t
Type alias for flatted PreBasis.
Definition: flatprebasis.hh:53
Definition: utils/dirichletvalues.hh:30
Transform a PreBasis into one with flat index-merging strategyThis utility takes a pre-basis and conv...
Definition: flatprebasis.hh:38
PreBasis type
Definition: flatprebasis.hh:39
static type create(PB const &preBasis)
Try to construct the pre-basis using a gridView.
Definition: flatprebasis.hh:43
static const PreBasis & create(const PreBasis &preBasis)
Do not transform the preBasis if already flat.
Definition: flatprebasis.hh:48
Define the flat index-merging strategy for a given strategy IMS
Definition: flatprebasis.hh:58
IMS type
Definition: flatprebasis.hh:59
Dune::Functions::BasisFactory::FlatInterleaved type
Definition: flatprebasis.hh:66
Dune::Functions::BasisFactory::FlatLexicographic type
Definition: flatprebasis.hh:73
typename FlatIndexMergingStrategy< IMS >::type FIMS
Definition: flatprebasis.hh:80
Dune::Functions::CompositePreBasis< FIMS, FlatPreBasis_t< SPB >... > type
Definition: flatprebasis.hh:81
static type create(const PreBasis &preBasis)
Definition: flatprebasis.hh:84
static type create(const PreBasis &preBasis, std::index_sequence< I... >)
Definition: flatprebasis.hh:89
static type create(const PreBasis &preBasis)
Definition: flatprebasis.hh:102
Dune::Functions::PowerPreBasis< FIMS, FlatPreBasis_t< SPB >, C > type
Definition: flatprebasis.hh:99
typename FlatIndexMergingStrategy< IMS >::type FIMS
Definition: flatprebasis.hh:98