dune-pdelab 2.7-git
Loading...
Searching...
No Matches
brezzidouglasmarinifem.hh
Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil -*-
2#ifndef DUNE_PDELAB_FINITEELEMENTMAP_BREZZIDOUGLASMARINIFEM_HH
3#define DUNE_PDELAB_FINITEELEMENTMAP_BREZZIDOUGLASMARINIFEM_HH
4
5#include <dune/grid/common/capabilities.hh>
6
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
For backward compatibility – Do not use this!
Definition adaptivity.hh:28
Definition brezzidouglasmarinifem.hh:83
BrezziDouglasMariniLocalFiniteElementMap(const GV &gv)
Constructs a finite element map on the GridView gv.
Definition brezzidouglasmarinifem.hh:88
static const unsigned int value
Definition gridfunctionspace/tags.hh:139