Dune Core Modules (2.9.0)

pk2d.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 (C) 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_PK2DLOCALFINITEELEMENT_HH
6#define DUNE_PK2DLOCALFINITEELEMENT_HH
7
8#include <cstddef>
9
10#include <dune/geometry/type.hh>
11
12#include <dune/localfunctions/common/localfiniteelementtraits.hh>
13#include <dune/localfunctions/common/localtoglobaladaptors.hh>
14#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
15
16#warning This header is deprecated
17
18namespace Dune
19{
20
25 template<class D, class R, unsigned int k>
27 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]]
29
30
32
39 template<class Geometry, class RF, std::size_t k>
41 typedef typename Geometry::ctype DF;
42 typedef Impl::LagrangeSimplexLocalBasis<DF,RF,2,k> LocalBasis;
43 typedef Impl::LagrangeSimplexLocalInterpolation<LocalBasis> LocalInterpolation;
44
45 public:
49 struct Traits {
52 LocalInterpolation,
53 typename Basis::Traits
54 > Interpolation;
55 typedef Impl::LagrangeSimplexLocalCoefficients<2,k> Coefficients;
56 };
57
58 private:
59 static const GeometryType gt;
60 static const LocalBasis localBasis;
61 static const LocalInterpolation localInterpolation;
62
63 typename Traits::Basis basis_;
64 typename Traits::Interpolation interpolation_;
65 typename Traits::Coefficients coefficients_;
66
67 public:
69
82 template<class VertexOrder>
83 Pk2DFiniteElement(const Geometry &geometry,
84 const VertexOrder& vertexOrder) :
85 basis_(localBasis, geometry), interpolation_(localInterpolation),
86 coefficients_(vertexOrder.begin(0, 0))
87 { }
88
89 const typename Traits::Basis& basis() const { return basis_; }
90 const typename Traits::Interpolation& interpolation() const
91 { return interpolation_; }
92 const typename Traits::Coefficients& coefficients() const
93 { return coefficients_; }
94 const GeometryType &type() const { return gt; }
95 };
96
97 template<class Geometry, class RF, std::size_t k>
98 const GeometryType
99 Pk2DFiniteElement<Geometry, RF, k>::gt(GeometryTypes::simplex(2));
100
101 template<class Geometry, class RF, std::size_t k>
102 const typename Pk2DFiniteElement<Geometry, RF, k>::LocalBasis
103 Pk2DFiniteElement<Geometry, RF, k>::localBasis = LocalBasis();
104
105 template<class Geometry, class RF, std::size_t k>
106 const typename Pk2DFiniteElement<Geometry, RF, k>::LocalInterpolation
107 Pk2DFiniteElement<Geometry, RF, k>::localInterpolation =
108 LocalInterpolation();
109
111
121 template<class Geometry, class RF, std::size_t k>
124
126
140 template<class VertexOrder>
141 const FiniteElement make(const Geometry& geometry,
142 const VertexOrder& vertexOrder)
143 { return FiniteElement(geometry, vertexOrder); }
144 };
145}
146
147#endif
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:125
Wrapper class for geometries.
Definition: geometry.hh:71
GridImp::ctype ctype
define type used for coordinates in grid module
Definition: geometry.hh:100
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition: lagrangesimplex.hh:838
Convert a local interpolation into a global interpolation.
Definition: localtoglobaladaptors.hh:149
Langrange finite element of arbitrary order on triangles.
Definition: pk2d.hh:40
Pk2DFiniteElement(const Geometry &geometry, const VertexOrder &vertexOrder)
construct a Pk2DFiniteElement
Definition: pk2d.hh:83
Convert a simple scalar local basis into a global basis.
Definition: localtoglobaladaptors.hh:65
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:132
bool gt(const T &first, const T &second, typename EpsilonType< T >::Type epsilon)
test if first greater than second
Definition: float_cmp.cc:158
constexpr GeometryType simplex(unsigned int dim)
Returns a GeometryType representing a simplex of dimension dim.
Definition: type.hh:463
Dune namespace.
Definition: alignedallocator.hh:13
Dummy struct used for documentation purposes.
Definition: documentation.hh:42
Factory for Pk2DFiniteElement objects.
Definition: pk2d.hh:122
const FiniteElement make(const Geometry &geometry, const VertexOrder &vertexOrder)
construct Pk2DFiniteElementFactory
Definition: pk2d.hh:141
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 (Dec 21, 23:30, 2024)