dune-localfunctions  2.7.1
refinedp1.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_LOCALFUNCTIONS_REFINED_REFINEDP1_HH
4 #define DUNE_LOCALFUNCTIONS_REFINED_REFINEDP1_HH
5 
6 #include <dune/geometry/type.hh>
7 
10 
13 
14 namespace Dune
15 {
16 
23  template<class D, class R, int dim>
25  {
26  public:
30  Impl::LagrangeSimplexLocalCoefficients<dim,2>,
31  Impl::LagrangeSimplexLocalInterpolation<Impl::LagrangeSimplexLocalBasis<D,R,dim,2> > > Traits;
32 
36  {}
37 
40  const typename Traits::LocalBasisType& localBasis () const
41  {
42  return basis_;
43  }
44 
48  {
49  return coefficients_;
50  }
51 
55  {
56  return interpolation_;
57  }
58 
60  unsigned int size () const
61  {
62  return basis_.size();
63  }
64 
67  static constexpr GeometryType type ()
68  {
69  return GeometryTypes::simplex(dim);
70  }
71 
72  private:
74  Impl::LagrangeSimplexLocalCoefficients<dim,2> coefficients_;
75  // Yes, the template argument here really is LagrangeSimplexLocalBasis, even though this is not
76  // the local basis of the refined locale finite element: The reason is that LagrangeSimplexLocalInterpolation
77  // uses this argument to determine the polynomial order, and RefinedP1LocalBasis returns order 1
78  // whereas order 2 is needed here.
79  Impl::LagrangeSimplexLocalInterpolation<Impl::LagrangeSimplexLocalBasis<D,R,dim,2> > interpolation_;
80  };
81 
82 }
83 
84 #endif // DUNE_LOCALFUNCTIONS_REFINED_REFINEDP1_HH
Linear Lagrange shape functions on a uniformly refined reference element.
Definition: bdfmcube.hh:16
traits helper struct
Definition: localfiniteelementtraits.hh:11
LB LocalBasisType
Definition: localfiniteelementtraits.hh:14
LC LocalCoefficientsType
Definition: localfiniteelementtraits.hh:18
LI LocalInterpolationType
Definition: localfiniteelementtraits.hh:22
Definition: refinedp1localbasis.hh:21
Piecewise linear continuous Lagrange functions on a uniformly refined simplex element.
Definition: refinedp1.hh:25
const Traits::LocalBasisType & localBasis() const
The set of shape functions.
Definition: refinedp1.hh:40
static constexpr GeometryType type()
The element type that this finite element is defined on.
Definition: refinedp1.hh:67
unsigned int size() const
Number of shape functions of this finite element.
Definition: refinedp1.hh:60
RefinedP1LocalFiniteElement()
Default constructor.
Definition: refinedp1.hh:35
LocalFiniteElementTraits< RefinedP1LocalBasis< D, R, dim >, Impl::LagrangeSimplexLocalCoefficients< dim, 2 >, Impl::LagrangeSimplexLocalInterpolation< Impl::LagrangeSimplexLocalBasis< D, R, dim, 2 > > > Traits
Export all types used by this implementation.
Definition: refinedp1.hh:31
const Traits::LocalInterpolationType & localInterpolation() const
Evaluates all degrees of freedom for a given function.
Definition: refinedp1.hh:54
const Traits::LocalCoefficientsType & localCoefficients() const
Produces the assignments of the degrees of freedom to the element subentities.
Definition: refinedp1.hh:47