dune-localfunctions  2.4.1
interface.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=4 sw=2 sts=2:
3 
4 #ifndef DUNE_LOCALFUNCTIONS_INTERFACE_HH
5 #define DUNE_LOCALFUNCTIONS_INTERFACE_HH
6 
7 #ifndef HEADERCHECK
8 #error This header exists for documentation purposes only and should never be included directly.
9 #endif
10 
11 #include <array>
12 #include <cstddef>
13 #include <vector>
14 
15 
16 #include <dune/geometry/type.hh>
17 
19 
20 namespace Dune {
21 
24  {
25  struct ImplementationDefined;
26 
27  public:
29 
32  struct Traits
33  {
35 
40  typedef ImplementationDefined Basis;
42 
47  typedef ImplementationDefined Coefficients;
49 
54  typedef ImplementationDefined Interpolation;
55  };
56 
58 
68 
70 
74  const Traits::Basis& basis() const;
76 
80  const Traits::Coefficients& coefficients() const;
82 
86  const Traits::Interpolation& interpolation() const;
88  GeometryType type() const;
89  };
90 
92 
112  template<class Geometry, class VertexOrder>
114  {
115  struct ImplementationDefined;
116 
117  public:
119 
124  typedef ImplementationDefined FiniteElement;
125 
127 
131 
151 
154  const FiniteElement make(const Geometry&, const VertexOrder&, ...);
156  const FiniteElement make(const Geometry&, ...);
158  const FiniteElement make(const VertexOrder&, ...);
160 
164  const FiniteElement make(const GeometryType&, ...);
166  const FiniteElement make(...);
167 
169 
170  };
171 
174  {
175  struct ImplementationDefined;
176  enum { implementationDefined };
177 
178  public:
180 
185  struct Traits
186  {
189 
191  typedef ImplementationDefined DomainField;
193  static const std::size_t dimDomainLocal = implementationDefined;
195  static const std::size_t dimDomainGlobal = implementationDefined;
197  typedef ImplementationDefined DomainLocal;
199  typedef ImplementationDefined DomainGlobal;
200 
202 
205 
207  typedef ImplementationDefined RangeField;
209  static const std::size_t dimRange = implementationDefined;
211  typedef ImplementationDefined Range;
212 
214 
216 
220  typedef ImplementationDefined Jacobian;
221 
223  static const std::size_t diffOrder = implementationDefined;
224  };
225 
227  std::size_t size () const;
229  std::size_t order () const;
230 
232  void evaluateFunction(const Traits::DomainLocal& in,
233  std::vector<Traits::Range>& out) const;
234 
236 
239  void evaluateJacobian(const Traits::DomainLocal& in,
240  std::vector<Traits::Jacobian>& out) const;
241 
243 
246  void evaluate
247  ( const std::array<std::size_t, Traits::dimDomainGlobal>& directions,
248  const Traits::DomainLocal& in,
249  std::vector<Traits::Range>& out) const;
250  };
251 
254  {
256 
260 
262 
271  template<typename F, typename C>
272  void interpolate (const F& f, std::vector<C>& out) const;
273  };
274 
276 
282  {
284  std::size_t size() const;
285 
287  const LocalKey& localKey(std::size_t i) const;
288  };
289 }
290 #endif // DUNE_LOCALFUNCTIONS_INTERFACE_HH
ImplementationDefined DomainGlobal
Type used for coordinate vectors in the world domain.
Definition: interface.hh:199
ImplementationDefined Basis
type of the Basis
Definition: interface.hh:40
Interface for global-valued finite elements.
Definition: interface.hh:23
types of component objects
Definition: interface.hh:32
Interface for global-valued coefficients.
Definition: interface.hh:281
std::size_t order() const
Polynomial order of the shape functions for quadrature.
Definition: brezzidouglasmarini1cube2dlocalbasis.hh:14
const LocalKey & localKey(std::size_t i) const
get i'th index
const Traits::Interpolation & interpolation() const
Extract interpolation of this finite element.
const Traits::Basis & basis() const
Extract basis of this finite element.
FiniteElementFactoryInterface(...)
Construct a finite element factory.
FiniteElementInterface(...)
Construct a finite element.
static const std::size_t dimDomainLocal
Dimension of the local coordinate system.
Definition: interface.hh:193
ImplementationDefined Interpolation
type of the Interpolation
Definition: interface.hh:54
BasisInterface::Traits Traits
Export basis traits.
Definition: interface.hh:259
void evaluateJacobian(const Traits::DomainLocal &in, std::vector< Traits::Jacobian > &out) const
Evaluate Jacobian of all shape functions at given position.
static const std::size_t diffOrder
maximum number of partial derivatives supported
Definition: interface.hh:223
void evaluateFunction(const Traits::DomainLocal &in, std::vector< Traits::Range > &out) const
Evaluate all shape functions at given position.
const Traits::Coefficients & coefficients() const
Extract coefficients of this finite element.
types of domain and range
Definition: interface.hh:185
Factory interface for global-valued finite elements.
Definition: interface.hh:113
GeometryType type() const
Extract geometry type of this finite element.
static const std::size_t dimDomainGlobal
Dimension of the world coordinate system.
Definition: interface.hh:195
Interface for global-valued interpolation.
Definition: interface.hh:253
ImplementationDefined Range
Type used for range values.
Definition: interface.hh:211
ImplementationDefined Jacobian
Jacobian properties.
Definition: interface.hh:220
ImplementationDefined FiniteElement
Type of the finite element.
Definition: interface.hh:115
ImplementationDefined DomainLocal
Type used for coordinate vectors in the local domain.
Definition: interface.hh:197
const FiniteElement make(const Geometry &, const VertexOrder &,...)
create a finite element from a geometry and a vertex ordering
ImplementationDefined Coefficients
type of the Coefficients
Definition: interface.hh:47
ImplementationDefined RangeField
Field type of the range.
Definition: interface.hh:207
std::size_t size() const
Number of shape functions.
void interpolate(const F &f, std::vector< C > &out) const
Determine coefficients interpolating a given function.
std::size_t size() const
number of coefficients
Interface for global-valued shape functions.
Definition: interface.hh:173
static const std::size_t dimRange
Dimension of the range values.
Definition: interface.hh:209
ImplementationDefined DomainField
Field type of the domain.
Definition: interface.hh:191
Describe position of one degree of freedom.
Definition: localkey.hh:21
void evaluate(const std::array< std::size_t, Traits::dimDomainGlobal > &directions, const Traits::DomainLocal &in, std::vector< Traits::Range > &out) const
Evaluate derivatives of all shape functions at given position.