dune-localfunctions  2.2.1
refinedp1.hh
Go to the documentation of this file.
1 // -*- tab-width: 8; indent-tabs-mode: nil -*-
2 // vi: set ts=8 sw=2 et sts=2:
3 #ifndef DUNE_REFINED_P1_LOCALFINITEELEMENT_HH
4 #define DUNE_REFINED_P1_LOCALFINITEELEMENT_HH
5 
6 #include <dune/geometry/type.hh>
7 
10 
21 
22 namespace Dune
23 {
24 
27  template<class D, class R, int dim>
29  {
30  public:
36 
40  {
41  gt.makeLine();
42  }
43 
46  const typename Traits::LocalBasisType& localBasis () const
47  {
48  return basis;
49  }
50 
54  {
55  return coefficients;
56  }
57 
61  {
62  return interpolation;
63  }
64 
67  GeometryType type () const
68  {
69  return gt;
70  }
71 
73  {
74  return new RefinedP1LocalFiniteElement(*this);
75  }
76 
77  private:
79  Pk1DLocalCoefficients<2> coefficients;
81  GeometryType gt;
82  };
83 
84 
85 
88  template<class D, class R>
90  {
91  public:
97 
101  {
102  gt.makeTriangle();
103  }
104 
107  const typename Traits::LocalBasisType& localBasis () const
108  {
109  return basis;
110  }
111 
115  {
116  return coefficients;
117  }
118 
122  {
123  return interpolation;
124  }
125 
128  GeometryType type () const
129  {
130  return gt;
131  }
132 
134  {
135  return new RefinedP1LocalFiniteElement(*this);
136  }
137 
138  private:
140  Pk2DLocalCoefficients<2> coefficients;
142  GeometryType gt;
143  };
144 
147  template<class D, class R>
149  {
150  public:
156 
160  {
161  gt.makeTetrahedron();
162  }
163 
166  const typename Traits::LocalBasisType& localBasis () const
167  {
168  return basis;
169  }
170 
174  {
175  return coefficients;
176  }
177 
181  {
182  return interpolation;
183  }
184 
187  GeometryType type () const
188  {
189  return gt;
190  }
191 
193  {
194  return new RefinedP1LocalFiniteElement(*this);
195  }
196 
197  private:
199  Pk3DLocalCoefficients<2> coefficients;
201  GeometryType gt;
202  };
203 
204 }
205 
206 #endif