dune-localfunctions  2.2.1
edges0.5.hh
Go to the documentation of this file.
1 // -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set ts=8 sw=2 et sts=2:
3 
4 #ifndef DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_HH
5 #define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_HH
6 
7 #include <dune/geometry/type.hh>
8 
12 
13 namespace Dune {
14 
16  //
17  // FiniteElement
18  //
19 
21 
37  template<class Geometry, class RF>
39  public:
43  struct Traits {
45  typedef EdgeS0_5Interpolation<Geometry,
46  typename Basis::Traits> Interpolation;
48  };
49 
50  private:
51  typename Traits::Basis basis_;
52  typename Traits::Interpolation interpolation_;
53  static const typename Traits::Coefficients& coefficients_;
54  static const GeometryType gt;
55 
56  public:
58 
61  template<class VertexOrder>
62  EdgeS0_5FiniteElement(const Geometry& geo,
63  const VertexOrder& vertexOrder) :
64  basis_(geo, vertexOrder), interpolation_(geo, vertexOrder)
65  { }
66 
68  const typename Traits::Basis& basis() const { return basis_; }
70  const typename Traits::Interpolation& interpolation() const
71  { return interpolation_; }
73  const typename Traits::Coefficients& coefficients() const
74  { return coefficients_; }
76  const GeometryType& type() const { return gt; }
77  };
78 
79  template<class Geometry, class RF>
81  EdgeS0_5FiniteElement<Geometry, RF>::coefficients_ =
82  typename Traits::Coefficients();
83 
84  template<class Geometry, class RF>
85  const GeometryType
86  EdgeS0_5FiniteElement<Geometry, RF>::gt(GeometryType::simplex,
87  Geometry::mydimension);
88 
90  //
91  // Factory
92  //
93 
95 
104  template<class Geometry, class RF>
107 
109 
123  template<class VertexOrder>
124  const FiniteElement make(const Geometry& geometry,
125  const VertexOrder& vertexOrder)
126  { return FiniteElement(geometry, vertexOrder); }
127  };
128 
129 } // namespace Dune
130 
131 #endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_HH