DUNE PDELab (git)

interface.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 © DUNE Project contributors, see file LICENSE.md in module root
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
5
6#ifndef DUNE_LOCALFUNCTIONS_INTERFACE_HH
7#define DUNE_LOCALFUNCTIONS_INTERFACE_HH
8
9#ifndef HEADERCHECK
10#error This header exists for documentation purposes only and should never be included directly.
11#endif
12
13#include <array>
14#include <cstddef>
15#include <vector>
16
17
18#include <dune/geometry/type.hh>
19
20#include <dune/localfunctions/common/localkey.hh>
21
22namespace Dune {
23
26 {
28
29 public:
31
34 struct Traits
35 {
37
44
51
57 };
58
60
70
72
76 const Traits::Basis& basis() const;
78
84
91 };
92
94
114 template<class Geometry, class VertexOrder>
116 {
118
119 public:
121
127
129
133
154
156 const FiniteElement make(const Geometry&, const VertexOrder&, ...);
158 const FiniteElement make(const Geometry&, ...);
160 const FiniteElement make(const VertexOrder&, ...);
162
166 const FiniteElement make(const GeometryType&, ...);
168 const FiniteElement make(...);
169
171
172 };
173
176 {
178 constexpr static int implementationDefined = 42;
179
180 public:
182
187 struct Traits
188 {
191
194
196 constexpr static int dimDomain = implementationDefined;
197
200
202
205
208
210 constexpr static int dimRange = implementationDefined;
211
214
216
218
223 };
224
226 std::size_t size () const;
228 std::size_t order () const;
229
232 std::vector<Traits::RangeType>& out) const;
233
236 std::vector<Traits::Jacobian>& out) const;
237
243 void partial(const std::array<unsigned int,Traits::dimDomain>& order,
244 const typename Traits::DomainType& in,
245 std::vector<typename Traits::RangeType>& out) const;
246 };
247
250 {
252
256
258
267 template<typename F, typename C>
268 void interpolate (const F& f, std::vector<C>& out) const;
269 };
270
272
278 {
280 std::size_t size() const;
281
283 const LocalKey& localKey(std::size_t i) const;
284 };
285}
286#endif // DUNE_LOCALFUNCTIONS_INTERFACE_HH
Interface for global-valued shape functions.
Definition: interface.hh:176
void partial(const std::array< unsigned int, Traits::dimDomain > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of any order of all shape functions.
void evaluateFunction(const Traits::DomainType &in, std::vector< Traits::RangeType > &out) const
Evaluate all shape functions at given position.
std::size_t order() const
Polynomial order of the shape functions for quadrature.
void evaluateJacobian(const Traits::DomainType &in, std::vector< Traits::Jacobian > &out) const
Evaluate Jacobian of all shape functions at given position.
std::size_t size() const
Number of shape functions.
Factory interface for global-valued finite elements.
Definition: interface.hh:116
const FiniteElement make(const VertexOrder &,...)
create a finite element from a vertex ordering
const FiniteElement make(...)
create a finite element
const FiniteElement make(const GeometryType &,...)
create a finite element from a geometry type
FiniteElementFactoryInterface(...)
Construct a finite element factory.
ImplementationDefined FiniteElement
Type of the finite element.
Definition: interface.hh:126
const FiniteElement make(const Geometry &, const VertexOrder &,...)
create a finite element from a geometry and a vertex ordering
const FiniteElement make(const Geometry &,...)
create a finite element from a geometry
Interface for global-valued finite elements.
Definition: interface.hh:26
GeometryType type() const
Extract geometry type of this finite element.
const Traits::Basis & basis() const
Extract basis of this finite element.
const Traits::Coefficients & coefficients() const
Extract coefficients of this finite element.
const Traits::Interpolation & interpolation() const
Extract interpolation of this finite element.
FiniteElementInterface(const FiniteElementInterface &)
Finite elements are CopyConstructible.
FiniteElementInterface(...)
Construct a finite element.
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:114
Wrapper class for geometries.
Definition: geometry.hh:71
Describe position of one degree of freedom.
Definition: localkey.hh:24
@ implementationDefined
Dummy integral value used for documentation purposes.
Definition: documentation.hh:55
Dune namespace.
Definition: alignedallocator.hh:13
types of domain and range
Definition: interface.hh:188
static constexpr int dimRange
dimension of the range
Definition: interface.hh:210
ImplementationDefined Jacobian
Jacobian properties.
Definition: interface.hh:222
ImplementationDefined DomainType
Type used for coordinate vectors in the domain.
Definition: interface.hh:199
ImplementationDefined RangeFieldType
Field type of the range.
Definition: interface.hh:207
ImplementationDefined DomainFieldType
Field type of the domain.
Definition: interface.hh:193
ImplementationDefined RangeType
Type used for range values.
Definition: interface.hh:213
static constexpr int dimDomain
dimension of the domain
Definition: interface.hh:196
Interface for global-valued coefficients.
Definition: interface.hh:278
const LocalKey & localKey(std::size_t i) const
get i'th index
std::size_t size() const
number of coefficients
types of component objects
Definition: interface.hh:35
ImplementationDefined Basis
type of the Basis
Definition: interface.hh:42
ImplementationDefined Coefficients
type of the Coefficients
Definition: interface.hh:49
ImplementationDefined Interpolation
type of the Interpolation
Definition: interface.hh:56
Dummy struct used for documentation purposes.
Definition: documentation.hh:42
Interface for global-valued interpolation.
Definition: interface.hh:250
BasisInterface::Traits Traits
Export basis traits.
Definition: interface.hh:255
void interpolate(const F &f, std::vector< C > &out) const
Determine coefficients interpolating a given function.
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 (Jul 15, 22:36, 2024)