1 #ifndef DUNE_PDELAB_FINITEELEMENTMAP_UTILITY_HH 2 #define DUNE_PDELAB_FINITEELEMENTMAP_UTILITY_HH 6 #include <dune/common/keywords.hh> 7 #include <dune/geometry/type.hh> 16 template<
typename FEM>
30 template<
typename FEM>
31 constexpr std::size_t _femBlockSize(std::true_type)
33 constexpr
int dim = FEM::dimension;
34 for (
int d = 0 ; d <=
dim ; ++d)
36 std::size_t size = FEM::size(GeometryTypes::none(d));
39 for (
unsigned int topology_id = 0 ; topology_id < (1 <<
dim) ; ++topology_id)
41 std::size_t size = FEM::size(GeometryType(topology_id,d));
50 template<
typename FEM>
51 constexpr std::size_t _femBlockSize(std::false_type)
56 template<
typename FEM>
57 using Dimension = std::integral_constant<decltype(FEM::dimension),FEM::dimension>;
59 template<
typename FEM>
60 constexpr std::size_t femBlockSizeCheckFEMInterface(std::true_type)
62 return _femBlockSize<FEM>(Std::is_detected<StaticFEMSize,FEM>());
65 template<
typename FEM>
66 DUNE_DEPRECATED_MSG(
"Your finite element map does not export the dimension. After the release of PDELab 2.6, this will cause compilation failures.")
67 constexpr
std::
size_t femBlockSizeCheckFEMInterface(
std::false_type)
85 template<
typename FEM>
88 return Impl::femBlockSizeCheckFEMInterface<FEM>(Std::is_detected<Impl::Dimension,FEM>());
92 template<
typename FEM>
98 #endif // DUNE_PDELAB_FINITEELEMENTMAP_UTILITY_HH static const int dim
Definition: adaptivity.hh:84
constexpr std::size_t finiteElementMapBlockSize()
Returns the block size for FEM if available, 0 otherwise.
Definition: finiteelementmap/utility.hh:86
std::integral_constant< std::size_t, finiteElementMapBlockSize< FEM >()> FiniteElementMapBlockSize
An alias template that encapsulates the result of finiteElementMapBlockSize<FEM>() in an integral con...
Definition: finiteelementmap/utility.hh:93
decltype(FEM::size(GeometryTypes::vertex)) StaticFEMSize
Metafunction that returns the type of FEM::size() iff that function is static.
Definition: finiteelementmap/utility.hh:17
For backward compatibility – Do not use this!
Definition: adaptivity.hh:28