// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- // vi: set et ts=4 sw=2 sts=2: // SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root // SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception #ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGELFECACHE_HH #define DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGELFECACHE_HH #include #include #include #include #include #include #include #include #include #include namespace Dune { namespace Impl { // Provide implemented Lagrange local finite elements template struct ImplementedLagrangeFiniteElements : public FixedDimLocalGeometryTypeIndex { using FixedDimLocalGeometryTypeIndex::index; static auto getImplementations() { return std::make_tuple( std::make_pair(index(GeometryTypes::simplex(dim)), []() { return LagrangeSimplexLocalFiniteElement(); }), std::make_pair(index(GeometryTypes::cube(dim)), []() { return LagrangeCubeLocalFiniteElement(); }) ); } }; template struct ImplementedLagrangeFiniteElements : public FixedDimLocalGeometryTypeIndex { using FixedDimLocalGeometryTypeIndex::index; static auto getImplementations() { return std::make_tuple( std::make_pair(index(GeometryTypes::simplex(dim)), []() { return P0LocalFiniteElement(GeometryTypes::simplex(dim)); }), std::make_pair(index(GeometryTypes::cube(dim)), []() { return P0LocalFiniteElement(GeometryTypes::cube(dim)); }), std::make_pair(index(GeometryTypes::none(dim)), []() { return P0LocalFiniteElement(GeometryTypes::none(dim)); }) ); } }; template struct ImplementedLagrangeFiniteElements : public FixedDimLocalGeometryTypeIndex<3> { using FixedDimLocalGeometryTypeIndex<3>::index; static auto getImplementations() { return std::make_tuple( std::make_pair(index(GeometryTypes::tetrahedron), []() { return P0LocalFiniteElement(GeometryTypes::tetrahedron); }), std::make_pair(index(GeometryTypes::hexahedron), []() { return P0LocalFiniteElement(GeometryTypes::hexahedron); }), std::make_pair(index(GeometryTypes::prism), []() { return P0LocalFiniteElement(GeometryTypes::prism); }), std::make_pair(index(GeometryTypes::pyramid), []() { return P0LocalFiniteElement(GeometryTypes::pyramid); }) ); } }; template struct ImplementedLagrangeFiniteElements : public FixedDimLocalGeometryTypeIndex<3> { using FixedDimLocalGeometryTypeIndex<3>::index; static auto getImplementations() { return std::make_tuple( std::make_pair(index(GeometryTypes::tetrahedron), []() { return LagrangeSimplexLocalFiniteElement(); }), std::make_pair(index(GeometryTypes::hexahedron), []() { return LagrangeCubeLocalFiniteElement(); }), std::make_pair(index(GeometryTypes::prism), []() { return LagrangePrismLocalFiniteElement(); }), std::make_pair(index(GeometryTypes::pyramid), []() { return LagrangePyramidLocalFiniteElement(); }) ); } }; template struct ImplementedLagrangeFiniteElements : public FixedDimLocalGeometryTypeIndex<3> { using FixedDimLocalGeometryTypeIndex<3>::index; static auto getImplementations() { return std::make_tuple( std::make_pair(index(GeometryTypes::tetrahedron), []() { return LagrangeSimplexLocalFiniteElement(); }), std::make_pair(index(GeometryTypes::hexahedron), []() { return LagrangeCubeLocalFiniteElement(); }), std::make_pair(index(GeometryTypes::prism), []() { return LagrangePrismLocalFiniteElement(); }), std::make_pair(index(GeometryTypes::pyramid), []() { return LagrangePyramidLocalFiniteElement(); }) ); } }; } // namespace Impl /** \brief A cache that stores all available Pk/Qk like local finite elements for the given dimension and order * * An interface for dealing with different vertex orders is currently missing. * * \tparam D Type used for domain coordinates * \tparam R Type used for shape function values * \tparam dim Element dimension * \tparam order Element order * * The cached finite element implementations can be obtained using get(GeometryType). */ template using LagrangeLocalFiniteElementCache = LocalFiniteElementVariantCache>; } // namespace Dune #endif // DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGELFECACHE_HH