Skip to content
Snippets Groups Projects

Draft: Use the topology id directly in the Lagrange cache

Open Simon Praetorius requested to merge issue/topology-id-lagrange-cache into master
1 unresolved thread
1 file
+ 6
4
Compare changes
  • Side-by-side
  • Inline
@@ -67,7 +67,7 @@ private:
/** \brief A cache that stores all available Pk/Qk like local finite elements for the given dimension and order
* for the case that the GeometryType is fixed and has the given Id.
*
* \tparam id The Id of the fixed GeometryType
* \tparam topologyId The topology id of the fixed GeometryType
* \tparam Domain Type used for domain coordinates
* \tparam Range Type used for shape function values
* \tparam dim Element dimension
@@ -75,11 +75,13 @@ private:
*
* The cached finite element implementations can be obtained using get(GeometryType).
*/
template <GeometryType::Id id, class Domain, class Range, std::size_t dim, std::size_t order>
template <unsigned int topologyId, class Domain, class Range, std::size_t dim, std::size_t order>
class StaticLagrangeLocalFiniteElementCache
{
struct UnknownToplogy {};
static constexpr GeometryType::Id id = GeometryType(dim,topologyId);
static constexpr bool isSimplex = GeometryType(id).isSimplex();
static constexpr bool isCube = GeometryType(id).isCube();
static constexpr bool isPrism = GeometryType(id).isPrism();
@@ -120,12 +122,12 @@ private:
*
* The cached finite element implementations can be obtained using get(GeometryType).
*
* \note This is a specialization of the fixed-geometry type LFE cache for the ID `GeometryType::Id(~0u)`.
* \note This is a specialization of the fixed-geometry type LFE cache for the topology id `~0u`.
* This is given by the default `topologyId` in the capability `Dune::Capabilities::hasSingleGeometryType`
* that can be extracted from grids with support for mixed geometry types.
*/
template <class Domain, class Range, std::size_t dim, std::size_t order>
class StaticLagrangeLocalFiniteElementCache<GeometryType::Id(~0u), Domain, Range, dim, order>
class StaticLagrangeLocalFiniteElementCache<~0u, Domain, Range, dim, order>
: public LagrangeLocalFiniteElementCache<Domain,Range,dim,order>
{
using Base = LagrangeLocalFiniteElementCache<Domain,Range,dim,order>;
Loading