Dune Core Modules (2.8.0)

hierarchicalp2.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_HIERARCHICAL_P2_LOCALFINITEELEMENT_HH
4#define DUNE_HIERARCHICAL_P2_LOCALFINITEELEMENT_HH
5
7
8#include <dune/localfunctions/common/localfiniteelementtraits.hh>
9#include <dune/localfunctions/lagrange/pk.hh>
10
12#include "hierarchicalp2/hierarchicalsimplexp2localinterpolation.hh"
13
14namespace Dune
15{
16
19 template<class D, class R, int dim>
21 {
22
23 static_assert(1 <= dim && dim <= 3,
24 "HierarchicalP2LocalFiniteElement only implemented for dim==1, 2, 3.");
25
26 public:
30 HierarchicalSimplexP2LocalBasis<D,R,dim>,
33
37 {}
38
41 const typename Traits::LocalBasisType& localBasis () const
42 {
43 return basis;
44 }
45
49 {
50 return coefficients;
51 }
52
56 {
57 return interpolation;
58 }
59
61 unsigned int size () const
62 {
63 return basis.size();
64 }
65
68 static constexpr GeometryType type ()
69 {
70 return GeometryTypes::simplex(dim);
71 }
72
73 private:
74 HierarchicalSimplexP2LocalBasis<D,R,dim> basis;
75
76 typename Traits::LocalCoefficientsType coefficients;
77
79 };
80
81}
82
83#endif
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:123
Definition: hierarchicalp2.hh:21
const Traits::LocalBasisType & localBasis() const
Definition: hierarchicalp2.hh:41
HierarchicalP2LocalFiniteElement()
Definition: hierarchicalp2.hh:36
unsigned int size() const
Number of shape functions in this finite element.
Definition: hierarchicalp2.hh:61
const Traits::LocalCoefficientsType & localCoefficients() const
Definition: hierarchicalp2.hh:48
LocalFiniteElementTraits< HierarchicalSimplexP2LocalBasis< D, R, dim >, typename PkLocalFiniteElement< D, R, dim, 2 >::Traits::LocalCoefficientsType, HierarchicalSimplexP2LocalInterpolation< HierarchicalSimplexP2LocalBasis< D, R, dim > > > Traits
Definition: hierarchicalp2.hh:32
const Traits::LocalInterpolationType & localInterpolation() const
Definition: hierarchicalp2.hh:55
static constexpr GeometryType type()
Definition: hierarchicalp2.hh:68
Definition: hierarchicalsimplexp2localinterpolation.hh:16
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition: lagrangesimplex.hh:836
constexpr GeometryType simplex(unsigned int dim)
Returns a GeometryType representing a simplex of dimension dim.
Definition: type.hh:461
Hierarchical p2 shape functions for the simplex.
Dune namespace.
Definition: alignedallocator.hh:11
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 22, 23:30, 2024)