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;
35 for (
int d = 0 ; d <=
dim ; ++d)
37 std::size_t gt_size = FEM::size(GeometryTypes::none(d));
40 if (size > 0 and size != gt_size)
45 for (
unsigned int topology_id = 0 ; topology_id < (1 <<
dim) ; ++topology_id)
47 std::size_t gt_size = FEM::size(GeometryType(topology_id,d));
50 if (size > 0 and size != gt_size)
61 template<
typename FEM>
62 constexpr std::size_t _femBlockSize(std::false_type)
80 template<
typename FEM>
83 return Impl::_femBlockSize<FEM>(Std::is_detected<StaticFEMSize,FEM>());
87 template<
typename FEM>
static const int dim
Definition: adaptivity.hh:84
For backward compatibility – Do not use this!
Definition: adaptivity.hh:28
decltype(FEM::size(GeometryTypes::vertex)) StaticFEMSize
Metafunction that returns the type of FEM::size() iff that function is static.
Definition: finiteelementmap/utility.hh:17
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:88
constexpr std::size_t finiteElementMapBlockSize()
Returns the block size for FEM if available, 0 otherwise.
Definition: finiteelementmap/utility.hh:81