dune-pdelab  2.5-dev
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> >
39  {
40  public:
41  bool fixedSize() const
42  {
43  return true;
44  }
45 
46  bool hasDOFs(int codim) const
47  {
48  return codim == 0;
49  }
50 
51  std::size_t size(GeometryType gt) const
52  {
53  if (gt == GeometryType(GeometryType::cube,d))
55  else
56  return 0;
57  }
58 
59  std::size_t maxLocalSize() const
60  {
62  }
63 
65  static constexpr QkDGBasisPolynomial polynomial()
66  {
68  }
69 
71  static constexpr std::size_t order()
72  {
73  return k;
74  }
75  };
76 
87  template<class D, class R, int k, int d>
88  class QkDGLocalFiniteElementMap<D,R,k,d,QkDGBasisPolynomial::legendre>
89  : public Dune::PDELab::SimpleLocalFiniteElementMap< Dune::QkDGLegendreLocalFiniteElement<D,R,k,d> >
90  {
91  public:
92  bool fixedSize() const
93  {
94  return true;
95  }
96 
97  bool hasDOFs(int codim) const
98  {
99  return codim == 0;
100  }
101 
102  std::size_t size(GeometryType gt) const
103  {
104  if (gt == GeometryType(GeometryType::cube,d))
106  else
107  return 0;
108  }
109 
110  std::size_t maxLocalSize() const
111  {
113  }
114 
116  static constexpr QkDGBasisPolynomial polynomial()
117  {
119  }
120 
122  static constexpr std::size_t order()
123  {
124  return k;
125  }
126  };
127 
138  template<class D, class R, int k, int d>
139  class QkDGLocalFiniteElementMap<D,R,k,d,QkDGBasisPolynomial::lobatto>
140  : public Dune::PDELab::SimpleLocalFiniteElementMap< Dune::QkDGGLLocalFiniteElement<D,R,k,d> >
141  {
142  public:
143  bool fixedSize() const
144  {
145  return true;
146  }
147 
148  bool hasDOFs(int codim) const
149  {
150  return codim == 0;
151  }
152 
153  std::size_t size(GeometryType gt) const
154  {
155  if (gt == GeometryType(GeometryType::cube,d))
157  else
158  return 0;
159  }
160 
161  std::size_t maxLocalSize() const
162  {
164  }
165 
167  static constexpr QkDGBasisPolynomial polynomial()
168  {
170  }
171 
173  static constexpr std::size_t order()
174  {
175  return k;
176  }
177  };
178 
179 
196  template<class D, class R, int k, int d>
197  class QkDGLocalFiniteElementMap<D,R,k,d,QkDGBasisPolynomial::l2orthonormal>
198  : public OPBLocalFiniteElementMap<D,R,k,d,Dune::GeometryType::cube,
199 #if HAVE_GMP
200  Dune::GMPField<512>,
201 #else
202  R,
203 #endif
204  Dune::PB::BasisType::Qk>
205  {
206  public:
208  static constexpr QkDGBasisPolynomial polynomial()
209  {
211  }
212 
214  static constexpr std::size_t order()
215  {
216  return k;
217  }
218 
219  };
220 
221  }
222 }
223 
224 #endif // DUNE_PDELAB_FINITEELEMENTMAP_QKDG_HH
std::size_t size(GeometryType gt) const
Definition: qkdg.hh:153
Definition: qkdglagrange.hh:21
For backward compatibility – Do not use this!
Definition: adaptivity.hh:27
static constexpr QkDGBasisPolynomial polynomial()
return type of polynomial basis
Definition: qkdg.hh:65
static constexpr std::size_t order()
return order of polynomial basis
Definition: qkdg.hh:71
static constexpr std::size_t order()
return order of polynomial basis
Definition: qkdg.hh:122
static constexpr QkDGBasisPolynomial polynomial()
return type of polynomial basis
Definition: qkdg.hh:116
simple implementation where all entities have the same finite element
Definition: finiteelementmap.hh:95
Definition: qkdglegendre.hh:31
std::size_t size(GeometryType gt) const
Definition: qkdg.hh:51
std::size_t size(GeometryType gt) const
Definition: qkdg.hh:102
static constexpr std::size_t order()
return order of polynomial basis
Definition: qkdg.hh:214
static constexpr QkDGBasisPolynomial polynomial()
return type of polynomial basis
Definition: qkdg.hh:208
static constexpr QkDGBasisPolynomial polynomial()
return type of polynomial basis
Definition: qkdg.hh:167
QkDGBasisPolynomial
Switch between different basis for QkDGLocalFiniteElementMap.
Definition: qkdg.hh:18
static constexpr std::size_t order()
return order of polynomial basis
Definition: qkdg.hh:173