dune-pdelab  2.7-git
qkdg.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=4 sw=2 sts=2:
3 
4 #ifndef DUNE_PDELAB_FINITEELEMENTMAP_QKDG_HH
5 #define DUNE_PDELAB_FINITEELEMENTMAP_QKDG_HH
6 
10 
13 
14 namespace Dune {
15  namespace PDELab {
16 
19 
20 #ifndef DOXYGEN
21  // Class declaration. Use template specialization below.
22  template<class D, class R, int k, int d, QkDGBasisPolynomial p = QkDGBasisPolynomial::lagrange>
23  class QkDGLocalFiniteElementMap;
24 #endif
25 
36  template<class D, class R, int k, int d>
37  class QkDGLocalFiniteElementMap<D,R,k,d,QkDGBasisPolynomial::lagrange>
38  : public Dune::PDELab::SimpleLocalFiniteElementMap< Dune::QkDGLagrangeLocalFiniteElement<D,R,k,d>,d>
39  {
40  public:
41 
42  static constexpr bool fixedSize()
43  {
44  return true;
45  }
46 
47  static constexpr bool hasDOFs(int codim)
48  {
49  return codim == 0;
50  }
51 
52  static constexpr std::size_t size(GeometryType gt)
53  {
54  if (gt == GeometryTypes::cube(d))
56  else
57  return 0;
58  }
59 
60  static constexpr std::size_t maxLocalSize()
61  {
63  }
64 
66  static constexpr QkDGBasisPolynomial polynomial()
67  {
69  }
70 
72  static constexpr std::size_t order()
73  {
74  return k;
75  }
76  };
77 
88  template<class D, class R, int k, int d>
89  class QkDGLocalFiniteElementMap<D,R,k,d,QkDGBasisPolynomial::legendre>
90  : public Dune::PDELab::SimpleLocalFiniteElementMap< Dune::QkDGLegendreLocalFiniteElement<D,R,k,d>,d>
91  {
92  public:
93 
94  static constexpr bool fixedSize()
95  {
96  return true;
97  }
98 
99  static constexpr bool hasDOFs(int codim)
100  {
101  return codim == 0;
102  }
103 
104  static constexpr std::size_t size(GeometryType gt)
105  {
106  if (gt == GeometryTypes::cube(d))
108  else
109  return 0;
110  }
111 
112  static constexpr std::size_t maxLocalSize()
113  {
115  }
116 
118  static constexpr QkDGBasisPolynomial polynomial()
119  {
121  }
122 
124  static constexpr std::size_t order()
125  {
126  return k;
127  }
128  };
129 
140  template<class D, class R, int k, int d>
141  class QkDGLocalFiniteElementMap<D,R,k,d,QkDGBasisPolynomial::lobatto>
142  : public Dune::PDELab::SimpleLocalFiniteElementMap< Dune::QkDGGLLocalFiniteElement<D,R,k,d>,d>
143  {
144  public:
145 
146  static constexpr bool fixedSize()
147  {
148  return true;
149  }
150 
151  static constexpr bool hasDOFs(int codim)
152  {
153  return codim == 0;
154  }
155 
156  static constexpr std::size_t size(GeometryType gt)
157  {
158  if (gt == GeometryTypes::cube(d))
160  else
161  return 0;
162  }
163 
164  static constexpr std::size_t maxLocalSize()
165  {
167  }
168 
170  static constexpr QkDGBasisPolynomial polynomial()
171  {
173  }
174 
176  static constexpr std::size_t order()
177  {
178  return k;
179  }
180  };
181 
182 
199  template<class D, class R, int k, int d>
200  class QkDGLocalFiniteElementMap<D,R,k,d,QkDGBasisPolynomial::l2orthonormal>
201  : public OPBLocalFiniteElementMap<D,R,k,d,Dune::GeometryType::cube,
202 #if HAVE_GMP
203  Dune::GMPField<512>,
204 #else
205  R,
206 #endif
207  Dune::PB::BasisType::Qk>
208  {
209  public:
210 
212  static constexpr QkDGBasisPolynomial polynomial()
213  {
215  }
216 
218  static constexpr std::size_t order()
219  {
220  return k;
221  }
222 
223  };
224 
225  }
226 }
227 
228 #endif // DUNE_PDELAB_FINITEELEMENTMAP_QKDG_HH
For backward compatibility – Do not use this!
Definition: adaptivity.hh:28
QkDGBasisPolynomial
Switch between different basis for QkDGLocalFiniteElementMap.
Definition: qkdg.hh:18
Definition: qkdglagrange.hh:24
Definition: qkdglegendre.hh:33
simple implementation where all entities have the same finite element
Definition: finiteelementmap.hh:101
static constexpr std::size_t size(GeometryType gt)
Definition: qkdg.hh:52
static constexpr std::size_t order()
return order of polynomial basis
Definition: qkdg.hh:72
static constexpr bool hasDOFs(int codim)
Definition: qkdg.hh:47
static constexpr QkDGBasisPolynomial polynomial()
return type of polynomial basis
Definition: qkdg.hh:66
static constexpr bool hasDOFs(int codim)
Definition: qkdg.hh:99
static constexpr std::size_t maxLocalSize()
Definition: qkdg.hh:112
static constexpr std::size_t size(GeometryType gt)
Definition: qkdg.hh:104
static constexpr QkDGBasisPolynomial polynomial()
return type of polynomial basis
Definition: qkdg.hh:118
static constexpr std::size_t order()
return order of polynomial basis
Definition: qkdg.hh:124
static constexpr std::size_t size(GeometryType gt)
Definition: qkdg.hh:156
static constexpr std::size_t order()
return order of polynomial basis
Definition: qkdg.hh:176
static constexpr std::size_t maxLocalSize()
Definition: qkdg.hh:164
static constexpr bool hasDOFs(int codim)
Definition: qkdg.hh:151
static constexpr QkDGBasisPolynomial polynomial()
return type of polynomial basis
Definition: qkdg.hh:170
static constexpr std::size_t order()
return order of polynomial basis
Definition: qkdg.hh:218
static constexpr QkDGBasisPolynomial polynomial()
return type of polynomial basis
Definition: qkdg.hh:212