Dune Core Modules (unstable)

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// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
5#ifndef DUNE_HIERARCHICAL_P2_LOCALFINITEELEMENT_HH
6#define DUNE_HIERARCHICAL_P2_LOCALFINITEELEMENT_HH
7
9
10#include <dune/localfunctions/common/localfiniteelementtraits.hh>
11#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
12
14#include "hierarchicalp2/hierarchicalsimplexp2localinterpolation.hh"
15
16namespace Dune
17{
18
21 template<class D, class R, int dim>
23 {
24
25 static_assert(1 <= dim && dim <= 3,
26 "HierarchicalP2LocalFiniteElement only implemented for dim==1, 2, 3.");
27
28 public:
32 HierarchicalSimplexP2LocalBasis<D,R,dim>,
35
39 {}
40
43 const typename Traits::LocalBasisType& localBasis () const
44 {
45 return basis;
46 }
47
51 {
52 return coefficients;
53 }
54
58 {
59 return interpolation;
60 }
61
63 unsigned int size () const
64 {
65 return basis.size();
66 }
67
70 static constexpr GeometryType type ()
71 {
72 return GeometryTypes::simplex(dim);
73 }
74
75 private:
76 HierarchicalSimplexP2LocalBasis<D,R,dim> basis;
77
78 typename Traits::LocalCoefficientsType coefficients;
79
81 };
82
83}
84
85#endif
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:114
Definition: hierarchicalp2.hh:23
const Traits::LocalBasisType & localBasis() const
Definition: hierarchicalp2.hh:43
HierarchicalP2LocalFiniteElement()
Definition: hierarchicalp2.hh:38
unsigned int size() const
Number of shape functions in this finite element.
Definition: hierarchicalp2.hh:63
const Traits::LocalCoefficientsType & localCoefficients() const
Definition: hierarchicalp2.hh:50
LocalFiniteElementTraits< HierarchicalSimplexP2LocalBasis< D, R, dim >, typename LagrangeSimplexLocalFiniteElement< D, R, dim, 2 >::Traits::LocalCoefficientsType, HierarchicalSimplexP2LocalInterpolation< HierarchicalSimplexP2LocalBasis< D, R, dim > > > Traits
Definition: hierarchicalp2.hh:34
const Traits::LocalInterpolationType & localInterpolation() const
Definition: hierarchicalp2.hh:57
static constexpr GeometryType type()
Definition: hierarchicalp2.hh:70
Definition: hierarchicalsimplexp2localinterpolation.hh:17
constexpr GeometryType simplex(unsigned int dim)
Returns a GeometryType representing a simplex of dimension dim.
Definition: type.hh:453
Hierarchical p2 shape functions for the simplex.
Dune namespace.
Definition: alignedallocator.hh:13
traits helper struct
Definition: localfiniteelementtraits.hh:13
LB LocalBasisType
Definition: localfiniteelementtraits.hh:16
LC LocalCoefficientsType
Definition: localfiniteelementtraits.hh:20
LI LocalInterpolationType
Definition: localfiniteelementtraits.hh:24
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 (Nov 21, 23:30, 2024)