5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_CACHE_HH
6#define DUNE_LOCALFUNCTIONS_LAGRANGE_CACHE_HH
12#include <dune/geometry/type.hh>
13#include <dune/geometry/typeindex.hh>
39template <
class Domain,
class Range,
int dim,
40 class SF=Range,
class CF=Range>
60 auto [it,_] = data_.try_emplace(type,type,order_);
66 mutable std::map<GeometryType, FiniteElementType> data_;
81template <GeometryType::Id
id,
class Domain,
class Range, std::
size_t dim, std::
size_t order>
84 struct UnknownToplogy {};
86 static constexpr bool isSimplex = GeometryType(
id).isSimplex();
87 static constexpr bool isCube = GeometryType(
id).isCube();
88 static constexpr bool isPrism = GeometryType(
id).isPrism();
89 static constexpr bool isPyramid = GeometryType(
id).isPyramid();
93 = std::conditional_t<isSimplex, LagrangeSimplexLocalFiniteElement<Domain,Range,dim,order>,
94 std::conditional_t<isCube, LagrangeCubeLocalFiniteElement<Domain,Range,dim,order>,
95 std::conditional_t<isPrism, LagrangePrismLocalFiniteElement<Domain,Range,order>,
96 std::conditional_t<isPyramid, LagrangePyramidLocalFiniteElement<Domain,Range,order>, UnknownToplogy> > > >;
107 assert(GeometryType::Id(type) ==
id);
113 std::optional<FiniteElementType> lfe_{};
130template <
class Domain,
class Range, std::
size_t dim, std::
size_t order>
Convenience header that includes all implementations of Lagrange finite elements.
Definition bdfmcube.hh:18
LocalFiniteElementVariantCache< Impl::ImplementedLagrangeFiniteElements< D, R, dim, order > > LagrangeLocalFiniteElementCache
A cache that stores all available Pk/Qk like local finite elements for the given dimension and order.
Definition lagrangelfecache.hh:118
Lagrange local finite elements for a given set of interpolation points.
Definition lagrange.hh:69
LagrangeLocalFiniteElement< EquidistantPointSet, dim, Domain, Range, SF, CF > FiniteElementType
Definition cache.hh:44
const FiniteElementType & get(GeometryType type) const
Obtain the cached local finite-element.
Definition cache.hh:58
DynamicLagrangeLocalFiniteElementCache(unsigned int order)
Construct an empty cache.
Definition cache.hh:47
const FiniteElementType & get(GeometryType type) const
Obtain the cached local finite-element.
Definition cache.hh:104
std::conditional_t< isSimplex, LagrangeSimplexLocalFiniteElement< Domain, Range, dim, order >, std::conditional_t< isCube, LagrangeCubeLocalFiniteElement< Domain, Range, dim, order >, std::conditional_t< isPrism, LagrangePrismLocalFiniteElement< Domain, Range, order >, std::conditional_t< isPyramid, LagrangePyramidLocalFiniteElement< Domain, Range, order >, UnknownToplogy > > > > FiniteElementType
Definition cache.hh:92
StaticLagrangeLocalFiniteElementCache(std::integral_constant< std::size_t, order >={})
Construct the local-finite element for the order specified as template parameter.
Definition cache.hh:98