dune-localfunctions  2.2.1
hierarchicalp2.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil -*-
2 // vi: set ts=4 sw=2 et sts=2:
3 #ifndef DUNE_HIERARCHICAL_P2_LOCALFINITEELEMENT_HH
4 #define DUNE_HIERARCHICAL_P2_LOCALFINITEELEMENT_HH
5 
6 #include <dune/geometry/type.hh>
7 
11 
14 
15 namespace Dune
16 {
17 
20  template<class D, class R, int dim>
22  {
23 
24  dune_static_assert(dim==2 || dim==3, "HierarchicalP2LocalFiniteElement only implemented for dim==2, 3.");
25 
26  public:
30  typename Dune::SelectType<dim==2, Pk2DLocalCoefficients<2>, Pk3DLocalCoefficients<2> >::Type,
32 
36  {
37  gt.makeTriangle();
38  }
39 
42  const typename Traits::LocalBasisType& localBasis () const
43  {
44  return basis;
45  }
46 
50  {
51  return coefficients;
52  }
53 
57  {
58  return interpolation;
59  }
60 
63  GeometryType type () const
64  {
65  return gt;
66  }
67 
69  {
70  return new HierarchicalP2LocalFiniteElement(*this);
71  }
72 
73  private:
75 
77  typename Dune::SelectType<dim==2, Pk2DLocalCoefficients<2>, Pk3DLocalCoefficients<2> >::Type coefficients;
78 
80  GeometryType gt;
81  };
82 
83 }
84 
85 #endif