DUNE PDELab (git)

brezzidouglasmarinifem.hh
1// -*- tab-width: 4; indent-tabs-mode: nil -*-
2#ifndef DUNE_PDELAB_FINITEELEMENTMAP_BREZZIDOUGLASMARINIFEM_HH
3#define DUNE_PDELAB_FINITEELEMENTMAP_BREZZIDOUGLASMARINIFEM_HH
4
6
7#include <dune/pdelab/common/topologyutility.hh>
8#include <dune/pdelab/finiteelementmap/bdm1simplex2dfem.hh>
9#include <dune/pdelab/finiteelementmap/bdm1cube2dfem.hh>
10
11
12namespace Dune {
13 namespace PDELab {
14
15#ifndef DOXYGEN
16
17 namespace detail {
18
20
25 template<typename GV, int dim, GeometryType::BasicType basic_type, typename D, typename R, std::size_t k>
26 struct BrezziDouglasMariniLocalFiniteElementMapBaseSelector
27 {
28 static_assert((AlwaysFalse<GV>::value),"The requested type of Brezzi-Douglas-Marini element is not implemented, sorry!");
29 };
30
31
32 // ********************************************************************************
33 // Specializations
34 // ********************************************************************************
35
36 template<typename GV, typename D, typename R>
37 struct BrezziDouglasMariniLocalFiniteElementMapBaseSelector<GV,2,GeometryType::simplex,D,R,1>
38 {
39 typedef BDM1Simplex2DLocalFiniteElementMap<GV,D,R> type;
40 };
41
42 template<typename GV, typename D, typename R>
43 struct BrezziDouglasMariniLocalFiniteElementMapBaseSelector<GV,2,GeometryType::cube,D,R,1>
44 {
45 typedef BDM1Cube2DLocalFiniteElementMap<GV,D,R> type;
46 };
47
48 } // end namespace detail
49
50#endif // DOXYGEN
51
52
55
72 template<typename GV,
73 typename D,
74 typename R,
75 std::size_t k,
76 GeometryType::BasicType basic_type = BasicTypeFromDimensionAndTopologyId<
77 GV::dimension,
78 Capabilities::hasSingleGeometryType<typename GV::Grid>::topologyId
79 >::value
80 >
82 public detail::BrezziDouglasMariniLocalFiniteElementMapBaseSelector<GV,GV::dimension,basic_type,D,R,k>::type
83 {
84
85 public:
86
89 : detail::BrezziDouglasMariniLocalFiniteElementMapBaseSelector<GV,GV::dimension,basic_type,D,R,k>::type(gv)
90 {}
91
92 };
93
94#ifndef DOXYGEN
95
96 // Specialization for grids that don't provide a valid topology id for their cells.
97 template<typename GV, typename D, typename R, std::size_t k>
98 class BrezziDouglasMariniLocalFiniteElementMap<GV,D,R,k,GeometryType::none>
99 {
100 static_assert((AlwaysFalse<GV>::value),
101 "Your chosen grid does not export a usable topology id for its cells."
102 "Please provide the correct GeometryType::BasicType as an additional template parameter.");
103 };
104
105#endif // DOXYGEN
106
107 } // end namespace PDELab
108} // end namespace Dune
109
110#endif // DUNE_PDELAB_FINITEELEMENTMAP_BREZZIDOUGLASMARINIFEM_HH
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:114
BasicType
Each entity can be tagged by one of these basic types plus its space dimension.
Definition: type.hh:120
Definition: brezzidouglasmarinifem.hh:83
BrezziDouglasMariniLocalFiniteElementMap(const GV &gv)
Constructs a finite element map on the GridView gv.
Definition: brezzidouglasmarinifem.hh:88
A set of traits classes to store static information about grid implementation.
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:132
constexpr GeometryType cube(unsigned int dim)
Returns a GeometryType representing a hypercube of dimension dim.
Definition: type.hh:462
constexpr GeometryType none(unsigned int dim)
Returns a GeometryType representing a singular of dimension dim.
Definition: type.hh:471
constexpr GeometryType simplex(unsigned int dim)
Returns a GeometryType representing a simplex of dimension dim.
Definition: type.hh:453
Dune namespace.
Definition: alignedallocator.hh:13
template which always yields a false value
Definition: typetraits.hh:124
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 12, 23:30, 2024)