Debian Codegraph @

dune/localfunctions/rannacherturek/rannacherturek.hh

raw symbols SCIP
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_RANNACHER_TUREK_LOCALFINITEELEMENT_HH
6 #define DUNE_RANNACHER_TUREK_LOCALFINITEELEMENT_HH
7
8 #include <dune/geometry/type.hh>
9
10 #include <dune/localfunctions/common/localfiniteelementtraits.hh>
11
12 #include "rannachertureklocalbasis.hh"
13 #include "rannachertureklocalcoefficients.hh"
14 #include "rannachertureklocalinterpolation.hh"
15
16 namespace Dune
17 {
18
19 /**
20 * \brief Rannacher-Turek shape functions.
21 *
22 * \ingroup RannacherTurek
23 *
24 * \tparam D type to represent the field in the domain.
25 * \tparam R type to represent the field in the range.
26 * \tparam d domain dimension
27 */
28 template< class D, class R, unsigned int d >
29 struct RannacherTurekLocalFiniteElement
30 {
31 //! \brief export traits class
32 typedef LocalFiniteElementTraits< RannacherTurekLocalBasis< D, R, d >,
33 RannacherTurekLocalCoefficients< d >,
34 RannacherTurekLocalInterpolation< D, R, d >
35 > Traits;
36
37 //! \brief return local basis
38 const typename Traits::LocalBasisType &localBasis () const
39 {
40 return localBasis_;
41 }
42
43 //! \brief return local coefficients
44 const typename Traits::LocalCoefficientsType &localCoefficients () const
45 {
46 return localCoefficients_;
47 }
48
49 //! \brief return local interpolation
50 const typename Traits::LocalInterpolationType &localInterpolation () const
51 {
52 return localInterpolation_;
53 }
54
55 /** \brief Number of shape functions in this finite element */
56 unsigned int size () const
57 {
58 return localBasis_.size();
59 }
60
61 //! \brief return geometry type
62 GeometryType type () const
63 {
64 return GeometryTypes::cube(d);
65 }
66
67 private:
68 typename Traits::LocalBasisType localBasis_;
69 typename Traits::LocalCoefficientsType localCoefficients_;
70 typename Traits::LocalInterpolationType localInterpolation_;
71 };
72
73 } // namespace Dune
74
75 #endif // #ifndef DUNE_RANNACHER_TUREK_LOCALFINITEELEMENT_HH