Debian Codegraph @

dune/localfunctions/raviartthomas/raviartthomas0pyramid.hh

raw
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_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH
6 #define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH
7
8 #include <dune/geometry/type.hh>
9
10 #include "../common/localfiniteelementtraits.hh"
11 #include "raviartthomas0pyramid/raviartthomas0pyramidlocalbasis.hh"
12 #include "raviartthomas0pyramid/raviartthomas0pyramidlocalcoefficients.hh"
13 #include "raviartthomas0pyramid/raviartthomas0pyramidlocalinterpolation.hh"
14
15 namespace Dune
16 {
17 /**
18 * \brief First order Raviart-Thomas shape functions on pyramids.
19 *
20 * This implements the composite element proposed by Ainsworth/Fu in
21 * "A lowest-order composite finite element exact sequence on pyramids"
22 * Computer Methods in Applied Mechanics and Engineering,
23 * Volume 324, 1 September 2017, Pages 110-127.
24 * https://arxiv.org/abs/1705.00064
25 *
26 * Notice that this is a composite element with a discontinuity across
27 * the plane with x[0]==x[1]. It contains on DOF per face and one internal
28 * DOF located at the center of the intersections of the two sub-elements.
29 *
30 * \ingroup RaviartThomas
31 *
32 * \tparam D Type to represent the field in the domain.
33 * \tparam R Type to represent the field in the range.
34 */
35 template<class D, class R>
36 class RT0PyramidLocalFiniteElement
37 {
38
39 public:
40 typedef LocalFiniteElementTraits<
41 RT0PyramidLocalBasis<D,R>,
42 RT0PyramidLocalCoefficients,
43 RT0PyramidLocalInterpolation<RT0PyramidLocalBasis<D,R> > > Traits;
44
45 //! \brief Standard constructor
46 RT0PyramidLocalFiniteElement ()
47 {}
48
49 /**
50 * \brief Make set number s, where 0 <= s < 32
51 *
52 * \param s Face orientation indicator
53 */
54 RT0PyramidLocalFiniteElement (int s) :
55 basis(s),
56 interpolation(s)
57 {}
58
59 const typename Traits::LocalBasisType& localBasis () const
60 {
61 return basis;
62 }
63
64 const typename Traits::LocalCoefficientsType& localCoefficients () const
65 {
66 return coefficients;
67 }
68
69 const typename Traits::LocalInterpolationType& localInterpolation () const
70 {
71 return interpolation;
72 }
73
74 /** \brief Number of shape functions in this finite element */
75 unsigned int size () const
76 {
77 return basis.size();
78 }
79
80 static constexpr GeometryType type ()
81 {
82 return GeometryTypes::pyramid;
83 }
84
85 private:
86 RT0PyramidLocalBasis<D,R> basis;
87 RT0PyramidLocalCoefficients coefficients;
88 RT0PyramidLocalInterpolation<RT0PyramidLocalBasis<D,R> > interpolation;
89 };
90 }
91 #endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH