DUNE PDELab (2.8)

refinedp1.hh
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
7
8#include <dune/localfunctions/common/localfiniteelementtraits.hh>
9#include <dune/localfunctions/lagrange/p0.hh>
10
11#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
13
14namespace 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:
73 RefinedP1LocalBasis<D,R,dim> basis_;
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
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:123
Piecewise linear continuous Lagrange functions on a uniformly refined simplex element.
Definition: refinedp1.hh:25
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
const Traits::LocalInterpolationType & localInterpolation() const
Evaluates all degrees of freedom for a given function.
Definition: refinedp1.hh:54
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::LocalCoefficientsType & localCoefficients() const
Produces the assignments of the degrees of freedom to the element subentities.
Definition: refinedp1.hh:47
const Traits::LocalBasisType & localBasis() const
The set of shape functions.
Definition: refinedp1.hh:40
constexpr GeometryType simplex(unsigned int dim)
Returns a GeometryType representing a simplex of dimension dim.
Definition: type.hh:461
Dune namespace.
Definition: alignedallocator.hh:11
Linear Lagrange shape functions on a uniformly refined reference element.
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
A unique label for each type of element that can occur in a grid.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 21, 23:30, 2024)