dune-localfunctions  2.3beta2
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 
40  {}
41 
44  const typename Traits::LocalBasisType& localBasis () const
45  {
46  return basis;
47  }
48 
52  {
53  return coefficients;
54  }
55 
59  {
60  return interpolation;
61  }
62 
65  GeometryType type () const
66  {
67  return gt;
68  }
69 
71  {
72  return new Q1LocalFiniteElement(*this);
73  }
74 
75  private:
77  Q1LocalCoefficients<dim> coefficients;
79  GeometryType gt;
80  };
81 
83 
88  template<class Geometry, class RF>
91  Q1LocalFiniteElement<
92  typename Geometry::ctype, RF, Geometry::mydimension
93  >,
94  Geometry
95  >
96  {
97  typedef Q1LocalFiniteElement<
98  typename Geometry::ctype, RF, Geometry::mydimension
99  > LFE;
101 
102  static const LFE lfe;
103 
104  public:
107  };
108 
109  template<class Geometry, class RF>
110  const typename Q1FiniteElementFactory<Geometry, RF>::LFE
111  Q1FiniteElementFactory<Geometry, RF>::lfe;
112 }
113 
114 #endif