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>
36 template <
class PreBasis>
43 return {preBasis.gridView()};
47 static PreBasis
const&
create(PreBasis
const& preBasis) {
return preBasis; }
51 template <
class PreBasis>
63 using type = Dune::Functions::BasisFactory::FlatInterleaved;
69 using type = Dune::Functions::BasisFactory::FlatLexicographic;
73 template <
class IMS,
class... SPB>
76 using type = Dune::Functions::CompositePreBasis<FIMS, FlatPreBasis_t<SPB>...>;
78 template <
class PreBasis>
80 return create(preBasis, std::index_sequence_for<SPB...>{});
83 template <
class PreBasis, std::size_t... I>
84 static type create(PreBasis
const& preBasis, std::index_sequence<I...>) {
90 template <
class IMS,
class SPB, std::
size_t C>
93 using type = Dune::Functions::PowerPreBasis<FIMS, FlatPreBasis_t<SPB>, C>;
95 template <
class PreBasis>
103 template <
class PreBasis>
decltype(auto) flatPreBasis(PreBasis const &preBasis)
Generator function for a flatted PreBasis.
Definition: flatprebasis.hh:104
Definition: simpleassemblers.hh:21
typename FlatPreBasis< PreBasis >::type FlatPreBasis_t
Type alias for flatted PreBasis.
Definition: flatprebasis.hh:52
Definition: resultevaluators.hh:17
Transform a PreBasis into one with flat index-merging strategyThis utility takes a pre-basis and conv...
Definition: flatprebasis.hh:37
PreBasis type
Definition: flatprebasis.hh:38
static type create(PB const &preBasis)
Try to construct the pre-basis using a gridView.
Definition: flatprebasis.hh:42
static PreBasis const & create(PreBasis const &preBasis)
Do not transform the preBasis if already flat.
Definition: flatprebasis.hh:47
Define the flat index-merging strategy for a given strategy IMS
Definition: flatprebasis.hh:56
IMS type
Definition: flatprebasis.hh:57
Dune::Functions::BasisFactory::FlatInterleaved type
Definition: flatprebasis.hh:63
Dune::Functions::BasisFactory::FlatLexicographic type
Definition: flatprebasis.hh:69
typename FlatIndexMergingStrategy< IMS >::type FIMS
Definition: flatprebasis.hh:75
static type create(PreBasis const &preBasis)
Definition: flatprebasis.hh:79
Dune::Functions::CompositePreBasis< FIMS, FlatPreBasis_t< SPB >... > type
Definition: flatprebasis.hh:76
static type create(PreBasis const &preBasis, std::index_sequence< I... >)
Definition: flatprebasis.hh:84
static type create(PreBasis const &preBasis)
Definition: flatprebasis.hh:96
Dune::Functions::PowerPreBasis< FIMS, FlatPreBasis_t< SPB >, C > type
Definition: flatprebasis.hh:93
typename FlatIndexMergingStrategy< IMS >::type FIMS
Definition: flatprebasis.hh:92