14#include <dune/functions/functionspacebases/defaultglobalbasis.hh>
28 template <
typename PreBasis_>
34 =
decltype(Dune::Functions::DefaultGlobalBasis(std::declval<PreBasis>()));
35 using FlatBasis =
decltype(Dune::Functions::DefaultGlobalBasis(
46 : bb{
Dune::Functions::DefaultGlobalBasis(pb)},
54 auto&
flat() {
return fb; }
68 const auto&
flat()
const {
return fb; }
82 const auto&
gridView()
const {
return bb.gridView(); }
107 template <
typename Gr
idView,
typename PreBasisFactory>
108 auto makeBasis(
const GridView& gv,
const PreBasisFactory& pb) {
109 auto preBasis = pb(gv);
110 return Basis(preBasis);
121 template <
typename PreBasis>
122 auto makeBasis(
const Dune::Functions::DefaultGlobalBasis<PreBasis>& gb) {
123 return Basis(gb.preBasis());
Implementation of creating a flat basis from a possibly blocked basis.
decltype(auto) flatPreBasis(PreBasis const &preBasis)
Generator function for a flatted PreBasis.
Definition: flatprebasis.hh:104
Definition: simpleassemblers.hh:21
auto makeBasis(const GridView &gv, const PreBasisFactory &pb)
Factory function to create a Basis object.
Definition: utils/basis.hh:108
Definition: resultevaluators.hh:17
Wrapper class for a hierarchical basis constructed from a pre-basis.
Definition: utils/basis.hh:29
typename PreBasis::GridView GridView
The type of the grid view.
Definition: utils/basis.hh:32
auto & untouched()
Returns a reference to the untouched version of the basis.
Definition: utils/basis.hh:61
PreBasis_ PreBasis
The type of the untouched pre basis.
Definition: utils/basis.hh:31
const auto & gridView() const
Returns a const reference to the grid view associated with the untouched basis.
Definition: utils/basis.hh:82
const auto & untouched() const
Returns a const reference to the untouched version of the basis.
Definition: utils/basis.hh:75
auto & gridView()
Returns a reference to the grid view associated with the untouched basis.
Definition: utils/basis.hh:89
const auto & flat() const
Returns a const reference to the flat version of the basis.
Definition: utils/basis.hh:68
decltype(Dune::Functions::DefaultGlobalBasis(Ikarus::flatPreBasis(std::declval< PreBasis >()))) FlatBasis
The type of the flattened basis.
Definition: utils/basis.hh:36
Basis(const PreBasis &pb)
Constructs a Basis object from a pre-basis.
Definition: utils/basis.hh:45
decltype(Dune::Functions::DefaultGlobalBasis(std::declval< PreBasis >())) UntouchedBasis
The type of the untouched basis.
Definition: utils/basis.hh:34
auto & flat()
Returns a reference to the flat version of the basis.
Definition: utils/basis.hh:54