dune-localfunctions  2.4.1-rc2
p1.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_P1LOCALFINITEELEMENT_HH
4 #define DUNE_P1LOCALFINITEELEMENT_HH
5 
6 #include <dune/geometry/type.hh>
7 
9 #include "p1/p1localbasis.hh"
12 
13 namespace Dune
14 {
15 
21  template<class D, class R, int dim>
23  {
24  public:
29 
33  {
34  gt.makeSimplex(dim);
35  }
36 
39  const typename Traits::LocalBasisType& localBasis () const
40  {
41  return basis;
42  }
43 
47  {
48  return coefficients;
49  }
50 
54  {
55  return interpolation;
56  }
57 
59  unsigned int size () const
60  {
61  return basis.size();
62  }
63 
66  GeometryType type () const
67  {
68  return gt;
69  }
70 
72  {
73  return new P1LocalFiniteElement(*this);
74  }
75 
76  private:
78  P1LocalCoefficients<dim> coefficients;
80  GeometryType gt;
81  };
82 
83 
84 
85 }
86 
87 #endif
const Traits::LocalCoefficientsType & localCoefficients() const
Definition: p1.hh:46
Definition: p1localinterpolation.hh:11
Local coefficients for simplex P1 elements.
Definition: p1localcoefficients.hh:21
The local p1 finite element on simplices.
Definition: p1.hh:22
Linear Lagrange shape functions on the simplex.
Definition: p1localbasis.hh:26
GeometryType type() const
Definition: p1.hh:66
P1LocalFiniteElement()
Definition: p1.hh:32
LocalFiniteElementTraits< P1LocalBasis< D, R, dim >, P1LocalCoefficients< dim >, P1LocalInterpolation< dim, P1LocalBasis< D, R, dim > > > Traits
Definition: p1.hh:28
P1LocalFiniteElement * clone() const
Definition: p1.hh:71
const Traits::LocalInterpolationType & localInterpolation() const
Definition: p1.hh:53
traits helper struct
Definition: localfiniteelementtraits.hh:10
LI LocalInterpolationType
Definition: localfiniteelementtraits.hh:22
LC LocalCoefficientsType
Definition: localfiniteelementtraits.hh:18
const Traits::LocalBasisType & localBasis() const
Definition: p1.hh:39
LB LocalBasisType
Definition: localfiniteelementtraits.hh:14
unsigned int size() const
Number of shape functions in this finite element.
Definition: p1.hh:59