// -*- 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_RAVIARTTHOMAS_RAVIARTTHOMASLFECACHE_HH #define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASLFECACHE_HH #include #include #include #include #include #include namespace Dune { namespace Impl { // Provide implemented Raviart-Thomas local finite elements template struct ImplementedRaviartThomasLocalFiniteElements {}; template struct ImplementedRaviartThomasLocalFiniteElements : public FixedDimLocalGeometryTypeIndex<2> { using FixedDimLocalGeometryTypeIndex<2>::index; static auto getImplementations() { return std::make_tuple( std::make_pair(index(GeometryTypes::triangle), []() { return RT02DLocalFiniteElement(); }), std::make_pair(index(GeometryTypes::quadrilateral), []() { return RT0Cube2DLocalFiniteElement(); }) ); } }; template struct ImplementedRaviartThomasLocalFiniteElements : public FixedDimLocalGeometryTypeIndex<2> { using FixedDimLocalGeometryTypeIndex<2>::index; static auto getImplementations() { return std::make_tuple( std::make_pair(index(GeometryTypes::triangle), []() { return RT12DLocalFiniteElement(); }), std::make_pair(index(GeometryTypes::quadrilateral), []() { return RT1Cube2DLocalFiniteElement(); }) ); } }; template struct ImplementedRaviartThomasLocalFiniteElements : public FixedDimLocalGeometryTypeIndex<2> { using FixedDimLocalGeometryTypeIndex<2>::index; static auto getImplementations() { return std::make_tuple( std::make_pair(index(GeometryTypes::quadrilateral), []() { return RT2Cube2DLocalFiniteElement(); }) ); } }; template struct ImplementedRaviartThomasLocalFiniteElements : public FixedDimLocalGeometryTypeIndex<3> { using FixedDimLocalGeometryTypeIndex<3>::index; static auto getImplementations() { return std::make_tuple( std::make_pair(index(GeometryTypes::tetrahedron), []() { return RT03DLocalFiniteElement(); }), std::make_pair(index(GeometryTypes::hexahedron), []() { return RT0Cube3DLocalFiniteElement(); }) ); } }; template struct ImplementedRaviartThomasLocalFiniteElements : public FixedDimLocalGeometryTypeIndex<3> { using FixedDimLocalGeometryTypeIndex<3>::index; static auto getImplementations() { return std::make_tuple( std::make_pair(index(GeometryTypes::hexahedron), []() { RT1Cube3DLocalFiniteElement(); }) ); } }; } // namespace Impl /** \brief A cache that stores all available Raviart-Thomas local finite elements for the given dimension and order * * \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 RaviartThomasLocalFiniteElementCache = LocalFiniteElementVariantCache>; } // namespace Dune #endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASLFECACHE_HH