3#include <dune/functions/functionspacebases/basistags.hh>
4#include <dune/functions/functionspacebases/compositebasis.hh>
5#include <dune/functions/functionspacebases/lagrangebasis.hh>
6#include <dune/functions/functionspacebases/powerbasis.hh>
7#include <dune/grid/yaspgrid.hh>
9#include <amdis/AdaptiveGrid.hpp>
10#include <amdis/common/Logical.hpp>
11#include <amdis/common/TypeTraits.hpp>
12#include <amdis/functions/GlobalBasis.hpp>
18 template <
bool same,
int... degs>
19 struct LagrangePreBasisCreatorImpl;
23 struct LagrangePreBasisCreatorImpl<true, deg>
27 using namespace Dune::Functions::BasisFactory;
28 return lagrange<deg>();
33 template <
int... degs>
34 struct LagrangePreBasisCreatorImpl<false, degs...>
38 using namespace Dune::Functions::BasisFactory;
39 return composite(lagrange<degs>()..., flatLexicographic());
44 template <
int deg,
int... degs>
45 struct LagrangePreBasisCreatorImpl<true, deg, degs...>
49 using namespace Dune::Functions::BasisFactory;
50 return power<1+
sizeof...(degs)>(lagrange<deg>(), flatLexicographic());
55 template <
int deg,
int... degs>
56 struct LagrangePreBasisCreator
57 :
public LagrangePreBasisCreatorImpl<((deg == degs) &&...), deg, degs...>
61 template <
int dow,
int k = 1>
62 struct TaylorHoodPreBasisCreator
66 using namespace Dune::Functions::BasisFactory;
67 return composite(power<dow>(lagrange<k+1>(), flatInterleaved()), lagrange<k>(), flatLexicographic());
75 template <
class GB,
class T =
double,
class Traits = BackendTraits>
78 using GlobalBasis = GB;
79 using CoefficientType = T;
84 template <
class HostGr
id,
class PreBasisCreator,
class T =
double,
class Traits = BackendTraits>
87 using Grid = AdaptiveGrid_t<HostGrid>;
88 using GridView =
typename Grid::LeafGridView;
90 static auto create(std::string
const& name, GridView
const& gridView)
95 static auto create(GridView
const& gridView)
100 using GlobalBasis =
decltype(create(std::declval<GridView>()));
101 using CoefficientType = T;
108 template <
class Grid,
int... degrees>
115 template <
int dim,
int... degrees>
122 template <
class Gr
id,
int k = 1>
124 :
public DefaultBasisCreator<Grid, Impl::TaylorHoodPreBasisCreator<Grid::dimensionworld,k>>
Global basis defined on a pre-basis.
Definition: GlobalBasis.hpp:48
Generator for a basis and default problem traits.
Definition: ProblemStatTraits.hpp:86
Wrapper around a global basis providing default traits.
Definition: ProblemStatTraits.hpp:77
ProblemStatTraits for a (composite) basis composed of lagrange bases of different degree.
Definition: ProblemStatTraits.hpp:111
ProblemStatTraits of Taylor-Hood basis of lagrange-type with pressure degree k.
Definition: ProblemStatTraits.hpp:125
Specialization of LagrangeBasis for Grid type Dune::YaspGrid for a given dimension.
Definition: ProblemStatTraits.hpp:118