dune-localfunctions  2.2.0
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 <cstddef>
8 // #include <vector>
9 
10 // #include <dune/common/fmatrix.hh>
11 // #include <dune/common/fvector.hh>
12 #include <dune/geometry/type.hh>
13 
14 // #include <dune/grid/common/referenceelements.hh>
15 
16 // #include <dune/localfunctions/common/localkey.hh>
17 // #include <dune/localfunctions/common/localtoglobaladaptors.hh>
18 // #include <dune/localfunctions/lagrange/p1/p1localbasis.hh>
22 
23 namespace Dune {
24 
26  //
27  // FiniteElement
28  //
29 
31 
47  template<class Geometry, class RF>
49  public:
53  struct Traits {
55  typedef EdgeS0_5Interpolation<Geometry,
56  typename Basis::Traits> Interpolation;
58  };
59 
60  private:
61  typename Traits::Basis basis_;
62  typename Traits::Interpolation interpolation_;
63  static const typename Traits::Coefficients& coefficients_;
64  static const GeometryType gt;
65 
66  public:
68 
71  template<class VertexOrder>
72  EdgeS0_5FiniteElement(const Geometry& geo,
73  const VertexOrder& vertexOrder) :
74  basis_(geo, vertexOrder), interpolation_(geo, vertexOrder)
75  { }
76 
78  const typename Traits::Basis& basis() const { return basis_; }
80  const typename Traits::Interpolation& interpolation() const
81  { return interpolation_; }
83  const typename Traits::Coefficients& coefficients() const
84  { return coefficients_; }
86  const GeometryType& type() const { return gt; }
87  };
88 
89  template<class Geometry, class RF>
91  EdgeS0_5FiniteElement<Geometry, RF>::coefficients_ =
92  typename Traits::Coefficients();
93 
94  template<class Geometry, class RF>
95  const GeometryType
96  EdgeS0_5FiniteElement<Geometry, RF>::gt(GeometryType::simplex,
97  Geometry::mydimension);
98 
100  //
101  // Factory
102  //
103 
105 
114  template<class Geometry, class RF>
117 
119 
133  template<class VertexOrder>
134  const FiniteElement make(const Geometry& geometry,
135  const VertexOrder& vertexOrder)
136  { return FiniteElement(geometry, vertexOrder); }
137  };
138 
139 } // namespace Dune
140 
141 #endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_HH