Debian Codegraph @

dune/localfunctions/dualmortarbasis/dualp1.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_DUALMORTARBASIS_DUALP1_HH
6 #define DUNE_LOCALFUNCTIONS_DUALMORTARBASIS_DUALP1_HH
7
8 #include <dune/geometry/type.hh>
9
10 #include <dune/localfunctions/common/localfiniteelementtraits.hh>
11 #include "dualp1/dualp1localbasis.hh"
12 #include "dualp1/dualp1localcoefficients.hh"
13 #include "dualp1/dualp1localinterpolation.hh"
14
15 namespace Dune
16 {
17
18 /**
19 * \brief The local dual p1 finite element on simplices
20 *
21 * Note that if the dual functions are chosen to be dual on the faces,
22 * the integrated product of a Lagrange \f$\lambda_p\f$ and dual
23 * function \f$\theta_q\f$ over faces not containing \f$q\f$ does in
24 * general not vanish.
25 *
26 * \ingroup DualMortar
27 *
28 * \tparam D Domain data type
29 * \tparam R Range data type
30 * \tparam dim Dimension of the simplex
31 * \tparam faceDual If set, the basis functions are bi-orthogonal only on faces containing the corresponding vertex.
32 */
33 template<class D, class R, int dim, bool faceDual=false>
34 class DualP1LocalFiniteElement
35 {
36 public:
37 /** \todo Please doc me !
38 */
39 typedef LocalFiniteElementTraits<DualP1LocalBasis<D,R,dim,faceDual>,DualP1LocalCoefficients<dim>,
40 DualP1LocalInterpolation<dim,DualP1LocalBasis<D,R,dim,faceDual> > > Traits;
41
42 /** \todo Please doc me !
43 */
44 DualP1LocalFiniteElement ()
45 {}
46
47 /** \todo Please doc me !
48 */
49 const typename Traits::LocalBasisType& localBasis () const
50 {
51 return basis;
52 }
53
54 /** \todo Please doc me !
55 */
56 const typename Traits::LocalCoefficientsType& localCoefficients () const
57 {
58 return coefficients;
59 }
60
61 /** \todo Please doc me !
62 */
63 const typename Traits::LocalInterpolationType& localInterpolation () const
64 {
65 return interpolation;
66 }
67
68 /** \brief Number of shape functions in this finite element */
69 unsigned int size () const
70 {
71 return basis.size();
72 }
73
74 /** \todo Please doc me !
75 */
76 static constexpr GeometryType type ()
77 {
78 return GeometryTypes::simplex(dim);
79 }
80
81 private:
82 DualP1LocalBasis<D,R,dim,faceDual> basis;
83 DualP1LocalCoefficients<dim> coefficients;
84 DualP1LocalInterpolation<dim,DualP1LocalBasis<D,R,dim,faceDual> > interpolation;
85 };
86
87
88
89 }
90
91 #endif