dune-localfunctions  2.2.1
q1.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_Q1_LOCALFINITEELEMENT_HH
5 #define DUNE_Q1_LOCALFINITEELEMENT_HH
6 
7 #include <dune/geometry/type.hh>
8 
14 
15 namespace Dune
16 {
17 
23  template<class D, class R, int dim>
25  {
26  public:
31 
35  {
36  gt.makeCube(dim);
37  }
38 
41  const typename Traits::LocalBasisType& localBasis () const
42  {
43  return basis;
44  }
45 
49  {
50  return coefficients;
51  }
52 
56  {
57  return interpolation;
58  }
59 
62  GeometryType type () const
63  {
64  return gt;
65  }
66 
68  {
69  return new Q1LocalFiniteElement(*this);
70  }
71 
72  private:
74  Q1LocalCoefficients<dim> coefficients;
76  GeometryType gt;
77  };
78 
80 
85  template<class Geometry, class RF>
88  Q1LocalFiniteElement<
89  typename Geometry::ctype, RF, Geometry::mydimension
90  >,
91  Geometry
92  >
93  {
94  typedef Q1LocalFiniteElement<
95  typename Geometry::ctype, RF, Geometry::mydimension
96  > LFE;
98 
99  static const LFE lfe;
100 
101  public:
104  };
105 
106  template<class Geometry, class RF>
107  const typename Q1FiniteElementFactory<Geometry, RF>::LFE
108  Q1FiniteElementFactory<Geometry, RF>::lfe;
109 }
110 
111 #endif