dune-localfunctions  2.4.1-rc2
p0.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 #ifndef DUNE_P0LOCALFINITEELEMENT_HH
4 #define DUNE_P0LOCALFINITEELEMENT_HH
5 
6 #include <dune/geometry/type.hh>
7 
9 #include "p0/p0localbasis.hh"
12 
13 namespace Dune
14 {
15 
21  template<class D, class R, int d>
23  {
24  public:
29 
32  P0LocalFiniteElement (const GeometryType& type)
33  : interpolation(type), gt(type)
34  {}
35 
38  const typename Traits::LocalBasisType& localBasis () const
39  {
40  return basis;
41  }
42 
46  {
47  return coefficients;
48  }
49 
53  {
54  return interpolation;
55  }
56 
58  unsigned int size () const
59  {
60  return 1;
61  }
62 
65  GeometryType type () const
66  {
67  return gt;
68  }
69 
71  {
72  return new P0LocalFiniteElement(*this);
73  }
74 
75  private:
76  P0LocalBasis<D,R,d> basis;
77  P0LocalCoefficients coefficients;
79  GeometryType gt;
80  };
81 
82 }
83 
84 #endif
const Traits::LocalInterpolationType & localInterpolation() const
Definition: p0.hh:52
LocalFiniteElementTraits< P0LocalBasis< D, R, d >, P0LocalCoefficients, P0LocalInterpolation< P0LocalBasis< D, R, d > > > Traits
Definition: p0.hh:28
Layout map for P0 elements.
Definition: p0localcoefficients.hh:21
const Traits::LocalBasisType & localBasis() const
Definition: p0.hh:38
Constant shape function.
Definition: p0localbasis.hh:25
Definition: p0localinterpolation.hh:14
P0LocalFiniteElement(const GeometryType &type)
Definition: p0.hh:32
P0LocalFiniteElement * clone() const
Definition: p0.hh:70
traits helper struct
Definition: localfiniteelementtraits.hh:10
LI LocalInterpolationType
Definition: localfiniteelementtraits.hh:22
LC LocalCoefficientsType
Definition: localfiniteelementtraits.hh:18
GeometryType type() const
Definition: p0.hh:65
unsigned int size() const
The number of shape functions – here: 1.
Definition: p0.hh:58
const Traits::LocalCoefficientsType & localCoefficients() const
Definition: p0.hh:45
LB LocalBasisType
Definition: localfiniteelementtraits.hh:14
The local p0 finite element on all types of reference elements.
Definition: p0.hh:22