Debian Codegraph @

dune/localfunctions/lagrange/pq22d.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_DISABLE_DEPRECATION_WARNING_PQ22D
6 #warning This header is deprecated and will be removed after 2.11.
7 #endif
8
9 #ifndef DUNE_PQ22DLOCALFINITEELEMENT_HH
10 #define DUNE_PQ22DLOCALFINITEELEMENT_HH
11
12 #include <dune/common/fmatrix.hh>
13
14 #include <dune/localfunctions/common/localfiniteelementvariant.hh>
15
16 #include <dune/localfunctions/lagrange/lagrangesimplex.hh>
17 #include <dune/localfunctions/lagrange/lagrangecube.hh>
18
19 namespace Dune
20 {
21 template<class D, class R>
22 class
23 [[deprecated("Use LocalFiniteElementVariant or the virtual interface directly. This will be removed after release 2.11.")]]
24 PQ22DLocalFiniteElement
25 {
26 using LFEVariant = LocalFiniteElementVariant<LagrangeSimplexLocalFiniteElement<D,R,2,2>,
27 LagrangeCubeLocalFiniteElement<D,R,2,2> >;
28 public:
29 using Traits = typename LFEVariant::Traits;
30
31 PQ22DLocalFiniteElement ( const GeometryType &gt )
32 {
33 if ( gt.isTriangle() )
34 lfeVariant_ = LagrangeSimplexLocalFiniteElement<D,R,2,2>();
35 else if ( gt.isQuadrilateral() )
36 lfeVariant_ = LagrangeCubeLocalFiniteElement<D,R,2,2>();
37 }
38
39 PQ22DLocalFiniteElement ( const GeometryType &gt, const std::vector<unsigned int> vertexmap )
40 {
41 if ( gt.isTriangle() )
42 lfeVariant_ = LagrangeSimplexLocalFiniteElement<D,R,2,2>(vertexmap);
43 else if ( gt.isQuadrilateral() )
44 lfeVariant_ = LagrangeCubeLocalFiniteElement<D,R,2,2>();
45 }
46
47 const typename Traits::LocalBasisType& localBasis () const
48 {
49 return lfeVariant_.localBasis();
50 }
51
52 const typename Traits::LocalCoefficientsType& localCoefficients () const
53 {
54 return lfeVariant_.localCoefficients();
55 }
56
57 const typename Traits::LocalInterpolationType& localInterpolation () const
58 {
59 return lfeVariant_.localInterpolation();
60 }
61
62 /** \brief Number of shape functions in this finite element */
63 unsigned int size () const
64 {
65 return lfeVariant_.size();
66 }
67
68 GeometryType type () const
69 {
70 return lfeVariant_.type();
71 }
72
73 private:
74
75 LFEVariant lfeVariant_;
76 };
77
78 }
79
80 #endif